From 2fd09c1c931cc0bb06296440a48d40c6fa8e8647 Mon Sep 17 00:00:00 2001 From: Samuel Date: Mon, 25 Dec 2023 17:29:03 +0100 Subject: [PATCH] Migrated: all responses, balance-controller.ts and some entities --- src/controller/balance-controller.ts | 50 +++++++++---------- src/controller/request/dinero-request.ts | 4 +- src/controller/response/balance-response.ts | 10 ++-- src/controller/response/container-response.ts | 22 ++++---- src/controller/response/debtor-response.ts | 30 +++++------ src/controller/response/dinero-response.ts | 2 +- src/controller/response/dinero.ts | 2 +- src/controller/response/event-response.ts | 26 +++++----- .../response/financial-mutation-response.ts | 12 ++--- src/controller/response/invoice-response.ts | 33 ++++++------ src/controller/response/message-response.ts | 2 +- .../response/payout-request-response.ts | 22 ++++---- .../response/point-of-sale-response.ts | 16 +++--- .../response/product-category-response.ts | 8 +-- src/controller/response/product-response.ts | 20 ++++---- .../response/simple-file-response.ts | 4 +- src/controller/response/stripe-response.ts | 14 +++--- .../response/transaction-report-response.ts | 44 ++++++++-------- .../response/transaction-response.ts | 44 ++++++++-------- src/controller/response/transfer-response.ts | 24 ++++----- .../response/update-key-response.ts | 2 +- src/controller/response/vat-group-response.ts | 16 +++--- .../response/voucher-group-response.ts | 12 ++--- src/entity/base-entity-without-id.ts | 2 +- src/entity/base-entity.ts | 2 +- src/entity/vat-group.ts | 2 +- src/start/swagger.ts | 7 +++ 27 files changed, 219 insertions(+), 213 deletions(-) diff --git a/src/controller/balance-controller.ts b/src/controller/balance-controller.ts index ba4287272..262d17286 100644 --- a/src/controller/balance-controller.ts +++ b/src/controller/balance-controller.ts @@ -40,8 +40,8 @@ export default class BalanceController extends BaseController { } /** - * @inheritdoc - */ + * @inheritdoc + */ public getPolicy(): Policy { return { '/': { @@ -66,15 +66,15 @@ export default class BalanceController extends BaseController { } /** - * Get balance of the current user - * @route get /balances + * GET /balances + * @summary Get balance of the current user * @operationId getBalances - * @group balance - Operations of balance controller + * @tags balance - Operations of balance controller * @security JWT - * @returns {BalanceResponse.model} 200 - The requested user's balance - * @returns {string} 400 - Validation error - * @returns {string} 404 - Not found error - * @returns {string} 500 - Internal server error + * @return {BalanceResponse} 200 - The requested user's balance + * @return {string} 400 - Validation error + * @return {string} 404 - Not found error + * @return {string} 500 - Internal server error */ // eslint-disable-next-line class-methods-use-this private async getOwnBalance(req: RequestWithToken, res: Response): Promise { @@ -87,10 +87,10 @@ export default class BalanceController extends BaseController { } /** - * Get balance of the current user - * @route GET /balances/all + * GET /balances/all + * @summary Get balance of the current user * @operationId getAllBalance - * @group balance - Operations of balance controller + * @tags balance - Operations of balance controller * @security JWT * @param {string} date.query - Timestamp to get balances for * @param {integer} minBalance.query - Minimum balance @@ -98,14 +98,14 @@ export default class BalanceController extends BaseController { * @param {boolean} hasFine.query - Only users with(out) fines * @param {integer} minFine.query - Minimum fine * @param {integer} maxFine.query - Maximum fine - * @param {string} userType[].query.enum{MEMBER,ORGAN,VOUCHER,LOCAL_USER,LOCAL_ADMIN,INVOICE,AUTOMATIC_INVOICE} - Filter based on user type. - * @param {enum} orderBy.query - Column to order balance by - eg: id,amount - * @param {enum} orderDirection.query - Order direction - eg: ASC,DESC + * @param {string} userType.query - enum:MEMBER,ORGAN,VOUCHER,LOCAL_USER,LOCAL_ADMIN,INVOICE,AUTOMATIC_INVOICE - Filter based on user type. + * @param {string} orderBy.query - Column to order balance by - eg: id,amount + * @param {string} orderDirection.query - enum:ASC,DESC - Order direction * @param {integer} take.query - How many transactions the endpoint should return * @param {integer} skip.query - How many transactions should be skipped (for pagination) - * @returns {Array} 200 - The requested user's balance - * @returns {string} 400 - Validation error - * @returns {string} 500 - Internal server error + * @return {Array} 200 - The requested user's balance + * @return {string} 400 - Validation error + * @return {string} 500 - Internal server error */ private async getAllBalances(req: RequestWithToken, res: Response): Promise { this.logger.trace('Get all balances by', req.token.user); @@ -143,16 +143,16 @@ export default class BalanceController extends BaseController { } /** - * Retrieves the requested balance - * @route get /balances/{id} + * GET /balances/{id} + * @summary Retrieves the requested balance * @operationId getBalanceId - * @group balance - Operations of balance controller + * @tags balance - Operations of balance controller * @param {integer} id.path.required - The id of the user for which the saldo is requested * @security JWT - * @returns {BalanceResponse.model} 200 - The requested user's balance - * @returns {string} 400 - Validation error - * @returns {string} 404 - Not found error - * @returns {string} 500 - Internal server error + * @return {BalanceResponse} 200 - The requested user's balance + * @return {string} 400 - Validation error + * @return {string} 404 - Not found error + * @return {string} 500 - Internal server error */ private async getBalance(req: RequestWithToken, res: Response): Promise { try { diff --git a/src/controller/request/dinero-request.ts b/src/controller/request/dinero-request.ts index e58d98a99..e94555b8c 100644 --- a/src/controller/request/dinero-request.ts +++ b/src/controller/request/dinero-request.ts @@ -17,14 +17,14 @@ */ /** - * @typedef DineroObject + * @typedef {object} DineroObject * @property {integer} amount.required - amount * @property {string} currency.required - currency * @property {integer} precision.required - precision */ /** -* @typedef DineroObjectRequest +* @typedef {object} DineroObjectRequest * @property {integer} amount.required - amount * @property {string} currency.required - currency * @property {integer} precision.required - precision diff --git a/src/controller/response/balance-response.ts b/src/controller/response/balance-response.ts index f15861e28..6ad1aa325 100644 --- a/src/controller/response/balance-response.ts +++ b/src/controller/response/balance-response.ts @@ -19,11 +19,11 @@ import { DineroObjectResponse } from './dinero-response'; import { PaginationResult } from '../../helpers/pagination'; /** - * @typedef BalanceResponse + * @typedef {object} BalanceResponse * @property {number} id.required - ID of the user this balance belongs to * @property {string} date.required - Date at which this user had this balance - * @property {DineroObjectResponse.model} amount.required - The amount of balance this user has - * @property {DineroObjectResponse.model} fine - The amount of fines this user has at the current point in time, + * @property {DineroObjectResponse} amount.required - The amount of balance this user has + * @property {DineroObjectResponse} fine - The amount of fines this user has at the current point in time, * aka "now" (if any). Should be ignored if date is not now. * @property {string} fineSince - Timestamp of the first fine * @property {number} lastTransactionId - The ID of the last transaction that was @@ -42,8 +42,8 @@ export default interface BalanceResponse { } /** - * @typedef PaginatedBalanceResponse - * @property {PaginationResult.model} _pagination - Pagination metadata + * @typedef {object} PaginatedBalanceResponse + * @property {PaginationResult} _pagination - Pagination metadata * @property {Array} records - Returned balance responses */ export interface PaginatedBalanceResponse { diff --git a/src/controller/response/container-response.ts b/src/controller/response/container-response.ts index 4dce3c8a7..2d9cff579 100644 --- a/src/controller/response/container-response.ts +++ b/src/controller/response/container-response.ts @@ -21,7 +21,7 @@ import { BaseUserResponse } from './user-response'; import { PaginationResult } from '../../helpers/pagination'; /** - * @typedef {BaseResponse} BaseContainerResponse + * @typedef {allOf|BaseResponse} BaseContainerResponse * @property {string} name.required - The name of the container. * @property {boolean} public.required - Public status of the container. * @property {integer} revision - The container revision. @@ -33,17 +33,17 @@ export interface BaseContainerResponse extends BaseResponse { } /** - * @typedef {BaseContainerResponse} ContainerResponse - * @property {BaseUserResponse.model} owner.required - The owner of the container. + * @typedef {allOf|BaseContainerResponse} ContainerResponse + * @property {BaseUserResponse} owner.required - The owner of the container. */ export interface ContainerResponse extends BaseContainerResponse { owner: BaseUserResponse, } /** - * @typedef PaginatedContainerResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned containers + * @typedef {object} PaginatedContainerResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned containers */ export interface PaginatedContainerResponse { _pagination: PaginationResult, @@ -51,9 +51,9 @@ export interface PaginatedContainerResponse { } /** - * @typedef PaginatedContainerWithProductResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned containers + * @typedef {object} PaginatedContainerWithProductResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned containers */ export interface PaginatedContainerWithProductResponse { _pagination: PaginationResult, @@ -61,8 +61,8 @@ export interface PaginatedContainerWithProductResponse { } /** - * @typedef {ContainerResponse} ContainerWithProductsResponse - * @property {Array.} products.required - The products in the container. + * @typedef {allOf|ContainerResponse} ContainerWithProductsResponse + * @property {Array} products.required - The products in the container. */ export interface ContainerWithProductsResponse extends ContainerResponse { products: ProductResponse[], diff --git a/src/controller/response/debtor-response.ts b/src/controller/response/debtor-response.ts index 4b6fe8555..d5bae7e8e 100644 --- a/src/controller/response/debtor-response.ts +++ b/src/controller/response/debtor-response.ts @@ -22,10 +22,10 @@ import { BaseUserResponse } from './user-response'; import BalanceResponse from './balance-response'; /** - * @typedef UserToFineResponse + * @typedef {object} UserToFineResponse * @property {integer} id.required - User ID - * @property {DineroObjectResponse.model} fineAmount.required - Amount to fine - * @property {Array.} balances.required - Balances at the given reference dates + * @property {DineroObjectResponse} fineAmount.required - Amount to fine + * @property {Array} balances.required - Balances at the given reference dates */ export interface UserToFineResponse { id: number; @@ -34,9 +34,9 @@ export interface UserToFineResponse { } /** - * @typedef {BaseResponse} FineResponse - * @property {DineroObjectResponse.model} amount.required - Fine amount - * @property {BaseUserResponse.model} user.required - User that got the fine + * @typedef {allOf|BaseResponse} FineResponse + * @property {DineroObjectResponse} amount.required - Fine amount + * @property {BaseUserResponse} user.required - User that got the fine */ export interface FineResponse extends BaseResponse { amount: DineroObjectResponse; @@ -44,9 +44,9 @@ export interface FineResponse extends BaseResponse { } /** - * @typedef {BaseResponse} BaseFineHandoutEventResponse + * @typedef {allOf|BaseResponse} BaseFineHandoutEventResponse * @property {string} referenceDate.required - Reference date of fines - * @property {BaseUserResponse.model} createdBy.required - User that handed out the fines + * @property {BaseUserResponse} createdBy.required - User that handed out the fines */ export interface BaseFineHandoutEventResponse extends BaseResponse { referenceDate: string; @@ -54,17 +54,17 @@ export interface BaseFineHandoutEventResponse extends BaseResponse { } /** - * @typedef {BaseFineHandoutEventResponse} FineHandoutEventResponse - * @property {Array.} fines.required - Fines that have been handed out + * @typedef {allOf|BaseFineHandoutEventResponse} FineHandoutEventResponse + * @property {Array} fines.required - Fines that have been handed out */ export interface FineHandoutEventResponse extends BaseFineHandoutEventResponse { fines: FineResponse[]; } /** - * @typedef PaginatedFineHandoutEventResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned fine handout events + * @typedef {object} PaginatedFineHandoutEventResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned fine handout events */ export interface PaginatedFineHandoutEventResponse { _pagination: PaginationResult, @@ -72,8 +72,8 @@ export interface PaginatedFineHandoutEventResponse { } /** - * @typedef UserFineGroupResponse - * @property {Array.} fines.required - Fines that have been handed out + * @typedef {object} UserFineGroupResponse + * @property {Array} fines.required - Fines that have been handed out */ export interface UserFineGroupResponse { fines: FineResponse[]; diff --git a/src/controller/response/dinero-response.ts b/src/controller/response/dinero-response.ts index 48c7096d2..2c4d536c1 100644 --- a/src/controller/response/dinero-response.ts +++ b/src/controller/response/dinero-response.ts @@ -17,7 +17,7 @@ */ /** -* @typedef DineroObjectResponse +* @typedef {object} DineroObjectResponse * @property {integer} amount.required - amount * @property {string} currency.required - currency * @property {integer} precision.required - precision diff --git a/src/controller/response/dinero.ts b/src/controller/response/dinero.ts index d526af574..559ce207c 100644 --- a/src/controller/response/dinero.ts +++ b/src/controller/response/dinero.ts @@ -17,7 +17,7 @@ */ /** - * @typedef Dinero + * @typedef {object} Dinero * @property {integer} amount.required - The amount of money as integer in the given precision. * @property {integer} precision.required - The precision of the amount, in decimal places. * @property {string} currency.required - The ISO 4217 currency code. diff --git a/src/controller/response/event-response.ts b/src/controller/response/event-response.ts index 4f346781e..9847aa62c 100644 --- a/src/controller/response/event-response.ts +++ b/src/controller/response/event-response.ts @@ -21,9 +21,9 @@ import { BaseUserResponse } from './user-response'; import { EventType } from '../../entity/event/event'; /** - * @typedef {BaseResponse} BaseEventResponse + * @typedef {allOf|BaseResponse} BaseEventResponse * @property {string} name.required - Name of the borrel. - * @property {BaseUserResponse.model} createdBy.required - Creator of the event. + * @property {BaseUserResponse} createdBy.required - Creator of the event. * @property {string} startDate.required - The starting date of the event. * @property {string} endDate.required - The end date of the event. * @property {string} type.required - The tpye of event. @@ -37,7 +37,7 @@ export interface BaseEventResponse extends BaseResponse { } /** - * @typedef {BaseResponse} BaseEventShiftResponse + * @typedef {allOf|BaseResponse} BaseEventShiftResponse * @property {string} name.required - Name of the shift. */ export interface BaseEventShiftResponse extends BaseResponse { @@ -45,7 +45,7 @@ export interface BaseEventShiftResponse extends BaseResponse { } /** - * @typedef {BaseEventShiftResponse} EventShiftResponse + * @typedef {allOf|BaseEventShiftResponse} EventShiftResponse * @property {Array} roles.required - Which roles can fill in this shift. */ export interface EventShiftResponse extends BaseEventShiftResponse { @@ -53,7 +53,7 @@ export interface EventShiftResponse extends BaseEventShiftResponse { } /** - * @typedef {EventShiftResponse} EventInShiftResponse + * @typedef {allOf|EventShiftResponse} EventInShiftResponse * @property {Array} answers - Answers for this shift. */ export interface EventInShiftResponse extends EventShiftResponse { @@ -61,8 +61,8 @@ export interface EventInShiftResponse extends EventShiftResponse { } /** - * @typedef PaginatedEventShiftResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata + * @typedef {object} PaginatedEventShiftResponse + * @property {PaginationResult} _pagination.required - Pagination metadata * @property {Array} records.required - Returned event shifts */ export interface PaginatedEventShiftResponse { @@ -71,7 +71,7 @@ export interface PaginatedEventShiftResponse { } /** - * @typedef {BaseEventResponse} EventResponse + * @typedef {allOf|BaseEventResponse} EventResponse * @property {Array} shifts.required - Shifts for this event */ export interface EventResponse extends BaseEventResponse { @@ -79,8 +79,8 @@ export interface EventResponse extends BaseEventResponse { } /** - * @typedef BaseEventAnswerResponse - * @property {BaseUserResponse.model} user.required - Participant that filled in their availability + * @typedef {object} BaseEventAnswerResponse + * @property {BaseUserResponse} user.required - Participant that filled in their availability * @property {string} availability - Filled in availability per slot. * @property {boolean} selected.required - Whether this user is selected for the shift in the event */ @@ -91,8 +91,8 @@ export interface BaseEventAnswerResponse { } /** - * @typedef PaginatedBaseEventResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata + * @typedef {object} PaginatedBaseEventResponse + * @property {PaginationResult} _pagination.required - Pagination metadata * @property {Array} records.required - Returned borrel Schemas */ export interface PaginatedBaseEventResponse { @@ -101,7 +101,7 @@ export interface PaginatedBaseEventResponse { } /** - * @typedef {BaseUserResponse} EventPlanningSelectedCount + * @typedef {allOf|BaseUserResponse} EventPlanningSelectedCount * @property {integer} count.required - Number of times this user was selected for this shift */ export interface EventPlanningSelectedCount extends BaseUserResponse { diff --git a/src/controller/response/financial-mutation-response.ts b/src/controller/response/financial-mutation-response.ts index 2ea4c684b..fa6c38706 100644 --- a/src/controller/response/financial-mutation-response.ts +++ b/src/controller/response/financial-mutation-response.ts @@ -21,9 +21,9 @@ import { TransferResponse } from './transfer-response'; import { BaseTransactionResponse } from './transaction-response'; /** - * @typedef FinancialMutationResponse - * @property {string} type.required - Type of mutation ('transfer' or 'transaction') (Optional) - * @property {object} mutation - Details of mutation, this can be either of type TransferResponse or BaseTransactionResponse + * @typedef {object} FinancialMutationResponse + * @property {string} type.required - enum:transfer,transaction - Type of mutation ('transfer' or 'transaction') (Optional) + * @property {oneOf|TransferResponse|BaseTransactionResponse} mutation - Details of mutation, this can be either of type TransferResponse or BaseTransactionResponse */ export interface FinancialMutationResponse { type: 'transfer' | 'transaction', @@ -31,9 +31,9 @@ export interface FinancialMutationResponse { } /** - * @typedef PaginatedFinancialMutationResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned mutations + * @typedef {object} PaginatedFinancialMutationResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned mutations */ export interface PaginatedFinancialMutationResponse { _pagination: PaginationResult, diff --git a/src/controller/response/invoice-response.ts b/src/controller/response/invoice-response.ts index 36e13f1d6..068c04e82 100644 --- a/src/controller/response/invoice-response.ts +++ b/src/controller/response/invoice-response.ts @@ -23,10 +23,9 @@ import { PaginationResult } from '../../helpers/pagination'; import { InvoiceState } from '../../entity/invoices/invoice-status'; /** - * @typedef InvoiceStatusResponse - * @property {BaseUserResponse.model} changedBy.required - The user that changed the invoice status. - * @property {string} state.required - The state of the invoice, - * can be either CREATED, SENT, PAID or DELETED. + * @typedef {object} InvoiceStatusResponse + * @property {BaseUserResponse} changedBy.required - The user that changed the invoice status. + * @property {string} state.required - enum:CREATED,SENT,PAID,DELETED - The state of the invoice */ export interface InvoiceStatusResponse { state: keyof typeof InvoiceState, @@ -34,10 +33,10 @@ export interface InvoiceStatusResponse { } /** - * @typedef InvoiceEntryResponse + * @typedef {object} InvoiceEntryResponse * @property {string} description.required - The description of the entry * @property {integer} amount.required - Amount of products sold. - * @property {DineroObject.model} priceInclVat.required - The price per product. + * @property {DineroObject} priceInclVat.required - The price per product. * @property {number} vatPercentage.required - The percentage of VAT applied to this entry */ export interface InvoiceEntryResponse { @@ -48,12 +47,12 @@ export interface InvoiceEntryResponse { } /** - * @typedef {BaseResponse} BaseInvoiceResponse - * @property {BaseUserResponse.model} to.required - The person who was invoiced. + * @typedef {allOf|BaseResponse} BaseInvoiceResponse + * @property {BaseUserResponse} to.required - The person who was invoiced. * @property {string} addressee.required - Name of the addressed. * @property {string} description.required - Description of the invoice. - * @property {InvoiceStatusResponse.model} currentState.required - The current state of the invoice. - * @property {TransferResponse.model} transfer - Transfer linked to the invoice. + * @property {InvoiceStatusResponse} currentState.required - The current state of the invoice. + * @property {TransferResponse} transfer - Transfer linked to the invoice. */ export interface BaseInvoiceResponse extends BaseResponse { to: BaseUserResponse, @@ -64,25 +63,25 @@ export interface BaseInvoiceResponse extends BaseResponse { } /** - * @typedef {BaseInvoiceResponse} InvoiceResponse - * @property {Array.} invoiceEntries.required - The entries of the invoice + * @typedef {allOf|BaseInvoiceResponse} InvoiceResponse + * @property {Array} invoiceEntries.required - The entries of the invoice */ export interface InvoiceResponse extends BaseInvoiceResponse { invoiceEntries: InvoiceEntryResponse[], } /** - * @typedef {BaseInvoiceResponse} InvoiceResponseTypes - * @property {Array.} invoiceEntries - The entries of the invoice + * @typedef {allOf|BaseInvoiceResponse} InvoiceResponseTypes + * @property {Array} invoiceEntries - The entries of the invoice */ export interface InvoiceResponseTypes extends BaseInvoiceResponse { invoiceEntries?: InvoiceEntryResponse[], } /** - * @typedef PaginatedInvoiceResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned Invoices + * @typedef {object} PaginatedInvoiceResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned Invoices */ export interface PaginatedInvoiceResponse { _pagination: PaginationResult, diff --git a/src/controller/response/message-response.ts b/src/controller/response/message-response.ts index 209a823ba..3dfc8dbed 100644 --- a/src/controller/response/message-response.ts +++ b/src/controller/response/message-response.ts @@ -17,7 +17,7 @@ */ /** - * @typedef MessageResponse + * @typedef {object} MessageResponse * @property {string} message.required - The message response text. */ export default interface MessageResponse { diff --git a/src/controller/response/payout-request-response.ts b/src/controller/response/payout-request-response.ts index ddeefebce..9c0cb1e87 100644 --- a/src/controller/response/payout-request-response.ts +++ b/src/controller/response/payout-request-response.ts @@ -22,10 +22,10 @@ import { PayoutRequestState } from '../../entity/transactions/payout-request-sta import { PaginationResult } from '../../helpers/pagination'; /** - * @typedef {BaseResponse} BoilerPayoutRequestResponse - * @property {BaseUserResponse.model} requestedBy.required - The user that requested a payout - * @property {BaseUserResponse.model} approvedBy - The user that potentially approved the payout request - * @property {DineroObjectResponse.model} amount.required - The amount requested to be paid out + * @typedef {allOf|BaseResponse} BoilerPayoutRequestResponse + * @property {BaseUserResponse} requestedBy.required - The user that requested a payout + * @property {BaseUserResponse} approvedBy - The user that potentially approved the payout request + * @property {DineroObjectResponse} amount.required - The amount requested to be paid out */ interface BoilerPayoutRequestResponse extends BaseResponse { requestedBy: BaseUserResponse, @@ -34,7 +34,7 @@ interface BoilerPayoutRequestResponse extends BaseResponse { } /** - * @typedef {BoilerPayoutRequestResponse} BasePayoutRequestResponse + * @typedef {allOf|BoilerPayoutRequestResponse} BasePayoutRequestResponse * @property {string} status - The current status of the payout request */ export interface BasePayoutRequestResponse extends BoilerPayoutRequestResponse { @@ -42,7 +42,7 @@ export interface BasePayoutRequestResponse extends BoilerPayoutRequestResponse { } /** - * @typedef {BaseResponse} PayoutRequestStatusResponse + * @typedef {allOf|BaseResponse} PayoutRequestStatusResponse * @property {string} state.required - The state of this status change */ export interface PayoutRequestStatusResponse extends BaseResponse { @@ -50,8 +50,8 @@ export interface PayoutRequestStatusResponse extends BaseResponse { } /** - * @typedef {BoilerPayoutRequestResponse} PayoutRequestResponse - * @property {Array.} status.required - Statuses of this + * @typedef {allOf|BoilerPayoutRequestResponse} PayoutRequestResponse + * @property {Array} status.required - Statuses of this * payout response over time * @property {string} bankAccountNumber.required - Bank account number * @property {string} bankAccountName.required - Name of the account owner @@ -63,9 +63,9 @@ export interface PayoutRequestResponse extends BoilerPayoutRequestResponse { } /** - * @typedef PaginatedBasePayoutRequestResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned payout requests + * @typedef {object} PaginatedBasePayoutRequestResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned payout requests */ export interface PaginatedBasePayoutRequestResponse { _pagination: PaginationResult, diff --git a/src/controller/response/point-of-sale-response.ts b/src/controller/response/point-of-sale-response.ts index bf3d76deb..cb082ba52 100644 --- a/src/controller/response/point-of-sale-response.ts +++ b/src/controller/response/point-of-sale-response.ts @@ -21,15 +21,15 @@ import { BaseUserResponse } from './user-response'; import { PaginationResult } from '../../helpers/pagination'; /** - * @typedef {BaseResponse} BasePointOfSaleResponse + * @typedef {allOf|BaseResponse} BasePointOfSaleResponse * @property {string} name.required - The name of the point-of-sale. */ export interface BasePointOfSaleResponse extends BaseResponse { name: string, } /** - * @typedef {BasePointOfSaleResponse} PointOfSaleResponse - * @property {BaseUserResponse.model} owner - The owner of the point-of-sale. + * @typedef {allOf|BasePointOfSaleResponse} PointOfSaleResponse + * @property {BaseUserResponse} owner - The owner of the point-of-sale. * @property {number} revision.required - Revision of the POS * @property {boolean} useAuthentication.required - Whether this POS requires users to * authenticate themselves before making a transaction @@ -41,9 +41,9 @@ export interface PointOfSaleResponse extends BasePointOfSaleResponse { } /** - * @typedef PaginatedPointOfSaleResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned points of sale + * @typedef {object} PaginatedPointOfSaleResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned points of sale */ export interface PaginatedPointOfSaleResponse { _pagination: PaginationResult, @@ -51,8 +51,8 @@ export interface PaginatedPointOfSaleResponse { } /** - * @typedef {PointOfSaleResponse} PointOfSaleWithContainersResponse - * @property {Array.} containers.required - The containers + * @typedef {allOf|PointOfSaleResponse} PointOfSaleWithContainersResponse + * @property {Array} containers.required - The containers * in the point-of-sale. */ export interface PointOfSaleWithContainersResponse extends PointOfSaleResponse { diff --git a/src/controller/response/product-category-response.ts b/src/controller/response/product-category-response.ts index 79dd69fc3..ac49adc74 100644 --- a/src/controller/response/product-category-response.ts +++ b/src/controller/response/product-category-response.ts @@ -19,7 +19,7 @@ import BaseResponse from './base-response'; import { PaginationResult } from '../../helpers/pagination'; /** - * @typedef {BaseResponse} ProductCategoryResponse + * @typedef {allOf|BaseResponse} ProductCategoryResponse * @property {string} name.required - The name of the productCategory. */ export interface ProductCategoryResponse extends BaseResponse { @@ -27,9 +27,9 @@ export interface ProductCategoryResponse extends BaseResponse { } /** - * @typedef PaginatedProductCategoryResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned product categories + * @typedef {object} PaginatedProductCategoryResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned product categories */ export interface PaginatedProductCategoryResponse { _pagination: PaginationResult, diff --git a/src/controller/response/product-response.ts b/src/controller/response/product-response.ts index e979b2ad7..cc471e6b9 100644 --- a/src/controller/response/product-response.ts +++ b/src/controller/response/product-response.ts @@ -23,10 +23,10 @@ import { DineroObjectResponse } from './dinero-response'; import { BaseVatGroupResponse } from './vat-group-response'; /** - * @typedef {BaseResponse} BaseProductResponse + * @typedef {allOf|BaseResponse} BaseProductResponse * @property {string} name.required - The name of the product. - * @property {DineroObjectResponse.model} priceInclVat.required - The price of the product. - * @property {BaseVatGroupResponse.model} vat.required - The VAT percentage + * @property {DineroObjectResponse} priceInclVat.required - The price of the product. + * @property {BaseVatGroupResponse} vat.required - The VAT percentage */ export interface BaseProductResponse extends BaseResponse { name: string, @@ -35,12 +35,12 @@ export interface BaseProductResponse extends BaseResponse { } /** - * @typedef {BaseProductResponse} ProductResponse + * @typedef {allOf|BaseProductResponse} ProductResponse * @property {integer} revision.required - The product revision ID - * @property {BaseUserResponse.model} owner.required - The owner of the product. - * @property {ProductCategoryResponse.model} category.required - + * @property {BaseUserResponse} owner.required - The owner of the product. + * @property {ProductCategoryResponse} category.required - * The category the product belongs to. - * @property {DineroObjectResponse.model} priceExclVat.required - The price of the product + * @property {DineroObjectResponse} priceExclVat.required - The price of the product * excluding VAT * @property {string} image - The URL to the picture representing this product. * @property {number} alcoholPercentage.required - The percentage of alcohol in this product. @@ -55,9 +55,9 @@ export interface ProductResponse extends BaseProductResponse { } /** - * @typedef PaginatedProductResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned products + * @typedef {object} PaginatedProductResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned products */ export interface PaginatedProductResponse { _pagination: PaginationResult, diff --git a/src/controller/response/simple-file-response.ts b/src/controller/response/simple-file-response.ts index 2c12c14f2..ca421574d 100644 --- a/src/controller/response/simple-file-response.ts +++ b/src/controller/response/simple-file-response.ts @@ -19,10 +19,10 @@ import BaseResponse from './base-response'; import { UserResponse } from './user-response'; /** - * @typedef {BaseResponse} SimpleFileResponse + * @typedef {allOf|BaseResponse} SimpleFileResponse * @property {string} downloadName.required - The filename of the file * @property {string} location.required - The location of the file in storage - * @property {UserResponse.model} createdBy.required - The user who created this file + * @property {UserResponse} createdBy.required - The user who created this file */ export interface SimpleFileResponse extends BaseResponse { downloadName: string; diff --git a/src/controller/response/stripe-response.ts b/src/controller/response/stripe-response.ts index 0852ca3a2..abcfb09e3 100644 --- a/src/controller/response/stripe-response.ts +++ b/src/controller/response/stripe-response.ts @@ -22,7 +22,7 @@ import { StripeDepositState } from '../../entity/deposit/stripe-deposit-status'; import { BaseUserResponse } from './user-response'; /** - * @typedef {BaseResponse} StripePaymentIntentResponse + * @typedef {allOf|BaseResponse} StripePaymentIntentResponse * @property {string} stripeId.required - ID of the intent in Stripe. * @property {string} clientSecret.required - The client secret of the created Payment Intent. */ @@ -32,19 +32,19 @@ export interface StripePaymentIntentResponse extends BaseResponse { } /** - * @typedef {BaseResponse} StripeDepositStatusResponse - * @property {number} state.required - State of the Stripe deposit. It can be 1 ('CREATED'), 2 ('PROCESSING'), 3 ('SUCCEEDED'), or 4 ('FAILED') + * @typedef {allOf|BaseResponse} StripeDepositStatusResponse + * @property {number} state.required - enum:1,2,3,4 - State of the Stripe deposit. It can be 1 ('CREATED'), 2 ('PROCESSING'), 3 ('SUCCEEDED'), or 4 ('FAILED') */ export interface StripeDepositStatusResponse extends BaseResponse { state: StripeDepositState; } /** - * @typedef {BaseResponse} StripeDepositResponse + * @typedef {allOf|BaseResponse} StripeDepositResponse * @property {string} stripeId.required - The ID of the payment intent in Stripe - * @property {Array.} depositStatus.required - Current status of the deposit - * @property {DineroObjectResponse.model} amount.required - The amount deposited - * @property {BaseUserResponse.model} to.required - User that deposited money + * @property {Array} depositStatus.required - Current status of the deposit + * @property {DineroObjectResponse} amount.required - The amount deposited + * @property {BaseUserResponse} to.required - User that deposited money */ export interface StripeDepositResponse extends BaseResponse { stripeId: string; diff --git a/src/controller/response/transaction-report-response.ts b/src/controller/response/transaction-report-response.ts index 159029686..b2104a8d2 100644 --- a/src/controller/response/transaction-report-response.ts +++ b/src/controller/response/transaction-report-response.ts @@ -54,7 +54,7 @@ export interface TransactionReport { } /** - * @typedef TransactionFilterParameters + * @typedef {object} TransactionFilterParameters * @property {Array} transactionId * @property {number} fromId * @property {number} createdById @@ -72,10 +72,10 @@ export interface TransactionReport { */ /** - * @typedef TransactionReportVatEntryResponse - * @property {BaseVatGroupResponse.model} vat.required - The vat group of this entry - * @property {DineroObjectResponse.model} totalInclVat.required - The price of this entry incl. vat - * @property {DineroObjectResponse.model} totalExclVat.required - The price of this entry excl. vat + * @typedef {object} TransactionReportVatEntryResponse + * @property {BaseVatGroupResponse} vat.required - The vat group of this entry + * @property {DineroObjectResponse} totalInclVat.required - The price of this entry incl. vat + * @property {DineroObjectResponse} totalExclVat.required - The price of this entry excl. vat */ export interface TransactionReportVatEntryResponse { vat: BaseVatGroupResponse, @@ -84,10 +84,10 @@ export interface TransactionReportVatEntryResponse { } /** - * @typedef TransactionReportCategoryEntryResponse - * @property {ProductCategoryResponse.model} category.required - The category of this entry - * @property {DineroObjectResponse.model} totalInclVat.required - The price of this entry incl. vat - * @property {DineroObjectResponse.model} totalExclVat.required - The price of this entry excl. vat + * @typedef {object} TransactionReportCategoryEntryResponse + * @property {ProductCategoryResponse} category.required - The category of this entry + * @property {DineroObjectResponse} totalInclVat.required - The price of this entry incl. vat + * @property {DineroObjectResponse} totalExclVat.required - The price of this entry excl. vat */ export interface TransactionReportCategoryEntryResponse { category: ProductCategoryResponse, @@ -96,11 +96,11 @@ export interface TransactionReportCategoryEntryResponse { } /** - * @typedef TransactionReportEntryResponse + * @typedef {object} TransactionReportEntryResponse * @property {integer} count.required - The amount of times this product is in the report - * @property {BaseProductResponse.model} product.required - The product for this entry - * @property {DineroObjectResponse.model} totalInclVat.required - The price of this entry incl. vat - * @property {DineroObjectResponse.model} totalExclVat.required - The price of this entry excl. vat + * @property {BaseProductResponse} product.required - The product for this entry + * @property {DineroObjectResponse} totalInclVat.required - The price of this entry incl. vat + * @property {DineroObjectResponse} totalExclVat.required - The price of this entry excl. vat */ export interface TransactionReportEntryResponse { count: number, @@ -110,10 +110,10 @@ export interface TransactionReportEntryResponse { } /** - * @typedef TransactionReportDataResponse - * @property {Array.} entries.required - The entries grouped by product - * @property {Array.} categories.required - The entries grouped by category - * @property {Array.} vat.required - The entries grouped by vat + * @typedef {object} TransactionReportDataResponse + * @property {Array} entries.required - The entries grouped by product + * @property {Array} categories.required - The entries grouped by category + * @property {Array} vat.required - The entries grouped by vat */ export interface TransactionReportDataResponse { entries: TransactionReportEntryResponse[], @@ -122,11 +122,11 @@ export interface TransactionReportDataResponse { } /** - * @typedef TransactionReportResponse - * @property {TransactionFilterParameters.model} parameters.required - The parameters used for the report - * @property {TransactionReportDataResponse.model} data.required - The data that makes up the report - * @property {DineroObjectResponse.model} totalExclVat.required - The total amount of money excl. vat of this report - * @property {DineroObjectResponse.model} totalInclVat.required - The total amount of money inc. vat of this report + * @typedef {object} TransactionReportResponse + * @property {TransactionFilterParameters} parameters.required - The parameters used for the report + * @property {TransactionReportDataResponse} data.required - The data that makes up the report + * @property {DineroObjectResponse} totalExclVat.required - The total amount of money excl. vat of this report + * @property {DineroObjectResponse} totalInclVat.required - The total amount of money inc. vat of this report */ export interface TransactionReportResponse { parameters: TransactionFilterParameters, diff --git a/src/controller/response/transaction-response.ts b/src/controller/response/transaction-response.ts index 2aefc0f76..c785d4409 100644 --- a/src/controller/response/transaction-response.ts +++ b/src/controller/response/transaction-response.ts @@ -25,14 +25,14 @@ import { DineroObjectResponse } from './dinero-response'; import { PaginationResult } from '../../helpers/pagination'; /** - * @typedef {BaseResponse} BaseTransactionResponse - * @property {BaseUserResponse.model} from.required - The account from which the transaction + * @typedef {allOf|BaseResponse} BaseTransactionResponse + * @property {BaseUserResponse} from.required - The account from which the transaction * is subtracted. - * @property {BaseUserResponse.model} createdBy - The user that created the transaction, if not + * @property {BaseUserResponse} createdBy - The user that created the transaction, if not * same as 'from'.. - * @property {BasePointOfSaleResponse.model} pointOfSale.required - The POS at which this transaction + * @property {BasePointOfSaleResponse} pointOfSale.required - The POS at which this transaction * has been created - * @property {Dinero.model} value.required - Total sum of subtransactions + * @property {Dinero} value.required - Total sum of subtransactions */ export interface BaseTransactionResponse extends BaseResponse { from: BaseUserResponse, @@ -42,16 +42,16 @@ export interface BaseTransactionResponse extends BaseResponse { } /** - * @typedef {BaseResponse} TransactionResponse - * @property {BaseUserResponse.model} from.required - The account from which the transaction + * @typedef {allOf|BaseResponse} TransactionResponse + * @property {BaseUserResponse} from.required - The account from which the transaction * is subtracted. - * @property {BaseUserResponse.model} createdBy - The user that created the transaction, if not + * @property {BaseUserResponse} createdBy - The user that created the transaction, if not * same as 'from'. - * @property {Array.} subTransactions.required - The subtransactions + * @property {Array} subTransactions.required - The subtransactions * belonging to this transaction. - * @property {BasePointOfSaleResponse.model} pointOfSale.required - The POS at which this transaction + * @property {BasePointOfSaleResponse} pointOfSale.required - The POS at which this transaction * has been created - * @property {DineroObjectResponse.model} totalPriceInclVat.required - The total cost of the + * @property {DineroObjectResponse} totalPriceInclVat.required - The total cost of the * transaction */ export interface TransactionResponse extends BaseResponse { @@ -63,13 +63,13 @@ export interface TransactionResponse extends BaseResponse { } /** - * @typedef {BaseResponse} SubTransactionResponse - * @property {BaseUserResponse.model} to.required - The account that the transaction is added to. - * @property {BaseContainerResponse.model} container.required - The container from which all + * @typedef {allOf|BaseResponse} SubTransactionResponse + * @property {BaseUserResponse} to.required - The account that the transaction is added to. + * @property {BaseContainerResponse} container.required - The container from which all * products in the SubTransactionRows are bought - * @property {Array.} subTransactionRows.required - The rows of this + * @property {Array} subTransactionRows.required - The rows of this * SubTransaction - * @property {DineroObjectResponse.model} totalPriceInclVat.required - The total cost of the sub + * @property {DineroObjectResponse} totalPriceInclVat.required - The total cost of the sub * transaction */ export interface SubTransactionResponse extends BaseResponse { @@ -80,10 +80,10 @@ export interface SubTransactionResponse extends BaseResponse { } /** - * @typedef {BaseResponse} SubTransactionRowResponse - * @property {BaseProductResponse.model} product.required - The product that has been bought + * @typedef {allOf|BaseResponse} SubTransactionRowResponse + * @property {BaseProductResponse} product.required - The product that has been bought * @property {number} amount.required - The amount that has been bought - * @property {DineroObjectResponse.model} totalPriceInclVat.required - The cost of the + * @property {DineroObjectResponse} totalPriceInclVat.required - The cost of the * sub transaction row */ export interface SubTransactionRowResponse extends BaseResponse { @@ -93,9 +93,9 @@ export interface SubTransactionRowResponse extends BaseResponse { } /** - * @typedef PaginatedBaseTransactionResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned banners + * @typedef {object} PaginatedBaseTransactionResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned banners */ export interface PaginatedBaseTransactionResponse { _pagination: PaginationResult, diff --git a/src/controller/response/transfer-response.ts b/src/controller/response/transfer-response.ts index 6632911c0..3c8e61055 100644 --- a/src/controller/response/transfer-response.ts +++ b/src/controller/response/transfer-response.ts @@ -26,16 +26,16 @@ import { BasePayoutRequestResponse } from './payout-request-response'; import { FineResponse, UserFineGroupResponse } from './debtor-response'; /** - * @typedef {BaseResponse} TransferResponse + * @typedef {allOf|BaseResponse} TransferResponse * @property {string} description.required - Description of the transfer - * @property {Dinero.model} amount.required - Amount of money being transferred - * @property {BaseUserResponse.model} from - from which user the money is being transferred - * @property {BaseUserResponse.model} to - to which user the money is being transferred. - * @property {BaseInvoiceResponse.model} invoice - invoice belonging to this transfer - * @property {StripeDepositResponse.model} deposit - deposit belonging to this transfer - * @property {BasePayoutRequestResponse.model} payoutRequest - payout request belonging to this transfer - * @property {FineResponse.model} fine - fine belonging to this transfer - * @property {UserFineGroupResponse.model} waivedFines - fines that have been waived by this transfer + * @property {Dinero} amount.required - Amount of money being transferred + * @property {BaseUserResponse} from - from which user the money is being transferred + * @property {BaseUserResponse} to - to which user the money is being transferred. + * @property {BaseInvoiceResponse} invoice - invoice belonging to this transfer + * @property {StripeDepositResponse} deposit - deposit belonging to this transfer + * @property {BasePayoutRequestResponse} payoutRequest - payout request belonging to this transfer + * @property {FineResponse} fine - fine belonging to this transfer + * @property {UserFineGroupResponse} waivedFines - fines that have been waived by this transfer */ export interface TransferResponse extends BaseResponse { amount: DineroObjectResponse; @@ -50,9 +50,9 @@ export interface TransferResponse extends BaseResponse { } /** - * @typedef PaginatedTransferResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned transfers + * @typedef {object} PaginatedTransferResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned transfers */ export interface PaginatedTransferResponse { _pagination: PaginationResult, diff --git a/src/controller/response/update-key-response.ts b/src/controller/response/update-key-response.ts index f91486481..f24c6db23 100644 --- a/src/controller/response/update-key-response.ts +++ b/src/controller/response/update-key-response.ts @@ -19,7 +19,7 @@ import BaseResponse from './base-response'; /** - * @typedef UpdateKeyResponse + * @typedef {object} UpdateKeyResponse * @property {string} key.required - The key to return */ export default interface UpdateKeyResponse extends BaseResponse { diff --git a/src/controller/response/vat-group-response.ts b/src/controller/response/vat-group-response.ts index 8eb09f2f5..b66618193 100644 --- a/src/controller/response/vat-group-response.ts +++ b/src/controller/response/vat-group-response.ts @@ -21,7 +21,7 @@ import VatGroup, { VatDeclarationPeriod } from '../../entity/vat-group'; import BaseResponse from './base-response'; /** - * @typedef {BaseResponse} BaseVatGroupResponse + * @typedef {allOf|BaseResponse} BaseVatGroupResponse * @property {number} percentage.required - Percentage of VAT * @property {boolean} hidden.required - Whether VAT should be hidden */ @@ -31,9 +31,9 @@ export interface BaseVatGroupResponse extends BaseResponse { } /** - * @typedef PaginatedVatGroupResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned VAT groups + * @typedef {object} PaginatedVatGroupResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned VAT groups */ export interface PaginatedVatGroupResponse { _pagination: PaginationResult, @@ -41,11 +41,11 @@ export interface PaginatedVatGroupResponse { } /** - * @typedef VatDeclarationRow + * @typedef {object} VatDeclarationRow * @property {number} id.required - ID of the VAT group * @property {string} name.required - Name of the VAT group * @property {number} percentage.required - Percentage of VAT in this group - * @property {Array.} values.required - Amount of VAT to be paid to the tax administration + * @property {Array} values.required - Amount of VAT to be paid to the tax administration * per period */ export interface VatDeclarationRow { @@ -56,10 +56,10 @@ export interface VatDeclarationRow { } /** - * @typedef VatDeclarationResponse + * @typedef {object} VatDeclarationResponse * @property {number} calendarYear.required - Calendar year of this result table * @property {string} period.required - The used VAT declaration period the rows below are based upon - * @property {Array.} rows.required - The rows of the result table + * @property {Array} rows.required - The rows of the result table */ export interface VatDeclarationResponse { calendarYear: number; diff --git a/src/controller/response/voucher-group-response.ts b/src/controller/response/voucher-group-response.ts index 134986152..a4c42c0e1 100644 --- a/src/controller/response/voucher-group-response.ts +++ b/src/controller/response/voucher-group-response.ts @@ -21,12 +21,12 @@ import { PaginationResult } from '../../helpers/pagination'; import { DineroObjectResponse } from './dinero-response'; /** - * @typedef {BaseResponse} VoucherGroupResponse + * @typedef {allOf|BaseResponse} VoucherGroupResponse * @property {string} name.required - Name of the voucher group * @property {string} activeStartDate - Start date of the voucher group * @property {string} activeEndDate.required - End date of the voucher group - * @property {Array.} users.required - Users in the voucher group - * @property {DineroObjectRequest.model} balance.required - Start balance to be assigned + * @property {Array} users.required - Users in the voucher group + * @property {DineroObjectRequest} balance.required - Start balance to be assigned * to the voucher users * @property {number} amount.required - Amount of users to be assigned to the voucher group */ @@ -40,9 +40,9 @@ export default interface VoucherGroupResponse extends BaseResponse { } /** - * @typedef PaginatedVoucherGroupResponse - * @property {PaginationResult.model} _pagination.required - Pagination metadata - * @property {Array.} records.required - Returned voucher groups + * @typedef {object} PaginatedVoucherGroupResponse + * @property {PaginationResult} _pagination.required - Pagination metadata + * @property {Array} records.required - Returned voucher groups */ export interface PaginatedVoucherGroupResponse { _pagination: PaginationResult, diff --git a/src/entity/base-entity-without-id.ts b/src/entity/base-entity-without-id.ts index 41f368e5d..2efd6e67a 100644 --- a/src/entity/base-entity-without-id.ts +++ b/src/entity/base-entity-without-id.ts @@ -20,7 +20,7 @@ import { } from 'typeorm'; /** - * @typedef BaseEntityWithoutId + * @typedef {object} BaseEntityWithoutId * @property {string} createdAt - The creation date of the object. * @property {string} updatedAt - The last update date of the object. * @property {integer} version - The current version of the object. diff --git a/src/entity/base-entity.ts b/src/entity/base-entity.ts index fad19364a..96c6417a6 100644 --- a/src/entity/base-entity.ts +++ b/src/entity/base-entity.ts @@ -21,7 +21,7 @@ import { import BaseEntityWithoutId from './base-entity-without-id'; /** - * @typedef {BaseEntityWithoutId} BaseEntity + * @typedef {allOf|BaseEntityWithoutId} BaseEntity * @property {integer} id.required - The auto-generated object id. */ export default class BaseEntity extends BaseEntityWithoutId { diff --git a/src/entity/vat-group.ts b/src/entity/vat-group.ts index 1b5002474..7ebfda652 100644 --- a/src/entity/vat-group.ts +++ b/src/entity/vat-group.ts @@ -19,7 +19,7 @@ import { Column, Entity } from 'typeorm'; import BaseEntity from './base-entity'; /** - * @typedef {BaseEntity} VatGroup + * @typedef {allOf|BaseEntity} VatGroup * @property {string} name - Name of the VAT group * @property {number} percentage - VAT percentage * @property {boolean} deleted - Whether this group is soft-deleted diff --git a/src/start/swagger.ts b/src/start/swagger.ts index 10aa468a9..858a30189 100644 --- a/src/start/swagger.ts +++ b/src/start/swagger.ts @@ -76,6 +76,7 @@ export default class Swagger { // Glob pattern to find your jsdoc files filesPattern: [ './controller/root-controller.ts', + './controller/balance-controller.ts', './controller/response/banner-response.ts', './helpers/pagination.ts', './controller/response/base-response.ts', @@ -85,6 +86,12 @@ export default class Swagger { './controller/request/authentication-*.ts', './controller/request/reset-local-request.ts', './controller/authentication-secure-controller.ts', + './controller/response/balance-response.ts', + './controller/response/*.ts', + './controller/request/dinero-request.ts', + './entity/vat-group.ts', + './entity/base-entity-without-id.ts', + './entity/base-entity.ts', ], swaggerUIPath: '/api-docs', exposeSwaggerUI: true, // Expose Swagger UI