Skip to content

Commit

Permalink
Migrated:
Browse files Browse the repository at this point in the history
authentication-controller.ts
authentication-response.ts
all authentication requests
user-response.ts
  • Loading branch information
JustSamuel committed Dec 25, 2023
1 parent 3cb5fc0 commit a5384c4
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 106 deletions.
172 changes: 86 additions & 86 deletions src/controller/authentication-controller.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/controller/request/authentication-ean-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationEanRequest
* @typedef {object} AuthenticationEanRequest
* @property {string} eanCode.required
*/
export default interface AuthenticationEanRequest {
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/authentication-key-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationKeyRequest
* @typedef {object} AuthenticationKeyRequest
* @property {number} userId.required
* @property {string} key.required - The password
*
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/authentication-ldap-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationLDAPRequest
* @typedef {object} AuthenticationLDAPRequest
* @property {string} accountName.required - The AD account name to authenticate
* @property {string} password.required - The password
*/
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/authentication-local-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationLocalRequest
* @typedef {object} AuthenticationLocalRequest
* @property {string} accountMail.required - The users mail to authenticate
* @property {string} password.required - The password
*/
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/authentication-mock-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationMockRequest
* @typedef {object} AuthenticationMockRequest
* @property {number} userId.required
* @property {string} nonce.required
*/
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/authentication-nfc-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationNfcRequest
* @typedef {object} AuthenticationNfcRequest
* @property {string} nfcCode.required
*/
export default interface AuthenticationNfcRequest {
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/authentication-pin-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationPinRequest
* @typedef {object} AuthenticationPinRequest
* @property {number} userId.required
* @property {string} pin.required
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AuthenticationResetTokenRequest
* @typedef {object} AuthenticationResetTokenRequest
* @property {string} accountMail.required - The mail of the user
* @property {string} token.required - The reset token passcode
* @property {string} password.required - The new password to set
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/reset-local-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef ResetLocalRequest
* @typedef {object} ResetLocalRequest
* @property {string} accountMail.required - The mail of the user
*/
export default interface ResetLocalRequest {
Expand Down
8 changes: 4 additions & 4 deletions src/controller/response/authentication-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import { UserResponse } from './user-response';
import { TermsOfServiceStatus } from '../../entity/user/user';

/**
* @typedef AuthenticationResponse
* @property {UserResponse.model} user.required - The user that has authenticated.
* @property {Array.<string>} roles.required - The RBAC roles that the user has.
* @property {Array.<UserResponse>} organs.required - The organs that the user is a member of.
* @typedef {object} AuthenticationResponse
* @property {UserResponse} user.required - The user that has authenticated.
* @property {Array<string>} roles.required - The RBAC roles that the user has.
* @property {Array<UserResponse>} organs.required - The organs that the user is a member of.
* @property {string} token.required - The JWT token that can be used as Bearer token for authentication.
* @property {string} acceptedToS.required - Whether the related user has accepted the Terms of Service
* or is not required to.
Expand Down
10 changes: 5 additions & 5 deletions src/controller/response/user-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { PaginationResult } from '../../helpers/pagination';
import { TermsOfServiceStatus } from '../../entity/user/user';

/**
* @typedef {BaseResponse} BaseUserResponse
* @typedef {allOf|BaseResponse} BaseUserResponse
* @property {string} firstName.required - The name of the user.
* @property {string} lastName.required - The last name of the user
* @property {string} nickname - The nickname of the user
Expand All @@ -32,7 +32,7 @@ export interface BaseUserResponse extends BaseResponse {
}

/**
* @typedef {BaseUserResponse} UserResponse
* @typedef {allOf|BaseUserResponse} UserResponse
* @property {boolean} active.required - Whether the user activated
* @property {boolean} deleted.required - Whether the user is deleted
* @property {string} type.required - The type of user
Expand All @@ -55,9 +55,9 @@ export interface UserResponse extends BaseUserResponse {
}

/**
* @typedef PaginatedUserResponse
* @property {PaginationResult.model} _pagination.required - Pagination metadata
* @property {Array.<UserResponse>} records.required - Returned users
* @typedef {object} PaginatedUserResponse
* @property {PaginationResult} _pagination.required - Pagination metadata
* @property {Array<UserResponse>} records.required - Returned users
*/
export interface PaginatedUserResponse {
_pagination: PaginationResult,
Expand Down
9 changes: 7 additions & 2 deletions src/start/swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,15 @@ export default class Swagger {
baseDir: 'C:\\Users\\Samuel\\WebstormProjects\\GEWIS\\SudoSOS\\sudosos-backend\\src\\',
// Glob pattern to find your jsdoc files
filesPattern: [
'.\\controller\\root-controller.ts',
'./controller/root-controller.ts',
'./controller/response/banner-response.ts',
'./helpers/pagination.ts',
'./controller/response/base-response.ts'
'./controller/response/base-response.ts',
'./controller/authentication-controller.ts',
'./controller/response/authentication-response.ts',
'./controller/response/user-response.ts',
'./controller/request/authentication-*.ts',
'./controller/request/reset-local-request.ts'
],
swaggerUIPath: '/api-docs',
exposeSwaggerUI: true, // Expose Swagger UI
Expand Down

0 comments on commit a5384c4

Please sign in to comment.