Skip to content

Commit

Permalink
Migrated:
Browse files Browse the repository at this point in the history
all requests
  • Loading branch information
JustSamuel committed Dec 25, 2023
1 parent 2fd09c1 commit 9974c2e
Show file tree
Hide file tree
Showing 28 changed files with 77 additions and 81 deletions.
2 changes: 1 addition & 1 deletion src/controller/request/accept-tos-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef AcceptTosRequest
* @typedef {object} AcceptTosRequest
* @property {boolean} extensiveDataProcessing.required - Whether data about this
* user can be used (non-anonymously) for more data science!
*/
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/banner-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef BannerRequest
* @typedef {object} BannerRequest
* @property {string} name - Name/label of the banner
* @property {number} duration - How long the banner should be shown (in seconds)
* @property {boolean} active - Whether the banner is active. Overrides start and end date
Expand Down
8 changes: 4 additions & 4 deletions src/controller/request/container-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export type ContainerParams = UpdateContainerParams | CreateContainerParams;
// strict type checker later down the line.

/**
* @typedef CreateContainerRequest
* @typedef {object} CreateContainerRequest
* @property {string} name.required - Name of the container
* @property {Array.<integer>} products.required -
* @property {Array<integer>} products.required -
* IDs or requests of the products to add to the container
* @property {boolean} public.required - Whether the container is public or not
* @property {integer} ownerId - Id of the user who will own the container, if undefined it will
Expand All @@ -50,9 +50,9 @@ export interface CreateContainerRequest extends BaseContainerParams {
}

/**
* @typedef UpdateContainerRequest
* @typedef {object} UpdateContainerRequest
* @property {string} name.required - Name of the container
* @property {Array.<integer>} products.required -
* @property {Array<integer>} products.required -
* IDs or requests of the products to add to the container
* @property {boolean} public.required - Whether the container is public or not
*/
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/debtor-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef HandoutFinesRequest
* @typedef {object} HandoutFinesRequest
* @property {Array<integer>} userIds.required - Users to fine. If a user is not eligible for a fine, a fine of 0,00 will be handed out.
* @property {string} referenceDate.required - Reference date to calculate the balance and thus the height of the fine for.
*/
Expand Down
12 changes: 6 additions & 6 deletions src/controller/request/event-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { Availability } from '../../entity/event/event-shift-answer';

/**
* @typedef CreateEventRequest
* @typedef {object} CreateEventRequest
* @property {string} name.required - Name of the event.
* @property {string} startDate.required - The starting date of the event.
* @property {string} endDate.required - The end date of the event.
Expand All @@ -28,7 +28,7 @@ import { Availability } from '../../entity/event/event-shift-answer';
*/

/**
* @typedef UpdateEventRequest
* @typedef {object} UpdateEventRequest
* @property {string} name - Name of the event.
* @property {string} startDate - The starting date of the event.
* @property {string} endDate - The end date of the event.
Expand All @@ -45,13 +45,13 @@ export interface EventRequest {
}

/**
* @typedef CreateShiftRequest
* @typedef {object} CreateShiftRequest
* @property {string} name.required - Name of the event
* @property {Array<string>} roles.required - Roles that (can) have this shift
*/

/**
* @typedef UpdateShiftRequest
* @typedef {object} UpdateShiftRequest
* @property {string} name - Name of the event
* @property {Array<string>} roles - Roles that (can) have this shift
*/
Expand All @@ -61,15 +61,15 @@ export interface EventShiftRequest {
}

/**
* @typedef EventAnswerAssignmentRequest
* @typedef {object} EventAnswerAssignmentRequest
* @property {boolean} selected.required - Whether this user is selected for the given shift at the given event
*/
export interface EventAnswerAssignmentRequest {
selected: boolean,
}

/**
* @typedef EventAnswerAvailabilityRequest
* @typedef {object} EventAnswerAvailabilityRequest
* @property {string} availability.required - New availability of the given user for the given event (YES, NO, LATER, NA)
*/
export interface EventAnswerAvailabilityRequest {
Expand Down
4 changes: 2 additions & 2 deletions src/controller/request/invoice-entry-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import { DineroObjectRequest } from './dinero-request';

/**
* @typedef InvoiceEntryRequest
* @typedef {object} InvoiceEntryRequest
* @property {string} description.required - The description of the entry
* @property {integer} amount.required - Amount of item sold.
* @property {DineroObjectRequest.model} priceInclVat.required - The price per item.
* @property {DineroObjectRequest} priceInclVat.required - The price per item.
* @property {number} vatPercentage.required - The percentage of VAT applied to this item
*/
export default interface InvoiceEntryRequest {
Expand Down
11 changes: 5 additions & 6 deletions src/controller/request/invoice-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ export interface UpdateInvoiceParams extends BaseUpdateInvoice {
}

/**
* @typedef UpdateInvoiceRequest
* @typedef{object} UpdateInvoiceRequest
* @property {integer} byId - The user who updates the Invoice, defaults to the ID of the requester.
* @property {string} addressee.required - Name of the addressed.
* @property {string} description.required - The description of the invoice.
* @property {string} state - The state to set of the invoice,
* can be either CREATED, SENT, PAID or DELETED.
* @property {string} state - enum:CREATED,SENT,PAID,DELETED - The state to set of the invoice,
*/
export interface UpdateInvoiceRequest extends BaseUpdateInvoice {
byId?: number,
Expand All @@ -58,13 +57,13 @@ export interface CreateInvoiceParams extends BaseInvoice {
}

/**
* @typedef CreateInvoiceRequest
* @typedef {object} CreateInvoiceRequest
* @property {integer} forId.required - The recipient of the Invoice.
* @property {integer} byId - The creator of the Invoice, defaults to the ID of the requester.
* @property {string} addressee.required - Name of the addressed.
* @property {string} description.required - The description of the invoice.
* @property {Array.<InvoiceEntryRequest>} customEntries - Custom entries to be added to the invoice
* @property {Array.<integer>} transactionIDs - IDs of the transactions to add to the Invoice.
* @property {Array<InvoiceEntryRequest>} customEntries - Custom entries to be added to the invoice
* @property {Array<integer>} transactionIDs - IDs of the transactions to add to the Invoice.
* @property {string} fromDate - For creating an Invoice for all transactions from a specific date.
* @property {boolean} isCreditInvoice.required - If the invoice is an credit Invoice
* If an invoice is a credit invoice the relevant subtransactions are defined as all the sub transactions which have `subTransaction.toId == forId`.
Expand Down
4 changes: 2 additions & 2 deletions src/controller/request/payout-request-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import { DineroObjectRequest } from './dinero-request';

/**
* @typedef PayoutRequestRequest
* @property {DineroObjectRequest.model} amount.required - The requested amount to be paid out
* @typedef {object} PayoutRequestRequest
* @property {DineroObjectRequest} amount.required - The requested amount to be paid out
* @property {string} bankAccountNumber.required - The bank account number to transfer the money to
* @property {string} bankAccountName.required - The name of the owner of the bank account
*/
Expand Down
5 changes: 2 additions & 3 deletions src/controller/request/payout-request-status-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
import { PayoutRequestState } from '../../entity/transactions/payout-request-status';

/**
* @typedef PayoutRequestStatusRequest
* @property {string} state - PayoutRequestState to change to,
* should be one of CREATED, APPROVED, DENIED, CANCELLED
* @typedef {object} PayoutRequestStatusRequest
* @property {string} state - enum:CREATED,APPROVED,DENIED,CANCELLED - PayoutRequestState to change to.
*/
export interface PayoutRequestStatusRequest {
state: PayoutRequestState;
Expand Down
8 changes: 4 additions & 4 deletions src/controller/request/point-of-sale-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export interface UpdatePointOfSaleParams extends BasePointOfSaleParams {
}

/**
* @typedef CreatePointOfSaleRequest
* @typedef {object} CreatePointOfSaleRequest
* @property {string} name.required - Name of the POS
* @property {boolean} useAuthentication.required - Whether this POS requires users to
* authenticate themselves before making a transaction
* @property {Array.<integer>} containers -
* @property {Array<integer>} containers -
* IDs or Requests of the containers to add to the POS
* @property {integer} ownerId - ID of the user who will own the POS, if undefined it will
* default to the token ID.
Expand All @@ -45,11 +45,11 @@ export interface CreatePointOfSaleRequest extends BasePointOfSaleParams {
}

/**
* @typedef UpdatePointOfSaleRequest
* @typedef {object} UpdatePointOfSaleRequest
* @property {string} name.required - Name of the POS
* @property {boolean} useAuthentication.required - Whether this POS requires users to
* authenticate themselves before making a transaction
* @property {Array.<integer>} containers -
* @property {Array<integer>} containers -
* IDs or Requests of the containers to add to the POS
* @property {integer} id.required - ID of the POS to update.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/product-category-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef ProductCategoryRequest
* @typedef {object} ProductCategoryRequest
* @property {string} name - Name/label of the productCategory
*/
export default interface ProductCategoryRequest {
Expand Down
8 changes: 4 additions & 4 deletions src/controller/request/product-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export interface UpdateProductParams extends BaseProductParams {
export type ProductRequest = UpdateProductParams | CreateProductParams;

/**
* @typedef CreateProductRequest
* @typedef {object} CreateProductRequest
* @property {string} name.required - Name of the product
* @property {DineroObjectRequest.model} priceInclVat.required - Price of the product
* @property {DineroObjectRequest} priceInclVat.required - Price of the product
* @property {number} vat.required - VAT group ID of the product
* @property {number} category.required - Category of the product
* @property {number} alcoholPercentage.required - Alcohol percentage of the product in 2 decimals
Expand All @@ -50,9 +50,9 @@ export interface CreateProductRequest extends BaseProductParams {
}

/**
* @typedef UpdateProductRequest
* @typedef {object} UpdateProductRequest
* @property {string} name.required - Name of the product
* @property {DineroObjectRequest.model} priceInclVat.required - Price of the product
* @property {DineroObjectRequest} priceInclVat.required - Price of the product
* @property {number} vat.required - VAT group ID of the product
* @property {number} category.required - Category of the product
* @property {number} alcoholPercentage.required - Alcohol percentage of the product in 2 decimals
Expand Down
6 changes: 3 additions & 3 deletions src/controller/request/revision-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/

/**
* @typedef RevisionRequest
* @property {integer} id - revision id
* @property {integer} revision - revision number
* @typedef {object} RevisionRequest
* @property {integer} id.required - revision id
* @property {integer} revision.required - revision number
*/
export default interface RevisionRequest {
id: number,
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/simple-file-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef SimpleFileRequest
* @typedef {object} SimpleFileRequest
* @property {string} name - Name of the file
*/
export default interface SimpleFileRequest {
Expand Down
4 changes: 2 additions & 2 deletions src/controller/request/stripe-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import { DineroObjectRequest } from './dinero-request';

/**
* @typedef StripeRequest
* @property {Dinero.model} amount - Amount of money being deposited
* @typedef {object} StripeRequest
* @property {DineroObjectRequest} amount - Amount of money being deposited
*/
export interface StripeRequest {
amount: DineroObjectRequest;
Expand Down
22 changes: 11 additions & 11 deletions src/controller/request/transaction-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import { DineroObjectRequest } from './dinero-request';
import RevisionRequest from './revision-request';

/**
* @typedef TransactionRequest
* @typedef {object} TransactionRequest
* @property {integer} from.required - from user id
* @property {integer} createdBy - createdBy user id
* @property {Array.<SubTransactionRequest>} subTransactions.required - subtransactions
* @property {RevisionRequest.model} pointOfSale.required - point of sale
* @property {DineroObjectRequest.model} totalPriceInclVat.required - total price of the transaction
* @property {Array<SubTransactionRequest>} subTransactions.required - subtransactions
* @property {RevisionRequest} pointOfSale.required - point of sale
* @property {DineroObjectRequest} totalPriceInclVat.required - total price of the transaction
*/
export interface TransactionRequest {
from: number,
Expand All @@ -36,11 +36,11 @@ export interface TransactionRequest {
}

/**
* @typedef SubTransactionRequest
* @typedef {object} SubTransactionRequest
* @property {integer} to.required - to user id
* @property {RevisionRequest.model} container.required - container
* @property {Array.<SubTransactionRowRequest>} subTransactionRows.required - subtransaction rows
* @property {DineroObjectRequest.model} totalPriceInclVat.required - total price
* @property {RevisionRequest} container.required - container
* @property {Array<SubTransactionRowRequest>} subTransactionRows.required - subtransaction rows
* @property {DineroObjectRequest} totalPriceInclVat.required - total price
* of the subtransaction
*/
export interface SubTransactionRequest {
Expand All @@ -51,10 +51,10 @@ export interface SubTransactionRequest {
}

/**
* @typedef SubTransactionRowRequest
* @property {RevisionRequest.model} product - product
* @typedef {object} SubTransactionRowRequest
* @property {RevisionRequest} product - product
* @property {integer} amount - amount of this product in subtransaction
* @property {DineroObjectRequest.model} totalPriceInclVat.required - total price
* @property {DineroObjectRequest} totalPriceInclVat.required - total price
* of the subtransaction row
*/
export interface SubTransactionRowRequest {
Expand Down
4 changes: 2 additions & 2 deletions src/controller/request/transfer-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import { DineroObjectRequest } from './dinero-request';

/**
* @typedef TransferRequest
* @typedef {object} TransferRequest
* @property {string} description - Description of the transfer
* @property {DineroObjectRequest.model} amount - Amount of money being transferred
* @property {DineroObjectRequest} amount - Amount of money being transferred
* @property {integer} type - Type of transfer
* @property {integer} fromId - from which user the money is being transferred
* @property {integer} toId - to which user the money is being transferred.
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/update-local-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef UpdateLocalRequest
* @typedef {object} UpdateLocalRequest
* @property {string} password.required - The password to set
*/
export default interface UpdateLocalRequest {
Expand Down
2 changes: 1 addition & 1 deletion src/controller/request/update-nfc-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

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

/**
* @typedef UpdatePinRequest
* @typedef {object} UpdatePinRequest
* @property {string} pin.required - The PIN code to set
*/
export default interface UpdatePinRequest {
Expand Down
4 changes: 2 additions & 2 deletions src/controller/request/user-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default interface BaseUserRequest {
}

/**
* @typedef CreateUserRequest
* @typedef {object} CreateUserRequest
* @property {string} firstName.required
* @property {string} lastName
* @property {string} nickname
Expand All @@ -42,7 +42,7 @@ export interface CreateUserRequest extends BaseUserRequest {
}

/**
* @typedef UpdateUserRequest
* @typedef {object} UpdateUserRequest
* @property {string} firstName
* @property {string} lastName
* @property {string} nickname
Expand Down
4 changes: 2 additions & 2 deletions src/controller/request/vat-group-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @typedef UpdateVatGroupRequest
* @typedef {object} UpdateVatGroupRequest
* @property {string} name.required - Name of the VAT group
* @property {boolean} deleted.required - Whether this group should be hidden
* in the financial overviews when its value is zero
Expand All @@ -31,7 +31,7 @@ export interface UpdateVatGroupRequest {
}

/**
* @typedef {UpdateVatGroupRequest} VatGroupRequest
* @typedef {allOf|UpdateVatGroupRequest} VatGroupRequest
* @property {number} percentage.required - VAT percentage
*/
export interface VatGroupRequest extends UpdateVatGroupRequest {
Expand Down
Loading

0 comments on commit 9974c2e

Please sign in to comment.