@@ -32,7 +32,7 @@ router.use(logRequest);
3232
3333We also keep our own database of domains and their status, so we can return the status of the domain quickly if it has been checked before.
3434
35- * @tags Domain - Endpoints related to domain checking
35+ * @tags Domain - Endpoints for checking / reporting domains.
3636 * @security BearerAuth
3737 * @param {string } domain.query.required - Domain to check
3838 * @return {object } 200 - Success message
@@ -75,7 +75,7 @@ router.get("/check", authenticateToken, stripeMeter, async (req, res) => {
7575 return res
7676 . status ( 400 )
7777 . json (
78- "Invalid domain parameter, should be a top level domain. Ex: google.com, amazon.com"
78+ "Invalid domain parameter, should be a top level domain. Ex: google.com, amazon.com" ,
7979 ) ;
8080 }
8181
@@ -115,7 +115,7 @@ router.get("/check", authenticateToken, stripeMeter, async (req, res) => {
115115 phishObserverData ,
116116 urlScanData ,
117117 securitytrailsData ,
118- phishreportData
118+ phishreportData ,
119119 ) ;
120120
121121 if ( isPhish ) {
@@ -186,19 +186,36 @@ router.get("/check", authenticateToken, stripeMeter, async (req, res) => {
186186 }
187187} ) ;
188188
189+ /**
190+ * Classification Type
191+ * @typedef {string } ClassificationType
192+ * @enum {string}
193+ * @property {string } postal - postal
194+ * @property {string } banking - banking
195+ * @property {string } item_scams - item_scams
196+ * @property {string } other - other
197+ */
198+
199+ /**
200+ * Domain Classification Body
201+ * @typedef {object } DomainClassification
202+ * @property {string } domain.required - Domain to classify
203+ * @property {ClassificationTyoe } classification.required - Classification to assign to the domain - eg: postal, banking, item_scams, other
204+ */
205+
189206/**
190207 * PUT /domain/classify
191208 * @summary Classify a domain to specific types (scam, phishing, etc.)
192209 * @description Classify a domain to specific types (scam, phishing, etc.).
193210 The classification parameter should be one of the following: "postal", "banking", "item_scams", or "other".
211+ (Check the ClassificationType enum for more information) (see swagger ui)
194212
195213 This endpoint requires TRUSTED level access. To check if you have this access run /user/me with your token.
196214
197215 To request trusted level access or a new classification type, contact Jasper via email at jasper@phish.directory or via Slack.
198- * @tags Domain - Endpoints related to domain checking
216+ * @tags Domain - Endpoints for checking / reporting domains.
199217 * @security BearerAuth
200- * @body {string} domain - Domain to classify
201- * @body {string} classification - Classification to assign to the domain
218+ * @param {DomainClassification } request.body.required - Domain Classification Body
202219 * @return {object } 200 - Success message
203220 * @return {string } 400 - Error message
204221 * @example response - 200 - Success message
0 commit comments