From 66b09e2526715855510f84116dea03ecf29f3f93 Mon Sep 17 00:00:00 2001 From: Logan Ralston Date: Fri, 22 Jan 2021 21:07:44 -0500 Subject: [PATCH 01/33] release: version 3.1.2 (#689) * feat: Hacker location fields (#687) * feat: add additional optional fields for hacker location * feat: update documentation to include hacker location * feat: update emails and bump version Co-authored-by: Tony <36376980+Tony9984@users.noreply.github.com> --- assets/email/statusEmail/Accepted.hbs | 13 +- assets/email/statusEmail/Confirmed.hbs | 24 +- assets/email/statusEmail/Declined.hbs | 9 +- docs/api/api_data.js | 4151 +++++++++++++++++++- docs/api/api_data.json | 4151 +++++++++++++++++++- middlewares/validators/hacker.validator.js | 10 +- models/hacker.model.js | 16 +- package.json | 2 +- routes/api/hacker.js | 30 + 9 files changed, 8361 insertions(+), 45 deletions(-) diff --git a/assets/email/statusEmail/Accepted.hbs b/assets/email/statusEmail/Accepted.hbs index 6501edc4..a586300a 100644 --- a/assets/email/statusEmail/Accepted.hbs +++ b/assets/email/statusEmail/Accepted.hbs @@ -390,20 +390,9 @@ We’re thrilled to offer you a spot at McHacks! We can't wait to see what you create with us this year.

- Here are your next steps: -

Confirm your attendance on our hacker - dashboard no later than January 20th at 11:59PM EST. -

- Join the McHacks participants Facebook - group and Slack - for announcements, to chat with other hackers, ask questions, and form - teams! + dashboard no later than January 25th at 11:59PM EST.

If you can no longer attend McHacks, please let us know as soon as possible by withdrawing your application on our Hi, {{firstName}},

- Thanks for confirming your attendance and securing your spot at McHacks! + Thanks for confirming your attendance for McHacks! We hope you’re just + as excited as we are. Keep an eye out for our week-of email with more + details regarding McHacks. Happy hacking!

- Don't forget to join the McHacks participants
Facebook - group and Slack - for announcements, to chat with other hackers, ask questions, and form - teams! -

- If plans change and you can no longer attend McHacks, please let us know - as soon as - possible by withdrawing your application on our hacker - dashboard so we can pass your spot along to someone else. -

- In the meantime, follow us on Facebook, Twitter, and Instagram - for important updates and news about McHacks! If you have any questions, + for important updates about McHacks! If you have any questions, feel free to reach out at contact@mchacks.ca.

diff --git a/assets/email/statusEmail/Declined.hbs b/assets/email/statusEmail/Declined.hbs index 92b1c326..c4d682b9 100644 --- a/assets/email/statusEmail/Declined.hbs +++ b/assets/email/statusEmail/Declined.hbs @@ -394,24 +394,17 @@ unfortunately can't accept everyone. We hope you understand and encourage you to apply again in the future.

- If you’re still interested in attending McHacks, we’ve opened up our volunteer - applications as well. -

Follow us on Facebook, Twitter, and Instagram - for important updates and news about McHacks. + for important updates about McHacks.

If you have any questions, feel free to reach out at contact@mchacks.ca. -

- We hope to see you next year!

diff --git a/docs/api/api_data.js b/docs/api/api_data.js index ca4aee3b..25e0c5a6 100644 --- a/docs/api/api_data.js +++ b/docs/api/api_data.js @@ -1 +1,4150 @@ -define({ "api": [ { "type": "post", "url": "/account/", "title": "create a new account", "name": "create", "group": "Account", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": false, "field": "firstName", "description": "

First name of the account creator.

" }, { "group": "body", "type": "String", "optional": false, "field": "lastName", "description": "

Last name of the account creator.

" }, { "group": "body", "type": "String", "optional": false, "field": "pronoun", "description": "

the pronoun of the account creator.

" }, { "group": "body", "type": "String", "optional": false, "field": "email", "description": "

Email of the account.

" }, { "group": "body", "type": "String", "optional": false, "field": "gender", "description": "

Gender of the account creator.

" }, { "group": "body", "type": "String[]", "optional": false, "field": "dietaryRestrictions", "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" }, { "group": "body", "type": "String", "optional": false, "field": "password", "description": "

The password of the account.

" }, { "group": "body", "type": "String", "optional": false, "field": "birthDate", "description": "

a Date parsable string.

" }, { "group": "body", "type": "Number", "optional": true, "field": "phoneNumber", "description": "

the user's phone number, represented as a string.

" } ], "header": [ { "group": "header", "type": "JWT", "optional": true, "field": "token", "description": "

the user's invite token.

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"password\":\"hunter2\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":\"10/30/1997\"\n}", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account creation successful\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\n \"message\": \"Account already exists\", \n \"data\": {\n \"route\": \"/\"\n }\n}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/" } ] }, { "type": "get", "url": "/account/:id", "title": "gets information from an account with mongoid ':id'", "name": "getAccount", "group": "Account", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

MongoId of an account

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account found by user id\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Account not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/:id" } ] }, { "type": "get", "url": "/account/invite", "title": "Get all of the invites.", "name": "getAllInvites", "group": "Account", "version": "0.0.8", "description": "

Get all of the invites that currently exist in the database.

", "success": { "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Invite retrieval successful.\", \n \"data\": [{\n \"email\":\"abc@def.com\",\n \"accountType\":\"Hacker\"\n }]\n }", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/invite" } ] }, { "type": "post", "url": "/account/invite", "title": "invites a user to create an account with the specified accountType", "name": "inviteAccount", "group": "Account", "version": "0.0.8", "description": "

sends link with token to be used with the account/create route

", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": true, "field": "email", "description": "

email of the account to be created and where to send the link

" }, { "group": "body", "type": "String", "optional": true, "field": "accountType", "description": "

the type of the account which the user can create, for sponsor this should specify tier as well

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully invited user\", \n \"data\": {}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

Error object

" } ] }, "examples": [ { "title": "Error-Response:", "content": "{\n \"message\": \"Invalid Authentication\",\n \"data\": {\n \"route\": \"/invite\"\n }\n }", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/invite" } ] }, { "type": "get", "url": "/account/self", "title": "get information about own account", "name": "self", "group": "Account", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account found by user email\", \n \"data\": {\n \t\"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty object

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Account not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/self" } ] }, { "type": "patch", "url": "/account/:id", "title": "update an account's information", "name": "updateOneUser", "group": "Account", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": true, "field": "firstName", "description": "

First name of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "lastName", "description": "

Last name of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "pronoun", "description": "

The pronoun of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "email", "description": "

Email of the account.

" }, { "group": "body", "type": "String", "optional": true, "field": "gender", "description": "

Gender of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "birthDate", "description": "

A Date parsable string.

" }, { "group": "body", "type": "Number", "optional": true, "field": "phoneNumber", "description": "

The user's phone number, represented as a string.

" }, { "group": "body", "type": "String[]", "optional": true, "field": "dietaryRestrictions", "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"gender\": \"Male\" }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account update successful.\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\": \"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while updating account\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/:id" } ] }, { "type": "patch", "url": "/auth/password/change", "title": "change password for logged in user", "name": "changePassword", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "oldPassword", "description": "

The current password of the user

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "newPassword", "description": "

The new password of the user

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{\n \"oldPassword\": \"password12345\",\n \"newPassword\": \"password123456\"\n}", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", "type": "json" } ] }, "permission": [ { "name": ": Must be logged in" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/password/change" } ] }, { "type": "post", "url": "/auth/confirm/:token", "title": "confirm account using the JWT in :token", "name": "confirmAccount", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "JWT", "description": "

for confirming the account

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully confirmed account\", \"data\": {}}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response:", "content": "{\"message\": \"Invalid token for confirming account, \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/confirm/:token" } ] }, { "type": "post", "url": "/auth/password/forgot", "title": "forgot password route", "name": "forgotPassword", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "email", "description": "

the email address of the account

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"email\": \"myemail@mchacks.ca\" }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Sent reset email\", \"data\": {}}", "type": "json" } ] }, "permission": [ { "name": ": public" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/password/forgot" } ] }, { "type": "get", "url": "/auth/rolebindings/:id", "title": "retrieve rolebindings for a user given by their user id :id", "name": "getRoleBindings", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

MongoId of an account

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Rolebindings object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Role Bindings not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/rolebindings/:id" } ] }, { "type": "get", "url": "/auth/roles", "title": "get roles", "name": "getRoles", "description": "

get all roles that exist in the database

", "group": "Authentication", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Sucessfully retrieved all roles\", \"data\":\n[{name: \"GodStaff\", routes: Array(27), id: \"5bee20ef3ca9dd4754382880\"},\n {name: \"Hacker\", routes: Array(10), id: \"5bee20ef3ca9dd4754382881\"},\n {name: \"Volunteer\", routes: Array(4), id: \"5bee20ef3ca9dd4754382882\"}]", "type": "json" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/roles" } ] }, { "type": "post", "url": "/auth/login", "title": "login to the service", "name": "login", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "string", "optional": false, "field": "email", "description": "

Account email

" }, { "group": "Parameter", "type": "string", "optional": false, "field": "password", "description": "

Account password

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\"message\": \"Successfully logged in\", \"data\": {}}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Invalid Authentication\", \"data\": {}}", "type": "object" } ] }, "permission": [ { "name": ": public" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/login" } ] }, { "type": "get", "url": "/auth/logout", "title": "logout of service", "name": "logout", "group": "Authentication", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully logged out\", \"data\": {}}", "type": "object" } ] }, "permission": [ { "name": ": public" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/logout" } ] }, { "type": "get", "url": "/auth/confirm/resend", "title": "resend confirmation token", "name": "resendConfirmAccount", "group": "Authentication", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully resent confirmation email\", \"data\": {}}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response:", "content": " HTTP/1.1 422\n{\"message\": \"Account already confirmed\", \"data\": {}}", "type": "json" }, { "title": "Error-Response:", "content": " HTTP/1.1 428\n{\"message\": \"Account confirmation token does not exist\", \"data\": {}}", "type": "json" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/confirm/resend" } ] }, { "type": "post", "url": "/auth/password/reset", "title": "reset password", "name": "resetPassword", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "password", "description": "

the password of the account

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"password\": \"hunter2\" }", "type": "json" } ] }, "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Authentication", "description": "

the token that was provided in the reset password email

" } ] }, "examples": [ { "title": "Header-Example:", "content": "{\n \"X-Reset-Token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n}", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", "type": "json" } ] }, "permission": [ { "name": ": must have authentication token" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/password/reset" } ] }, { "type": "patch", "url": "/hacker/batchAccept/", "title": "accept array of Hackers", "name": "acceptHacker", "group": "Hacker", "version": "3.0.0", "parameter": { "fields": { "body) {{ids: ObjectId[]}} Array of id(s": [ { "group": "body) {{ids: ObjectId[]}} Array of id(s", "optional": false, "field": "that", "description": "

needed to be accepted

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

success_ids array and errors array. Errors array will contain a detailed error for why the batch update for a given ID did not work

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker batch update successful.\",\n \"data\": {\n \"success_ids\": [\"id1\", \"id2\"]\n \"errors\": [{status: 404, message: \"ACCOUNT_NOT_FOUND\", account: null, hacker_id: \"id3\"}]\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/batchAccept/" } ] }, { "type": "patch", "url": "/hacker/acceptEmail/:email", "title": "accept a Hacker by email", "name": "acceptHacker", "group": "Hacker", "version": "2.0.0", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/acceptEmail/:email" } ] }, { "type": "patch", "url": "/hacker/accept/:id", "title": "accept a Hacker", "name": "acceptHacker", "group": "Hacker", "version": "2.0.0", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/accept/:id" } ] }, { "type": "patch", "url": "/hacker/checkin/:id", "title": "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.", "name": "checkinHacker", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

Check-in status. "Checked-in"

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Checked-in\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" }, { "name": "Volunteer" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/checkin/:id" } ] }, { "type": "post", "url": "/hacker/", "title": "create a new hacker", "name": "createHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

ObjectID of the respective account

" }, { "group": "body", "type": "String", "optional": false, "field": "school", "description": "

Name of the school the hacker goes to

" }, { "group": "body", "type": "String", "optional": false, "field": "gender", "description": "

Gender of the hacker

" }, { "group": "body", "type": "Number", "optional": false, "field": "travel", "description": "

Whether the hacker requires a bus for transportation

" }, { "group": "body", "type": "String[]", "optional": false, "field": "ethnicity", "description": "

the ethnicities of the hacker

" }, { "group": "body", "type": "String[]", "optional": false, "field": "major", "description": "

the major of the hacker

" }, { "group": "body", "type": "Number", "optional": false, "field": "graduationYear", "description": "

the graduation year of the hacker

" }, { "group": "body", "type": "Boolean", "optional": false, "field": "codeOfConduct", "description": "

acceptance of the code of conduct

" }, { "group": "body", "type": "Json", "optional": false, "field": "application", "description": "

The hacker's application. Resume and jobInterest fields are required.

" } ] }, "examples": [ { "title": "application: ", "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}", "type": "Json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Hacker creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating hacker\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/" } ] }, { "type": "get", "url": "/hacker/:id", "title": "get a hacker's information", "name": "getHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "id", "description": "

a hacker's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Hacker not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/:id" } ] }, { "type": "get", "url": "/hacker/email/:email", "title": "get a hacker's information", "name": "getHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "email", "description": "

a hacker's unique email

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Hacker not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/:email" } ] }, { "type": "get", "url": "/hacker/resume:id", "title": "get the resume for a hacker.", "name": "getHackerResume", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

Hacker id

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" } ] }, "examples": [ { "title": "Success-Response:", "content": "HTTP/1.1 200 OK\n{\n message: \"Downloaded resume\",\n data: {\n id: \"507f191e810c19729de860ea\",\n resume: [Buffer]\n }\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

"Resume does not exist"

" } ] }, "examples": [ { "title": "Error-Response:", "content": "HTTP/1.1 404\n{\n message: \"Resume not found\",\n data: {}\n}", "type": "json" } ] }, "permission": [ { "name": "Must be logged in, and the account id must be linked to the hacker." } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker" }, { "type": "get", "url": "/hacker/stats", "title": "Gets the stats of all of the hackers who have applied.", "name": "getHackerStats", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "query": [ { "group": "query", "type": "String", "optional": false, "field": "model", "description": "

the model to be searched (Only hacker supported)

" }, { "group": "query", "type": "Array", "optional": false, "field": "q", "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Retrieved stats\",\n \"data\": {\n \"stats\" : {\n \"total\": 10,\n \"status\": { \"Applied\": 10 },\n \"school\": { \"McGill University\": 3, \"Harvard University\": 7 },\n degree: { \"Undergraduate\": 10 },\n gender: { \"Male\": 1, \"Female\": 9 },\n travel: { \"true\": 7, \"false\": 3 },\n ethnicity: { \"White\": 10, },\n jobInterest: { \"Internship\": 10 },\n major: { \"Computer Science\": 10 },\n graduationYear: { \"2019\": 10 },\n dietaryRestrictions: { \"None\": 10 },\n shirtSize: { \"M\": 3, \"XL\": 7 },\n age: { \"22\": 10 }\n }\n }\n}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/stats" } ] }, { "type": "patch", "url": "/hacker/:id", "title": "update a hacker's information.", "description": "

This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.

", "name": "patchHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": true, "field": "school", "description": "

Name of the school the hacker goes to

" }, { "group": "body", "type": "String", "optional": true, "field": "gender", "description": "

Gender of the hacker

" }, { "group": "body", "type": "Number", "optional": true, "field": "travel", "description": "

How much the hacker requires a bus for transportation

" }, { "group": "body", "type": "String[]", "optional": true, "field": "ethnicity", "description": "

the ethnicities of the hacker

" }, { "group": "body", "type": "String[]", "optional": true, "field": "major", "description": "

the major of the hacker

" }, { "group": "body", "type": "Number", "optional": true, "field": "graduationYear", "description": "

the graduation year of the hacker

" }, { "group": "body", "type": "Json", "optional": true, "field": "application", "description": "

The hacker's application

" } ] }, "examples": [ { "title": "application: ", "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }", "type": "Json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Changed hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while updating hacker\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/:id" } ] }, { "type": "patch", "url": "/hacker/confirmation/:id", "title": "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.", "name": "patchHackerConfirmed", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

The new status of the hacker. "Accepted", "Confirmed", or "Withdrawn"

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Confirmed\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" }, { "name": "Hacker" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/confirmation/:id" } ] }, { "type": "patch", "url": "/hacker/status/:id", "title": "update a hacker's status", "name": "patchHackerStatus", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

Status of the hacker's application ("None"|"Applied"|"Accepted"|"Declined"|"Waitlisted"|"Confirmed"|"Withdrawn"|"Checked-in")

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/status/:id" } ] }, { "type": "post", "url": "/hacker/resume/:id", "title": "upload or update resume for a hacker.", "name": "postHackerResume", "group": "Hacker", "version": "0.0.8", "description": "

NOTE: This must be sent via multipart/form-data POST request

", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

Hacker id

" } ], "body": [ { "group": "body", "type": "File", "optional": false, "field": "resume", "description": "

The uploaded file.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Location in the bucket that the file was stored.

" } ] }, "examples": [ { "title": "Success-Response:", "content": "HTTP/1.1 200 OK\n{\n message: \"Uploaded resume\",\n data: {\n filename: \"resumes/1535032624768-507f191e810c19729de860ea\"\n }\n}", "type": "json" } ] }, "permission": [ { "name": "Must be logged in, and the account id must be linked to the hacker." } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/resume/:id" } ] }, { "type": "post", "url": "/hacker/email/dayOf/:id", "title": "", "description": "

Sends a hacker the day-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", "name": "postHackerSendDayOfEmail", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": true, "field": "status", "description": "

The hacker ID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker day-of email sent.\",\n \"data\": {}\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/dayOf/:id" } ] }, { "type": "post", "url": "/hacker/email/weekOf/:id", "title": "", "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", "name": "postHackerSendWeekOfEmail", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": true, "field": "status", "description": "

The hacker ID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" } ] }, { "type": "post", "url": "/hacker/email/weekOf/:id", "title": "", "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.

", "name": "postHackerSendWeekOfEmail", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": true, "field": "status", "description": "

The hacker ID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" } ] }, { "type": "get", "url": "/sponsor/self", "title": "get information about logged in sponsor", "name": "self", "group": "Hacker", "version": "1.4.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", "type": "object" } ] }, "permission": [ { "name": ": Sponsor" } ], "filename": "routes/api/sponsor.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/self" } ] }, { "type": "get", "url": "/hacker/self", "title": "get information about own hacker", "name": "self", "group": "Hacker", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Hacker found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":[\"Accounting\"],\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n } \n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Hacker not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/self" } ] }, { "type": "get", "url": "/", "title": "version", "version": "0.0.8", "name": "index", "group": "Index", "permission": [ { "name": "public" } ], "filename": "routes/index.js", "groupTitle": "Index", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/" } ] }, { "type": "post", "url": "/api/role/", "title": "create a new role", "name": "createRole", "group": "Role", "version": "1.1.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": false, "field": "name", "description": "

Name of the route

" }, { "group": "body", "type": "Route[]", "optional": false, "field": "routes", "description": "

The routes that this role gives access to

" } ] }, "examples": [ { "title": "application: ", "content": "{\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n}", "type": "Json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Role object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Role creation successful\", \n \"data\": {\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating role\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/role.js", "groupTitle": "Role", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/api/role/" } ] }, { "type": "get", "url": "/search/", "title": "provide a specific query for any defined model", "name": "search", "group": "Search", "version": "0.0.8", "parameter": { "fields": { "query": [ { "group": "query", "type": "String", "optional": false, "field": "model", "description": "

the model to be searched

" }, { "group": "query", "type": "Array", "optional": false, "field": "q", "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" }, { "group": "query", "type": "String", "optional": false, "field": "sort", "description": "

either "asc" or "desc"

" }, { "group": "query", "type": "number", "optional": false, "field": "page", "description": "

the page number that you would like

" }, { "group": "query", "type": "number", "optional": false, "field": "limit", "description": "

the maximum number of results that you would like returned

" }, { "group": "query", "type": "any", "optional": false, "field": "sort_by", "description": "

any parameter you want to sort the results by

" }, { "group": "query", "type": "boolean", "optional": false, "field": "expand", "description": "

whether you want to expand sub documents within the results

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Results

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Successfully executed query, returning all results\",\n \"data\": [\n {...}\n ]\n }", "type": "object" }, { "title": "Success-Response:", "content": "{\n \"message\": \"No results found.\",\n \"data\": {}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response:", "content": "{\"message\": \"Validation failed\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/search.js", "groupTitle": "Search", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/search/" } ] }, { "type": "get", "url": "/settings/", "title": "Get the settings for the current hackathon", "name": "getSettings", "group": "Settings", "version": "1.1.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Settings Object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Settings creation successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: false\n }\n }\n}", "type": "object" } ] }, "permission": [ { "name": "public" } ], "filename": "routes/api/settings.js", "groupTitle": "Settings", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/settings/" } ] }, { "type": "patch", "url": "/settings/", "title": "Patch the settings for the current hackathon", "name": "patchSettings", "group": "Settings", "version": "1.1.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "Date", "optional": true, "field": "openTime", "description": "

The opening time for the hackathon.

" }, { "group": "body", "type": "Date", "optional": true, "field": "closeTime", "description": "

The closing time for the hackathon.

" }, { "group": "body", "type": "Date", "optional": true, "field": "confirmTime", "description": "

The deadline for confirmation for the hackathon.

" }, { "group": "body", "type": "Boolean", "optional": true, "field": "isRemote", "description": "

Whether this hackathon is remote or not.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Settings Object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Settings patch successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: true\n }\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrators" } ], "filename": "routes/api/settings.js", "groupTitle": "Settings", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/settings/" } ] }, { "type": "post", "url": "/sponsor/", "title": "create a new sponsor", "name": "createSponsor", "group": "Sponsor", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

ObjectID of the respective account.

" }, { "group": "body", "type": "Number", "optional": false, "field": "tier", "description": "

Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.

" }, { "group": "body", "type": "String", "optional": false, "field": "company", "description": "

Name of the company.

" }, { "group": "body", "type": "String", "optional": false, "field": "contractURL", "description": "

URL link to the contract with the company.

" }, { "group": "body", "type": "MongoID[]", "optional": false, "field": "nominees", "description": "

Array of accounts that the company wish to nominate as hackers.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Sponsor creation successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating sponsor\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/sponsor.js", "groupTitle": "Sponsor", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/" } ] }, { "type": "get", "url": "/sponsor/:id", "title": "get a sponsor's information", "name": "getSponsor", "group": "Sponsor", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": false, "field": "id", "description": "

a sponsor's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/sponsor.js", "groupTitle": "Sponsor", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/:id" } ] }, { "type": "patch", "url": "/sponsor/", "title": "update a sponsor", "name": "patchSponsor", "group": "Sponsor", "version": "1.3.0", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

ObjectID of the sponsor

" } ], "body": [ { "group": "body", "type": "String", "optional": false, "field": "company", "description": "

Name of the company.

" }, { "group": "body", "type": "String", "optional": false, "field": "contractURL", "description": "

URL link to the contract with the company.

" }, { "group": "body", "type": "ObjectId[]", "optional": false, "field": "nominees", "description": "

Array of accounts that the company wish to nominate as hackers.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Sponsor update successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while updating sponsor\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/sponsor.js", "groupTitle": "Sponsor", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/" } ] }, { "type": "post", "url": "/team/", "title": "create a new team consisting of only the logged in user", "name": "createTeam", "group": "Team", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": false, "field": "name", "description": "

Name of the team.

" }, { "group": "body", "type": "String", "optional": true, "field": "devpostURL", "description": "

Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.

" }, { "group": "body", "type": "String", "optional": true, "field": "projectName", "description": "

Name of the team.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Team object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Team creation successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating team\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/" } ] }, { "type": "patch", "url": "/team/leave/", "title": "Allows a logged in hacker to leave current team", "name": "deleteSelfFromTeam", "group": "Team", "version": "1.1.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

{}

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Removal from team successful.\",\n \"data\": {}\n}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/leave/" } ] }, { "type": "get", "url": "/team/:id", "title": "get a team's information", "name": "getTeam", "group": "Team", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

MongoId of the team

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Team object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Team retrieval successful\", \n \"data\": { \n \"team\": {\n \"name\":\"foo\",\n \"members\": [\n ObjectId('...')\n ],\n \"devpostURL\": \"www.devpost.com/foo\",\n \"projectName\": \"fooey\"\n },\n \"members\": [\n {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\"\n }\n ],\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Team not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/:id" } ] }, { "type": "patch", "url": "/team/join/", "title": "Allows a logged in hacker to join a team by name", "name": "patchJoinTeam", "group": "Team", "version": "1.1.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "name", "description": "

Name of the team to join

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

{}

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Team join successful.\",\n \"data\": {}\n}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/join/" } ] }, { "type": "patch", "url": "/team/:hackerId", "title": "Update a team's information. The team is specified by the hacker belonging to it.", "name": "patchTeam", "group": "Team", "version": "0.0.8", "description": "

We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId

", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "hackerId", "description": "

a hacker's unique Id

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Team object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Team update successful.\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

Query input that caused the error.

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Team not found\", \"data\": {teamId}}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/:hackerId" } ] }, { "type": "post", "url": "/travel/", "title": "create a new travel", "name": "createTravel", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

ObjectID of the respective account

" }, { "group": "body", "type": "MongoID", "optional": false, "field": "hackerId", "description": "

ObjectID of the respective hacker

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Travel creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"None\",\n \"request\": 50,\n \"offer\": 0\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating travel\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/" } ] }, { "type": "get", "url": "/travel/email/:email", "title": "get a travel's information", "name": "getTravel", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "email", "description": "

a travel's unique email

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Travel not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/email/:email" } ] }, { "type": "get", "url": "/travel/:id", "title": "get a traveler's information", "name": "getTravel", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "id", "description": "

a travel's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Travel not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/:id" } ] }, { "type": "patch", "url": "/travel/offer/:id", "title": "update a traveler's offer", "name": "patchTravelOffer", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "number", "optional": true, "field": "offer", "description": "

Amount of money offered for travel

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"offer\": 75\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/offer/:id" } ] }, { "type": "patch", "url": "/travel/status/:id", "title": "update a traveler's status", "name": "patchTravelStatus", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

Status of the travel's reimbursement ("None"|"Bus"|"Offered"|"Valid"|"Invalid"|"Claimed")

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/status/:id" } ] }, { "type": "get", "url": "/travel/self", "title": "get information about own hacker's travel", "name": "self", "group": "Travel", "version": "2.0.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Travel found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Claimed\"\n \"request\": 90,\n \"offer\": 80\n } \n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Travel not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/self" } ] }, { "type": "post", "url": "/volunteer/", "title": "create a new volunteer", "name": "createVolunteer", "group": "Volunteer", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

MongoID of the account of the volunteer

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Volunteer object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Volunteer creation successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating volunteer\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/volunteer.js", "groupTitle": "Volunteer", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/volunteer/" } ] }, { "type": "get", "url": "/volunteer/:id", "title": "get a volunteer's information", "name": "getVolunteer", "group": "Volunteer", "version": "1.3.0", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

a volunteer's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Volunteer object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Volunteer not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/volunteer.js", "groupTitle": "Volunteer", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/volunteer/:id" } ] } ] }); +define({ "api": [ + { + "type": "post", + "url": "/account/", + "title": "create a new account", + "name": "create", + "group": "Account", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "firstName", + "description": "

First name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "lastName", + "description": "

Last name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "pronoun", + "description": "

the pronoun of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "email", + "description": "

Email of the account.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "gender", + "description": "

Gender of the account creator.

" + }, + { + "group": "body", + "type": "String[]", + "optional": false, + "field": "dietaryRestrictions", + "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "password", + "description": "

The password of the account.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "birthDate", + "description": "

a Date parsable string.

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "phoneNumber", + "description": "

the user's phone number, represented as a string.

" + } + ], + "header": [ + { + "group": "header", + "type": "JWT", + "optional": true, + "field": "token", + "description": "

the user's invite token.

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"password\":\"hunter2\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":\"10/30/1997\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account creation successful\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\n \"message\": \"Account already exists\", \n \"data\": {\n \"route\": \"/\"\n }\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/" + } + ] + }, + { + "type": "get", + "url": "/account/:id", + "title": "gets information from an account with mongoid ':id'", + "name": "getAccount", + "group": "Account", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

MongoId of an account

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account found by user id\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Account not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/:id" + } + ] + }, + { + "type": "get", + "url": "/account/invite", + "title": "Get all of the invites.", + "name": "getAllInvites", + "group": "Account", + "version": "0.0.8", + "description": "

Get all of the invites that currently exist in the database.

", + "success": { + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Invite retrieval successful.\", \n \"data\": [{\n \"email\":\"abc@def.com\",\n \"accountType\":\"Hacker\"\n }]\n }", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/invite" + } + ] + }, + { + "type": "post", + "url": "/account/invite", + "title": "invites a user to create an account with the specified accountType", + "name": "inviteAccount", + "group": "Account", + "version": "0.0.8", + "description": "

sends link with token to be used with the account/create route

", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": true, + "field": "email", + "description": "

email of the account to be created and where to send the link

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "accountType", + "description": "

the type of the account which the user can create, for sponsor this should specify tier as well

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully invited user\", \n \"data\": {}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

Error object

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "{\n \"message\": \"Invalid Authentication\",\n \"data\": {\n \"route\": \"/invite\"\n }\n }", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/invite" + } + ] + }, + { + "type": "get", + "url": "/account/self", + "title": "get information about own account", + "name": "self", + "group": "Account", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account found by user email\", \n \"data\": {\n \t\"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty object

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Account not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/self" + } + ] + }, + { + "type": "patch", + "url": "/account/:id", + "title": "update an account's information", + "name": "updateOneUser", + "group": "Account", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": true, + "field": "firstName", + "description": "

First name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "lastName", + "description": "

Last name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "pronoun", + "description": "

The pronoun of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "email", + "description": "

Email of the account.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "gender", + "description": "

Gender of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "birthDate", + "description": "

A Date parsable string.

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "phoneNumber", + "description": "

The user's phone number, represented as a string.

" + }, + { + "group": "body", + "type": "String[]", + "optional": true, + "field": "dietaryRestrictions", + "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \"gender\": \"Male\" }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account update successful.\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\": \"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while updating account\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/:id" + } + ] + }, + { + "type": "patch", + "url": "/auth/password/change", + "title": "change password for logged in user", + "name": "changePassword", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "oldPassword", + "description": "

The current password of the user

" + }, + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "newPassword", + "description": "

The new password of the user

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{\n \"oldPassword\": \"password12345\",\n \"newPassword\": \"password123456\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": ": Must be logged in" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/password/change" + } + ] + }, + { + "type": "post", + "url": "/auth/confirm/:token", + "title": "confirm account using the JWT in :token", + "name": "confirmAccount", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "JWT", + "description": "

for confirming the account

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully confirmed account\", \"data\": {}}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "{\"message\": \"Invalid token for confirming account, \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/confirm/:token" + } + ] + }, + { + "type": "post", + "url": "/auth/password/forgot", + "title": "forgot password route", + "name": "forgotPassword", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "email", + "description": "

the email address of the account

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \"email\": \"myemail@mchacks.ca\" }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Sent reset email\", \"data\": {}}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": ": public" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/password/forgot" + } + ] + }, + { + "type": "get", + "url": "/auth/rolebindings/:id", + "title": "retrieve rolebindings for a user given by their user id :id", + "name": "getRoleBindings", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

MongoId of an account

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Rolebindings object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Role Bindings not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/rolebindings/:id" + } + ] + }, + { + "type": "get", + "url": "/auth/roles", + "title": "get roles", + "name": "getRoles", + "description": "

get all roles that exist in the database

", + "group": "Authentication", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Sucessfully retrieved all roles\", \"data\":\n[{name: \"GodStaff\", routes: Array(27), id: \"5bee20ef3ca9dd4754382880\"},\n {name: \"Hacker\", routes: Array(10), id: \"5bee20ef3ca9dd4754382881\"},\n {name: \"Volunteer\", routes: Array(4), id: \"5bee20ef3ca9dd4754382882\"}]", + "type": "json" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/roles" + } + ] + }, + { + "type": "post", + "url": "/auth/login", + "title": "login to the service", + "name": "login", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "string", + "optional": false, + "field": "email", + "description": "

Account email

" + }, + { + "group": "Parameter", + "type": "string", + "optional": false, + "field": "password", + "description": "

Account password

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\"message\": \"Successfully logged in\", \"data\": {}}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Invalid Authentication\", \"data\": {}}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": ": public" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/login" + } + ] + }, + { + "type": "get", + "url": "/auth/logout", + "title": "logout of service", + "name": "logout", + "group": "Authentication", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully logged out\", \"data\": {}}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": ": public" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/logout" + } + ] + }, + { + "type": "get", + "url": "/auth/confirm/resend", + "title": "resend confirmation token", + "name": "resendConfirmAccount", + "group": "Authentication", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully resent confirmation email\", \"data\": {}}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": " HTTP/1.1 422\n{\"message\": \"Account already confirmed\", \"data\": {}}", + "type": "json" + }, + { + "title": "Error-Response:", + "content": " HTTP/1.1 428\n{\"message\": \"Account confirmation token does not exist\", \"data\": {}}", + "type": "json" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/confirm/resend" + } + ] + }, + { + "type": "post", + "url": "/auth/password/reset", + "title": "reset password", + "name": "resetPassword", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "password", + "description": "

the password of the account

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \"password\": \"hunter2\" }", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "

the token that was provided in the reset password email

" + } + ] + }, + "examples": [ + { + "title": "Header-Example:", + "content": "{\n \"X-Reset-Token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": ": must have authentication token" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/password/reset" + } + ] + }, + { + "type": "patch", + "url": "/hacker/batchAccept/", + "title": "accept array of Hackers", + "name": "acceptHacker", + "group": "Hacker", + "version": "3.0.0", + "parameter": { + "fields": { + "body) {{ids: ObjectId[]}} Array of id(s": [ + { + "group": "body) {{ids: ObjectId[]}} Array of id(s", + "optional": false, + "field": "that", + "description": "

needed to be accepted

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

success_ids array and errors array. Errors array will contain a detailed error for why the batch update for a given ID did not work

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker batch update successful.\",\n \"data\": {\n \"success_ids\": [\"id1\", \"id2\"]\n \"errors\": [{status: 404, message: \"ACCOUNT_NOT_FOUND\", account: null, hacker_id: \"id3\"}]\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/batchAccept/" + } + ] + }, + { + "type": "patch", + "url": "/hacker/acceptEmail/:email", + "title": "accept a Hacker by email", + "name": "acceptHacker", + "group": "Hacker", + "version": "2.0.0", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/acceptEmail/:email" + } + ] + }, + { + "type": "patch", + "url": "/hacker/accept/:id", + "title": "accept a Hacker", + "name": "acceptHacker", + "group": "Hacker", + "version": "2.0.0", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/accept/:id" + } + ] + }, + { + "type": "patch", + "url": "/hacker/checkin/:id", + "title": "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.", + "name": "checkinHacker", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

Check-in status. "Checked-in"

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Checked-in\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + }, + { + "name": "Volunteer" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/checkin/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/", + "title": "create a new hacker", + "name": "createHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

ObjectID of the respective account

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "school", + "description": "

Name of the school the hacker goes to

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "gender", + "description": "

Gender of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": false, + "field": "travel", + "description": "

Whether the hacker requires a bus for transportation

" + }, + { + "group": "body", + "type": "String[]", + "optional": false, + "field": "ethnicity", + "description": "

the ethnicities of the hacker

" + }, + { + "group": "body", + "type": "String[]", + "optional": false, + "field": "major", + "description": "

the major of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": false, + "field": "graduationYear", + "description": "

the graduation year of the hacker

" + }, + { + "group": "body", + "type": "Boolean", + "optional": false, + "field": "codeOfConduct", + "description": "

acceptance of the code of conduct

" + }, + { + "group": "body", + "type": "Json", + "optional": false, + "field": "application", + "description": "

The hacker's application. Resume and jobInterest fields are required.

" + } + ] + }, + "examples": [ + { + "title": "application: ", + "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n}", + "type": "Json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Hacker creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating hacker\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/" + } + ] + }, + { + "type": "get", + "url": "/hacker/:id", + "title": "get a hacker's information", + "name": "getHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "id", + "description": "

a hacker's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Hacker not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/:id" + } + ] + }, + { + "type": "get", + "url": "/hacker/email/:email", + "title": "get a hacker's information", + "name": "getHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "email", + "description": "

a hacker's unique email

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Hacker not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/:email" + } + ] + }, + { + "type": "get", + "url": "/hacker/resume:id", + "title": "get the resume for a hacker.", + "name": "getHackerResume", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

Hacker id

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n message: \"Downloaded resume\",\n data: {\n id: \"507f191e810c19729de860ea\",\n resume: [Buffer]\n }\n}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

"Resume does not exist"

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "HTTP/1.1 404\n{\n message: \"Resume not found\",\n data: {}\n}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": "Must be logged in, and the account id must be linked to the hacker." + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker" + }, + { + "type": "get", + "url": "/hacker/stats", + "title": "Gets the stats of all of the hackers who have applied.", + "name": "getHackerStats", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "query": [ + { + "group": "query", + "type": "String", + "optional": false, + "field": "model", + "description": "

the model to be searched (Only hacker supported)

" + }, + { + "group": "query", + "type": "Array", + "optional": false, + "field": "q", + "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Retrieved stats\",\n \"data\": {\n \"stats\" : {\n \"total\": 10,\n \"status\": { \"Applied\": 10 },\n \"school\": { \"McGill University\": 3, \"Harvard University\": 7 },\n degree: { \"Undergraduate\": 10 },\n gender: { \"Male\": 1, \"Female\": 9 },\n travel: { \"true\": 7, \"false\": 3 },\n ethnicity: { \"White\": 10, },\n jobInterest: { \"Internship\": 10 },\n major: { \"Computer Science\": 10 },\n graduationYear: { \"2019\": 10 },\n dietaryRestrictions: { \"None\": 10 },\n shirtSize: { \"M\": 3, \"XL\": 7 },\n age: { \"22\": 10 }\n }\n }\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/stats" + } + ] + }, + { + "type": "patch", + "url": "/hacker/:id", + "title": "update a hacker's information.", + "description": "

This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.

", + "name": "patchHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": true, + "field": "school", + "description": "

Name of the school the hacker goes to

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "gender", + "description": "

Gender of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "travel", + "description": "

How much the hacker requires a bus for transportation

" + }, + { + "group": "body", + "type": "String[]", + "optional": true, + "field": "ethnicity", + "description": "

the ethnicities of the hacker

" + }, + { + "group": "body", + "type": "String[]", + "optional": true, + "field": "major", + "description": "

the major of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "graduationYear", + "description": "

the graduation year of the hacker

" + }, + { + "group": "body", + "type": "Json", + "optional": true, + "field": "application", + "description": "

The hacker's application

" + } + ] + }, + "examples": [ + { + "title": "application: ", + "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }", + "type": "Json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Changed hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while updating hacker\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/:id" + } + ] + }, + { + "type": "patch", + "url": "/hacker/confirmation/:id", + "title": "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.", + "name": "patchHackerConfirmed", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

The new status of the hacker. "Accepted", "Confirmed", or "Withdrawn"

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Confirmed\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + }, + { + "name": "Hacker" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/confirmation/:id" + } + ] + }, + { + "type": "patch", + "url": "/hacker/status/:id", + "title": "update a hacker's status", + "name": "patchHackerStatus", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

Status of the hacker's application ("None"|"Applied"|"Accepted"|"Declined"|"Waitlisted"|"Confirmed"|"Withdrawn"|"Checked-in")

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/status/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/resume/:id", + "title": "upload or update resume for a hacker.", + "name": "postHackerResume", + "group": "Hacker", + "version": "0.0.8", + "description": "

NOTE: This must be sent via multipart/form-data POST request

", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

Hacker id

" + } + ], + "body": [ + { + "group": "body", + "type": "File", + "optional": false, + "field": "resume", + "description": "

The uploaded file.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Location in the bucket that the file was stored.

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n message: \"Uploaded resume\",\n data: {\n filename: \"resumes/1535032624768-507f191e810c19729de860ea\"\n }\n}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": "Must be logged in, and the account id must be linked to the hacker." + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/resume/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/email/dayOf/:id", + "title": "", + "description": "

Sends a hacker the day-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", + "name": "postHackerSendDayOfEmail", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": true, + "field": "status", + "description": "

The hacker ID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker day-of email sent.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/dayOf/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/email/weekOf/:id", + "title": "", + "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", + "name": "postHackerSendWeekOfEmail", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": true, + "field": "status", + "description": "

The hacker ID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/email/weekOf/:id", + "title": "", + "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.

", + "name": "postHackerSendWeekOfEmail", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": true, + "field": "status", + "description": "

The hacker ID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" + } + ] + }, + { + "type": "get", + "url": "/sponsor/self", + "title": "get information about logged in sponsor", + "name": "self", + "group": "Hacker", + "version": "1.4.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": ": Sponsor" + } + ], + "filename": "routes/api/sponsor.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/self" + } + ] + }, + { + "type": "get", + "url": "/hacker/self", + "title": "get information about own hacker", + "name": "self", + "group": "Hacker", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Hacker found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":[\"Accounting\"],\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n } \n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Hacker not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/self" + } + ] + }, + { + "type": "get", + "url": "/", + "title": "version", + "version": "0.0.8", + "name": "index", + "group": "Index", + "permission": [ + { + "name": "public" + } + ], + "filename": "routes/index.js", + "groupTitle": "Index", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/" + } + ] + }, + { + "type": "post", + "url": "/api/role/", + "title": "create a new role", + "name": "createRole", + "group": "Role", + "version": "1.1.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "name", + "description": "

Name of the route

" + }, + { + "group": "body", + "type": "Route[]", + "optional": false, + "field": "routes", + "description": "

The routes that this role gives access to

" + } + ] + }, + "examples": [ + { + "title": "application: ", + "content": "{\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n}", + "type": "Json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Role object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Role creation successful\", \n \"data\": {\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating role\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/role.js", + "groupTitle": "Role", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/api/role/" + } + ] + }, + { + "type": "get", + "url": "/search/", + "title": "provide a specific query for any defined model", + "name": "search", + "group": "Search", + "version": "0.0.8", + "parameter": { + "fields": { + "query": [ + { + "group": "query", + "type": "String", + "optional": false, + "field": "model", + "description": "

the model to be searched

" + }, + { + "group": "query", + "type": "Array", + "optional": false, + "field": "q", + "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" + }, + { + "group": "query", + "type": "String", + "optional": false, + "field": "sort", + "description": "

either "asc" or "desc"

" + }, + { + "group": "query", + "type": "number", + "optional": false, + "field": "page", + "description": "

the page number that you would like

" + }, + { + "group": "query", + "type": "number", + "optional": false, + "field": "limit", + "description": "

the maximum number of results that you would like returned

" + }, + { + "group": "query", + "type": "any", + "optional": false, + "field": "sort_by", + "description": "

any parameter you want to sort the results by

" + }, + { + "group": "query", + "type": "boolean", + "optional": false, + "field": "expand", + "description": "

whether you want to expand sub documents within the results

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Results

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Successfully executed query, returning all results\",\n \"data\": [\n {...}\n ]\n }", + "type": "object" + }, + { + "title": "Success-Response:", + "content": "{\n \"message\": \"No results found.\",\n \"data\": {}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "{\"message\": \"Validation failed\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/search.js", + "groupTitle": "Search", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/search/" + } + ] + }, + { + "type": "get", + "url": "/settings/", + "title": "Get the settings for the current hackathon", + "name": "getSettings", + "group": "Settings", + "version": "1.1.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Settings Object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Settings creation successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: false\n }\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "public" + } + ], + "filename": "routes/api/settings.js", + "groupTitle": "Settings", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/settings/" + } + ] + }, + { + "type": "patch", + "url": "/settings/", + "title": "Patch the settings for the current hackathon", + "name": "patchSettings", + "group": "Settings", + "version": "1.1.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "Date", + "optional": true, + "field": "openTime", + "description": "

The opening time for the hackathon.

" + }, + { + "group": "body", + "type": "Date", + "optional": true, + "field": "closeTime", + "description": "

The closing time for the hackathon.

" + }, + { + "group": "body", + "type": "Date", + "optional": true, + "field": "confirmTime", + "description": "

The deadline for confirmation for the hackathon.

" + }, + { + "group": "body", + "type": "Boolean", + "optional": true, + "field": "isRemote", + "description": "

Whether this hackathon is remote or not.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Settings Object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Settings patch successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: true\n }\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrators" + } + ], + "filename": "routes/api/settings.js", + "groupTitle": "Settings", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/settings/" + } + ] + }, + { + "type": "post", + "url": "/sponsor/", + "title": "create a new sponsor", + "name": "createSponsor", + "group": "Sponsor", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

ObjectID of the respective account.

" + }, + { + "group": "body", + "type": "Number", + "optional": false, + "field": "tier", + "description": "

Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "company", + "description": "

Name of the company.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "contractURL", + "description": "

URL link to the contract with the company.

" + }, + { + "group": "body", + "type": "MongoID[]", + "optional": false, + "field": "nominees", + "description": "

Array of accounts that the company wish to nominate as hackers.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Sponsor creation successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating sponsor\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/sponsor.js", + "groupTitle": "Sponsor", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/" + } + ] + }, + { + "type": "get", + "url": "/sponsor/:id", + "title": "get a sponsor's information", + "name": "getSponsor", + "group": "Sponsor", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": false, + "field": "id", + "description": "

a sponsor's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/sponsor.js", + "groupTitle": "Sponsor", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/:id" + } + ] + }, + { + "type": "patch", + "url": "/sponsor/", + "title": "update a sponsor", + "name": "patchSponsor", + "group": "Sponsor", + "version": "1.3.0", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

ObjectID of the sponsor

" + } + ], + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "company", + "description": "

Name of the company.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "contractURL", + "description": "

URL link to the contract with the company.

" + }, + { + "group": "body", + "type": "ObjectId[]", + "optional": false, + "field": "nominees", + "description": "

Array of accounts that the company wish to nominate as hackers.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Sponsor update successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while updating sponsor\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/sponsor.js", + "groupTitle": "Sponsor", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/" + } + ] + }, + { + "type": "post", + "url": "/team/", + "title": "create a new team consisting of only the logged in user", + "name": "createTeam", + "group": "Team", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "name", + "description": "

Name of the team.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "devpostURL", + "description": "

Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "projectName", + "description": "

Name of the team.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Team object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Team creation successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating team\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/" + } + ] + }, + { + "type": "patch", + "url": "/team/leave/", + "title": "Allows a logged in hacker to leave current team", + "name": "deleteSelfFromTeam", + "group": "Team", + "version": "1.1.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

{}

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Removal from team successful.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/leave/" + } + ] + }, + { + "type": "get", + "url": "/team/:id", + "title": "get a team's information", + "name": "getTeam", + "group": "Team", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

MongoId of the team

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Team object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Team retrieval successful\", \n \"data\": { \n \"team\": {\n \"name\":\"foo\",\n \"members\": [\n ObjectId('...')\n ],\n \"devpostURL\": \"www.devpost.com/foo\",\n \"projectName\": \"fooey\"\n },\n \"members\": [\n {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\"\n }\n ],\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Team not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/:id" + } + ] + }, + { + "type": "patch", + "url": "/team/join/", + "title": "Allows a logged in hacker to join a team by name", + "name": "patchJoinTeam", + "group": "Team", + "version": "1.1.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "name", + "description": "

Name of the team to join

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

{}

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Team join successful.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/join/" + } + ] + }, + { + "type": "patch", + "url": "/team/:hackerId", + "title": "Update a team's information. The team is specified by the hacker belonging to it.", + "name": "patchTeam", + "group": "Team", + "version": "0.0.8", + "description": "

We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId

", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "hackerId", + "description": "

a hacker's unique Id

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Team object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Team update successful.\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Query input that caused the error.

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Team not found\", \"data\": {teamId}}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/:hackerId" + } + ] + }, + { + "type": "post", + "url": "/travel/", + "title": "create a new travel", + "name": "createTravel", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

ObjectID of the respective account

" + }, + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "hackerId", + "description": "

ObjectID of the respective hacker

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Travel creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"None\",\n \"request\": 50,\n \"offer\": 0\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating travel\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/" + } + ] + }, + { + "type": "get", + "url": "/travel/email/:email", + "title": "get a travel's information", + "name": "getTravel", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "email", + "description": "

a travel's unique email

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Travel not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/email/:email" + } + ] + }, + { + "type": "get", + "url": "/travel/:id", + "title": "get a traveler's information", + "name": "getTravel", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "id", + "description": "

a travel's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Travel not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/:id" + } + ] + }, + { + "type": "patch", + "url": "/travel/offer/:id", + "title": "update a traveler's offer", + "name": "patchTravelOffer", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "number", + "optional": true, + "field": "offer", + "description": "

Amount of money offered for travel

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"offer\": 75\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/offer/:id" + } + ] + }, + { + "type": "patch", + "url": "/travel/status/:id", + "title": "update a traveler's status", + "name": "patchTravelStatus", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

Status of the travel's reimbursement ("None"|"Bus"|"Offered"|"Valid"|"Invalid"|"Claimed")

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/status/:id" + } + ] + }, + { + "type": "get", + "url": "/travel/self", + "title": "get information about own hacker's travel", + "name": "self", + "group": "Travel", + "version": "2.0.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Travel found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Claimed\"\n \"request\": 90,\n \"offer\": 80\n } \n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Travel not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/self" + } + ] + }, + { + "type": "post", + "url": "/volunteer/", + "title": "create a new volunteer", + "name": "createVolunteer", + "group": "Volunteer", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

MongoID of the account of the volunteer

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Volunteer object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Volunteer creation successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating volunteer\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/volunteer.js", + "groupTitle": "Volunteer", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/volunteer/" + } + ] + }, + { + "type": "get", + "url": "/volunteer/:id", + "title": "get a volunteer's information", + "name": "getVolunteer", + "group": "Volunteer", + "version": "1.3.0", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

a volunteer's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Volunteer object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Volunteer not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/volunteer.js", + "groupTitle": "Volunteer", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/volunteer/:id" + } + ] + } +] }); diff --git a/docs/api/api_data.json b/docs/api/api_data.json index b846536d..2c40a0dd 100644 --- a/docs/api/api_data.json +++ b/docs/api/api_data.json @@ -1 +1,4150 @@ -[ { "type": "post", "url": "/account/", "title": "create a new account", "name": "create", "group": "Account", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": false, "field": "firstName", "description": "

First name of the account creator.

" }, { "group": "body", "type": "String", "optional": false, "field": "lastName", "description": "

Last name of the account creator.

" }, { "group": "body", "type": "String", "optional": false, "field": "pronoun", "description": "

the pronoun of the account creator.

" }, { "group": "body", "type": "String", "optional": false, "field": "email", "description": "

Email of the account.

" }, { "group": "body", "type": "String", "optional": false, "field": "gender", "description": "

Gender of the account creator.

" }, { "group": "body", "type": "String[]", "optional": false, "field": "dietaryRestrictions", "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" }, { "group": "body", "type": "String", "optional": false, "field": "password", "description": "

The password of the account.

" }, { "group": "body", "type": "String", "optional": false, "field": "birthDate", "description": "

a Date parsable string.

" }, { "group": "body", "type": "Number", "optional": true, "field": "phoneNumber", "description": "

the user's phone number, represented as a string.

" } ], "header": [ { "group": "header", "type": "JWT", "optional": true, "field": "token", "description": "

the user's invite token.

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"password\":\"hunter2\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":\"10/30/1997\"\n}", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account creation successful\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\n \"message\": \"Account already exists\", \n \"data\": {\n \"route\": \"/\"\n }\n}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/" } ] }, { "type": "get", "url": "/account/:id", "title": "gets information from an account with mongoid ':id'", "name": "getAccount", "group": "Account", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

MongoId of an account

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account found by user id\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Account not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/:id" } ] }, { "type": "get", "url": "/account/invite", "title": "Get all of the invites.", "name": "getAllInvites", "group": "Account", "version": "0.0.8", "description": "

Get all of the invites that currently exist in the database.

", "success": { "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Invite retrieval successful.\", \n \"data\": [{\n \"email\":\"abc@def.com\",\n \"accountType\":\"Hacker\"\n }]\n }", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/invite" } ] }, { "type": "post", "url": "/account/invite", "title": "invites a user to create an account with the specified accountType", "name": "inviteAccount", "group": "Account", "version": "0.0.8", "description": "

sends link with token to be used with the account/create route

", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": true, "field": "email", "description": "

email of the account to be created and where to send the link

" }, { "group": "body", "type": "String", "optional": true, "field": "accountType", "description": "

the type of the account which the user can create, for sponsor this should specify tier as well

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully invited user\", \n \"data\": {}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

Error object

" } ] }, "examples": [ { "title": "Error-Response:", "content": "{\n \"message\": \"Invalid Authentication\",\n \"data\": {\n \"route\": \"/invite\"\n }\n }", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/invite" } ] }, { "type": "get", "url": "/account/self", "title": "get information about own account", "name": "self", "group": "Account", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account found by user email\", \n \"data\": {\n \t\"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty object

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Account not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/self" } ] }, { "type": "patch", "url": "/account/:id", "title": "update an account's information", "name": "updateOneUser", "group": "Account", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": true, "field": "firstName", "description": "

First name of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "lastName", "description": "

Last name of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "pronoun", "description": "

The pronoun of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "email", "description": "

Email of the account.

" }, { "group": "body", "type": "String", "optional": true, "field": "gender", "description": "

Gender of the account creator.

" }, { "group": "body", "type": "String", "optional": true, "field": "birthDate", "description": "

A Date parsable string.

" }, { "group": "body", "type": "Number", "optional": true, "field": "phoneNumber", "description": "

The user's phone number, represented as a string.

" }, { "group": "body", "type": "String[]", "optional": true, "field": "dietaryRestrictions", "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"gender\": \"Male\" }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Account object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Account update successful.\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\": \"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while updating account\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/account.js", "groupTitle": "Account", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/account/:id" } ] }, { "type": "patch", "url": "/auth/password/change", "title": "change password for logged in user", "name": "changePassword", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "oldPassword", "description": "

The current password of the user

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "newPassword", "description": "

The new password of the user

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{\n \"oldPassword\": \"password12345\",\n \"newPassword\": \"password123456\"\n}", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", "type": "json" } ] }, "permission": [ { "name": ": Must be logged in" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/password/change" } ] }, { "type": "post", "url": "/auth/confirm/:token", "title": "confirm account using the JWT in :token", "name": "confirmAccount", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "JWT", "description": "

for confirming the account

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully confirmed account\", \"data\": {}}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response:", "content": "{\"message\": \"Invalid token for confirming account, \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/confirm/:token" } ] }, { "type": "post", "url": "/auth/password/forgot", "title": "forgot password route", "name": "forgotPassword", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "email", "description": "

the email address of the account

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"email\": \"myemail@mchacks.ca\" }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Sent reset email\", \"data\": {}}", "type": "json" } ] }, "permission": [ { "name": ": public" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/password/forgot" } ] }, { "type": "get", "url": "/auth/rolebindings/:id", "title": "retrieve rolebindings for a user given by their user id :id", "name": "getRoleBindings", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

MongoId of an account

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Rolebindings object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Role Bindings not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/rolebindings/:id" } ] }, { "type": "get", "url": "/auth/roles", "title": "get roles", "name": "getRoles", "description": "

get all roles that exist in the database

", "group": "Authentication", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Sucessfully retrieved all roles\", \"data\":\n[{name: \"GodStaff\", routes: Array(27), id: \"5bee20ef3ca9dd4754382880\"},\n {name: \"Hacker\", routes: Array(10), id: \"5bee20ef3ca9dd4754382881\"},\n {name: \"Volunteer\", routes: Array(4), id: \"5bee20ef3ca9dd4754382882\"}]", "type": "json" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/roles" } ] }, { "type": "post", "url": "/auth/login", "title": "login to the service", "name": "login", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "string", "optional": false, "field": "email", "description": "

Account email

" }, { "group": "Parameter", "type": "string", "optional": false, "field": "password", "description": "

Account password

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\"message\": \"Successfully logged in\", \"data\": {}}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Invalid Authentication\", \"data\": {}}", "type": "object" } ] }, "permission": [ { "name": ": public" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/login" } ] }, { "type": "get", "url": "/auth/logout", "title": "logout of service", "name": "logout", "group": "Authentication", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully logged out\", \"data\": {}}", "type": "object" } ] }, "permission": [ { "name": ": public" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/logout" } ] }, { "type": "get", "url": "/auth/confirm/resend", "title": "resend confirmation token", "name": "resendConfirmAccount", "group": "Authentication", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully resent confirmation email\", \"data\": {}}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response:", "content": " HTTP/1.1 422\n{\"message\": \"Account already confirmed\", \"data\": {}}", "type": "json" }, { "title": "Error-Response:", "content": " HTTP/1.1 428\n{\"message\": \"Account confirmation token does not exist\", \"data\": {}}", "type": "json" } ] }, "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/confirm/resend" } ] }, { "type": "post", "url": "/auth/password/reset", "title": "reset password", "name": "resetPassword", "group": "Authentication", "version": "0.0.8", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "password", "description": "

the password of the account

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"password\": \"hunter2\" }", "type": "json" } ] }, "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Authentication", "description": "

the token that was provided in the reset password email

" } ] }, "examples": [ { "title": "Header-Example:", "content": "{\n \"X-Reset-Token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n}", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", "type": "json" } ] }, "permission": [ { "name": ": must have authentication token" } ], "filename": "routes/api/auth.js", "groupTitle": "Authentication", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/auth/password/reset" } ] }, { "type": "patch", "url": "/hacker/batchAccept/", "title": "accept array of Hackers", "name": "acceptHacker", "group": "Hacker", "version": "3.0.0", "parameter": { "fields": { "body) {{ids: ObjectId[]}} Array of id(s": [ { "group": "body) {{ids: ObjectId[]}} Array of id(s", "optional": false, "field": "that", "description": "

needed to be accepted

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

success_ids array and errors array. Errors array will contain a detailed error for why the batch update for a given ID did not work

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker batch update successful.\",\n \"data\": {\n \"success_ids\": [\"id1\", \"id2\"]\n \"errors\": [{status: 404, message: \"ACCOUNT_NOT_FOUND\", account: null, hacker_id: \"id3\"}]\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/batchAccept/" } ] }, { "type": "patch", "url": "/hacker/acceptEmail/:email", "title": "accept a Hacker by email", "name": "acceptHacker", "group": "Hacker", "version": "2.0.0", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/acceptEmail/:email" } ] }, { "type": "patch", "url": "/hacker/accept/:id", "title": "accept a Hacker", "name": "acceptHacker", "group": "Hacker", "version": "2.0.0", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/accept/:id" } ] }, { "type": "patch", "url": "/hacker/checkin/:id", "title": "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.", "name": "checkinHacker", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

Check-in status. "Checked-in"

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Checked-in\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" }, { "name": "Volunteer" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/checkin/:id" } ] }, { "type": "post", "url": "/hacker/", "title": "create a new hacker", "name": "createHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

ObjectID of the respective account

" }, { "group": "body", "type": "String", "optional": false, "field": "school", "description": "

Name of the school the hacker goes to

" }, { "group": "body", "type": "String", "optional": false, "field": "gender", "description": "

Gender of the hacker

" }, { "group": "body", "type": "Number", "optional": false, "field": "travel", "description": "

Whether the hacker requires a bus for transportation

" }, { "group": "body", "type": "String[]", "optional": false, "field": "ethnicity", "description": "

the ethnicities of the hacker

" }, { "group": "body", "type": "String[]", "optional": false, "field": "major", "description": "

the major of the hacker

" }, { "group": "body", "type": "Number", "optional": false, "field": "graduationYear", "description": "

the graduation year of the hacker

" }, { "group": "body", "type": "Boolean", "optional": false, "field": "codeOfConduct", "description": "

acceptance of the code of conduct

" }, { "group": "body", "type": "Json", "optional": false, "field": "application", "description": "

The hacker's application. Resume and jobInterest fields are required.

" } ] }, "examples": [ { "title": "application: ", "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}", "type": "Json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Hacker creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating hacker\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/" } ] }, { "type": "get", "url": "/hacker/:id", "title": "get a hacker's information", "name": "getHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "id", "description": "

a hacker's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Hacker not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/:id" } ] }, { "type": "get", "url": "/hacker/email/:email", "title": "get a hacker's information", "name": "getHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "email", "description": "

a hacker's unique email

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Hacker not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/:email" } ] }, { "type": "get", "url": "/hacker/resume:id", "title": "get the resume for a hacker.", "name": "getHackerResume", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

Hacker id

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" } ] }, "examples": [ { "title": "Success-Response:", "content": "HTTP/1.1 200 OK\n{\n message: \"Downloaded resume\",\n data: {\n id: \"507f191e810c19729de860ea\",\n resume: [Buffer]\n }\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

"Resume does not exist"

" } ] }, "examples": [ { "title": "Error-Response:", "content": "HTTP/1.1 404\n{\n message: \"Resume not found\",\n data: {}\n}", "type": "json" } ] }, "permission": [ { "name": "Must be logged in, and the account id must be linked to the hacker." } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker" }, { "type": "get", "url": "/hacker/stats", "title": "Gets the stats of all of the hackers who have applied.", "name": "getHackerStats", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "query": [ { "group": "query", "type": "String", "optional": false, "field": "model", "description": "

the model to be searched (Only hacker supported)

" }, { "group": "query", "type": "Array", "optional": false, "field": "q", "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Retrieved stats\",\n \"data\": {\n \"stats\" : {\n \"total\": 10,\n \"status\": { \"Applied\": 10 },\n \"school\": { \"McGill University\": 3, \"Harvard University\": 7 },\n degree: { \"Undergraduate\": 10 },\n gender: { \"Male\": 1, \"Female\": 9 },\n travel: { \"true\": 7, \"false\": 3 },\n ethnicity: { \"White\": 10, },\n jobInterest: { \"Internship\": 10 },\n major: { \"Computer Science\": 10 },\n graduationYear: { \"2019\": 10 },\n dietaryRestrictions: { \"None\": 10 },\n shirtSize: { \"M\": 3, \"XL\": 7 },\n age: { \"22\": 10 }\n }\n }\n}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/stats" } ] }, { "type": "patch", "url": "/hacker/:id", "title": "update a hacker's information.", "description": "

This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.

", "name": "patchHacker", "group": "Hacker", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": true, "field": "school", "description": "

Name of the school the hacker goes to

" }, { "group": "body", "type": "String", "optional": true, "field": "gender", "description": "

Gender of the hacker

" }, { "group": "body", "type": "Number", "optional": true, "field": "travel", "description": "

How much the hacker requires a bus for transportation

" }, { "group": "body", "type": "String[]", "optional": true, "field": "ethnicity", "description": "

the ethnicities of the hacker

" }, { "group": "body", "type": "String[]", "optional": true, "field": "major", "description": "

the major of the hacker

" }, { "group": "body", "type": "Number", "optional": true, "field": "graduationYear", "description": "

the graduation year of the hacker

" }, { "group": "body", "type": "Json", "optional": true, "field": "application", "description": "

The hacker's application

" } ] }, "examples": [ { "title": "application: ", "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }", "type": "Json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Changed hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n }\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while updating hacker\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/:id" } ] }, { "type": "patch", "url": "/hacker/confirmation/:id", "title": "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.", "name": "patchHackerConfirmed", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

The new status of the hacker. "Accepted", "Confirmed", or "Withdrawn"

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Confirmed\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" }, { "name": "Hacker" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/confirmation/:id" } ] }, { "type": "patch", "url": "/hacker/status/:id", "title": "update a hacker's status", "name": "patchHackerStatus", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

Status of the hacker's application ("None"|"Applied"|"Accepted"|"Declined"|"Waitlisted"|"Confirmed"|"Withdrawn"|"Checked-in")

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/status/:id" } ] }, { "type": "post", "url": "/hacker/resume/:id", "title": "upload or update resume for a hacker.", "name": "postHackerResume", "group": "Hacker", "version": "0.0.8", "description": "

NOTE: This must be sent via multipart/form-data POST request

", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

Hacker id

" } ], "body": [ { "group": "body", "type": "File", "optional": false, "field": "resume", "description": "

The uploaded file.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Location in the bucket that the file was stored.

" } ] }, "examples": [ { "title": "Success-Response:", "content": "HTTP/1.1 200 OK\n{\n message: \"Uploaded resume\",\n data: {\n filename: \"resumes/1535032624768-507f191e810c19729de860ea\"\n }\n}", "type": "json" } ] }, "permission": [ { "name": "Must be logged in, and the account id must be linked to the hacker." } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/resume/:id" } ] }, { "type": "post", "url": "/hacker/email/dayOf/:id", "title": "", "description": "

Sends a hacker the day-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", "name": "postHackerSendDayOfEmail", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": true, "field": "status", "description": "

The hacker ID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker day-of email sent.\",\n \"data\": {}\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/dayOf/:id" } ] }, { "type": "post", "url": "/hacker/email/weekOf/:id", "title": "", "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", "name": "postHackerSendWeekOfEmail", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": true, "field": "status", "description": "

The hacker ID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" } ] }, { "type": "post", "url": "/hacker/email/weekOf/:id", "title": "", "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.

", "name": "postHackerSendWeekOfEmail", "group": "Hacker", "version": "0.0.9", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": true, "field": "status", "description": "

The hacker ID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" } ] }, { "type": "get", "url": "/sponsor/self", "title": "get information about logged in sponsor", "name": "self", "group": "Hacker", "version": "1.4.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", "type": "object" } ] }, "permission": [ { "name": ": Sponsor" } ], "filename": "routes/api/sponsor.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/self" } ] }, { "type": "get", "url": "/hacker/self", "title": "get information about own hacker", "name": "self", "group": "Hacker", "version": "0.0.8", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Hacker object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Hacker found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":[\"Accounting\"],\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n } \n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Hacker not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/hacker.js", "groupTitle": "Hacker", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/hacker/self" } ] }, { "type": "get", "url": "/", "title": "version", "version": "0.0.8", "name": "index", "group": "Index", "permission": [ { "name": "public" } ], "filename": "routes/index.js", "groupTitle": "Index", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/" } ] }, { "type": "post", "url": "/api/role/", "title": "create a new role", "name": "createRole", "group": "Role", "version": "1.1.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": false, "field": "name", "description": "

Name of the route

" }, { "group": "body", "type": "Route[]", "optional": false, "field": "routes", "description": "

The routes that this role gives access to

" } ] }, "examples": [ { "title": "application: ", "content": "{\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n}", "type": "Json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Role object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Role creation successful\", \n \"data\": {\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating role\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/role.js", "groupTitle": "Role", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/api/role/" } ] }, { "type": "get", "url": "/search/", "title": "provide a specific query for any defined model", "name": "search", "group": "Search", "version": "0.0.8", "parameter": { "fields": { "query": [ { "group": "query", "type": "String", "optional": false, "field": "model", "description": "

the model to be searched

" }, { "group": "query", "type": "Array", "optional": false, "field": "q", "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" }, { "group": "query", "type": "String", "optional": false, "field": "sort", "description": "

either "asc" or "desc"

" }, { "group": "query", "type": "number", "optional": false, "field": "page", "description": "

the page number that you would like

" }, { "group": "query", "type": "number", "optional": false, "field": "limit", "description": "

the maximum number of results that you would like returned

" }, { "group": "query", "type": "any", "optional": false, "field": "sort_by", "description": "

any parameter you want to sort the results by

" }, { "group": "query", "type": "boolean", "optional": false, "field": "expand", "description": "

whether you want to expand sub documents within the results

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Results

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Successfully executed query, returning all results\",\n \"data\": [\n {...}\n ]\n }", "type": "object" }, { "title": "Success-Response:", "content": "{\n \"message\": \"No results found.\",\n \"data\": {}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response:", "content": "{\"message\": \"Validation failed\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/search.js", "groupTitle": "Search", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/search/" } ] }, { "type": "get", "url": "/settings/", "title": "Get the settings for the current hackathon", "name": "getSettings", "group": "Settings", "version": "1.1.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Settings Object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Settings creation successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: false\n }\n }\n}", "type": "object" } ] }, "permission": [ { "name": "public" } ], "filename": "routes/api/settings.js", "groupTitle": "Settings", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/settings/" } ] }, { "type": "patch", "url": "/settings/", "title": "Patch the settings for the current hackathon", "name": "patchSettings", "group": "Settings", "version": "1.1.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "Date", "optional": true, "field": "openTime", "description": "

The opening time for the hackathon.

" }, { "group": "body", "type": "Date", "optional": true, "field": "closeTime", "description": "

The closing time for the hackathon.

" }, { "group": "body", "type": "Date", "optional": true, "field": "confirmTime", "description": "

The deadline for confirmation for the hackathon.

" }, { "group": "body", "type": "Boolean", "optional": true, "field": "isRemote", "description": "

Whether this hackathon is remote or not.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Settings Object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Settings patch successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: true\n }\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrators" } ], "filename": "routes/api/settings.js", "groupTitle": "Settings", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/settings/" } ] }, { "type": "post", "url": "/sponsor/", "title": "create a new sponsor", "name": "createSponsor", "group": "Sponsor", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

ObjectID of the respective account.

" }, { "group": "body", "type": "Number", "optional": false, "field": "tier", "description": "

Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.

" }, { "group": "body", "type": "String", "optional": false, "field": "company", "description": "

Name of the company.

" }, { "group": "body", "type": "String", "optional": false, "field": "contractURL", "description": "

URL link to the contract with the company.

" }, { "group": "body", "type": "MongoID[]", "optional": false, "field": "nominees", "description": "

Array of accounts that the company wish to nominate as hackers.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Sponsor creation successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating sponsor\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/sponsor.js", "groupTitle": "Sponsor", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/" } ] }, { "type": "get", "url": "/sponsor/:id", "title": "get a sponsor's information", "name": "getSponsor", "group": "Sponsor", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "string", "optional": false, "field": "id", "description": "

a sponsor's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/sponsor.js", "groupTitle": "Sponsor", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/:id" } ] }, { "type": "patch", "url": "/sponsor/", "title": "update a sponsor", "name": "patchSponsor", "group": "Sponsor", "version": "1.3.0", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

ObjectID of the sponsor

" } ], "body": [ { "group": "body", "type": "String", "optional": false, "field": "company", "description": "

Name of the company.

" }, { "group": "body", "type": "String", "optional": false, "field": "contractURL", "description": "

URL link to the contract with the company.

" }, { "group": "body", "type": "ObjectId[]", "optional": false, "field": "nominees", "description": "

Array of accounts that the company wish to nominate as hackers.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Sponsor object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Sponsor update successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while updating sponsor\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/sponsor.js", "groupTitle": "Sponsor", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/sponsor/" } ] }, { "type": "post", "url": "/team/", "title": "create a new team consisting of only the logged in user", "name": "createTeam", "group": "Team", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "String", "optional": false, "field": "name", "description": "

Name of the team.

" }, { "group": "body", "type": "String", "optional": true, "field": "devpostURL", "description": "

Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.

" }, { "group": "body", "type": "String", "optional": true, "field": "projectName", "description": "

Name of the team.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Team object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Team creation successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating team\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/" } ] }, { "type": "patch", "url": "/team/leave/", "title": "Allows a logged in hacker to leave current team", "name": "deleteSelfFromTeam", "group": "Team", "version": "1.1.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

{}

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Removal from team successful.\",\n \"data\": {}\n}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/leave/" } ] }, { "type": "get", "url": "/team/:id", "title": "get a team's information", "name": "getTeam", "group": "Team", "version": "0.0.8", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

MongoId of the team

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Team object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Team retrieval successful\", \n \"data\": { \n \"team\": {\n \"name\":\"foo\",\n \"members\": [\n ObjectId('...')\n ],\n \"devpostURL\": \"www.devpost.com/foo\",\n \"projectName\": \"fooey\"\n },\n \"members\": [\n {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\"\n }\n ],\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Team not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/:id" } ] }, { "type": "patch", "url": "/team/join/", "title": "Allows a logged in hacker to join a team by name", "name": "patchJoinTeam", "group": "Team", "version": "1.1.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "name", "description": "

Name of the team to join

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

{}

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Team join successful.\",\n \"data\": {}\n}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/join/" } ] }, { "type": "patch", "url": "/team/:hackerId", "title": "Update a team's information. The team is specified by the hacker belonging to it.", "name": "patchTeam", "group": "Team", "version": "0.0.8", "description": "

We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId

", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "hackerId", "description": "

a hacker's unique Id

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Team object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Team update successful.\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

Query input that caused the error.

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Team not found\", \"data\": {teamId}}", "type": "object" } ] }, "filename": "routes/api/team.js", "groupTitle": "Team", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/team/:hackerId" } ] }, { "type": "post", "url": "/travel/", "title": "create a new travel", "name": "createTravel", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

ObjectID of the respective account

" }, { "group": "body", "type": "MongoID", "optional": false, "field": "hackerId", "description": "

ObjectID of the respective hacker

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Travel creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"None\",\n \"request\": 50,\n \"offer\": 0\n }\n}", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating travel\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/" } ] }, { "type": "get", "url": "/travel/email/:email", "title": "get a travel's information", "name": "getTravel", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "email", "description": "

a travel's unique email

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Travel not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/email/:email" } ] }, { "type": "get", "url": "/travel/:id", "title": "get a traveler's information", "name": "getTravel", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "param": [ { "group": "param", "type": "String", "optional": false, "field": "id", "description": "

a travel's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Travel not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/:id" } ] }, { "type": "patch", "url": "/travel/offer/:id", "title": "update a traveler's offer", "name": "patchTravelOffer", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "number", "optional": true, "field": "offer", "description": "

Amount of money offered for travel

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"offer\": 75\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/offer/:id" } ] }, { "type": "patch", "url": "/travel/status/:id", "title": "update a traveler's status", "name": "patchTravelStatus", "group": "Travel", "version": "2.0.1", "parameter": { "fields": { "body": [ { "group": "body", "type": "string", "optional": true, "field": "status", "description": "

Status of the travel's reimbursement ("None"|"Bus"|"Offered"|"Valid"|"Invalid"|"Claimed")

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", "type": "object" } ] }, "permission": [ { "name": "Administrator" } ], "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/status/:id" } ] }, { "type": "get", "url": "/travel/self", "title": "get information about own hacker's travel", "name": "self", "group": "Travel", "version": "2.0.1", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Travel object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Travel found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Claimed\"\n \"request\": 90,\n \"offer\": 80\n } \n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Travel not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/travel.js", "groupTitle": "Travel", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/travel/self" } ] }, { "type": "post", "url": "/volunteer/", "title": "create a new volunteer", "name": "createVolunteer", "group": "Volunteer", "version": "0.0.8", "parameter": { "fields": { "body": [ { "group": "body", "type": "MongoID", "optional": false, "field": "accountId", "description": "

MongoID of the account of the volunteer

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "string", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "object", "optional": false, "field": "data", "description": "

Volunteer object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Volunteer creation successful\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "string", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Error while creating volunteer\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/volunteer.js", "groupTitle": "Volunteer", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/volunteer/" } ] }, { "type": "get", "url": "/volunteer/:id", "title": "get a volunteer's information", "name": "getVolunteer", "group": "Volunteer", "version": "1.3.0", "parameter": { "fields": { "param": [ { "group": "param", "type": "ObjectId", "optional": false, "field": "id", "description": "

a volunteer's unique mongoID

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "message", "description": "

Success message

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

Volunteer object

" } ] }, "examples": [ { "title": "Success-Response: ", "content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }", "type": "object" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String", "optional": false, "field": "message", "description": "

Error message

" }, { "group": "Error 4xx", "type": "Object", "optional": false, "field": "data", "description": "

empty

" } ] }, "examples": [ { "title": "Error-Response: ", "content": "{\"message\": \"Volunteer not found\", \"data\": {}}", "type": "object" } ] }, "filename": "routes/api/volunteer.js", "groupTitle": "Volunteer", "sampleRequest": [ { "url": "https://api.mchacks.ca/api/volunteer/:id" } ] } ] +[ + { + "type": "post", + "url": "/account/", + "title": "create a new account", + "name": "create", + "group": "Account", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "firstName", + "description": "

First name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "lastName", + "description": "

Last name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "pronoun", + "description": "

the pronoun of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "email", + "description": "

Email of the account.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "gender", + "description": "

Gender of the account creator.

" + }, + { + "group": "body", + "type": "String[]", + "optional": false, + "field": "dietaryRestrictions", + "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "password", + "description": "

The password of the account.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "birthDate", + "description": "

a Date parsable string.

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "phoneNumber", + "description": "

the user's phone number, represented as a string.

" + } + ], + "header": [ + { + "group": "header", + "type": "JWT", + "optional": true, + "field": "token", + "description": "

the user's invite token.

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"password\":\"hunter2\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":\"10/30/1997\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account creation successful\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\n \"message\": \"Account already exists\", \n \"data\": {\n \"route\": \"/\"\n }\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/" + } + ] + }, + { + "type": "get", + "url": "/account/:id", + "title": "gets information from an account with mongoid ':id'", + "name": "getAccount", + "group": "Account", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

MongoId of an account

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account found by user id\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Account not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/:id" + } + ] + }, + { + "type": "get", + "url": "/account/invite", + "title": "Get all of the invites.", + "name": "getAllInvites", + "group": "Account", + "version": "0.0.8", + "description": "

Get all of the invites that currently exist in the database.

", + "success": { + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Invite retrieval successful.\", \n \"data\": [{\n \"email\":\"abc@def.com\",\n \"accountType\":\"Hacker\"\n }]\n }", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/invite" + } + ] + }, + { + "type": "post", + "url": "/account/invite", + "title": "invites a user to create an account with the specified accountType", + "name": "inviteAccount", + "group": "Account", + "version": "0.0.8", + "description": "

sends link with token to be used with the account/create route

", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": true, + "field": "email", + "description": "

email of the account to be created and where to send the link

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "accountType", + "description": "

the type of the account which the user can create, for sponsor this should specify tier as well

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully invited user\", \n \"data\": {}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

Error object

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "{\n \"message\": \"Invalid Authentication\",\n \"data\": {\n \"route\": \"/invite\"\n }\n }", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/invite" + } + ] + }, + { + "type": "get", + "url": "/account/self", + "title": "get information about own account", + "name": "self", + "group": "Account", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account found by user email\", \n \"data\": {\n \t\"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\":\"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty object

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Account not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/self" + } + ] + }, + { + "type": "patch", + "url": "/account/:id", + "title": "update an account's information", + "name": "updateOneUser", + "group": "Account", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": true, + "field": "firstName", + "description": "

First name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "lastName", + "description": "

Last name of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "pronoun", + "description": "

The pronoun of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "email", + "description": "

Email of the account.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "gender", + "description": "

Gender of the account creator.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "birthDate", + "description": "

A Date parsable string.

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "phoneNumber", + "description": "

The user's phone number, represented as a string.

" + }, + { + "group": "body", + "type": "String[]", + "optional": true, + "field": "dietaryRestrictions", + "description": "

Any dietary restrictions for the user. 'None' if there are no restrictions

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \"gender\": \"Male\" }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Account object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Account update successful.\", \n \"data\": {\n \"id\": ObjectId(\"5bff8b9f3274cf001bc71048\"),\n \t\"firstName\": \"Theo\",\n \"lastName\":\"Klein\",\n \"pronoun\":\"he/him\",\n \"email\":\"theo@klein.com\",\n \"phoneNumber\":1234567890,\n \t\"gender\": \"Male\",\n \"birthDate\":Date(\"10/30/1997\")\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while updating account\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/account.js", + "groupTitle": "Account", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/account/:id" + } + ] + }, + { + "type": "patch", + "url": "/auth/password/change", + "title": "change password for logged in user", + "name": "changePassword", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "oldPassword", + "description": "

The current password of the user

" + }, + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "newPassword", + "description": "

The new password of the user

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{\n \"oldPassword\": \"password12345\",\n \"newPassword\": \"password123456\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": ": Must be logged in" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/password/change" + } + ] + }, + { + "type": "post", + "url": "/auth/confirm/:token", + "title": "confirm account using the JWT in :token", + "name": "confirmAccount", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "JWT", + "description": "

for confirming the account

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully confirmed account\", \"data\": {}}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "{\"message\": \"Invalid token for confirming account, \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/confirm/:token" + } + ] + }, + { + "type": "post", + "url": "/auth/password/forgot", + "title": "forgot password route", + "name": "forgotPassword", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "email", + "description": "

the email address of the account

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \"email\": \"myemail@mchacks.ca\" }", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Sent reset email\", \"data\": {}}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": ": public" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/password/forgot" + } + ] + }, + { + "type": "get", + "url": "/auth/rolebindings/:id", + "title": "retrieve rolebindings for a user given by their user id :id", + "name": "getRoleBindings", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

MongoId of an account

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Rolebindings object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved role bindings\",\n \"data\": {\n accountId:\"5beca4ab2e069a34f91697b2\"\n id:\"5beca4ae2e069a34f91698b1\"\n roles: [\n {\n _id:\"5beca4ab2e069a34f91697d9\",\n name:\"hacker\",\n routes: [\n {_id: \"5beca4ae2e069a34f9169852\", requestType: \"POST\", uri: \"/api/auth/login\"},\n {_id: \"5beca4ae2e069a34f9169851\", requestType: \"POST\", uri: \"/api/auth/logout\"},\n {_id: \"5beca4ae2e069a34f9169850\", requestType: \"GET\", uri: \"/api/auth/rolebindings/:self\"},\n {_id: \"5beca4ae2e069a34f916984f\", requestType: \"GET\", uri: \"/api/account/self\"},\n {_id: \"5beca4ae2e069a34f916984e\", requestType: \"GET\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984d\", requestType: \"PATCH\", uri: \"/api/account/:self\"},\n {_id: \"5beca4ae2e069a34f916984c\", requestType: \"POST\", uri: \"/api/hacker/\"},\n {_id: \"5beca4ae2e069a34f916984b\", requestType: \"GET\", uri: \"/api/hacker/:self\"},\n {_id: \"5beca4ae2e069a34f916984a\", requestType: \"GET\", uri: \"/api/hacker/:self/resume\"},\n {_id: \"5beca4ae2e069a34f9169849\", requestType: \"PATCH\", uri: \"/api/hacker/:self\"}\n ]\n }\n ]\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Role Bindings not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/rolebindings/:id" + } + ] + }, + { + "type": "get", + "url": "/auth/roles", + "title": "get roles", + "name": "getRoles", + "description": "

get all roles that exist in the database

", + "group": "Authentication", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Sucessfully retrieved all roles\", \"data\":\n[{name: \"GodStaff\", routes: Array(27), id: \"5bee20ef3ca9dd4754382880\"},\n {name: \"Hacker\", routes: Array(10), id: \"5bee20ef3ca9dd4754382881\"},\n {name: \"Volunteer\", routes: Array(4), id: \"5bee20ef3ca9dd4754382882\"}]", + "type": "json" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/roles" + } + ] + }, + { + "type": "post", + "url": "/auth/login", + "title": "login to the service", + "name": "login", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "string", + "optional": false, + "field": "email", + "description": "

Account email

" + }, + { + "group": "Parameter", + "type": "string", + "optional": false, + "field": "password", + "description": "

Account password

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\"message\": \"Successfully logged in\", \"data\": {}}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Invalid Authentication\", \"data\": {}}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": ": public" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/login" + } + ] + }, + { + "type": "get", + "url": "/auth/logout", + "title": "logout of service", + "name": "logout", + "group": "Authentication", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully logged out\", \"data\": {}}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": ": public" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/logout" + } + ] + }, + { + "type": "get", + "url": "/auth/confirm/resend", + "title": "resend confirmation token", + "name": "resendConfirmAccount", + "group": "Authentication", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully resent confirmation email\", \"data\": {}}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": " HTTP/1.1 422\n{\"message\": \"Account already confirmed\", \"data\": {}}", + "type": "json" + }, + { + "title": "Error-Response:", + "content": " HTTP/1.1 428\n{\"message\": \"Account confirmation token does not exist\", \"data\": {}}", + "type": "json" + } + ] + }, + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/confirm/resend" + } + ] + }, + { + "type": "post", + "url": "/auth/password/reset", + "title": "reset password", + "name": "resetPassword", + "group": "Authentication", + "version": "0.0.8", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "String", + "optional": false, + "field": "password", + "description": "

the password of the account

" + } + ] + }, + "examples": [ + { + "title": "Request-Example:", + "content": "{ \"password\": \"hunter2\" }", + "type": "json" + } + ] + }, + "header": { + "fields": { + "Header": [ + { + "group": "Header", + "type": "String", + "optional": false, + "field": "Authentication", + "description": "

the token that was provided in the reset password email

" + } + ] + }, + "examples": [ + { + "title": "Header-Example:", + "content": "{\n \"X-Reset-Token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n}", + "type": "json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\"message\": \"Successfully reset password\", \"data\": {}}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": ": must have authentication token" + } + ], + "filename": "routes/api/auth.js", + "groupTitle": "Authentication", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/auth/password/reset" + } + ] + }, + { + "type": "patch", + "url": "/hacker/batchAccept/", + "title": "accept array of Hackers", + "name": "acceptHacker", + "group": "Hacker", + "version": "3.0.0", + "parameter": { + "fields": { + "body) {{ids: ObjectId[]}} Array of id(s": [ + { + "group": "body) {{ids: ObjectId[]}} Array of id(s", + "optional": false, + "field": "that", + "description": "

needed to be accepted

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

success_ids array and errors array. Errors array will contain a detailed error for why the batch update for a given ID did not work

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker batch update successful.\",\n \"data\": {\n \"success_ids\": [\"id1\", \"id2\"]\n \"errors\": [{status: 404, message: \"ACCOUNT_NOT_FOUND\", account: null, hacker_id: \"id3\"}]\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/batchAccept/" + } + ] + }, + { + "type": "patch", + "url": "/hacker/acceptEmail/:email", + "title": "accept a Hacker by email", + "name": "acceptHacker", + "group": "Hacker", + "version": "2.0.0", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/acceptEmail/:email" + } + ] + }, + { + "type": "patch", + "url": "/hacker/accept/:id", + "title": "accept a Hacker", + "name": "acceptHacker", + "group": "Hacker", + "version": "2.0.0", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/accept/:id" + } + ] + }, + { + "type": "patch", + "url": "/hacker/checkin/:id", + "title": "update a hacker's status to be 'Checked-in'. Note that the Hacker must eitehr be Accepted or Confirmed.", + "name": "checkinHacker", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

Check-in status. "Checked-in"

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Checked-in\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + }, + { + "name": "Volunteer" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/checkin/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/", + "title": "create a new hacker", + "name": "createHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

ObjectID of the respective account

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "school", + "description": "

Name of the school the hacker goes to

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "gender", + "description": "

Gender of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": false, + "field": "travel", + "description": "

Whether the hacker requires a bus for transportation

" + }, + { + "group": "body", + "type": "String[]", + "optional": false, + "field": "ethnicity", + "description": "

the ethnicities of the hacker

" + }, + { + "group": "body", + "type": "String[]", + "optional": false, + "field": "major", + "description": "

the major of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": false, + "field": "graduationYear", + "description": "

the graduation year of the hacker

" + }, + { + "group": "body", + "type": "Boolean", + "optional": false, + "field": "codeOfConduct", + "description": "

acceptance of the code of conduct

" + }, + { + "group": "body", + "type": "Json", + "optional": false, + "field": "application", + "description": "

The hacker's application. Resume and jobInterest fields are required.

" + } + ] + }, + "examples": [ + { + "title": "application: ", + "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n}", + "type": "Json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Hacker creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating hacker\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/" + } + ] + }, + { + "type": "get", + "url": "/hacker/:id", + "title": "get a hacker's information", + "name": "getHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "id", + "description": "

a hacker's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Hacker not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/:id" + } + ] + }, + { + "type": "get", + "url": "/hacker/email/:email", + "title": "get a hacker's information", + "name": "getHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "email", + "description": "

a hacker's unique email

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Hacker not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/:email" + } + ] + }, + { + "type": "get", + "url": "/hacker/resume:id", + "title": "get the resume for a hacker.", + "name": "getHackerResume", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

Hacker id

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n message: \"Downloaded resume\",\n data: {\n id: \"507f191e810c19729de860ea\",\n resume: [Buffer]\n }\n}", + "type": "json" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

"Resume does not exist"

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "HTTP/1.1 404\n{\n message: \"Resume not found\",\n data: {}\n}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": "Must be logged in, and the account id must be linked to the hacker." + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker" + }, + { + "type": "get", + "url": "/hacker/stats", + "title": "Gets the stats of all of the hackers who have applied.", + "name": "getHackerStats", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "query": [ + { + "group": "query", + "type": "String", + "optional": false, + "field": "model", + "description": "

the model to be searched (Only hacker supported)

" + }, + { + "group": "query", + "type": "Array", + "optional": false, + "field": "q", + "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Retrieved stats\",\n \"data\": {\n \"stats\" : {\n \"total\": 10,\n \"status\": { \"Applied\": 10 },\n \"school\": { \"McGill University\": 3, \"Harvard University\": 7 },\n degree: { \"Undergraduate\": 10 },\n gender: { \"Male\": 1, \"Female\": 9 },\n travel: { \"true\": 7, \"false\": 3 },\n ethnicity: { \"White\": 10, },\n jobInterest: { \"Internship\": 10 },\n major: { \"Computer Science\": 10 },\n graduationYear: { \"2019\": 10 },\n dietaryRestrictions: { \"None\": 10 },\n shirtSize: { \"M\": 3, \"XL\": 7 },\n age: { \"22\": 10 }\n }\n }\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/stats" + } + ] + }, + { + "type": "patch", + "url": "/hacker/:id", + "title": "update a hacker's information.", + "description": "

This route only contains the ability to update a subset of a hacker's information. If you want to update a status, you must have Admin priviledges and use PATCH /hacker/status/:id.

", + "name": "patchHacker", + "group": "Hacker", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": true, + "field": "school", + "description": "

Name of the school the hacker goes to

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "gender", + "description": "

Gender of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "travel", + "description": "

How much the hacker requires a bus for transportation

" + }, + { + "group": "body", + "type": "String[]", + "optional": true, + "field": "ethnicity", + "description": "

the ethnicities of the hacker

" + }, + { + "group": "body", + "type": "String[]", + "optional": true, + "field": "major", + "description": "

the major of the hacker

" + }, + { + "group": "body", + "type": "Number", + "optional": true, + "field": "graduationYear", + "description": "

the graduation year of the hacker

" + }, + { + "group": "body", + "type": "Json", + "optional": true, + "field": "application", + "description": "

The hacker's application

" + } + ] + }, + "examples": [ + { + "title": "application: ", + "content": "{\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }", + "type": "Json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Changed hacker information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Applied\",\n \"application\":{\n \"general\":{\n \"school\": \"McGill University\",\n \"degree\": \"Undergraduate\",\n \"fieldOfStudy\": \"Computer Science\",\n \"graduationYear\": \"2021\",\n \"jobInterest\":\"Internship\",\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n },\n \"shortAnswer\": {\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"question1\": \"I love McHacks\",\n \"question2\":\"Pls accept me\",\n \"previousHackathons\": \"5\",\n \"comments\":\"hi!\",\n },\n \"other:\" {\n \"gender\": \"male\",\n \"ethnicity\": \"Asian or Pacific Islander\",\n \"privacyPolicy\": true,\n \"codeOfConduct\": true,\n }\n \"accomodation\": {\n \"travel\": 0\n },\n \"location:\" {\n \"timeZone\": \"GMT-5\",\n \"country\": \"Canada\",\n \"city\": \"Montreal\",\n }\n }\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while updating hacker\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/:id" + } + ] + }, + { + "type": "patch", + "url": "/hacker/confirmation/:id", + "title": "Allows confirmation of hacker attendence if they are accepted. Also allows change from 'confirmed' to 'withdrawn'.", + "name": "patchHackerConfirmed", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

The new status of the hacker. "Accepted", "Confirmed", or "Withdrawn"

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Confirmed\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + }, + { + "name": "Hacker" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/confirmation/:id" + } + ] + }, + { + "type": "patch", + "url": "/hacker/status/:id", + "title": "update a hacker's status", + "name": "patchHackerStatus", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

Status of the hacker's application ("None"|"Applied"|"Accepted"|"Declined"|"Waitlisted"|"Confirmed"|"Withdrawn"|"Checked-in")

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed hacker information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/status/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/resume/:id", + "title": "upload or update resume for a hacker.", + "name": "postHackerResume", + "group": "Hacker", + "version": "0.0.8", + "description": "

NOTE: This must be sent via multipart/form-data POST request

", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

Hacker id

" + } + ], + "body": [ + { + "group": "body", + "type": "File", + "optional": false, + "field": "resume", + "description": "

The uploaded file.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Location in the bucket that the file was stored.

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n message: \"Uploaded resume\",\n data: {\n filename: \"resumes/1535032624768-507f191e810c19729de860ea\"\n }\n}", + "type": "json" + } + ] + }, + "permission": [ + { + "name": "Must be logged in, and the account id must be linked to the hacker." + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/resume/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/email/dayOf/:id", + "title": "", + "description": "

Sends a hacker the day-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", + "name": "postHackerSendDayOfEmail", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": true, + "field": "status", + "description": "

The hacker ID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker day-of email sent.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/dayOf/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/email/weekOf/:id", + "title": "", + "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be either confirmed, or checked in.

", + "name": "postHackerSendWeekOfEmail", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": true, + "field": "status", + "description": "

The hacker ID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" + } + ] + }, + { + "type": "post", + "url": "/hacker/email/weekOf/:id", + "title": "", + "description": "

Sends a hacker the week-of email, along with the HackPass QR code to view their hacker profile (for checkin purposes). Hackers must be eitherconfirmed, or checked in.

", + "name": "postHackerSendWeekOfEmail", + "group": "Hacker", + "version": "0.0.9", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": true, + "field": "status", + "description": "

The hacker ID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Hacker week-of email sent.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/email/weekOf/:id" + } + ] + }, + { + "type": "get", + "url": "/sponsor/self", + "title": "get information about logged in sponsor", + "name": "self", + "group": "Hacker", + "version": "1.4.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": ": Sponsor" + } + ], + "filename": "routes/api/sponsor.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/self" + } + ] + }, + { + "type": "get", + "url": "/hacker/self", + "title": "get information about own hacker", + "name": "self", + "group": "Hacker", + "version": "0.0.8", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Hacker object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Hacker found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"application\":{\n \"URL\":{\n \"resume\":\"resumes/1543458163426-5bff4d736f86be0a41badb91\",\n \"github\":\"https://github.com/abcd\",\n \"dropler\":\"https://dribbble.com/abcd\",\n \"personal\":\"https://www.hi.com/\",\n \"linkedIn\":\"https://linkedin.com/in/abcd\",\n \"other\":\"https://github.com/hackmcgill/hackerAPI/issues/168\"\n },\n \"jobInterest\":\"Internship\",\n \"skills\":[\"Javascript\",\"Typescript\"],\n \"comments\":\"hi!\",\n \"essay\":\"Pls accept me\"\n },\n \"status\":\"Applied\",\n \"ethnicity\":[\"White or Caucasian\",\" Asian or Pacific Islander\"],\n \"accountId\":\"5bff2a35e533b0f6562b4998\",\n \"school\":\"McPherson College\",\n \"gender\":\"Female\",\n \"travel\":0,\n \"major\":[\"Accounting\"],\n \"graduationYear\":2019,\n \"codeOfConduct\":true,\n } \n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Hacker not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/hacker.js", + "groupTitle": "Hacker", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/hacker/self" + } + ] + }, + { + "type": "get", + "url": "/", + "title": "version", + "version": "0.0.8", + "name": "index", + "group": "Index", + "permission": [ + { + "name": "public" + } + ], + "filename": "routes/index.js", + "groupTitle": "Index", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/" + } + ] + }, + { + "type": "post", + "url": "/api/role/", + "title": "create a new role", + "name": "createRole", + "group": "Role", + "version": "1.1.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "name", + "description": "

Name of the route

" + }, + { + "group": "body", + "type": "Route[]", + "optional": false, + "field": "routes", + "description": "

The routes that this role gives access to

" + } + ] + }, + "examples": [ + { + "title": "application: ", + "content": "{\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n}", + "type": "Json" + } + ] + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Role object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Role creation successful\", \n \"data\": {\n \"name\": \"routename\",\n \"routes\": [\n {\n uri: \"/api/hacker/\"\n requestType: \"POST\"\n }\n ]\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating role\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/role.js", + "groupTitle": "Role", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/api/role/" + } + ] + }, + { + "type": "get", + "url": "/search/", + "title": "provide a specific query for any defined model", + "name": "search", + "group": "Search", + "version": "0.0.8", + "parameter": { + "fields": { + "query": [ + { + "group": "query", + "type": "String", + "optional": false, + "field": "model", + "description": "

the model to be searched

" + }, + { + "group": "query", + "type": "Array", + "optional": false, + "field": "q", + "description": "

the query to be executed. For more information on how to format this, please see https://docs.mchacks.ca/architecture/

" + }, + { + "group": "query", + "type": "String", + "optional": false, + "field": "sort", + "description": "

either "asc" or "desc"

" + }, + { + "group": "query", + "type": "number", + "optional": false, + "field": "page", + "description": "

the page number that you would like

" + }, + { + "group": "query", + "type": "number", + "optional": false, + "field": "limit", + "description": "

the maximum number of results that you would like returned

" + }, + { + "group": "query", + "type": "any", + "optional": false, + "field": "sort_by", + "description": "

any parameter you want to sort the results by

" + }, + { + "group": "query", + "type": "boolean", + "optional": false, + "field": "expand", + "description": "

whether you want to expand sub documents within the results

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Results

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Successfully executed query, returning all results\",\n \"data\": [\n {...}\n ]\n }", + "type": "object" + }, + { + "title": "Success-Response:", + "content": "{\n \"message\": \"No results found.\",\n \"data\": {}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response:", + "content": "{\"message\": \"Validation failed\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/search.js", + "groupTitle": "Search", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/search/" + } + ] + }, + { + "type": "get", + "url": "/settings/", + "title": "Get the settings for the current hackathon", + "name": "getSettings", + "group": "Settings", + "version": "1.1.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Settings Object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Settings creation successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: false\n }\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "public" + } + ], + "filename": "routes/api/settings.js", + "groupTitle": "Settings", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/settings/" + } + ] + }, + { + "type": "patch", + "url": "/settings/", + "title": "Patch the settings for the current hackathon", + "name": "patchSettings", + "group": "Settings", + "version": "1.1.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "Date", + "optional": true, + "field": "openTime", + "description": "

The opening time for the hackathon.

" + }, + { + "group": "body", + "type": "Date", + "optional": true, + "field": "closeTime", + "description": "

The closing time for the hackathon.

" + }, + { + "group": "body", + "type": "Date", + "optional": true, + "field": "confirmTime", + "description": "

The deadline for confirmation for the hackathon.

" + }, + { + "group": "body", + "type": "Boolean", + "optional": true, + "field": "isRemote", + "description": "

Whether this hackathon is remote or not.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Settings Object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Settings patch successful.\",\n \"data\": {\n \"settings\": {\n openTime: \"Wed Feb 06 2019 00:00:00 GMT-0500 (GMT-05:00)\",\n closeTime: \"Sat Feb 01 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n confirmTime: \"Sat Feb 20 2020 00:00:00 GMT-0500 (GMT-05:00)\",\n isRemote: true\n }\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrators" + } + ], + "filename": "routes/api/settings.js", + "groupTitle": "Settings", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/settings/" + } + ] + }, + { + "type": "post", + "url": "/sponsor/", + "title": "create a new sponsor", + "name": "createSponsor", + "group": "Sponsor", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

ObjectID of the respective account.

" + }, + { + "group": "body", + "type": "Number", + "optional": false, + "field": "tier", + "description": "

Tier of the sponsor, from 0 to 5. 0 is lowest tier, and 5 is the custom tier.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "company", + "description": "

Name of the company.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "contractURL", + "description": "

URL link to the contract with the company.

" + }, + { + "group": "body", + "type": "MongoID[]", + "optional": false, + "field": "nominees", + "description": "

Array of accounts that the company wish to nominate as hackers.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Sponsor creation successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating sponsor\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/sponsor.js", + "groupTitle": "Sponsor", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/" + } + ] + }, + { + "type": "get", + "url": "/sponsor/:id", + "title": "get a sponsor's information", + "name": "getSponsor", + "group": "Sponsor", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "string", + "optional": false, + "field": "id", + "description": "

a sponsor's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved sponsor information\", \n \"data\": {\n \"id\": \"5bff4d736f86be0a41badb91\",\n \"accountId\": \"5bff4d736f86be0a41badb99\",\n \"tier\": 3,\n \"company\": \"companyName\",\n \"contractURL\": \"https://www.contractHere.com\",\n \"nominees\": [\"5bff4d736f86be0a41badb93\",\"5bff4d736f86be0a41badb94\"]\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Sponsor not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/sponsor.js", + "groupTitle": "Sponsor", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/:id" + } + ] + }, + { + "type": "patch", + "url": "/sponsor/", + "title": "update a sponsor", + "name": "patchSponsor", + "group": "Sponsor", + "version": "1.3.0", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

ObjectID of the sponsor

" + } + ], + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "company", + "description": "

Name of the company.

" + }, + { + "group": "body", + "type": "String", + "optional": false, + "field": "contractURL", + "description": "

URL link to the contract with the company.

" + }, + { + "group": "body", + "type": "ObjectId[]", + "optional": false, + "field": "nominees", + "description": "

Array of accounts that the company wish to nominate as hackers.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Sponsor object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Sponsor update successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while updating sponsor\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/sponsor.js", + "groupTitle": "Sponsor", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/sponsor/" + } + ] + }, + { + "type": "post", + "url": "/team/", + "title": "create a new team consisting of only the logged in user", + "name": "createTeam", + "group": "Team", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "String", + "optional": false, + "field": "name", + "description": "

Name of the team.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "devpostURL", + "description": "

Devpost link to hack. Once the link is sent, the hack will be considered to be submitted.

" + }, + { + "group": "body", + "type": "String", + "optional": true, + "field": "projectName", + "description": "

Name of the team.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Team object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Team creation successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating team\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/" + } + ] + }, + { + "type": "patch", + "url": "/team/leave/", + "title": "Allows a logged in hacker to leave current team", + "name": "deleteSelfFromTeam", + "group": "Team", + "version": "1.1.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

{}

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Removal from team successful.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/leave/" + } + ] + }, + { + "type": "get", + "url": "/team/:id", + "title": "get a team's information", + "name": "getTeam", + "group": "Team", + "version": "0.0.8", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

MongoId of the team

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Team object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Team retrieval successful\", \n \"data\": { \n \"team\": {\n \"name\":\"foo\",\n \"members\": [\n ObjectId('...')\n ],\n \"devpostURL\": \"www.devpost.com/foo\",\n \"projectName\": \"fooey\"\n },\n \"members\": [\n {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\"\n }\n ],\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Team not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/:id" + } + ] + }, + { + "type": "patch", + "url": "/team/join/", + "title": "Allows a logged in hacker to join a team by name", + "name": "patchJoinTeam", + "group": "Team", + "version": "1.1.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "name", + "description": "

Name of the team to join

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

{}

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Team join successful.\",\n \"data\": {}\n}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/join/" + } + ] + }, + { + "type": "patch", + "url": "/team/:hackerId", + "title": "Update a team's information. The team is specified by the hacker belonging to it.", + "name": "patchTeam", + "group": "Team", + "version": "0.0.8", + "description": "

We use hackerId instead of teamId because authorization requires a one-to-one mapping from param id to accountId, but we are not able to have that from teamId to accountId due to multiple members in a team. Instead, we use hackerId, as there is a 1 to 1 link between hackerId to teamId, and a 1 to 1 link between hackerId and accountId

", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "hackerId", + "description": "

a hacker's unique Id

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Team object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Team update successful.\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Query input that caused the error.

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Team not found\", \"data\": {teamId}}", + "type": "object" + } + ] + }, + "filename": "routes/api/team.js", + "groupTitle": "Team", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/team/:hackerId" + } + ] + }, + { + "type": "post", + "url": "/travel/", + "title": "create a new travel", + "name": "createTravel", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

ObjectID of the respective account

" + }, + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "hackerId", + "description": "

ObjectID of the respective hacker

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Travel creation successful\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"None\",\n \"request\": 50,\n \"offer\": 0\n }\n}", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating travel\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/" + } + ] + }, + { + "type": "get", + "url": "/travel/email/:email", + "title": "get a travel's information", + "name": "getTravel", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "email", + "description": "

a travel's unique email

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Travel not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/email/:email" + } + ] + }, + { + "type": "get", + "url": "/travel/:id", + "title": "get a traveler's information", + "name": "getTravel", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "String", + "optional": false, + "field": "id", + "description": "

a travel's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved travel information\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Valid\",\n \"request\": 100,\n \"offer\": 50\n }\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Travel not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/:id" + } + ] + }, + { + "type": "patch", + "url": "/travel/offer/:id", + "title": "update a traveler's offer", + "name": "patchTravelOffer", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "number", + "optional": true, + "field": "offer", + "description": "

Amount of money offered for travel

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"offer\": 75\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/offer/:id" + } + ] + }, + { + "type": "patch", + "url": "/travel/status/:id", + "title": "update a traveler's status", + "name": "patchTravelStatus", + "group": "Travel", + "version": "2.0.1", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "string", + "optional": true, + "field": "status", + "description": "

Status of the travel's reimbursement ("None"|"Bus"|"Offered"|"Valid"|"Invalid"|"Claimed")

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "{\n \"message\": \"Changed travel information\",\n \"data\": {\n \"status\": \"Accepted\"\n }\n}", + "type": "object" + } + ] + }, + "permission": [ + { + "name": "Administrator" + } + ], + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/status/:id" + } + ] + }, + { + "type": "get", + "url": "/travel/self", + "title": "get information about own hacker's travel", + "name": "self", + "group": "Travel", + "version": "2.0.1", + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Travel object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Travel found by logged in account id\", \n \"data\": {\n \"id\":\"5bff4d736f86be0a41badb91\",\n \"status\": \"Claimed\"\n \"request\": 90,\n \"offer\": 80\n } \n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Travel not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/travel.js", + "groupTitle": "Travel", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/travel/self" + } + ] + }, + { + "type": "post", + "url": "/volunteer/", + "title": "create a new volunteer", + "name": "createVolunteer", + "group": "Volunteer", + "version": "0.0.8", + "parameter": { + "fields": { + "body": [ + { + "group": "body", + "type": "MongoID", + "optional": false, + "field": "accountId", + "description": "

MongoID of the account of the volunteer

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "string", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "object", + "optional": false, + "field": "data", + "description": "

Volunteer object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Volunteer creation successful\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "string", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Error while creating volunteer\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/volunteer.js", + "groupTitle": "Volunteer", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/volunteer/" + } + ] + }, + { + "type": "get", + "url": "/volunteer/:id", + "title": "get a volunteer's information", + "name": "getVolunteer", + "group": "Volunteer", + "version": "1.3.0", + "parameter": { + "fields": { + "param": [ + { + "group": "param", + "type": "ObjectId", + "optional": false, + "field": "id", + "description": "

a volunteer's unique mongoID

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "message", + "description": "

Success message

" + }, + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "data", + "description": "

Volunteer object

" + } + ] + }, + "examples": [ + { + "title": "Success-Response: ", + "content": "{\n \"message\": \"Successfully retrieved volunteer information\", \n \"data\": {...}\n }", + "type": "object" + } + ] + }, + "error": { + "fields": { + "Error 4xx": [ + { + "group": "Error 4xx", + "type": "String", + "optional": false, + "field": "message", + "description": "

Error message

" + }, + { + "group": "Error 4xx", + "type": "Object", + "optional": false, + "field": "data", + "description": "

empty

" + } + ] + }, + "examples": [ + { + "title": "Error-Response: ", + "content": "{\"message\": \"Volunteer not found\", \"data\": {}}", + "type": "object" + } + ] + }, + "filename": "routes/api/volunteer.js", + "groupTitle": "Volunteer", + "sampleRequest": [ + { + "url": "https://api.mchacks.ca/api/volunteer/:id" + } + ] + } +] diff --git a/middlewares/validators/hacker.validator.js b/middlewares/validators/hacker.validator.js index d23737c6..4d9b3b81 100644 --- a/middlewares/validators/hacker.validator.js +++ b/middlewares/validators/hacker.validator.js @@ -126,7 +126,10 @@ module.exports = { 100 ), VALIDATOR.mongoIdValidator("body", "application.team", true), - VALIDATOR.mongoIdValidator("body", "teamId", true) + VALIDATOR.stringValidator("body", "application.location.timeZone", true), + VALIDATOR.stringValidator("body", "application.location.country", true), + VALIDATOR.stringValidator("body", "application.location.city", true), + VALIDATOR.mongoIdValidator("body", "teamId", true), ], updateConfirmationValidator: [ @@ -253,7 +256,10 @@ module.exports = { 0, 100 ), - VALIDATOR.mongoIdValidator("body", "application.team", true) + VALIDATOR.mongoIdValidator("body", "application.team", true), + VALIDATOR.stringValidator("body", "application.location.timeZone", true), + VALIDATOR.stringValidator("body", "application.location.country", true), + VALIDATOR.stringValidator("body", "application.location.city", true), ], updateStatusValidator: [ VALIDATOR.enumValidator( diff --git a/models/hacker.model.js b/models/hacker.model.js index 8d46ba21..678570c1 100644 --- a/models/hacker.model.js +++ b/models/hacker.model.js @@ -131,12 +131,26 @@ const HackerSchema = new mongoose.Schema({ team: { type: mongoose.Schema.Types.ObjectId, ref: "Team" + }, + location: { + timeZone: { + type: String, + default: "" + }, + country: { + type: String, + default: "" + }, + city: { + type: String, + default: "" + } } }, teamId: { type: mongoose.Schema.Types.ObjectId, ref: "Team" - } + }, }); HackerSchema.methods.toJSON = function() { diff --git a/package.json b/package.json index 125efaef..8e8a9e91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hackerAPI", - "version": "3.1.1", + "version": "3.1.2", "private": true, "scripts": { "start": "DEBUG=hackboard:* NODE_ENV=test nodemon --ignore gcp_creds.json ./bin/www.js", diff --git a/routes/api/hacker.js b/routes/api/hacker.js index c6d73598..7f801e3b 100644 --- a/routes/api/hacker.js +++ b/routes/api/hacker.js @@ -128,6 +128,11 @@ module.exports = { "accomodation": { "travel": 0 }, + "location": { + "timeZone": "GMT-5", + "country": "Canada", + "city": "Montreal" + } } * } @@ -171,6 +176,11 @@ module.exports = { "accomodation": { "travel": 0 }, + "location": { + "timeZone": "GMT-5", + "country": "Canada", + "city": "Montreal" + } } * } @@ -461,6 +471,11 @@ module.exports = { "accomodation": { "travel": 0 }, + "location": { + "timeZone": "GMT-5", + "country": "Canada", + "city": "Montreal" + } } } * @@ -504,6 +519,11 @@ module.exports = { "accomodation": { "travel": 0 }, + "location": { + "timeZone": "GMT-5", + "country": "Canada", + "city": "Montreal" + } } } * } @@ -576,6 +596,11 @@ module.exports = { "accomodation": { "travel": 0 }, + "location": { + "timeZone": "GMT-5", + "country": "Canada", + "city": "Montreal" + } } } } @@ -644,6 +669,11 @@ module.exports = { "accomodation": { "travel": 0 }, + "location": { + "timeZone": "GMT-5", + "country": "Canada", + "city": "Montreal" + } } } } From 2829f542740e72c442ef7dae92ad15c87b2f60de Mon Sep 17 00:00:00 2001 From: logan-r Date: Wed, 27 Jan 2021 12:15:10 -0500 Subject: [PATCH 02/33] merge and resolve conflicts --- package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package.json b/package.json index 8750806a..817498e0 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,6 @@ { "name": "hackerAPI", -<<<<<<< HEAD - "version": "3.1.2", -======= "version": "3.1.3", ->>>>>>> dev "private": true, "scripts": { "start": "DEBUG=hackboard:* NODE_ENV=test nodemon --ignore gcp_creds.json ./bin/www.js", From 4a7c2002d5edf290ebeaafd8b9cfab435ea83234 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 17:39:14 -0400 Subject: [PATCH 03/33] Create node.js.yml --- .github/workflows/node.js.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..49f630d6 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ dev ] + pull_request: + branches: [ dev ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test From 7f5b91dcef178cd4fa0f2634f513157d72a07b52 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:05:37 -0400 Subject: [PATCH 04/33] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 49f630d6..a59b8a99 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -10,6 +10,7 @@ on: branches: [ dev ] jobs: + environment: hackerapi build: runs-on: ubuntu-latest From 09b6a67eea11957f137596b1d4b80125552f82c4 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:06:29 -0400 Subject: [PATCH 05/33] Update node.js.yml --- .github/workflows/node.js.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a59b8a99..092fe9ef 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -10,9 +10,8 @@ on: branches: [ dev ] jobs: - environment: hackerapi build: - + environment: testing runs-on: ubuntu-latest strategy: From 75d30c56b4c5cf7d5e06c2419a20cd65671380a0 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:16:10 -0400 Subject: [PATCH 06/33] Update app.js --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 2c6359a5..05434539 100755 --- a/app.js +++ b/app.js @@ -13,7 +13,7 @@ const Services = { const envLoadResult = Services.env.load(path.join(__dirname, "./.env")); if (envLoadResult.error) { - Services.log.error(envLoadResult.error); + Services.log.warn(envLoadResult.error); } const passport = require("passport"); From abd67676b1f8d318cfb55aeb8f1f1fe9245b2a88 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:21:44 -0400 Subject: [PATCH 07/33] Update node.js.yml --- .github/workflows/node.js.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 092fe9ef..c8a75efb 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,3 +27,22 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm ci - run: npm test + env: + AUTH_PROVIDER_X509_CERT_URL: ${{secrets.AUTH_PROVIDER_X509_CERT_URL}} + AUTH_URI: ${{secrets.AUTH_URI}} + BUCKET_NAME: ${{secrets.BUCKET_NAME}} + CLIENT_EMAIL: ${{secrets.CLIENT_EMAIL}} + CLIENT_ID: ${{secrets.CLIENT_ID}} + CLIENT_X509_CERT_URL: ${{secrets.CLIENT_X509_CERT_URL}} + DB_ADDRESS_DEV: ${{secrets.DB_ADDRESS_DEV}} + DB_PASS_DEV: ${{secrets.DB_PASS_DEV}} + DB_USER_DEV: ${{secrets.DB_USER_DEV}} + JWT_CONFIRM_ACC_SECRET: ${{secrets.JWT_CONFIRM_ACC_SECRET}} + JWT_RESET_PWD_SECRET: ${{secrets.JWT_RESET_PWD_SECRET}} + NO_REPLY_EMAIL: ${{secrets.NO_REPLY_EMAIL}} + PRIVATE_KEY: ${{secrets.PRIVATE_KEY}} + PRIVATE_KEY_ID: ${{secrets.PRIVATE_KEY_ID}} + PROJECT_ID: ${{secrets.PROJECT_ID}} + SENDGRID_API_KEY: ${{secrets.SENDGRID_API_KEY}} + TOKEN_URI: ${{secrets.TOKEN_URI}} + TYPE: ${{secrets.TYPE}} From 1a4fe3461b9d97c1ac6c2a06689aad9260713433 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:37:49 -0400 Subject: [PATCH 08/33] Update node.js.yml --- .github/workflows/node.js.yml | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c8a75efb..1a335972 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -28,21 +28,21 @@ jobs: - run: npm ci - run: npm test env: - AUTH_PROVIDER_X509_CERT_URL: ${{secrets.AUTH_PROVIDER_X509_CERT_URL}} - AUTH_URI: ${{secrets.AUTH_URI}} - BUCKET_NAME: ${{secrets.BUCKET_NAME}} - CLIENT_EMAIL: ${{secrets.CLIENT_EMAIL}} - CLIENT_ID: ${{secrets.CLIENT_ID}} - CLIENT_X509_CERT_URL: ${{secrets.CLIENT_X509_CERT_URL}} - DB_ADDRESS_DEV: ${{secrets.DB_ADDRESS_DEV}} - DB_PASS_DEV: ${{secrets.DB_PASS_DEV}} - DB_USER_DEV: ${{secrets.DB_USER_DEV}} - JWT_CONFIRM_ACC_SECRET: ${{secrets.JWT_CONFIRM_ACC_SECRET}} - JWT_RESET_PWD_SECRET: ${{secrets.JWT_RESET_PWD_SECRET}} - NO_REPLY_EMAIL: ${{secrets.NO_REPLY_EMAIL}} - PRIVATE_KEY: ${{secrets.PRIVATE_KEY}} - PRIVATE_KEY_ID: ${{secrets.PRIVATE_KEY_ID}} - PROJECT_ID: ${{secrets.PROJECT_ID}} - SENDGRID_API_KEY: ${{secrets.SENDGRID_API_KEY}} - TOKEN_URI: ${{secrets.TOKEN_URI}} - TYPE: ${{secrets.TYPE}} + AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }} + AUTH_URI: ${{ secrets.AUTH_URI }} + BUCKET_NAME: ${{ secrets.BUCKET_NAME }} + CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} + CLIENT_ID: ${{ secrets.CLIENT_ID }} + CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} + DB_ADDRESS_DEV: ${{ secrets.DB_ADDRESS_DEV }} + DB_PASS_DEV: ${{ secrets.DB_PASS_DEV }} + DB_USER_DEV: ${{ secrets.DB_USER_DEV }} + JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} + JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }} + NO_REPLY_EMAIL: ${{ secrets.NO_REPLY_EMAIL }} + PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} + PROJECT_ID: ${{ secrets.PROJECT_ID }} + SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} + TOKEN_URI: ${{ secrets.TOKEN_URI }} + TYPE: ${{ secrets.TYPE }} From fa56f41b2cc170f9ba852bf9f63b94db2aa73e35 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:40:02 -0400 Subject: [PATCH 09/33] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1a335972..51141036 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,9 +34,9 @@ jobs: CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} - DB_ADDRESS_DEV: ${{ secrets.DB_ADDRESS_DEV }} - DB_PASS_DEV: ${{ secrets.DB_PASS_DEV }} - DB_USER_DEV: ${{ secrets.DB_USER_DEV }} + DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }} + DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} + DB_USER_TEST: ${{ secrets.DB_USER_TEST }} JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }} NO_REPLY_EMAIL: ${{ secrets.NO_REPLY_EMAIL }} From 70740799d2052ec035ecb741e590dd744c847b8a Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:43:59 -0400 Subject: [PATCH 10/33] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 51141036..9d81fffe 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,6 +26,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci + - run: npm run seed - run: npm test env: AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }} From 7b6df3504202237179be609235de11b607e14657 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 12:10:41 -0400 Subject: [PATCH 11/33] Update node.js.yml --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9d81fffe..51141036 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,7 +26,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci - - run: npm run seed - run: npm test env: AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }} From 5eff92770bcc7bd3cdeb132f22c021088fd3b7b4 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 12:28:11 -0400 Subject: [PATCH 12/33] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 51141036..c57dd90d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [14.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: From 03402dd20d9c83d002c165f550d1f32e14322799 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:21:57 -0400 Subject: [PATCH 13/33] Update node.js.yml --- .github/workflows/node.js.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c57dd90d..2b2894db 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,6 +11,11 @@ on: jobs: build: + services: + mongodb: + image: mongo + ports: + - 27017:27017 environment: testing runs-on: ubuntu-latest @@ -34,9 +39,9 @@ jobs: CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} - DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }} - DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} - DB_USER_TEST: ${{ secrets.DB_USER_TEST }} + DB_ADDRESS_TEST: localhost:27017 +# DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} +# DB_USER_TEST: ${{ secrets.DB_USER_TEST }} JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }} NO_REPLY_EMAIL: ${{ secrets.NO_REPLY_EMAIL }} From aa52ae795e07b20ef0b819da9c127d5dced8f90c Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:33:38 -0400 Subject: [PATCH 14/33] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2b2894db..5cfa0749 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,7 +39,7 @@ jobs: CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} - DB_ADDRESS_TEST: localhost:27017 + DB_ADDRESS_TEST: mongodb:27017 # DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} # DB_USER_TEST: ${{ secrets.DB_USER_TEST }} JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} From c8171e14f257f146c96f504629a97b485631b22c Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:38:55 -0400 Subject: [PATCH 15/33] Update node.js.yml --- .github/workflows/node.js.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 5cfa0749..3b6f738c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,10 +39,11 @@ jobs: CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} - DB_ADDRESS_TEST: mongodb:27017 + DB_ADDRESS_TEST: localhost:27017 # DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} # DB_USER_TEST: ${{ secrets.DB_USER_TEST }} JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} + JWT_INVITE_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }} NO_REPLY_EMAIL: ${{ secrets.NO_REPLY_EMAIL }} PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} @@ -51,3 +52,5 @@ jobs: SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} TOKEN_URI: ${{ secrets.TOKEN_URI }} TYPE: ${{ secrets.TYPE }} + PORT: 3000 + ADDRESS: localhost From 01a232ee4066ea9bbce7e367c0c17fa62578fccf Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:40:22 -0400 Subject: [PATCH 16/33] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3b6f738c..6e9a171d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,9 +39,9 @@ jobs: CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} - DB_ADDRESS_TEST: localhost:27017 -# DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} -# DB_USER_TEST: ${{ secrets.DB_USER_TEST }} + DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }} + DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} + DB_USER_TEST: ${{ secrets.DB_USER_TEST }} JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} JWT_INVITE_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }} From dcabb855a7be2c49e1b498e5dfe272e74d1a9498 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:48:13 -0400 Subject: [PATCH 17/33] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6e9a171d..835dd3ff 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -54,3 +54,4 @@ jobs: TYPE: ${{ secrets.TYPE }} PORT: 3000 ADDRESS: localhost + COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }} From f9d0ef87c11d1f82aacb009f1cab408e32d569df Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:50:07 -0400 Subject: [PATCH 18/33] Update node.js.yml --- .github/workflows/node.js.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 835dd3ff..af37b8db 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,9 +39,10 @@ jobs: CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} - DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }} - DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} - DB_USER_TEST: ${{ secrets.DB_USER_TEST }} + DB_ADDRESS_TEST: localhost:3000/hackerapi +# DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }} +# DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} +# DB_USER_TEST: ${{ secrets.DB_USER_TEST }} JWT_CONFIRM_ACC_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} JWT_INVITE_SECRET: ${{ secrets.JWT_CONFIRM_ACC_SECRET }} JWT_RESET_PWD_SECRET: ${{ secrets.JWT_RESET_PWD_SECRET }} From f0a3a4d15dccb2d2b10a4d5d0d3044d5c05b51eb Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:52:14 -0400 Subject: [PATCH 19/33] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index af37b8db..65105f63 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,7 +39,7 @@ jobs: CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} CLIENT_ID: ${{ secrets.CLIENT_ID }} CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} - DB_ADDRESS_TEST: localhost:3000/hackerapi + DB_ADDRESS_TEST: localhost:27017/hackerapi # DB_ADDRESS_TEST: ${{ secrets.DB_ADDRESS_TEST }} # DB_PASS_TEST: ${{ secrets.DB_PASS_TEST }} # DB_USER_TEST: ${{ secrets.DB_USER_TEST }} From a5c1dd0ac65260b266a93189d802359d5e530e3f Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 20:17:08 -0400 Subject: [PATCH 20/33] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 817498e0..63a123a1 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "start": "DEBUG=hackboard:* NODE_ENV=test nodemon --ignore gcp_creds.json ./bin/www.js", "deploy": "NODE_ENV=deployment node ./bin/www.js", "debug": "DEBUG=hackboard:* NODE_ENV=test nodemon --ignore gcp_creds.json ./bin/www.js", - "test": "DEBUG=hackboard:* NODE_ENV=test mocha --reporter spec tests/**.js --exit", + "test": "DEBUG=hackboard:* NODE_ENV=test mocha --full-trace --reporter spec tests/**.js --exit", "seed": "NODE_ENV=test node ./seed/index.js", "docs": "apidoc -i ./routes -o ./docs/api/", "format": "prettier --write '**/*.js'", From 4cea357cb56d7577f11bb7cf6ed505219ff1d250 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 20:21:07 -0400 Subject: [PATCH 21/33] Update account.test.js --- tests/account.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/account.test.js b/tests/account.test.js index 567a2dae..6aaf0a0d 100644 --- a/tests/account.test.js +++ b/tests/account.test.js @@ -1,5 +1,6 @@ "use strict"; const chai = require("chai"); +chai.Assertion.includeStack = true const chaiHttp = require("chai-http"); chai.use(chaiHttp); const server = require("../app"); From 0df91eb7473448f0f9bc28489a83e1a52600de82 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 20:24:11 -0400 Subject: [PATCH 22/33] Update account.test.js --- tests/account.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/account.test.js b/tests/account.test.js index 6aaf0a0d..e246c090 100644 --- a/tests/account.test.js +++ b/tests/account.test.js @@ -1,6 +1,6 @@ "use strict"; const chai = require("chai"); -chai.Assertion.includeStack = true +chai.config.includeStack = true const chaiHttp = require("chai-http"); chai.use(chaiHttp); const server = require("../app"); From e5bf79d2a48a2b546d8cce66f973e96aa4a05135 Mon Sep 17 00:00:00 2001 From: James Xu Date: Sun, 20 Jun 2021 20:36:14 -0400 Subject: [PATCH 23/33] add elastic apm to see where tests are going wrong --- .idea/vcs.xml | 10 +- bin/www.js | 2 +- package-lock.json | 904 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 4 files changed, 904 insertions(+), 13 deletions(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7f..ff4fb78e 100755 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,14 @@ + + + - \ No newline at end of file + diff --git a/bin/www.js b/bin/www.js index 6d0316e3..fa1d51e0 100755 --- a/bin/www.js +++ b/bin/www.js @@ -2,7 +2,7 @@ /** * Module dependencies. */ - +const apm = require('elastic-apm-node').start() const app = require("../app").app; const debug = require("debug")("hackboard:server"); const http = require("http"); diff --git a/package-lock.json b/package-lock.json index 50eaecaa..9d872ca6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hackerAPI", - "version": "3.1.1", + "version": "3.1.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -8,7 +8,6 @@ "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, "requires": { "@babel/highlight": "^7.0.0" } @@ -17,7 +16,6 @@ "version": "7.5.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", - "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -28,7 +26,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -37,7 +34,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -46,6 +42,22 @@ } } }, + "@elastic/ecs-helpers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@elastic/ecs-helpers/-/ecs-helpers-1.1.0.tgz", + "integrity": "sha512-MDLb2aFeGjg46O5mLpdCzT5yOUDnXToJSrco2ShqGIXxNJaM8uJjX+4nd+hRYV4Vex8YJyDtOFEVBldQct6ndg==", + "requires": { + "fast-json-stringify": "^2.4.1" + } + }, + "@elastic/ecs-pino-format": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@elastic/ecs-pino-format/-/ecs-pino-format-1.1.2.tgz", + "integrity": "sha512-dnvY6mTo8c8njXbUcFEljbKw4hDaAI0hOVUZkwKMYV2kbKZFyFM5ynArZRGJDtk5VHs/5UbQdkTmOJprp0fgTg==", + "requires": { + "@elastic/ecs-helpers": "^1.1.0" + } + }, "@google-cloud/common": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.4.1.tgz", @@ -320,6 +332,11 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.10.tgz", "integrity": "sha512-p3W/hFzQs76RlYRIZsZc5a9bht6m0TspmWYYbKhRswmLnwj9fsE40EbuGifeu/XWR/c0UJQ1DDbvTxIsm/OOAA==" }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" + }, "@types/range-parser": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", @@ -411,6 +428,11 @@ "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", "dev": true }, + "after-all-results": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/after-all-results/-/after-all-results-2.0.0.tgz", + "integrity": "sha1-asL8ICtQD4jaj09VMM+hAPTGotA=" + }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -663,11 +685,53 @@ "lodash": "^4.17.10" } }, + "async-cache": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/async-cache/-/async-cache-1.1.0.tgz", + "integrity": "sha1-SppaidBl7F2OUlS9nulrp2xTK1o=", + "requires": { + "lru-cache": "^4.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + } + } + }, + "async-value": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/async-value/-/async-value-1.2.2.tgz", + "integrity": "sha1-hFF6Hny2saW14YH6Mb4QQ3t/sSU=" + }, + "async-value-promise": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/async-value-promise/-/async-value-promise-1.1.1.tgz", + "integrity": "sha512-c2RFDKjJle1rHa0YxN9Ysu97/QBu3Wa+NOejJxsX+1qVDJrkD3JL/GN1B3gaILAEXJXbu/4Z1lcoCHFESe/APA==", + "requires": { + "async-value": "^1.2.2" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -688,6 +752,21 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, "bcrypt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.0.tgz", @@ -716,6 +795,11 @@ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, + "binary-search": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/binary-search/-/binary-search-1.3.6.tgz", + "integrity": "sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==" + }, "bluebird": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", @@ -912,6 +996,14 @@ "fill-range": "^7.0.1" } }, + "breadth-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/breadth-filter/-/breadth-filter-2.0.0.tgz", + "integrity": "sha512-thQShDXnFWSk2oVBixRCyrWsFoV5tfOpWKHmxwafHQDNxCfDBk539utpvytNjmlFrTMqz41poLwJvA1MW3z0MQ==", + "requires": { + "object.entries": "^1.0.4" + } + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1040,6 +1132,15 @@ } } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1288,6 +1389,16 @@ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, + "console-log-level": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/console-log-level/-/console-log-level-1.4.1.tgz", + "integrity": "sha512-VZzbIORbP+PPcN/gg3DXClTLPLg5Slwd5fL2MIc+o1qZ4BXBvWyc6QxPk6T/Mkr6IVjRpoAGf32XxP3ZWMVRcQ==" + }, + "container-info": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/container-info/-/container-info-1.1.0.tgz", + "integrity": "sha512-eD2zLAmxGS2kmL4f1jY8BdOqnmpL6X70kvzTBW/9FIQnxoxiBJ4htMsTmtPLPWRs7NHYFvqKQ1VtppV08mdsQA==" + }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -1643,6 +1754,117 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "elastic-apm-http-client": { + "version": "9.8.1", + "resolved": "https://registry.npmjs.org/elastic-apm-http-client/-/elastic-apm-http-client-9.8.1.tgz", + "integrity": "sha512-tVU7+y4nSDUEZp/TXbXDxE+kXbWHsGVG1umk0OOV71UEPc/AqC7xSP5ACirOlDkewkfCOFXkvNThgu2zlx8PUw==", + "requires": { + "breadth-filter": "^2.0.0", + "container-info": "^1.0.1", + "end-of-stream": "^1.4.4", + "fast-safe-stringify": "^2.0.7", + "fast-stream-to-buffer": "^1.0.0", + "object-filter-sequence": "^1.0.0", + "readable-stream": "^3.4.0", + "stream-chopper": "^3.0.1", + "unicode-byte-truncate": "^1.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "elastic-apm-node": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/elastic-apm-node/-/elastic-apm-node-3.16.0.tgz", + "integrity": "sha512-WR56cjpvt9ZAAw+4Ct2XjCtmy+lgn5kXZH220TRgC7W71c5uuRdioRJpIdvBPMZmeLnHwzok2+acUB7bxnYvVA==", + "requires": { + "@elastic/ecs-pino-format": "^1.1.0", + "after-all-results": "^2.0.0", + "async-cache": "^1.1.0", + "async-value-promise": "^1.1.1", + "basic-auth": "^2.0.1", + "cookie": "^0.4.0", + "core-util-is": "^1.0.2", + "elastic-apm-http-client": "^9.8.1", + "end-of-stream": "^1.4.4", + "error-callsites": "^2.0.4", + "error-stack-parser": "^2.0.6", + "escape-string-regexp": "^4.0.0", + "fast-safe-stringify": "^2.0.7", + "http-headers": "^3.0.2", + "is-native": "^1.0.1", + "load-source-map": "^2.0.0", + "lru-cache": "^6.0.0", + "measured-reporting": "^1.51.1", + "monitor-event-loop-delay": "^1.0.0", + "object-filter-sequence": "^1.0.0", + "object-identity-map": "^1.0.2", + "original-url": "^1.2.3", + "pino": "^6.11.2", + "read-pkg-up": "^7.0.1", + "relative-microtime": "^2.0.0", + "require-in-the-middle": "^5.0.3", + "semver": "^6.3.0", + "set-cookie-serde": "^1.0.0", + "shallow-clone-shim": "^2.0.0", + "sql-summary": "^1.0.1", + "traceparent": "^1.0.0", + "traverse": "^0.6.6", + "unicode-byte-truncate": "^1.0.0" + }, + "dependencies": { + "cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -1681,6 +1903,27 @@ "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==", "dev": true }, + "error-callsites": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/error-callsites/-/error-callsites-2.0.4.tgz", + "integrity": "sha512-V877Ch4FC4FN178fDK1fsrHN4I1YQIBdtjKrHh3BUHMnh3SMvwUVrqkaOgDpUuevgSNna0RBq6Ox9SGlxYrigA==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "error-stack-parser": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", + "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", + "requires": { + "stackframe": "^1.1.1" + } + }, "es-abstract": { "version": "1.17.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", @@ -1962,8 +2205,7 @@ "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "etag": { "version": "1.8.1", @@ -2137,18 +2379,65 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-json-stringify": { + "version": "2.7.6", + "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-2.7.6.tgz", + "integrity": "sha512-ezem8qpAgpad6tXeUhK0aSCS8Fi2vjxTorI9i5M+xrq6UUbTl7/bBTxL1SjRI2zy+qpPkdD4+UblUCQdxRpvIg==", + "requires": { + "ajv": "^6.11.0", + "deepmerge": "^4.2.2", + "rfdc": "^1.2.0", + "string-similarity": "^4.0.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + } + } + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fast-redact": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.0.1.tgz", + "integrity": "sha512-kYpn4Y/valC9MdrISg47tZOpYBNoTXKgT9GYXFpHN/jYFs+lFkPoisY+LcBODdKVMY96ATzvzsWv+ES/4Kmufw==" + }, "fast-safe-stringify": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==", "dev": true }, + "fast-stream-to-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stream-to-buffer/-/fast-stream-to-buffer-1.0.0.tgz", + "integrity": "sha512-bI/544WUQlD2iXBibQbOMSmG07Hay7YrpXlKaeGTPT7H7pC0eitt3usak5vUwEvCGK/O7rUAM3iyQValGU22TQ==", + "requires": { + "end-of-stream": "^1.4.1" + } + }, "fast-text-encoding": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz", @@ -2247,6 +2536,11 @@ "write": "1.0.3" } }, + "flatstr": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", + "integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==" + }, "flatted": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", @@ -2279,6 +2573,11 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" }, + "forwarded-parse": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.1.tgz", + "integrity": "sha512-8Jh3uv3iaaTTvH3vM4qyRjKfe5dvR/THhiPY5zhsfFa/UviqnEd3hqNyxEtRCwL3+L2vv8JsanGZ5XHQcncyUA==" + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -2424,6 +2723,16 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-stdin": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", @@ -2618,6 +2927,11 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + }, "has-color": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", @@ -2655,6 +2969,11 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -2673,6 +2992,14 @@ "toidentifier": "1.0.0" } }, + "http-headers": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-headers/-/http-headers-3.0.2.tgz", + "integrity": "sha512-87E1I+2Wg4dxxz4rcxElo3dxO/w1ZtgL1yA0Sb6vH3qU16vRKq1NjWQv9SCY3ly2OQROcoxHZOUpmelS+k6wOw==", + "requires": { + "next-line": "^1.1.0" + } + }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -2902,6 +3229,16 @@ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-bigint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==" + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2911,6 +3248,14 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "requires": { + "call-bind": "^1.0.2" + } + }, "is-callable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", @@ -2925,6 +3270,14 @@ "ci-info": "^2.0.0" } }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "requires": { + "has": "^1.0.3" + } + }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", @@ -2936,6 +3289,11 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" + }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -2963,6 +3321,14 @@ "is-path-inside": "^3.0.1" } }, + "is-integer": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", + "integrity": "sha1-a96Bqs3feLZZtmKdYpytxRqIbVw=", + "requires": { + "is-finite": "^1.0.0" + } + }, "is-ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-2.0.0.tgz", @@ -2977,6 +3343,25 @@ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" }, + "is-native": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-native/-/is-native-1.0.1.tgz", + "integrity": "sha1-zRjMFi6EUNaDtbq+eayZwUVElnU=", + "requires": { + "is-nil": "^1.0.0", + "to-source-code": "^1.0.0" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, + "is-nil": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-nil/-/is-nil-1.0.1.tgz", + "integrity": "sha1-LauingtYUGOHXntTnQcfWxWTeWk=" + }, "is-npm": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", @@ -2989,6 +3374,11 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==" + }, "is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", @@ -3082,8 +3472,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.13.1", @@ -3114,6 +3503,11 @@ "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -3278,6 +3672,11 @@ "type-check": "~0.3.2" } }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, "linkify-it": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.1.0.tgz", @@ -3287,6 +3686,14 @@ "uc.micro": "^1.0.1" } }, + "load-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-source-map/-/load-source-map-2.0.0.tgz", + "integrity": "sha512-QNZzJ2wMrTmCdeobMuMNEXHN1QGk8HG6louEkzD/zwQ7EU2RarrzlhQ4GnUYEFzLhK+Jq7IGyF/qy+XYBSO7AQ==", + "requires": { + "source-map": "^0.7.3" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -3423,6 +3830,11 @@ } } }, + "mapcap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mapcap/-/mapcap-1.0.0.tgz", + "integrity": "sha512-KcNlZSlFPx+r1jYZmxEbTVymG+dIctf10WmWkuhrhrblM+KMoF77HelwihL5cxYlORye79KoR4IlOOk99lUJ0g==" + }, "markdown-it": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", @@ -3450,6 +3862,26 @@ "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", "dev": true }, + "measured-core": { + "version": "1.51.1", + "resolved": "https://registry.npmjs.org/measured-core/-/measured-core-1.51.1.tgz", + "integrity": "sha512-DZQP9SEwdqqYRvT2slMK81D/7xwdxXosZZBtLVfPSo6y5P672FBTbzHVdN4IQyUkUpcVOR9pIvtUy5Ryl7NKyg==", + "requires": { + "binary-search": "^1.3.3", + "optional-js": "^2.0.0" + } + }, + "measured-reporting": { + "version": "1.51.1", + "resolved": "https://registry.npmjs.org/measured-reporting/-/measured-reporting-1.51.1.tgz", + "integrity": "sha512-JCt+2u6XT1I5lG3SuYqywE0e62DJuAzBcfMzWGUhIYtPQV2Vm4HiYt/durqmzsAbZV181CEs+o/jMKWJKkYIWw==", + "requires": { + "console-log-level": "^1.4.1", + "mapcap": "^1.0.0", + "measured-core": "^1.51.1", + "optional-js": "^2.0.0" + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -3747,6 +4179,11 @@ } } }, + "module-details-from-path": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", + "integrity": "sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=" + }, "mongodb": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.5.tgz", @@ -3800,6 +4237,11 @@ "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" }, + "monitor-event-loop-delay": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/monitor-event-loop-delay/-/monitor-event-loop-delay-1.0.0.tgz", + "integrity": "sha512-YRIr1exCIfBDLZle8WHOfSo7Xg3M+phcZfq9Fx1L6Abo+atGp7cge5pM7PjyBn4s1oZI/BRD4EMrzQBbPpVb5Q==" + }, "mpath": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.6.0.tgz", @@ -3899,6 +4341,11 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "next-line": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-line/-/next-line-1.1.0.tgz", + "integrity": "sha1-/K5XhTBStqm66CCOQN19PC0wRgM=" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -4025,6 +4472,17 @@ "abbrev": "1" } }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4077,6 +4535,19 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-filter-sequence": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/object-filter-sequence/-/object-filter-sequence-1.0.0.tgz", + "integrity": "sha512-CsubGNxhIEChNY4cXYuA6KXafztzHqzLLZ/y3Kasf3A+sa3lL9thq3z+7o0pZqzEinjXT6lXDPAfVWI59dUyzQ==" + }, + "object-identity-map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/object-identity-map/-/object-identity-map-1.0.2.tgz", + "integrity": "sha512-a2XZDGyYTngvGS67kWnqVdpoaJWsY7C1GhPJvejWAFCsUioTAaiTu8oBad7c6cI4McZxr4CmvnZeycK05iav5A==", + "requires": { + "object.entries": "^1.1.0" + } + }, "object-inspect": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", @@ -4098,6 +4569,99 @@ "object-keys": "^1.0.11" } }, + "object.entries": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.4.tgz", + "integrity": "sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", + "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.10.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "is-regex": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" + }, + "object-inspect": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + } + } + }, "object.getownpropertydescriptors": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", @@ -4143,6 +4707,11 @@ "mimic-fn": "^2.1.0" } }, + "optional-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/optional-js/-/optional-js-2.3.0.tgz", + "integrity": "sha512-B0LLi+Vg+eko++0z/b8zIv57kp7HKEzaPJo7LowJXMUKYdf+3XJGu/cw03h/JhIOsLnP+cG5QnTHAuicjA5fMw==" + }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", @@ -4157,6 +4726,14 @@ "word-wrap": "~1.2.3" } }, + "original-url": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/original-url/-/original-url-1.2.3.tgz", + "integrity": "sha512-BYm+pKYLtS4mVe/mgT3YKGtWV5HzN/XKiaIu1aK4rsxyjuHeTW9N+xVBEpJcY1onB3nccfH0RbzUEoimMqFUHQ==", + "requires": { + "forwarded-parse": "^2.1.0" + } + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -4232,6 +4809,17 @@ "callsites": "^3.0.0" } }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -4275,6 +4863,11 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -4302,6 +4895,31 @@ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, + "pino": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/pino/-/pino-6.11.3.tgz", + "integrity": "sha512-drPtqkkSf0ufx2gaea3TryFiBHdNIdXKf5LN0hTM82SXI4xVIve2wLwNg92e1MT6m3jASLu6VO7eGY6+mmGeyw==", + "requires": { + "fast-redact": "^3.0.0", + "fast-safe-stringify": "^2.0.7", + "flatstr": "^1.0.12", + "pino-std-serializers": "^3.1.0", + "quick-format-unescaped": "^4.0.3", + "sonic-boom": "^1.0.2" + }, + "dependencies": { + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + } + } + }, + "pino-std-serializers": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz", + "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==" + }, "pngjs": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", @@ -4366,6 +4984,11 @@ "ipaddr.js": "1.9.0" } }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, "psl": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz", @@ -4525,6 +5148,16 @@ "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "dev": true }, + "quick-format-unescaped": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.3.tgz", + "integrity": "sha512-MaL/oqh02mhEo5m5J2rwsVL23Iw2PEaGVHgT2vFt8AAsr0lfvQA5dpXo9TPu0rz7tSBdUPgkbam0j/fj5ZM8yg==" + }, + "random-poly-fill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/random-poly-fill/-/random-poly-fill-1.0.1.tgz", + "integrity": "sha512-bMOL0hLfrNs52+EHtIPIXxn2PxYwXb0qjnKruTjXiM/sKfYqj506aB2plFwWW1HN+ri724bAVVGparh4AtlJKw==" + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -4569,6 +5202,66 @@ } } }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + } + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -4621,6 +5314,11 @@ "rc": "^1.2.8" } }, + "relative-microtime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/relative-microtime/-/relative-microtime-2.0.0.tgz", + "integrity": "sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA==" + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -4683,6 +5381,16 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, + "require-in-the-middle": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-5.1.0.tgz", + "integrity": "sha512-M2rLKVupQfJ5lf9OvqFGIT+9iVLnTmjgbOmpil12hiSQNn5zJTKGPoIisETNjfK+09vP3rpm1zJajmErpr2sEQ==", + "requires": { + "debug": "^4.1.1", + "module-details-from-path": "^1.0.3", + "resolve": "^1.12.0" + } + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -4697,6 +5405,15 @@ "semver": "^5.1.0" } }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, "resolve-from": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", @@ -4729,6 +5446,11 @@ "debug": "^4.1.1" } }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -4879,11 +5601,21 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "set-cookie-serde": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-cookie-serde/-/set-cookie-serde-1.0.0.tgz", + "integrity": "sha512-Vq8e5GsupfJ7okHIvEPcfs5neCo7MZ1ZuWrO3sllYi3DOWt6bSSCpADzqXjz3k0fXehnoFIrmmhty9IN6U6BXQ==" + }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, + "shallow-clone-shim": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone-shim/-/shallow-clone-shim-2.0.0.tgz", + "integrity": "sha512-YRNymdiL3KGOoS67d73TEmk4tdPTO9GSMCoiphQsTcC9EtC+AOmMPjkyBkRoCJfW9ASsaZw1craaiw1dPN2D3Q==" + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -4964,6 +5696,20 @@ "resolved": "https://registry.npmjs.org/snakeize/-/snakeize-0.1.0.tgz", "integrity": "sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0=" }, + "sonic-boom": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.4.1.tgz", + "integrity": "sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==", + "requires": { + "atomic-sleep": "^1.0.0", + "flatstr": "^1.0.12" + } + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + }, "sparse-bitfield": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", @@ -4973,12 +5719,45 @@ "memory-pager": "^1.0.2" } }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==" + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "sql-summary": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sql-summary/-/sql-summary-1.0.1.tgz", + "integrity": "sha512-IpCr2tpnNkP3Jera4ncexsZUp0enJBLr+pHCyTweMUBrbJsTgQeLWx1FXLhoBj/MvcnUQpkgOn2EY8FKOkUzww==" + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -5000,11 +5779,36 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, + "stackframe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz", + "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==" + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "stream-chopper": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/stream-chopper/-/stream-chopper-3.0.1.tgz", + "integrity": "sha512-f7h+ly8baAE26iIjcp3VbnBkbIRGtrvV0X0xxFM/d7fwLTYnLzDPTXRKNxa2HZzohOrc96NTrR+FaV3mzOelNA==", + "requires": { + "readable-stream": "^3.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "stream-events": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", @@ -5023,6 +5827,11 @@ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" }, + "string-similarity": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz", + "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==" + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -5252,6 +6061,14 @@ "is-number": "^7.0.0" } }, + "to-source-code": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/to-source-code/-/to-source-code-1.0.2.tgz", + "integrity": "sha1-3RNr2x4dvYC76s8IiZJnjpBwv+o=", + "requires": { + "is-nil": "^1.0.0" + } + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", @@ -5282,6 +6099,19 @@ } } }, + "traceparent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/traceparent/-/traceparent-1.0.0.tgz", + "integrity": "sha512-b/hAbgx57pANQ6cg2eBguY3oxD6FGVLI1CC2qoi01RmHR7AYpQHPXTig9FkzbWohEsVuHENZHP09aXuw3/LM+w==", + "requires": { + "random-poly-fill": "^1.0.1" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, "triple-beam": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", @@ -5325,8 +6155,7 @@ "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" }, "type-is": { "version": "1.6.18", @@ -5377,6 +6206,24 @@ "integrity": "sha512-FyYnoxVL1D6+jDGQpbK5jW6y/2JlVfRfEeQ67BPCUg5wfCjaKOpr2XeceE4QL+MkhxliLtf5EbrMDZgzpt2CNw==", "optional": true }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + } + } + }, "undefsafe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", @@ -5397,6 +6244,20 @@ } } }, + "unicode-byte-truncate": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unicode-byte-truncate/-/unicode-byte-truncate-1.0.0.tgz", + "integrity": "sha1-qm8PNHUZP+IMMgrJIT425i6HZKc=", + "requires": { + "is-integer": "^1.0.6", + "unicode-substring": "^0.1.0" + } + }, + "unicode-substring": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicode-substring/-/unicode-substring-0.1.0.tgz", + "integrity": "sha1-YSDOPDkDhdvND2DDK5BlxBgdSzY=" + }, "unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -5526,6 +6387,15 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "validator": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz", @@ -5555,6 +6425,18 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", diff --git a/package.json b/package.json index 63a123a1..70f59cfd 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "cryptiles": "^4.1.3", "debug": "~4.1.1", "dotenv": "^8.2.0", + "elastic-apm-node": "^3.16.0", "express": "~4.17.1", "express-validator": "^6.3.0", "express-winston": "^2.6.0", From 0ef97d7066e82673829f74e7c4b9526dd409821b Mon Sep 17 00:00:00 2001 From: James Xu Date: Sun, 20 Jun 2021 20:39:44 -0400 Subject: [PATCH 24/33] move apm to app.js so it gets picked up by test --- app.js | 1 + bin/www.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 05434539..d0d3204d 100755 --- a/app.js +++ b/app.js @@ -1,4 +1,5 @@ "use strict"; +const apm = require('elastic-apm-node').start() const express = require("express"); const path = require("path"); const cookieParser = require("cookie-parser"); diff --git a/bin/www.js b/bin/www.js index fa1d51e0..b76aea16 100755 --- a/bin/www.js +++ b/bin/www.js @@ -2,7 +2,6 @@ /** * Module dependencies. */ -const apm = require('elastic-apm-node').start() const app = require("../app").app; const debug = require("debug")("hackboard:server"); const http = require("http"); From 63fb87e6c5e66325d9282403aa4ebbfda9b57e9c Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 20:41:51 -0400 Subject: [PATCH 25/33] add apm env to gh workflow --- .github/workflows/node.js.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 65105f63..da4b2fc7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -56,3 +56,6 @@ jobs: PORT: 3000 ADDRESS: localhost COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }} + ELASTIC_APM_SERVICE_NAME: ${{ secrets.ELASTIC_APM_SERVICE_NAME }} + ELASTIC_APM_SECRET_TOKEN: ${{ secrets.ELASTIC_APM_SECRET_TOKEN }} + ELASTIC_APM_SERVER_URL: ${{ secrets.ELASTIC_APM_SERVER_URL }} From 5dde2ad7bd77d5c93704a88daebc329ce5d412e2 Mon Sep 17 00:00:00 2001 From: James Xu Date: Sun, 20 Jun 2021 20:47:47 -0400 Subject: [PATCH 26/33] add missing envs --- .github/workflows/node.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 65105f63..abfd8fe5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -56,3 +56,5 @@ jobs: PORT: 3000 ADDRESS: localhost COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }} + FRONTEND_ADDRESS_DEV: localhost:1337 + FRONTEND_ADDRESS_DEPLOY: app.mchacks.ca From 20126b77e9a65524735d73028fb54977240d5cc2 Mon Sep 17 00:00:00 2001 From: James Xu Date: Sun, 20 Jun 2021 21:15:17 -0400 Subject: [PATCH 27/33] remove debugging tools --- .github/workflows/node.js.yml | 7 ++++--- app.js | 1 - package.json | 2 +- tests/account.test.js | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c7d5b120..437ada69 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -56,8 +56,9 @@ jobs: PORT: 3000 ADDRESS: localhost COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }} - ELASTIC_APM_SERVICE_NAME: ${{ secrets.ELASTIC_APM_SERVICE_NAME }} - ELASTIC_APM_SECRET_TOKEN: ${{ secrets.ELASTIC_APM_SECRET_TOKEN }} - ELASTIC_APM_SERVER_URL: ${{ secrets.ELASTIC_APM_SERVER_URL }} + # we don't currently have hosted elastic apm +# ELASTIC_APM_SERVICE_NAME: ${{ secrets.ELASTIC_APM_SERVICE_NAME }} +# ELASTIC_APM_SECRET_TOKEN: ${{ secrets.ELASTIC_APM_SECRET_TOKEN }} +# ELASTIC_APM_SERVER_URL: ${{ secrets.ELASTIC_APM_SERVER_URL }} FRONTEND_ADDRESS_DEV: localhost:1337 FRONTEND_ADDRESS_DEPLOY: app.mchacks.ca diff --git a/app.js b/app.js index d0d3204d..05434539 100755 --- a/app.js +++ b/app.js @@ -1,5 +1,4 @@ "use strict"; -const apm = require('elastic-apm-node').start() const express = require("express"); const path = require("path"); const cookieParser = require("cookie-parser"); diff --git a/package.json b/package.json index 70f59cfd..b54be2d4 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "start": "DEBUG=hackboard:* NODE_ENV=test nodemon --ignore gcp_creds.json ./bin/www.js", "deploy": "NODE_ENV=deployment node ./bin/www.js", "debug": "DEBUG=hackboard:* NODE_ENV=test nodemon --ignore gcp_creds.json ./bin/www.js", - "test": "DEBUG=hackboard:* NODE_ENV=test mocha --full-trace --reporter spec tests/**.js --exit", + "test": "DEBUG=hackboard:* NODE_ENV=test mocha --reporter spec tests/**.js --exit", "seed": "NODE_ENV=test node ./seed/index.js", "docs": "apidoc -i ./routes -o ./docs/api/", "format": "prettier --write '**/*.js'", diff --git a/tests/account.test.js b/tests/account.test.js index e246c090..567a2dae 100644 --- a/tests/account.test.js +++ b/tests/account.test.js @@ -1,6 +1,5 @@ "use strict"; const chai = require("chai"); -chai.config.includeStack = true const chaiHttp = require("chai-http"); chai.use(chaiHttp); const server = require("../app"); From 428c0461ea29d78be7d839dc807f94fcfade516e Mon Sep 17 00:00:00 2001 From: James Xu Date: Sun, 20 Jun 2021 21:18:11 -0400 Subject: [PATCH 28/33] remove elastic apm --- package-lock.json | 902 +--------------------------------------------- package.json | 1 - 2 files changed, 10 insertions(+), 893 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d872ca6..5563d589 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, "requires": { "@babel/highlight": "^7.0.0" } @@ -16,6 +17,7 @@ "version": "7.5.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -26,6 +28,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -34,6 +37,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -42,22 +46,6 @@ } } }, - "@elastic/ecs-helpers": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@elastic/ecs-helpers/-/ecs-helpers-1.1.0.tgz", - "integrity": "sha512-MDLb2aFeGjg46O5mLpdCzT5yOUDnXToJSrco2ShqGIXxNJaM8uJjX+4nd+hRYV4Vex8YJyDtOFEVBldQct6ndg==", - "requires": { - "fast-json-stringify": "^2.4.1" - } - }, - "@elastic/ecs-pino-format": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@elastic/ecs-pino-format/-/ecs-pino-format-1.1.2.tgz", - "integrity": "sha512-dnvY6mTo8c8njXbUcFEljbKw4hDaAI0hOVUZkwKMYV2kbKZFyFM5ynArZRGJDtk5VHs/5UbQdkTmOJprp0fgTg==", - "requires": { - "@elastic/ecs-helpers": "^1.1.0" - } - }, "@google-cloud/common": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.4.1.tgz", @@ -332,11 +320,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.10.tgz", "integrity": "sha512-p3W/hFzQs76RlYRIZsZc5a9bht6m0TspmWYYbKhRswmLnwj9fsE40EbuGifeu/XWR/c0UJQ1DDbvTxIsm/OOAA==" }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" - }, "@types/range-parser": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", @@ -428,11 +411,6 @@ "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", "dev": true }, - "after-all-results": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/after-all-results/-/after-all-results-2.0.0.tgz", - "integrity": "sha1-asL8ICtQD4jaj09VMM+hAPTGotA=" - }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -685,53 +663,11 @@ "lodash": "^4.17.10" } }, - "async-cache": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/async-cache/-/async-cache-1.1.0.tgz", - "integrity": "sha1-SppaidBl7F2OUlS9nulrp2xTK1o=", - "requires": { - "lru-cache": "^4.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - } - } - }, - "async-value": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/async-value/-/async-value-1.2.2.tgz", - "integrity": "sha1-hFF6Hny2saW14YH6Mb4QQ3t/sSU=" - }, - "async-value-promise": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/async-value-promise/-/async-value-promise-1.1.1.tgz", - "integrity": "sha512-c2RFDKjJle1rHa0YxN9Ysu97/QBu3Wa+NOejJxsX+1qVDJrkD3JL/GN1B3gaILAEXJXbu/4Z1lcoCHFESe/APA==", - "requires": { - "async-value": "^1.2.2" - } - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, - "atomic-sleep": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==" - }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -752,21 +688,6 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, - "basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, "bcrypt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.0.tgz", @@ -795,11 +716,6 @@ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, - "binary-search": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/binary-search/-/binary-search-1.3.6.tgz", - "integrity": "sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==" - }, "bluebird": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", @@ -996,14 +912,6 @@ "fill-range": "^7.0.1" } }, - "breadth-filter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/breadth-filter/-/breadth-filter-2.0.0.tgz", - "integrity": "sha512-thQShDXnFWSk2oVBixRCyrWsFoV5tfOpWKHmxwafHQDNxCfDBk539utpvytNjmlFrTMqz41poLwJvA1MW3z0MQ==", - "requires": { - "object.entries": "^1.0.4" - } - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1132,15 +1040,6 @@ } } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1389,16 +1288,6 @@ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, - "console-log-level": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/console-log-level/-/console-log-level-1.4.1.tgz", - "integrity": "sha512-VZzbIORbP+PPcN/gg3DXClTLPLg5Slwd5fL2MIc+o1qZ4BXBvWyc6QxPk6T/Mkr6IVjRpoAGf32XxP3ZWMVRcQ==" - }, - "container-info": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/container-info/-/container-info-1.1.0.tgz", - "integrity": "sha512-eD2zLAmxGS2kmL4f1jY8BdOqnmpL6X70kvzTBW/9FIQnxoxiBJ4htMsTmtPLPWRs7NHYFvqKQ1VtppV08mdsQA==" - }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -1754,117 +1643,6 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, - "elastic-apm-http-client": { - "version": "9.8.1", - "resolved": "https://registry.npmjs.org/elastic-apm-http-client/-/elastic-apm-http-client-9.8.1.tgz", - "integrity": "sha512-tVU7+y4nSDUEZp/TXbXDxE+kXbWHsGVG1umk0OOV71UEPc/AqC7xSP5ACirOlDkewkfCOFXkvNThgu2zlx8PUw==", - "requires": { - "breadth-filter": "^2.0.0", - "container-info": "^1.0.1", - "end-of-stream": "^1.4.4", - "fast-safe-stringify": "^2.0.7", - "fast-stream-to-buffer": "^1.0.0", - "object-filter-sequence": "^1.0.0", - "readable-stream": "^3.4.0", - "stream-chopper": "^3.0.1", - "unicode-byte-truncate": "^1.0.0" - }, - "dependencies": { - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "elastic-apm-node": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/elastic-apm-node/-/elastic-apm-node-3.16.0.tgz", - "integrity": "sha512-WR56cjpvt9ZAAw+4Ct2XjCtmy+lgn5kXZH220TRgC7W71c5uuRdioRJpIdvBPMZmeLnHwzok2+acUB7bxnYvVA==", - "requires": { - "@elastic/ecs-pino-format": "^1.1.0", - "after-all-results": "^2.0.0", - "async-cache": "^1.1.0", - "async-value-promise": "^1.1.1", - "basic-auth": "^2.0.1", - "cookie": "^0.4.0", - "core-util-is": "^1.0.2", - "elastic-apm-http-client": "^9.8.1", - "end-of-stream": "^1.4.4", - "error-callsites": "^2.0.4", - "error-stack-parser": "^2.0.6", - "escape-string-regexp": "^4.0.0", - "fast-safe-stringify": "^2.0.7", - "http-headers": "^3.0.2", - "is-native": "^1.0.1", - "load-source-map": "^2.0.0", - "lru-cache": "^6.0.0", - "measured-reporting": "^1.51.1", - "monitor-event-loop-delay": "^1.0.0", - "object-filter-sequence": "^1.0.0", - "object-identity-map": "^1.0.2", - "original-url": "^1.2.3", - "pino": "^6.11.2", - "read-pkg-up": "^7.0.1", - "relative-microtime": "^2.0.0", - "require-in-the-middle": "^5.0.3", - "semver": "^6.3.0", - "set-cookie-serde": "^1.0.0", - "shallow-clone-shim": "^2.0.0", - "sql-summary": "^1.0.1", - "traceparent": "^1.0.0", - "traverse": "^0.6.6", - "unicode-byte-truncate": "^1.0.0" - }, - "dependencies": { - "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" - }, - "fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -1903,27 +1681,6 @@ "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==", "dev": true }, - "error-callsites": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/error-callsites/-/error-callsites-2.0.4.tgz", - "integrity": "sha512-V877Ch4FC4FN178fDK1fsrHN4I1YQIBdtjKrHh3BUHMnh3SMvwUVrqkaOgDpUuevgSNna0RBq6Ox9SGlxYrigA==" - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "error-stack-parser": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", - "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", - "requires": { - "stackframe": "^1.1.1" - } - }, "es-abstract": { "version": "1.17.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", @@ -2205,7 +1962,8 @@ "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true }, "etag": { "version": "1.8.1", @@ -2379,65 +2137,18 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, - "fast-json-stringify": { - "version": "2.7.6", - "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-2.7.6.tgz", - "integrity": "sha512-ezem8qpAgpad6tXeUhK0aSCS8Fi2vjxTorI9i5M+xrq6UUbTl7/bBTxL1SjRI2zy+qpPkdD4+UblUCQdxRpvIg==", - "requires": { - "ajv": "^6.11.0", - "deepmerge": "^4.2.2", - "rfdc": "^1.2.0", - "string-similarity": "^4.0.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - } - } - }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "fast-redact": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.0.1.tgz", - "integrity": "sha512-kYpn4Y/valC9MdrISg47tZOpYBNoTXKgT9GYXFpHN/jYFs+lFkPoisY+LcBODdKVMY96ATzvzsWv+ES/4Kmufw==" - }, "fast-safe-stringify": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==", "dev": true }, - "fast-stream-to-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-stream-to-buffer/-/fast-stream-to-buffer-1.0.0.tgz", - "integrity": "sha512-bI/544WUQlD2iXBibQbOMSmG07Hay7YrpXlKaeGTPT7H7pC0eitt3usak5vUwEvCGK/O7rUAM3iyQValGU22TQ==", - "requires": { - "end-of-stream": "^1.4.1" - } - }, "fast-text-encoding": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz", @@ -2536,11 +2247,6 @@ "write": "1.0.3" } }, - "flatstr": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", - "integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==" - }, "flatted": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", @@ -2573,11 +2279,6 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" }, - "forwarded-parse": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.1.tgz", - "integrity": "sha512-8Jh3uv3iaaTTvH3vM4qyRjKfe5dvR/THhiPY5zhsfFa/UviqnEd3hqNyxEtRCwL3+L2vv8JsanGZ5XHQcncyUA==" - }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -2723,16 +2424,6 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, "get-stdin": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", @@ -2927,11 +2618,6 @@ "function-bind": "^1.1.1" } }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" - }, "has-color": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", @@ -2969,11 +2655,6 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -2992,14 +2673,6 @@ "toidentifier": "1.0.0" } }, - "http-headers": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/http-headers/-/http-headers-3.0.2.tgz", - "integrity": "sha512-87E1I+2Wg4dxxz4rcxElo3dxO/w1ZtgL1yA0Sb6vH3qU16vRKq1NjWQv9SCY3ly2OQROcoxHZOUpmelS+k6wOw==", - "requires": { - "next-line": "^1.1.0" - } - }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -3229,16 +2902,6 @@ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==" - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -3248,14 +2911,6 @@ "binary-extensions": "^2.0.0" } }, - "is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", - "requires": { - "call-bind": "^1.0.2" - } - }, "is-callable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", @@ -3270,14 +2925,6 @@ "ci-info": "^2.0.0" } }, - "is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", - "requires": { - "has": "^1.0.3" - } - }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", @@ -3289,11 +2936,6 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" - }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -3321,14 +2963,6 @@ "is-path-inside": "^3.0.1" } }, - "is-integer": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", - "integrity": "sha1-a96Bqs3feLZZtmKdYpytxRqIbVw=", - "requires": { - "is-finite": "^1.0.0" - } - }, "is-ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-2.0.0.tgz", @@ -3343,25 +2977,6 @@ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" }, - "is-native": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-native/-/is-native-1.0.1.tgz", - "integrity": "sha1-zRjMFi6EUNaDtbq+eayZwUVElnU=", - "requires": { - "is-nil": "^1.0.0", - "to-source-code": "^1.0.0" - } - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" - }, - "is-nil": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-nil/-/is-nil-1.0.1.tgz", - "integrity": "sha1-LauingtYUGOHXntTnQcfWxWTeWk=" - }, "is-npm": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", @@ -3374,11 +2989,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==" - }, "is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", @@ -3472,7 +3082,8 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "js-yaml": { "version": "3.13.1", @@ -3503,11 +3114,6 @@ "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -3672,11 +3278,6 @@ "type-check": "~0.3.2" } }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" - }, "linkify-it": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.1.0.tgz", @@ -3686,14 +3287,6 @@ "uc.micro": "^1.0.1" } }, - "load-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-source-map/-/load-source-map-2.0.0.tgz", - "integrity": "sha512-QNZzJ2wMrTmCdeobMuMNEXHN1QGk8HG6louEkzD/zwQ7EU2RarrzlhQ4GnUYEFzLhK+Jq7IGyF/qy+XYBSO7AQ==", - "requires": { - "source-map": "^0.7.3" - } - }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -3830,11 +3423,6 @@ } } }, - "mapcap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mapcap/-/mapcap-1.0.0.tgz", - "integrity": "sha512-KcNlZSlFPx+r1jYZmxEbTVymG+dIctf10WmWkuhrhrblM+KMoF77HelwihL5cxYlORye79KoR4IlOOk99lUJ0g==" - }, "markdown-it": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", @@ -3862,26 +3450,6 @@ "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", "dev": true }, - "measured-core": { - "version": "1.51.1", - "resolved": "https://registry.npmjs.org/measured-core/-/measured-core-1.51.1.tgz", - "integrity": "sha512-DZQP9SEwdqqYRvT2slMK81D/7xwdxXosZZBtLVfPSo6y5P672FBTbzHVdN4IQyUkUpcVOR9pIvtUy5Ryl7NKyg==", - "requires": { - "binary-search": "^1.3.3", - "optional-js": "^2.0.0" - } - }, - "measured-reporting": { - "version": "1.51.1", - "resolved": "https://registry.npmjs.org/measured-reporting/-/measured-reporting-1.51.1.tgz", - "integrity": "sha512-JCt+2u6XT1I5lG3SuYqywE0e62DJuAzBcfMzWGUhIYtPQV2Vm4HiYt/durqmzsAbZV181CEs+o/jMKWJKkYIWw==", - "requires": { - "console-log-level": "^1.4.1", - "mapcap": "^1.0.0", - "measured-core": "^1.51.1", - "optional-js": "^2.0.0" - } - }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -4179,11 +3747,6 @@ } } }, - "module-details-from-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", - "integrity": "sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=" - }, "mongodb": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.5.tgz", @@ -4237,11 +3800,6 @@ "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" }, - "monitor-event-loop-delay": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/monitor-event-loop-delay/-/monitor-event-loop-delay-1.0.0.tgz", - "integrity": "sha512-YRIr1exCIfBDLZle8WHOfSo7Xg3M+phcZfq9Fx1L6Abo+atGp7cge5pM7PjyBn4s1oZI/BRD4EMrzQBbPpVb5Q==" - }, "mpath": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.6.0.tgz", @@ -4341,11 +3899,6 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, - "next-line": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-line/-/next-line-1.1.0.tgz", - "integrity": "sha1-/K5XhTBStqm66CCOQN19PC0wRgM=" - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -4472,17 +4025,6 @@ "abbrev": "1" } }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4535,19 +4077,6 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "object-filter-sequence": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/object-filter-sequence/-/object-filter-sequence-1.0.0.tgz", - "integrity": "sha512-CsubGNxhIEChNY4cXYuA6KXafztzHqzLLZ/y3Kasf3A+sa3lL9thq3z+7o0pZqzEinjXT6lXDPAfVWI59dUyzQ==" - }, - "object-identity-map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object-identity-map/-/object-identity-map-1.0.2.tgz", - "integrity": "sha512-a2XZDGyYTngvGS67kWnqVdpoaJWsY7C1GhPJvejWAFCsUioTAaiTu8oBad7c6cI4McZxr4CmvnZeycK05iav5A==", - "requires": { - "object.entries": "^1.1.0" - } - }, "object-inspect": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", @@ -4569,99 +4098,6 @@ "object-keys": "^1.0.11" } }, - "object.entries": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.4.tgz", - "integrity": "sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - } - }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" - }, - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" - }, - "is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", - "requires": { - "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" - }, - "object-inspect": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", - "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - } - } - }, "object.getownpropertydescriptors": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", @@ -4707,11 +4143,6 @@ "mimic-fn": "^2.1.0" } }, - "optional-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/optional-js/-/optional-js-2.3.0.tgz", - "integrity": "sha512-B0LLi+Vg+eko++0z/b8zIv57kp7HKEzaPJo7LowJXMUKYdf+3XJGu/cw03h/JhIOsLnP+cG5QnTHAuicjA5fMw==" - }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", @@ -4726,14 +4157,6 @@ "word-wrap": "~1.2.3" } }, - "original-url": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/original-url/-/original-url-1.2.3.tgz", - "integrity": "sha512-BYm+pKYLtS4mVe/mgT3YKGtWV5HzN/XKiaIu1aK4rsxyjuHeTW9N+xVBEpJcY1onB3nccfH0RbzUEoimMqFUHQ==", - "requires": { - "forwarded-parse": "^2.1.0" - } - }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -4809,17 +4232,6 @@ "callsites": "^3.0.0" } }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -4863,11 +4275,6 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -4895,31 +4302,6 @@ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, - "pino": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/pino/-/pino-6.11.3.tgz", - "integrity": "sha512-drPtqkkSf0ufx2gaea3TryFiBHdNIdXKf5LN0hTM82SXI4xVIve2wLwNg92e1MT6m3jASLu6VO7eGY6+mmGeyw==", - "requires": { - "fast-redact": "^3.0.0", - "fast-safe-stringify": "^2.0.7", - "flatstr": "^1.0.12", - "pino-std-serializers": "^3.1.0", - "quick-format-unescaped": "^4.0.3", - "sonic-boom": "^1.0.2" - }, - "dependencies": { - "fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" - } - } - }, - "pino-std-serializers": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz", - "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==" - }, "pngjs": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", @@ -4984,11 +4366,6 @@ "ipaddr.js": "1.9.0" } }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, "psl": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz", @@ -5148,16 +4525,6 @@ "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "dev": true }, - "quick-format-unescaped": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.3.tgz", - "integrity": "sha512-MaL/oqh02mhEo5m5J2rwsVL23Iw2PEaGVHgT2vFt8AAsr0lfvQA5dpXo9TPu0rz7tSBdUPgkbam0j/fj5ZM8yg==" - }, - "random-poly-fill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/random-poly-fill/-/random-poly-fill-1.0.1.tgz", - "integrity": "sha512-bMOL0hLfrNs52+EHtIPIXxn2PxYwXb0qjnKruTjXiM/sKfYqj506aB2plFwWW1HN+ri724bAVVGparh4AtlJKw==" - }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -5202,66 +4569,6 @@ } } }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - } - } - }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -5314,11 +4621,6 @@ "rc": "^1.2.8" } }, - "relative-microtime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/relative-microtime/-/relative-microtime-2.0.0.tgz", - "integrity": "sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA==" - }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -5381,16 +4683,6 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "require-in-the-middle": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-5.1.0.tgz", - "integrity": "sha512-M2rLKVupQfJ5lf9OvqFGIT+9iVLnTmjgbOmpil12hiSQNn5zJTKGPoIisETNjfK+09vP3rpm1zJajmErpr2sEQ==", - "requires": { - "debug": "^4.1.1", - "module-details-from-path": "^1.0.3", - "resolve": "^1.12.0" - } - }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -5405,15 +4697,6 @@ "semver": "^5.1.0" } }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, "resolve-from": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", @@ -5446,11 +4729,6 @@ "debug": "^4.1.1" } }, - "rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" - }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -5601,21 +4879,11 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "set-cookie-serde": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-cookie-serde/-/set-cookie-serde-1.0.0.tgz", - "integrity": "sha512-Vq8e5GsupfJ7okHIvEPcfs5neCo7MZ1ZuWrO3sllYi3DOWt6bSSCpADzqXjz3k0fXehnoFIrmmhty9IN6U6BXQ==" - }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, - "shallow-clone-shim": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone-shim/-/shallow-clone-shim-2.0.0.tgz", - "integrity": "sha512-YRNymdiL3KGOoS67d73TEmk4tdPTO9GSMCoiphQsTcC9EtC+AOmMPjkyBkRoCJfW9ASsaZw1craaiw1dPN2D3Q==" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -5696,20 +4964,6 @@ "resolved": "https://registry.npmjs.org/snakeize/-/snakeize-0.1.0.tgz", "integrity": "sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0=" }, - "sonic-boom": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.4.1.tgz", - "integrity": "sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==", - "requires": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - } - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" - }, "sparse-bitfield": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", @@ -5719,45 +4973,12 @@ "memory-pager": "^1.0.2" } }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==" - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "sql-summary": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sql-summary/-/sql-summary-1.0.1.tgz", - "integrity": "sha512-IpCr2tpnNkP3Jera4ncexsZUp0enJBLr+pHCyTweMUBrbJsTgQeLWx1FXLhoBj/MvcnUQpkgOn2EY8FKOkUzww==" - }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -5779,36 +5000,11 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, - "stackframe": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz", - "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==" - }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, - "stream-chopper": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stream-chopper/-/stream-chopper-3.0.1.tgz", - "integrity": "sha512-f7h+ly8baAE26iIjcp3VbnBkbIRGtrvV0X0xxFM/d7fwLTYnLzDPTXRKNxa2HZzohOrc96NTrR+FaV3mzOelNA==", - "requires": { - "readable-stream": "^3.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "stream-events": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", @@ -5827,11 +5023,6 @@ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" }, - "string-similarity": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz", - "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -6061,14 +5252,6 @@ "is-number": "^7.0.0" } }, - "to-source-code": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/to-source-code/-/to-source-code-1.0.2.tgz", - "integrity": "sha1-3RNr2x4dvYC76s8IiZJnjpBwv+o=", - "requires": { - "is-nil": "^1.0.0" - } - }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", @@ -6099,19 +5282,6 @@ } } }, - "traceparent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/traceparent/-/traceparent-1.0.0.tgz", - "integrity": "sha512-b/hAbgx57pANQ6cg2eBguY3oxD6FGVLI1CC2qoi01RmHR7AYpQHPXTig9FkzbWohEsVuHENZHP09aXuw3/LM+w==", - "requires": { - "random-poly-fill": "^1.0.1" - } - }, - "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" - }, "triple-beam": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", @@ -6155,7 +5325,8 @@ "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true }, "type-is": { "version": "1.6.18", @@ -6206,24 +5377,6 @@ "integrity": "sha512-FyYnoxVL1D6+jDGQpbK5jW6y/2JlVfRfEeQ67BPCUg5wfCjaKOpr2XeceE4QL+MkhxliLtf5EbrMDZgzpt2CNw==", "optional": true }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - }, - "dependencies": { - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" - } - } - }, "undefsafe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", @@ -6244,20 +5397,6 @@ } } }, - "unicode-byte-truncate": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unicode-byte-truncate/-/unicode-byte-truncate-1.0.0.tgz", - "integrity": "sha1-qm8PNHUZP+IMMgrJIT425i6HZKc=", - "requires": { - "is-integer": "^1.0.6", - "unicode-substring": "^0.1.0" - } - }, - "unicode-substring": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicode-substring/-/unicode-substring-0.1.0.tgz", - "integrity": "sha1-YSDOPDkDhdvND2DDK5BlxBgdSzY=" - }, "unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -6387,15 +5526,6 @@ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "validator": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz", @@ -6425,18 +5555,6 @@ "isexe": "^2.0.0" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", diff --git a/package.json b/package.json index b54be2d4..817498e0 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "cryptiles": "^4.1.3", "debug": "~4.1.1", "dotenv": "^8.2.0", - "elastic-apm-node": "^3.16.0", "express": "~4.17.1", "express-validator": "^6.3.0", "express-winston": "^2.6.0", From f1991734551ff158bb3e4843ddb9d5cd8a4af49b Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 21:58:45 -0400 Subject: [PATCH 29/33] run ci/cd on master as well --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 437ada69..941f103b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: [ dev ] + branches: [ dev, master ] pull_request: - branches: [ dev ] + branches: [ dev, master ] jobs: build: From 3ba498cfd307fda2d3679a7cb2aa37e9deaefb60 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:40:31 -0400 Subject: [PATCH 30/33] Update .nvmrc --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 73bffb03..958b5a36 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -10.17.0 +v14 From b9fc935c2dc1b31396f2942eae74ee9dd71cd2c1 Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:41:24 -0400 Subject: [PATCH 31/33] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 817498e0..a54aac6a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint": "eslint --fix '**/*.js'" }, "engines": { - "node": "10.17.0" + "node": "v14" }, "dependencies": { "@google-cloud/storage": "^5.5.0", From c9694e23981c21b84f6cae920eaaf76e27c3b8ca Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:41:55 -0400 Subject: [PATCH 32/33] Delete .travis.yml --- .travis.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5d589612..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -dist: trusty -sudo: false -services: - - mongodb -before_install: - - npm i -g npm@6.4.0 -before_script: - - sleep 15 -cache: - directories: - - "node_modules" - -branches: - only: - - master - - dev - -notifications: - slack: hackboard8:35nI0TJmTGbi6uQ3OfBSSoh5 From ac539a2814223cb81e7b9e9cd1242f414224c07d Mon Sep 17 00:00:00 2001 From: James Xu <36768789+jamesxu123@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:46:11 -0400 Subject: [PATCH 33/33] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a54aac6a..35e6db5e 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint": "eslint --fix '**/*.js'" }, "engines": { - "node": "v14" + "node": "14.x" }, "dependencies": { "@google-cloud/storage": "^5.5.0",