From 88332832ce0d3dd507fdca8e4afedd9848117f6b Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Fri, 16 Aug 2024 07:55:04 +1200 Subject: [PATCH 01/18] Resolve issue with search functionality when role filter is applied --- .../Admin/AdminMemberView/AdminMemberView.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.tsx b/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.tsx index c42046cd6..e498e7f5f 100644 --- a/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.tsx +++ b/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.tsx @@ -139,16 +139,22 @@ export const AdminMemberView = ({ const dataFilter = useCallback( (oldData: MemberColumnFormat[]) => { - return isValidSearchQuery || shouldFilterByAccount - ? oldData.filter( - (item) => - (isValidSearchQuery && - (item.Email?.toLowerCase().includes(currentSearchQuery) || - item.Name?.toLowerCase().includes(currentSearchQuery))) || - (shouldFilterByAccount && - filteredAccountType === item.Status?.toLowerCase()) - ) - : oldData + return oldData.filter((item) => { + const matchesSearchQuery = + isValidSearchQuery && + (item.Email?.toLowerCase().includes(currentSearchQuery) || + item.Name?.toLowerCase().includes(currentSearchQuery)) + + const matchesAccountType = + shouldFilterByAccount && + filteredAccountType === item.Status?.toLowerCase() + + // It is true if either filter matches or both + return ( + (matchesSearchQuery || !isValidSearchQuery) && + (matchesAccountType || !shouldFilterByAccount) + ) + }) }, [ isValidSearchQuery, From 40f16126edcfbc19fa892dac425926ccb0a4cddd Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Fri, 16 Aug 2024 07:56:06 +1200 Subject: [PATCH 02/18] Implemented new unit tests for AdminMemberView to cover Role-based filtering --- .../AdminMemberView/AdminMemberView.test.tsx | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.test.tsx b/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.test.tsx index 3404a591b..a2a4b9e36 100644 --- a/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.test.tsx +++ b/client/src/components/composite/Admin/AdminMemberView/AdminMemberView.test.tsx @@ -47,4 +47,102 @@ describe("AdminMemberView", () => { expect(await queryByText("sausage")).toBeNull() }) }) + it("Filters the data properly by account type", async () => { + const { getByText, queryByText } = render( + + ) + + const roleFilterButton = getByText("all") + + // Cycle through filters + fireEvent.click(roleFilterButton) // admin + await waitFor(() => { + expect(queryByText("John")).toBeVisible() + expect(queryByText("sausage")).toBeVisible() + expect(queryByText("Dog")).toBeNull() + expect(queryByText("cat")).toBeNull() + expect(queryByText("fish")).toBeNull() + }) + + fireEvent.click(roleFilterButton) // member + await waitFor(() => { + expect(queryByText("John")).toBeNull() + expect(queryByText("sausage")).toBeNull() + expect(queryByText("Dog")).toBeVisible() + expect(queryByText("cat")).toBeNull() + expect(queryByText("fish")).toBeVisible() + }) + + fireEvent.click(roleFilterButton) // guest + await waitFor(() => { + expect(queryByText("John")).toBeNull() + expect(queryByText("sausage")).toBeNull() + expect(queryByText("Dog")).toBeNull() + expect(queryByText("cat")).toBeVisible() + expect(queryByText("fish")).toBeNull() + }) + + fireEvent.click(roleFilterButton) // all + await waitFor(() => { + expect(queryByText("John")).toBeVisible() + expect(queryByText("sausage")).toBeVisible() + expect(queryByText("Dog")).toBeVisible() + expect(queryByText("cat")).toBeVisible() + expect(queryByText("fish")).toBeVisible() + }) + }) + + it("Filters the data by both search query and account type", async () => { + const { getByText, getByTestId, queryByText } = render( + + ) + + const input = getByTestId("search-input") + const roleFilterButton = getByText("all") + + fireEvent.change(input, { target: { value: "key" } }) + + fireEvent.click(roleFilterButton) // admin + await waitFor(() => { + expect(queryByText("John")).toBeVisible() + expect(queryByText("sausage")).toBeVisible() + expect(queryByText("Dog")).toBeNull() + expect(queryByText("cat")).toBeNull() + expect(queryByText("fish")).toBeNull() + }) + + fireEvent.click(roleFilterButton) // member + await waitFor(() => { + expect(queryByText("John")).toBeNull() + expect(queryByText("sausage")).toBeNull() + expect(queryByText("Dog")).toBeVisible() + expect(queryByText("cat")).toBeNull() + expect(queryByText("fish")).toBeVisible() + }) + + fireEvent.click(roleFilterButton) // guest + await waitFor(() => { + expect(queryByText("John")).toBeNull() + expect(queryByText("sausage")).toBeNull() + expect(queryByText("Dog")).toBeNull() + expect(queryByText("cat")).toBeVisible() + expect(queryByText("fish")).toBeNull() + }) + }) }) From 21ba9c6fe5b21fee8d484a704e796dfdfa322523 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Fri, 16 Aug 2024 07:58:57 +1200 Subject: [PATCH 03/18] codegen --- server/src/middleware/__generated__/routes.ts | 107 ++++++++++-------- .../src/middleware/__generated__/swagger.json | 32 +++--- 2 files changed, 73 insertions(+), 66 deletions(-) diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts index 049aee8eb..64a316d7a 100644 --- a/server/src/middleware/__generated__/routes.ts +++ b/server/src/middleware/__generated__/routes.ts @@ -490,17 +490,24 @@ const templateService = new ExpressTemplateService(models, {"noImplicitAdditiona // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + + export function RegisterRoutes(app: Router) { + // ########################################################################################################### // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa // ########################################################################################################### + + + app.get('/users/self', authenticateMiddleware([{"jwt":[]}]), ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.getSelf)), - function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { + async function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -513,7 +520,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getSelf', controller, response, @@ -531,7 +538,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.editSelf)), - function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { + async function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, @@ -545,7 +552,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'editSelf', controller, response, @@ -563,7 +570,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.deleteUser)), - function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { + async function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, }; @@ -576,7 +583,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'deleteUser', controller, response, @@ -593,7 +600,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(StripeWebhook)), ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { + async function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -606,7 +613,7 @@ export function RegisterRoutes(app: Router) { const controller = new StripeWebhook(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'receiveWebhook', controller, response, @@ -623,7 +630,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UserSignup)), ...(fetchMiddlewares(UserSignup.prototype.signup)), - function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { + async function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, }; @@ -636,7 +643,7 @@ export function RegisterRoutes(app: Router) { const controller = new UserSignup(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'signup', controller, response, @@ -653,7 +660,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), - function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { + async function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { const args: Record = { }; @@ -665,7 +672,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getMembershipPrices', controller, response, @@ -683,7 +690,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), - function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { + async function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { const args: Record = { sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, }; @@ -696,7 +703,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getCheckoutSessionDetails', controller, response, @@ -714,7 +721,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), - function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { + async function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, @@ -728,7 +735,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getMembershipPayment', controller, response, @@ -746,7 +753,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), - function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { + async function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, @@ -760,7 +767,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getBookingPayment', controller, response, @@ -778,7 +785,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), - function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { + async function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -791,7 +798,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getAllBookings', controller, response, @@ -809,7 +816,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), - function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { + async function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, }; @@ -822,7 +829,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getAvailableDates', controller, response, @@ -840,7 +847,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), - function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { + async function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, }; @@ -853,7 +860,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'fetchUsersByBookingDateRange', controller, response, @@ -871,7 +878,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), - function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, }; @@ -884,7 +891,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'makeDateAvailable', controller, response, @@ -902,7 +909,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), - function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, }; @@ -915,7 +922,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'makeDateUnavailable', controller, response, @@ -933,7 +940,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.createBookings)), - function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, }; @@ -946,7 +953,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'createBookings', controller, response, @@ -964,7 +971,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.removeBooking)), - function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, }; @@ -977,7 +984,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'removeBooking', controller, response, @@ -995,7 +1002,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), - function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { cursor: {"in":"query","name":"cursor","dataType":"string"}, toFetch: {"in":"query","name":"toFetch","dataType":"double"}, @@ -1009,7 +1016,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getAllUsers', controller, response, @@ -1027,7 +1034,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getUser)), - function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, }; @@ -1040,7 +1047,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getUser', controller, response, @@ -1058,7 +1065,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.createUser)), - function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, }; @@ -1071,7 +1078,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'createUser', controller, response, @@ -1089,7 +1096,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.editUsers)), - function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, }; @@ -1102,7 +1109,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'editUsers', controller, response, @@ -1120,7 +1127,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.promoteUser)), - function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, }; @@ -1133,7 +1140,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'promoteUser', controller, response, @@ -1151,7 +1158,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.demoteUser)), - function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, }; @@ -1164,7 +1171,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'demoteUser', controller, response, @@ -1182,7 +1189,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), - function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { }; @@ -1194,7 +1201,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'demoteAllUsers', controller, response, @@ -1212,7 +1219,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.addCoupon)), - function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, }; @@ -1225,7 +1232,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'addCoupon', controller, response, @@ -1243,7 +1250,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), - function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { + async function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { const args: Record = { limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, cursor: {"in":"query","name":"cursor","dataType":"string"}, @@ -1257,7 +1264,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - templateService.apiHandler({ + await templateService.apiHandler({ methodName: 'getLatestHistory', controller, response, diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 61a737b8c..2c3a4581b 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\nRequires an admin JWT token.", + "description": "Get a user by their UID.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ From 5c405e661790ccccddb47cfa305bb9179023f955 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Fri, 16 Aug 2024 08:03:24 +1200 Subject: [PATCH 04/18] codegen --- .../src/middleware/__generated__/swagger.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 2c3a4581b..61a737b8c 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\r\nRequires an admin JWT token.", + "description": "Get a user by their UID.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", "security": [ { "jwt": [ From b1a27020ae71c6842884fc8c92f04e7b17f7b37c Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Fri, 16 Aug 2024 08:06:21 +1200 Subject: [PATCH 05/18] codegen --- .../src/middleware/__generated__/swagger.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 61a737b8c..2c3a4581b 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\nRequires an admin JWT token.", + "description": "Get a user by their UID.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ From 9485790ee2d2ade355799233d777428051a9c701 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Fri, 16 Aug 2024 08:11:02 +1200 Subject: [PATCH 06/18] codegen --- .../src/middleware/__generated__/swagger.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 2c3a4581b..61a737b8c 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\r\nRequires an admin JWT token.", + "description": "Get a user by their UID.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", "security": [ { "jwt": [ From 0e3f173ac071ef48e443f1fa8391b890cb8685e4 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Fri, 16 Aug 2024 08:15:25 +1200 Subject: [PATCH 07/18] codegen --- .../src/middleware/__generated__/swagger.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 61a737b8c..2c3a4581b 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\nRequires an admin JWT token.", + "description": "Get a user by their UID.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ From 0a0b69846f9d3c5feb9aacd66d399d5a5bc86e12 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 17 Aug 2024 08:06:16 +1200 Subject: [PATCH 08/18] codegen --- .../src/middleware/__generated__/swagger.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 2c3a4581b..61a737b8c 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\r\nRequires an admin JWT token.", + "description": "Get a user by their UID.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", "security": [ { "jwt": [ From cecfe17befa09e1a2f7cc548efed567072207757 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 17 Aug 2024 08:09:01 +1200 Subject: [PATCH 09/18] codegen --- .../src/middleware/__generated__/swagger.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 61a737b8c..2c3a4581b 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\nRequires an admin JWT token.", + "description": "Get a user by their UID.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ From b7f723af7d05b155fca39f050a947a7ef6ff8bf8 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 17 Aug 2024 08:22:37 +1200 Subject: [PATCH 10/18] codegen --- server/src/middleware/__generated__/routes.ts | 1262 ++++++++--------- 1 file changed, 631 insertions(+), 631 deletions(-) diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts index 64a316d7a..8e3db924c 100644 --- a/server/src/middleware/__generated__/routes.ts +++ b/server/src/middleware/__generated__/routes.ts @@ -501,782 +501,782 @@ export function RegisterRoutes(app: Router) { // ########################################################################################################### - - app.get('/users/self', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.getSelf)), - - async function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/users/self', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.getSelf)), - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + async function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new UsersController(); + const controller = new UsersController(); await templateService.apiHandler({ - methodName: 'getSelf', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getSelf', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/users/edit-self', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.editSelf)), - - async function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/users/edit-self', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.editSelf)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new UsersController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UsersController(); await templateService.apiHandler({ - methodName: 'editSelf', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'editSelf', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/users/delete-user', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.deleteUser)), - - async function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.delete('/users/delete-user', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.deleteUser)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new UsersController(); + const controller = new UsersController(); await templateService.apiHandler({ - methodName: 'deleteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'deleteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/webhook', - ...(fetchMiddlewares(StripeWebhook)), - ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - - async function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/webhook', + ...(fetchMiddlewares(StripeWebhook)), + ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new StripeWebhook(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new StripeWebhook(); await templateService.apiHandler({ - methodName: 'receiveWebhook', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'receiveWebhook', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/signup', - ...(fetchMiddlewares(UserSignup)), - ...(fetchMiddlewares(UserSignup.prototype.signup)), - - async function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/signup', + ...(fetchMiddlewares(UserSignup)), + ...(fetchMiddlewares(UserSignup.prototype.signup)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new UserSignup(); + const controller = new UserSignup(); await templateService.apiHandler({ - methodName: 'signup', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'signup', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/payment/membership_prices', - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), - - async function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/payment/membership_prices', + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new PaymentController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); await templateService.apiHandler({ - methodName: 'getMembershipPrices', - controller, - response, - next, - validatedArgs, - successStatus: undefined, + methodName: 'getMembershipPrices', + controller, + response, + next, + validatedArgs, + successStatus: undefined, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/payment/checkout_status', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), - - async function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/payment/checkout_status', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new PaymentController(); + const controller = new PaymentController(); await templateService.apiHandler({ - methodName: 'getCheckoutSessionDetails', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getCheckoutSessionDetails', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/payment/membership', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), - - async function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/payment/membership', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new PaymentController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); await templateService.apiHandler({ - methodName: 'getMembershipPayment', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getMembershipPayment', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/payment/booking', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), - - async function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/payment/booking', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new PaymentController(); + const controller = new PaymentController(); await templateService.apiHandler({ - methodName: 'getBookingPayment', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getBookingPayment', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/bookings', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), - - async function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/bookings', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new BookingController(); + const controller = new BookingController(); await templateService.apiHandler({ - methodName: 'getAllBookings', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getAllBookings', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/bookings/available-dates', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), - - async function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/bookings/available-dates', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new BookingController(); + const controller = new BookingController(); await templateService.apiHandler({ - methodName: 'getAvailableDates', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getAvailableDates', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/bookings/fetch-users', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), - - async function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/bookings/fetch-users', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new BookingController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new BookingController(); await templateService.apiHandler({ - methodName: 'fetchUsersByBookingDateRange', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'fetchUsersByBookingDateRange', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/make-dates-available', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), - - async function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/make-dates-available', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new AdminController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'makeDateAvailable', - controller, - response, - next, - validatedArgs, - successStatus: 201, + methodName: 'makeDateAvailable', + controller, + response, + next, + validatedArgs, + successStatus: 201, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/make-dates-unavailable', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), - - async function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/make-dates-unavailable', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new AdminController(); + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'makeDateUnavailable', - controller, - response, - next, - validatedArgs, - successStatus: 201, + methodName: 'makeDateUnavailable', + controller, + response, + next, + validatedArgs, + successStatus: 201, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/create', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.createBookings)), - - async function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/create', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.createBookings)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new AdminController(); + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'createBookings', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'createBookings', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/delete', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.removeBooking)), - - async function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/delete', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.removeBooking)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new AdminController(); + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'removeBooking', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'removeBooking', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/users', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), - - async function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - cursor: {"in":"query","name":"cursor","dataType":"string"}, - toFetch: {"in":"query","name":"toFetch","dataType":"double"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/users', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + cursor: {"in":"query","name":"cursor","dataType":"string"}, + toFetch: {"in":"query","name":"toFetch","dataType":"double"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new AdminController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'getAllUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getAllUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/users/:uid', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getUser)), - - async function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/users/:uid', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getUser)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new AdminController(); + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'getUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/create', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.createUser)), - - async function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/create', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.createUser)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new AdminController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'createUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'createUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/admin/users/bulk-edit', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.editUsers)), - - async function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/admin/users/bulk-edit', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.editUsers)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new AdminController(); + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'editUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'editUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/promote', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.promoteUser)), - - async function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/promote', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.promoteUser)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new AdminController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'promoteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'promoteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/demote', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.demoteUser)), - - async function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/demote', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.demoteUser)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new AdminController(); + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'demoteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'demoteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/admin/users/demote-all', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), - - async function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/admin/users/demote-all', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new AdminController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'demoteAllUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'demoteAllUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/users/add-coupon', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.addCoupon)), - - async function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/users/add-coupon', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.addCoupon)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const controller = new AdminController(); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'addCoupon', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'addCoupon', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/bookings/history', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), - - async function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, - cursor: {"in":"query","name":"cursor","dataType":"string"}, - }; + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/bookings/history', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + async function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, + cursor: {"in":"query","name":"cursor","dataType":"string"}, + }; - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new AdminController(); + const controller = new AdminController(); await templateService.apiHandler({ - methodName: 'getLatestHistory', - controller, - response, - next, - validatedArgs, - successStatus: 200, + methodName: 'getLatestHistory', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1304,20 +1304,20 @@ export function RegisterRoutes(app: Router) { for (const name in secMethod) { secMethodAndPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) + expressAuthenticationRecasted(request, name, secMethod[name], response) + .catch(pushAndRethrow) ); } // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa secMethodOrPromises.push(Promise.all(secMethodAndPromises) - .then(users => { return users[0]; })); + .then(users => { return users[0]; })); } else { for (const name in secMethod) { secMethodOrPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) + expressAuthenticationRecasted(request, name, secMethod[name], response) + .catch(pushAndRethrow) ); } } From 85fad178cabbffe6486566351ff9c726fd81c370 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 17 Aug 2024 11:14:46 +1200 Subject: [PATCH 11/18] codegen --- server/src/middleware/__generated__/routes.ts | 107 ++++++++---------- .../src/middleware/__generated__/swagger.json | 32 +++--- 2 files changed, 66 insertions(+), 73 deletions(-) diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts index 8e3db924c..495734338 100644 --- a/server/src/middleware/__generated__/routes.ts +++ b/server/src/middleware/__generated__/routes.ts @@ -490,24 +490,17 @@ const templateService = new ExpressTemplateService(models, {"noImplicitAdditiona // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - - export function RegisterRoutes(app: Router) { - // ########################################################################################################### // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa // ########################################################################################################### - - - app.get('/users/self', authenticateMiddleware([{"jwt":[]}]), ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.getSelf)), - async function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { + function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -520,7 +513,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getSelf', controller, response, @@ -538,7 +531,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.editSelf)), - async function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { + function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, @@ -552,7 +545,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'editSelf', controller, response, @@ -570,7 +563,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.deleteUser)), - async function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { + function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, }; @@ -583,7 +576,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'deleteUser', controller, response, @@ -600,7 +593,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(StripeWebhook)), ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - async function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { + function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -613,7 +606,7 @@ export function RegisterRoutes(app: Router) { const controller = new StripeWebhook(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'receiveWebhook', controller, response, @@ -630,7 +623,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UserSignup)), ...(fetchMiddlewares(UserSignup.prototype.signup)), - async function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { + function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, }; @@ -643,7 +636,7 @@ export function RegisterRoutes(app: Router) { const controller = new UserSignup(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'signup', controller, response, @@ -660,7 +653,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), - async function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { const args: Record = { }; @@ -672,7 +665,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getMembershipPrices', controller, response, @@ -690,7 +683,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), - async function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { const args: Record = { sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, }; @@ -703,7 +696,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getCheckoutSessionDetails', controller, response, @@ -721,7 +714,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), - async function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, @@ -735,7 +728,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getMembershipPayment', controller, response, @@ -753,7 +746,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), - async function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, @@ -767,7 +760,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getBookingPayment', controller, response, @@ -785,7 +778,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), - async function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { + function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -798,7 +791,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getAllBookings', controller, response, @@ -816,7 +809,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), - async function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { + function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, }; @@ -829,7 +822,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getAvailableDates', controller, response, @@ -847,7 +840,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), - async function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { + function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, }; @@ -860,7 +853,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'fetchUsersByBookingDateRange', controller, response, @@ -878,7 +871,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), - async function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { + function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, }; @@ -891,7 +884,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'makeDateAvailable', controller, response, @@ -909,7 +902,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), - async function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { + function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, }; @@ -922,7 +915,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'makeDateUnavailable', controller, response, @@ -940,7 +933,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.createBookings)), - async function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { + function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, }; @@ -953,7 +946,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'createBookings', controller, response, @@ -971,7 +964,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.removeBooking)), - async function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { + function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, }; @@ -984,7 +977,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'removeBooking', controller, response, @@ -1002,7 +995,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), - async function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { + function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { cursor: {"in":"query","name":"cursor","dataType":"string"}, toFetch: {"in":"query","name":"toFetch","dataType":"double"}, @@ -1016,7 +1009,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getAllUsers', controller, response, @@ -1034,7 +1027,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getUser)), - async function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, }; @@ -1047,7 +1040,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getUser', controller, response, @@ -1065,7 +1058,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.createUser)), - async function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, }; @@ -1078,7 +1071,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'createUser', controller, response, @@ -1096,7 +1089,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.editUsers)), - async function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { + function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, }; @@ -1109,7 +1102,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'editUsers', controller, response, @@ -1127,7 +1120,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.promoteUser)), - async function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, }; @@ -1140,7 +1133,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'promoteUser', controller, response, @@ -1158,7 +1151,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.demoteUser)), - async function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, }; @@ -1171,7 +1164,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'demoteUser', controller, response, @@ -1189,7 +1182,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), - async function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { + function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { }; @@ -1201,7 +1194,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'demoteAllUsers', controller, response, @@ -1219,7 +1212,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.addCoupon)), - async function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { + function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, }; @@ -1232,7 +1225,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'addCoupon', controller, response, @@ -1250,7 +1243,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), - async function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { + function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { const args: Record = { limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, cursor: {"in":"query","name":"cursor","dataType":"string"}, @@ -1264,7 +1257,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getLatestHistory', controller, response, diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 2c3a4581b..61a737b8c 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\r\nRequires an admin JWT token.", + "description": "Get a user by their UID.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", "security": [ { "jwt": [ From 9ef75176e1bbfb44ac251f5fc037e218369248c3 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 17 Aug 2024 11:23:00 +1200 Subject: [PATCH 12/18] codegen --- server/src/middleware/__generated__/routes.ts | 1509 +++++++++-------- .../src/middleware/__generated__/swagger.json | 32 +- 2 files changed, 774 insertions(+), 767 deletions(-) diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts index 495734338..64a316d7a 100644 --- a/server/src/middleware/__generated__/routes.ts +++ b/server/src/middleware/__generated__/routes.ts @@ -490,786 +490,793 @@ const templateService = new ExpressTemplateService(models, {"noImplicitAdditiona // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + + export function RegisterRoutes(app: Router) { + // ########################################################################################################### // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa // ########################################################################################################### - app.get('/users/self', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.getSelf)), - - function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UsersController(); - - templateService.apiHandler({ - methodName: 'getSelf', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/users/edit-self', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.editSelf)), - - function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UsersController(); - - templateService.apiHandler({ - methodName: 'editSelf', - controller, - response, - next, - validatedArgs, - successStatus: 200, + + + + app.get('/users/self', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.getSelf)), + + async function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UsersController(); + + await templateService.apiHandler({ + methodName: 'getSelf', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/users/delete-user', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.deleteUser)), - - function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UsersController(); - - templateService.apiHandler({ - methodName: 'deleteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/users/edit-self', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.editSelf)), + + async function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UsersController(); + + await templateService.apiHandler({ + methodName: 'editSelf', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/webhook', - ...(fetchMiddlewares(StripeWebhook)), - ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - - function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new StripeWebhook(); - - templateService.apiHandler({ - methodName: 'receiveWebhook', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.delete('/users/delete-user', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.deleteUser)), + + async function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UsersController(); + + await templateService.apiHandler({ + methodName: 'deleteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/signup', - ...(fetchMiddlewares(UserSignup)), - ...(fetchMiddlewares(UserSignup.prototype.signup)), - - function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UserSignup(); - - templateService.apiHandler({ - methodName: 'signup', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/webhook', + ...(fetchMiddlewares(StripeWebhook)), + ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), + + async function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new StripeWebhook(); + + await templateService.apiHandler({ + methodName: 'receiveWebhook', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/payment/membership_prices', - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/signup', + ...(fetchMiddlewares(UserSignup)), + ...(fetchMiddlewares(UserSignup.prototype.signup)), + + async function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UserSignup(); - function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - }; + await templateService.apiHandler({ + methodName: 'signup', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/payment/membership_prices', + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), + + async function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + }; - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); - const controller = new PaymentController(); + const controller = new PaymentController(); - templateService.apiHandler({ - methodName: 'getMembershipPrices', - controller, - response, - next, - validatedArgs, - successStatus: undefined, + await templateService.apiHandler({ + methodName: 'getMembershipPrices', + controller, + response, + next, + validatedArgs, + successStatus: undefined, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/payment/checkout_status', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), - - function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getCheckoutSessionDetails', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/payment/checkout_status', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), + + async function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + await templateService.apiHandler({ + methodName: 'getCheckoutSessionDetails', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/payment/membership', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), - - function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getMembershipPayment', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/payment/membership', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), + + async function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + await templateService.apiHandler({ + methodName: 'getMembershipPayment', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/payment/booking', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), - - function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getBookingPayment', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/payment/booking', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), + + async function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + await templateService.apiHandler({ + methodName: 'getBookingPayment', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/bookings', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), - - function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new BookingController(); - - templateService.apiHandler({ - methodName: 'getAllBookings', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/bookings', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), + + async function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new BookingController(); + + await templateService.apiHandler({ + methodName: 'getAllBookings', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/bookings/available-dates', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), - - function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new BookingController(); - - templateService.apiHandler({ - methodName: 'getAvailableDates', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/bookings/available-dates', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), + + async function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new BookingController(); + + await templateService.apiHandler({ + methodName: 'getAvailableDates', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/bookings/fetch-users', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), - - function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new BookingController(); - - templateService.apiHandler({ - methodName: 'fetchUsersByBookingDateRange', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/bookings/fetch-users', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), + + async function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new BookingController(); + + await templateService.apiHandler({ + methodName: 'fetchUsersByBookingDateRange', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/make-dates-available', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), - - function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'makeDateAvailable', - controller, - response, - next, - validatedArgs, - successStatus: 201, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/make-dates-available', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), + + async function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'makeDateAvailable', + controller, + response, + next, + validatedArgs, + successStatus: 201, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/make-dates-unavailable', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), - - function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'makeDateUnavailable', - controller, - response, - next, - validatedArgs, - successStatus: 201, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/make-dates-unavailable', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), + + async function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'makeDateUnavailable', + controller, + response, + next, + validatedArgs, + successStatus: 201, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/create', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.createBookings)), - - function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'createBookings', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/create', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.createBookings)), + + async function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'createBookings', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/delete', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.removeBooking)), - - function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'removeBooking', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/delete', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.removeBooking)), + + async function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'removeBooking', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/users', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), - - function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - cursor: {"in":"query","name":"cursor","dataType":"string"}, - toFetch: {"in":"query","name":"toFetch","dataType":"double"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'getAllUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/users', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), + + async function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + cursor: {"in":"query","name":"cursor","dataType":"string"}, + toFetch: {"in":"query","name":"toFetch","dataType":"double"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'getAllUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/users/:uid', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getUser)), - - function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'getUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/users/:uid', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getUser)), + + async function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'getUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/create', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.createUser)), - - function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'createUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/create', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.createUser)), + + async function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'createUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/admin/users/bulk-edit', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.editUsers)), - - function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'editUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/admin/users/bulk-edit', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.editUsers)), + + async function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'editUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/promote', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.promoteUser)), - - function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'promoteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/promote', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.promoteUser)), + + async function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'promoteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/demote', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.demoteUser)), - - function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'demoteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/demote', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.demoteUser)), + + async function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'demoteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/admin/users/demote-all', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), - - function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'demoteAllUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/admin/users/demote-all', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), + + async function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'demoteAllUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/users/add-coupon', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.addCoupon)), - - function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'addCoupon', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/users/add-coupon', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.addCoupon)), + + async function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'addCoupon', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/bookings/history', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), - - function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, - cursor: {"in":"query","name":"cursor","dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'getLatestHistory', - controller, - response, - next, - validatedArgs, - successStatus: 200, + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/bookings/history', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), + + async function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, + cursor: {"in":"query","name":"cursor","dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + await templateService.apiHandler({ + methodName: 'getLatestHistory', + controller, + response, + next, + validatedArgs, + successStatus: 200, }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1297,20 +1304,20 @@ export function RegisterRoutes(app: Router) { for (const name in secMethod) { secMethodAndPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) + expressAuthenticationRecasted(request, name, secMethod[name], response) + .catch(pushAndRethrow) ); } // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa secMethodOrPromises.push(Promise.all(secMethodAndPromises) - .then(users => { return users[0]; })); + .then(users => { return users[0]; })); } else { for (const name in secMethod) { secMethodOrPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) + expressAuthenticationRecasted(request, name, secMethod[name], response) + .catch(pushAndRethrow) ); } } diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 61a737b8c..2c3a4581b 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -817,7 +817,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1072,7 +1072,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1110,7 +1110,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1148,12 +1148,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1184,7 +1184,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1383,7 +1383,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1546,7 +1546,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1648,7 +1648,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -1884,7 +1884,7 @@ } } }, - "description": "Get a user by their UID.\nRequires an admin JWT token.", + "description": "Get a user by their UID.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1913,7 +1913,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1944,7 +1944,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -1975,7 +1975,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2006,7 +2006,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2037,7 +2037,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2056,7 +2056,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ From cecda8e3e2d8b6edff2d9d0ee9f7b8985da43cb7 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 5 Oct 2024 07:39:59 +1300 Subject: [PATCH 13/18] codegen --- server/src/middleware/__generated__/routes.ts | 107 ++++++++---------- .../src/middleware/__generated__/swagger.json | 26 ++--- 2 files changed, 63 insertions(+), 70 deletions(-) diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts index e9fd97f82..ec44ff08e 100644 --- a/server/src/middleware/__generated__/routes.ts +++ b/server/src/middleware/__generated__/routes.ts @@ -576,24 +576,17 @@ const templateService = new ExpressTemplateService(models, {"noImplicitAdditiona // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - - export function RegisterRoutes(app: Router) { - // ########################################################################################################### // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa // ########################################################################################################### - - - app.get('/users/self', authenticateMiddleware([{"jwt":[]}]), ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.getSelf)), - async function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { + function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -606,7 +599,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getSelf', controller, response, @@ -624,7 +617,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.editSelf)), - async function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { + function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, @@ -638,7 +631,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'editSelf', controller, response, @@ -656,7 +649,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UsersController)), ...(fetchMiddlewares(UsersController.prototype.deleteUser)), - async function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { + function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, }; @@ -669,7 +662,7 @@ export function RegisterRoutes(app: Router) { const controller = new UsersController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'deleteUser', controller, response, @@ -686,7 +679,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(StripeWebhook)), ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - async function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { + function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -699,7 +692,7 @@ export function RegisterRoutes(app: Router) { const controller = new StripeWebhook(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'receiveWebhook', controller, response, @@ -716,7 +709,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(UserSignup)), ...(fetchMiddlewares(UserSignup.prototype.signup)), - async function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { + function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, }; @@ -729,7 +722,7 @@ export function RegisterRoutes(app: Router) { const controller = new UserSignup(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'signup', controller, response, @@ -746,7 +739,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), - async function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { const args: Record = { }; @@ -758,7 +751,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getMembershipPrices', controller, response, @@ -805,7 +798,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), - async function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { const args: Record = { sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, }; @@ -818,7 +811,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getCheckoutSessionDetails', controller, response, @@ -836,7 +829,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), - async function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, @@ -850,7 +843,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getMembershipPayment', controller, response, @@ -868,7 +861,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(PaymentController)), ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), - async function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { + function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, @@ -882,7 +875,7 @@ export function RegisterRoutes(app: Router) { const controller = new PaymentController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getBookingPayment', controller, response, @@ -991,7 +984,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), - async function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { + function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { const args: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -1004,7 +997,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getAllBookings', controller, response, @@ -1022,7 +1015,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), - async function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { + function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, }; @@ -1035,7 +1028,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getAvailableDates', controller, response, @@ -1053,7 +1046,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(BookingController)), ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), - async function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { + function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, }; @@ -1066,7 +1059,7 @@ export function RegisterRoutes(app: Router) { const controller = new BookingController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'fetchUsersByBookingDateRange', controller, response, @@ -1084,7 +1077,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), - async function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { + function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, }; @@ -1097,7 +1090,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'makeDateAvailable', controller, response, @@ -1115,7 +1108,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), - async function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { + function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, }; @@ -1128,7 +1121,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'makeDateUnavailable', controller, response, @@ -1146,7 +1139,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.createBookings)), - async function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { + function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, }; @@ -1159,7 +1152,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'createBookings', controller, response, @@ -1177,7 +1170,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.removeBooking)), - async function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { + function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, }; @@ -1190,7 +1183,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'removeBooking', controller, response, @@ -1208,7 +1201,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), - async function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { + function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { cursor: {"in":"query","name":"cursor","dataType":"string"}, toFetch: {"in":"query","name":"toFetch","dataType":"double"}, @@ -1222,7 +1215,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getAllUsers', controller, response, @@ -1240,7 +1233,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getUser)), - async function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, }; @@ -1253,7 +1246,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getUser', controller, response, @@ -1271,7 +1264,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.createUser)), - async function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, }; @@ -1284,7 +1277,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'createUser', controller, response, @@ -1302,7 +1295,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.editUsers)), - async function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { + function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, }; @@ -1315,7 +1308,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'editUsers', controller, response, @@ -1333,7 +1326,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.promoteUser)), - async function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, }; @@ -1346,7 +1339,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'promoteUser', controller, response, @@ -1364,7 +1357,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.demoteUser)), - async function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { + function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, }; @@ -1377,7 +1370,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'demoteUser', controller, response, @@ -1395,7 +1388,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), - async function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { + function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { const args: Record = { }; @@ -1407,7 +1400,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'demoteAllUsers', controller, response, @@ -1425,7 +1418,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.addCoupon)), - async function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { + function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, }; @@ -1438,7 +1431,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'addCoupon', controller, response, @@ -1456,7 +1449,7 @@ export function RegisterRoutes(app: Router) { ...(fetchMiddlewares(AdminController)), ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), - async function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { + function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { const args: Record = { limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, cursor: {"in":"query","name":"cursor","dataType":"string"}, @@ -1470,7 +1463,7 @@ export function RegisterRoutes(app: Router) { const controller = new AdminController(); - await templateService.apiHandler({ + templateService.apiHandler({ methodName: 'getLatestHistory', controller, response, diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index 8908ff209..c42d6a503 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -483,7 +483,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\nThis should be in markdown" + "description": "An optional description for this event\r\nThis should be in markdown" }, "image_url": { "type": "string", @@ -495,19 +495,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\nNote that this date is in UTC time." + "description": "The signup period end date.\r\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -536,7 +536,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1426,7 +1426,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\nThis should be in markdown" + "description": "An optional description for this event\r\nThis should be in markdown" }, "image_url": { "type": "string", @@ -1438,19 +1438,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\nNote that this date is in UTC time." + "description": "The signup period end date.\r\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -1894,7 +1894,7 @@ } } }, - "description": "Fetches latest events starting from the event with the latest starting date\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", + "description": "Fetches latest events starting from the event with the latest starting date\r\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", "security": [], "parameters": [ { @@ -1926,7 +1926,7 @@ "description": "No content" } }, - "description": "Streams the signup count for active events signups.\nNote that when testing this on swagger, the connection will remain open.", + "description": "Streams the signup count for active events signups.\r\nNote that when testing this on swagger, the connection will remain open.", "security": [], "parameters": [] } From f1a2519d78af282129a4601ce759075c057a9968 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 5 Oct 2024 07:47:05 +1300 Subject: [PATCH 14/18] codegen --- .../src/middleware/__generated__/swagger.json | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index c42d6a503..cf914607b 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -483,7 +483,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\r\nThis should be in markdown" + "description": "An optional description for this event\nThis should be in markdown" }, "image_url": { "type": "string", @@ -495,19 +495,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\r\nNote that this date is in UTC time." + "description": "The signup period end date.\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -536,7 +536,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1021,7 +1021,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1276,7 +1276,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1314,7 +1314,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1352,12 +1352,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1388,7 +1388,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1426,7 +1426,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\r\nThis should be in markdown" + "description": "An optional description for this event\nThis should be in markdown" }, "image_url": { "type": "string", @@ -1438,19 +1438,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\r\nNote that this date is in UTC time." + "description": "The signup period end date.\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -1643,7 +1643,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1826,7 +1826,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1894,7 +1894,7 @@ } } }, - "description": "Fetches latest events starting from the event with the latest starting date\r\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", + "description": "Fetches latest events starting from the event with the latest starting date\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", "security": [], "parameters": [ { @@ -1926,7 +1926,7 @@ "description": "No content" } }, - "description": "Streams the signup count for active events signups.\r\nNote that when testing this on swagger, the connection will remain open.", + "description": "Streams the signup count for active events signups.\nNote that when testing this on swagger, the connection will remain open.", "security": [], "parameters": [] } @@ -2010,7 +2010,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -2246,7 +2246,7 @@ } } }, - "description": "Get a user by their UID.\r\nRequires an admin JWT token.", + "description": "Get a user by their UID.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2275,7 +2275,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2306,7 +2306,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2337,7 +2337,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2368,7 +2368,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2399,7 +2399,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2418,7 +2418,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", "security": [ { "jwt": [ From c8ad0b151aeb902ba5c65b8021cedf880bd0f722 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 5 Oct 2024 07:48:54 +1300 Subject: [PATCH 15/18] codegen --- .../src/middleware/__generated__/swagger.json | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index cf914607b..c42d6a503 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -483,7 +483,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\nThis should be in markdown" + "description": "An optional description for this event\r\nThis should be in markdown" }, "image_url": { "type": "string", @@ -495,19 +495,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\nNote that this date is in UTC time." + "description": "The signup period end date.\r\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -536,7 +536,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1021,7 +1021,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1276,7 +1276,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1314,7 +1314,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1352,12 +1352,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1388,7 +1388,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1426,7 +1426,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\nThis should be in markdown" + "description": "An optional description for this event\r\nThis should be in markdown" }, "image_url": { "type": "string", @@ -1438,19 +1438,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\nNote that this date is in UTC time." + "description": "The signup period end date.\r\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -1643,7 +1643,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1826,7 +1826,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1894,7 +1894,7 @@ } } }, - "description": "Fetches latest events starting from the event with the latest starting date\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", + "description": "Fetches latest events starting from the event with the latest starting date\r\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", "security": [], "parameters": [ { @@ -1926,7 +1926,7 @@ "description": "No content" } }, - "description": "Streams the signup count for active events signups.\nNote that when testing this on swagger, the connection will remain open.", + "description": "Streams the signup count for active events signups.\r\nNote that when testing this on swagger, the connection will remain open.", "security": [], "parameters": [] } @@ -2010,7 +2010,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -2246,7 +2246,7 @@ } } }, - "description": "Get a user by their UID.\nRequires an admin JWT token.", + "description": "Get a user by their UID.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2275,7 +2275,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2306,7 +2306,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2337,7 +2337,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2368,7 +2368,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2399,7 +2399,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2418,7 +2418,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", "security": [ { "jwt": [ From 9f38a322dfaa2bd08fdc3449ab68a2d89c95501f Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 5 Oct 2024 07:54:06 +1300 Subject: [PATCH 16/18] codegen --- server/src/middleware/__generated__/routes.ts | 1619 ----------- .../src/middleware/__generated__/swagger.json | 2561 ----------------- 2 files changed, 4180 deletions(-) delete mode 100644 server/src/middleware/__generated__/routes.ts delete mode 100644 server/src/middleware/__generated__/swagger.json diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts deleted file mode 100644 index ec44ff08e..000000000 --- a/server/src/middleware/__generated__/routes.ts +++ /dev/null @@ -1,1619 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { TsoaRoute, fetchMiddlewares, ExpressTemplateService } from '@tsoa/runtime'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { UsersController } from './../../service-layer/controllers/UserController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { StripeWebhook } from './../../service-layer/controllers/StripeWebhook'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { UserSignup } from './../../service-layer/controllers/SignupController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { PaymentController } from './../../service-layer/controllers/PaymentController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { EventController } from './../../service-layer/controllers/EventController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { BookingController } from './../../service-layer/controllers/BookingController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { AdminController } from './../../service-layer/controllers/AdminController'; -import { expressAuthentication } from './../../business-layer/security/Authentication'; -// @ts-ignore - no great way to install types from subpackage -import type { Request as ExRequest, Response as ExResponse, RequestHandler, Router } from 'express'; - -const expressAuthenticationRecasted = expressAuthentication as (req: ExRequest, securityName: string, scopes?: string[], res?: ExResponse) => Promise; - - -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - -const models: TsoaRoute.Models = { - "FirebaseFirestore.Timestamp": { - "dataType": "refObject", - "properties": { - "seconds": {"dataType":"double","required":true}, - "nanoseconds": {"dataType":"double","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"date_of_birth":{"ref":"FirebaseFirestore.Timestamp"},"does_snowboarding":{"dataType":"boolean"},"does_racing":{"dataType":"boolean"},"does_ski":{"dataType":"boolean"},"phone_number":{"dataType":"double"},"gender":{"dataType":"string"},"emergency_contact":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}},"first_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your First Name"}}},"last_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your Second Name"}}},"dietary_requirements":{"dataType":"string","validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}},"ethnicity":{"dataType":"string"},"faculty":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}},"university":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}},"student_id":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}},"university_year":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Omit_Partial_UserAdditionalInfo_.stripe_id_": { - "dataType": "refAlias", - "type": {"ref":"Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__","validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "EditSelfRequestBody": { - "dataType": "refObject", - "properties": { - "updatedInformation": {"ref":"Omit_Partial_UserAdditionalInfo_.stripe_id_","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CommonResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DeleteUserRequestBody": { - "dataType": "refObject", - "properties": { - "uid": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UserSignupResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "jwtToken": {"dataType":"string"}, - "uid": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"date_of_birth":{"ref":"FirebaseFirestore.Timestamp","required":true},"does_snowboarding":{"dataType":"boolean"},"does_racing":{"dataType":"boolean"},"does_ski":{"dataType":"boolean"},"phone_number":{"dataType":"double","required":true},"gender":{"dataType":"string"},"emergency_contact":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}},"first_name":{"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}},"last_name":{"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}},"dietary_requirements":{"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}},"ethnicity":{"dataType":"string"},"faculty":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}},"university":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}},"student_id":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}},"university_year":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Omit_UserAdditionalInfo.stripe_id_": { - "dataType": "refAlias", - "type": {"ref":"Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__","validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UserSignupBody": { - "dataType": "refObject", - "properties": { - "email": {"dataType":"string","required":true}, - "user": {"ref":"Omit_UserAdditionalInfo.stripe_id_","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "MembershipTypeValues": { - "dataType": "refEnum", - "enums": ["uoa_student","non_uoa_student","returning_member","new_non_student"], - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "MembershipStripeProductResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"originalPrice":{"dataType":"string"},"displayPrice":{"dataType":"string","required":true},"discount":{"dataType":"boolean","required":true},"description":{"dataType":"string"},"name":{"ref":"MembershipTypeValues","required":true},"productId":{"dataType":"string","required":true}}}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "LodgePricingTypeValues": { - "dataType": "refEnum", - "enums": ["single_friday_or_saturday","normal"], - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "LodgeStripeProductResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"originalPrice":{"dataType":"string"},"displayPrice":{"dataType":"string","required":true},"discount":{"dataType":"boolean","required":true},"description":{"dataType":"string"},"name":{"ref":"LodgePricingTypeValues","required":true},"productId":{"dataType":"string","required":true}}}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "stripe.Stripe.Checkout.Session.Status": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["complete"]},{"dataType":"enum","enums":["expired"]},{"dataType":"enum","enums":["open"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "stripe.Stripe.Metadata": { - "dataType": "refObject", - "properties": { - }, - "additionalProperties": {"dataType":"string"}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "MembershipPaymentResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "stripeClientSecret": {"dataType":"string"}, - "membershipType": {"ref":"MembershipTypeValues"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UserPaymentRequestModel": { - "dataType": "refObject", - "properties": { - "membershipType": {"ref":"MembershipTypeValues"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingPaymentResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "stripeClientSecret": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UserBookingRequestingModel": { - "dataType": "refObject", - "properties": { - "startDate": {"ref":"FirebaseFirestore.Timestamp"}, - "endDate": {"ref":"FirebaseFirestore.Timestamp"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "EventSignupResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"email":{"dataType":"string","required":true},"last_name":{"dataType":"string","required":true},"first_name":{"dataType":"string","required":true}}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Pick_EventReservation.Exclude_keyofEventReservation.timestamp__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"first_name":{"dataType":"string","required":true},"last_name":{"dataType":"string","required":true},"email":{"dataType":"string","required":true},"is_member":{"dataType":"boolean","required":true}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Omit_EventReservation.timestamp_": { - "dataType": "refAlias", - "type": {"ref":"Pick_EventReservation.Exclude_keyofEventReservation.timestamp__","validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "EventSignupBody": { - "dataType": "refObject", - "properties": { - "event_id": {"dataType":"string","required":true}, - "reservation": {"ref":"Omit_EventReservation.timestamp_","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Event": { - "dataType": "refObject", - "properties": { - "title": {"dataType":"string","required":true}, - "description": {"dataType":"string"}, - "image_url": {"dataType":"string"}, - "location": {"dataType":"string","required":true}, - "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "physical_start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "physical_end_date": {"ref":"FirebaseFirestore.Timestamp"}, - "max_occupancy": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "GetAllEventsResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "nextCursor": {"dataType":"string"}, - "data": {"dataType":"array","array":{"dataType":"refObject","ref":"Event"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AllUserBookingSlotsResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "dates": {"dataType":"array","array":{"dataType":"string"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AvailableDates": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"availableSpaces":{"dataType":"double","required":true},"maxBookings":{"dataType":"double","required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true},"description":{"dataType":"string"},"id":{"dataType":"string","required":true}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AvailableDatesResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "data": {"dataType":"array","array":{"dataType":"refAlias","ref":"AvailableDates"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AvailableDatesRequestModel": { - "dataType": "refObject", - "properties": { - "startDate": {"ref":"FirebaseFirestore.Timestamp"}, - "endDate": {"ref":"FirebaseFirestore.Timestamp"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UserAccountTypes": { - "dataType": "refEnum", - "enums": ["admin","member","guest"], - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingIdandUserData": { - "dataType": "refObject", - "properties": { - "date_of_birth": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "does_snowboarding": {"dataType":"boolean"}, - "does_racing": {"dataType":"boolean"}, - "does_ski": {"dataType":"boolean"}, - "phone_number": {"dataType":"double","required":true}, - "gender": {"dataType":"string"}, - "emergency_contact": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}}, - "first_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}}, - "last_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}}, - "dietary_requirements": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}}, - "ethnicity": {"dataType":"string"}, - "faculty": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}}, - "university": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}}, - "student_id": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}}, - "university_year": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}, - "stripe_id": {"dataType":"string"}, - "uid": {"dataType":"string","required":true}, - "dateJoined": {"dataType":"string"}, - "email": {"dataType":"string","required":true}, - "membership": {"ref":"UserAccountTypes","required":true}, - "bookingId": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UsersByDateRangeResponse": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"users":{"dataType":"array","array":{"dataType":"refObject","ref":"BookingIdandUserData"},"required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true}}}}, - "error": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingsByDateRangeRequestModel": { - "dataType": "refObject", - "properties": { - "startDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "endDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingSlotUpdateResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "updatedBookingSlots": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"bookingSlotId":{"dataType":"string","required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true}}}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "MakeDatesAvailableRequestBody": { - "dataType": "refObject", - "properties": { - "startDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "endDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "slots": {"dataType":"double","validators":{"maximum":{"errorMsg":"You have exceeded the maximum slots for bookings","value":32},"minimum":{"errorMsg":"must be positive","value":0}}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"startDate":{"ref":"FirebaseFirestore.Timestamp","required":true},"endDate":{"ref":"FirebaseFirestore.Timestamp","required":true}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Omit_MakeDatesAvailableRequestBody.slots_": { - "dataType": "refAlias", - "type": {"ref":"Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__","validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UIdssByDateRangeResponse": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"users":{"dataType":"array","array":{"dataType":"string"},"required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true}}}}, - "error": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CreateBookingsRequestModel": { - "dataType": "refObject", - "properties": { - "startDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "endDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "userId": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingDeleteResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "user_id": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DeleteBookingRequest": { - "dataType": "refObject", - "properties": { - "bookingID": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CombinedUserData": { - "dataType": "refObject", - "properties": { - "date_of_birth": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "does_snowboarding": {"dataType":"boolean"}, - "does_racing": {"dataType":"boolean"}, - "does_ski": {"dataType":"boolean"}, - "phone_number": {"dataType":"double","required":true}, - "gender": {"dataType":"string"}, - "emergency_contact": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}}, - "first_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}}, - "last_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}}, - "dietary_requirements": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}}, - "ethnicity": {"dataType":"string"}, - "faculty": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}}, - "university": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}}, - "student_id": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}}, - "university_year": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}, - "stripe_id": {"dataType":"string"}, - "uid": {"dataType":"string","required":true}, - "dateJoined": {"dataType":"string"}, - "email": {"dataType":"string","required":true}, - "membership": {"ref":"UserAccountTypes","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AllUsersResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "nextCursor": {"dataType":"string"}, - "data": {"dataType":"array","array":{"dataType":"refObject","ref":"CombinedUserData"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "GetUserResponse": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "data": {"ref":"CombinedUserData"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UserAdditionalInfo": { - "dataType": "refObject", - "properties": { - "date_of_birth": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "does_snowboarding": {"dataType":"boolean"}, - "does_racing": {"dataType":"boolean"}, - "does_ski": {"dataType":"boolean"}, - "phone_number": {"dataType":"double","required":true}, - "gender": {"dataType":"string"}, - "emergency_contact": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}}, - "first_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}}, - "last_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}}, - "dietary_requirements": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}}, - "ethnicity": {"dataType":"string"}, - "faculty": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}}, - "university": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}}, - "student_id": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}}, - "university_year": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}, - "stripe_id": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CreateUserRequestBody": { - "dataType": "refObject", - "properties": { - "uid": {"dataType":"string","required":true}, - "user": {"ref":"UserAdditionalInfo","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Partial_UserAdditionalInfo_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"date_of_birth":{"ref":"FirebaseFirestore.Timestamp"},"does_snowboarding":{"dataType":"boolean"},"does_racing":{"dataType":"boolean"},"does_ski":{"dataType":"boolean"},"phone_number":{"dataType":"double"},"gender":{"dataType":"string"},"emergency_contact":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}},"first_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your First Name"}}},"last_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your Second Name"}}},"dietary_requirements":{"dataType":"string","validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}},"ethnicity":{"dataType":"string"},"faculty":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}},"university":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}},"student_id":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}},"university_year":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}},"stripe_id":{"dataType":"string"}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "EditUsersRequestBody": { - "dataType": "refObject", - "properties": { - "users": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"updatedInformation":{"ref":"Partial_UserAdditionalInfo_","required":true},"uid":{"dataType":"string","required":true}}},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "PromoteUserRequestBody": { - "dataType": "refObject", - "properties": { - "uid": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "DemoteUserRequestBody": { - "dataType": "refObject", - "properties": { - "uid": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AddCouponRequestBody": { - "dataType": "refObject", - "properties": { - "uid": {"dataType":"string","required":true}, - "quantity": {"dataType":"double","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingAddedEvent": { - "dataType": "refObject", - "properties": { - "timestamp": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "event_type": {"dataType":"enum","enums":["added_user_to_booking"],"required":true}, - "uid": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingDeletedEvent": { - "dataType": "refObject", - "properties": { - "timestamp": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "event_type": {"dataType":"enum","enums":["removed_user_from_booking"],"required":true}, - "uid": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingAvailabilityChangeEvent": { - "dataType": "refObject", - "properties": { - "timestamp": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, - "event_type": {"dataType":"enum","enums":["changed_date_availability"],"required":true}, - "change": {"dataType":"double","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BookingHistoryEvent": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"BookingAddedEvent"},{"ref":"BookingDeletedEvent"},{"ref":"BookingAvailabilityChangeEvent"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "FetchLatestBookingHistoryEventResponse": { - "dataType": "refObject", - "properties": { - "nextCursor": {"dataType":"string"}, - "error": {"dataType":"string"}, - "message": {"dataType":"string"}, - "historyEvents": {"dataType":"array","array":{"dataType":"refAlias","ref":"BookingHistoryEvent"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CreateEventBody": { - "dataType": "refObject", - "properties": { - "data": {"ref":"Event","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Partial_Event_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"title":{"dataType":"string"},"description":{"dataType":"string"},"image_url":{"dataType":"string"},"location":{"dataType":"string"},"start_date":{"ref":"FirebaseFirestore.Timestamp"},"end_date":{"ref":"FirebaseFirestore.Timestamp"},"physical_start_date":{"ref":"FirebaseFirestore.Timestamp"},"physical_end_date":{"ref":"FirebaseFirestore.Timestamp"},"max_occupancy":{"dataType":"double"}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -}; -const templateService = new ExpressTemplateService(models, {"noImplicitAdditionalProperties":"throw-on-extras","bodyCoercion":true}); - -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - -export function RegisterRoutes(app: Router) { - // ########################################################################################################### - // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look - // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa - // ########################################################################################################### - app.get('/users/self', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.getSelf)), - - function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UsersController(); - - templateService.apiHandler({ - methodName: 'getSelf', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/users/edit-self', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.editSelf)), - - function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UsersController(); - - templateService.apiHandler({ - methodName: 'editSelf', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/users/delete-user', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(UsersController)), - ...(fetchMiddlewares(UsersController.prototype.deleteUser)), - - function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UsersController(); - - templateService.apiHandler({ - methodName: 'deleteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/webhook', - ...(fetchMiddlewares(StripeWebhook)), - ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), - - function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new StripeWebhook(); - - templateService.apiHandler({ - methodName: 'receiveWebhook', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/signup', - ...(fetchMiddlewares(UserSignup)), - ...(fetchMiddlewares(UserSignup.prototype.signup)), - - function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new UserSignup(); - - templateService.apiHandler({ - methodName: 'signup', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/payment/membership_prices', - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), - - function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getMembershipPrices', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/payment/lodge_prices', - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getLodgePrices)), - - function PaymentController_getLodgePrices(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getLodgePrices', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/payment/checkout_status', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), - - function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getCheckoutSessionDetails', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/payment/membership', - authenticateMiddleware([{"jwt":[]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), - - function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getMembershipPayment', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/payment/booking', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(PaymentController)), - ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), - - function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new PaymentController(); - - templateService.apiHandler({ - methodName: 'getBookingPayment', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/events/signup', - ...(fetchMiddlewares(EventController)), - ...(fetchMiddlewares(EventController.prototype.eventSignup)), - - function EventController_eventSignup(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EventSignupBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new EventController(); - - templateService.apiHandler({ - methodName: 'eventSignup', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/events', - ...(fetchMiddlewares(EventController)), - ...(fetchMiddlewares(EventController.prototype.getAllEvents)), - - function EventController_getAllEvents(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - limit: {"default":20,"in":"query","name":"limit","dataType":"double"}, - cursor: {"in":"query","name":"cursor","dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new EventController(); - - templateService.apiHandler({ - methodName: 'getAllEvents', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/events/reservations/stream', - ...(fetchMiddlewares(EventController)), - ...(fetchMiddlewares(EventController.prototype.streamSignupCounts)), - - function EventController_streamSignupCounts(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - req: {"in":"request","name":"req","required":true,"dataType":"object"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new EventController(); - - templateService.apiHandler({ - methodName: 'streamSignupCounts', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/bookings', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), - - function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new BookingController(); - - templateService.apiHandler({ - methodName: 'getAllBookings', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/bookings/available-dates', - authenticateMiddleware([{"jwt":["member"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), - - function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new BookingController(); - - templateService.apiHandler({ - methodName: 'getAvailableDates', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/bookings/fetch-users', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(BookingController)), - ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), - - function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new BookingController(); - - templateService.apiHandler({ - methodName: 'fetchUsersByBookingDateRange', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/make-dates-available', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), - - function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'makeDateAvailable', - controller, - response, - next, - validatedArgs, - successStatus: 201, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/make-dates-unavailable', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), - - function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'makeDateUnavailable', - controller, - response, - next, - validatedArgs, - successStatus: 201, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/create', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.createBookings)), - - function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'createBookings', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/bookings/delete', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.removeBooking)), - - function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'removeBooking', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/users', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), - - function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - cursor: {"in":"query","name":"cursor","dataType":"string"}, - toFetch: {"in":"query","name":"toFetch","dataType":"double"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'getAllUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/users/:uid', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getUser)), - - function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'getUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/create', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.createUser)), - - function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'createUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/admin/users/bulk-edit', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.editUsers)), - - function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'editUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/promote', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.promoteUser)), - - function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'promoteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.put('/admin/users/demote', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.demoteUser)), - - function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'demoteUser', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/admin/users/demote-all', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), - - function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'demoteAllUsers', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/users/add-coupon', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.addCoupon)), - - function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'addCoupon', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/admin/bookings/history', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), - - function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, - cursor: {"in":"query","name":"cursor","dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'getLatestHistory', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/admin/events', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.createNewEvent)), - - function AdminController_createNewEvent(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - body: {"in":"body","name":"body","required":true,"ref":"CreateEventBody"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'createNewEvent', - controller, - response, - next, - validatedArgs, - successStatus: 201, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.patch('/admin/events/:id', - authenticateMiddleware([{"jwt":["admin"]}]), - ...(fetchMiddlewares(AdminController)), - ...(fetchMiddlewares(AdminController.prototype.editEvent)), - - function AdminController_editEvent(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - id: {"in":"path","name":"id","required":true,"dataType":"string"}, - requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Partial_Event_"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const controller = new AdminController(); - - templateService.apiHandler({ - methodName: 'editEvent', - controller, - response, - next, - validatedArgs, - successStatus: 200, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - function authenticateMiddleware(security: TsoaRoute.Security[] = []) { - return async function runAuthenticationMiddleware(request: any, response: any, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - // keep track of failed auth attempts so we can hand back the most - // recent one. This behavior was previously existing so preserving it - // here - const failedAttempts: any[] = []; - const pushAndRethrow = (error: any) => { - failedAttempts.push(error); - throw error; - }; - - const secMethodOrPromises: Promise[] = []; - for (const secMethod of security) { - if (Object.keys(secMethod).length > 1) { - const secMethodAndPromises: Promise[] = []; - - for (const name in secMethod) { - secMethodAndPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) - ); - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - secMethodOrPromises.push(Promise.all(secMethodAndPromises) - .then(users => { return users[0]; })); - } else { - for (const name in secMethod) { - secMethodOrPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) - ); - } - } - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - try { - request['user'] = await Promise.any(secMethodOrPromises); - - // Response was sent in middleware, abort - if (response.writableEnded) { - return; - } - - next(); - } - catch(err) { - // Show most recent error as response - const error = failedAttempts.pop(); - error.status = error.status || 401; - - // Response was sent in middleware, abort - if (response.writableEnded) { - return; - } - next(error); - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - } - } - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -} - -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json deleted file mode 100644 index c42d6a503..000000000 --- a/server/src/middleware/__generated__/swagger.json +++ /dev/null @@ -1,2561 +0,0 @@ -{ - "openapi": "3.0.0", - "components": { - "examples": {}, - "headers": {}, - "parameters": {}, - "requestBodies": {}, - "responses": {}, - "schemas": { - "FirebaseFirestore.Timestamp": { - "description": "A Timestamp represents a point in time independent of any time zone or\ncalendar, represented as seconds and fractions of seconds at nanosecond\nresolution in UTC Epoch time. It is encoded using the Proleptic Gregorian\nCalendar which extends the Gregorian calendar backwards to year one. It is\nencoded assuming all minutes are 60 seconds long, i.e. leap seconds are\n\"smeared\" so that no leap second table is needed for interpretation. Range\nis from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.", - "properties": { - "seconds": { - "type": "number", - "format": "double", - "description": "The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z." - }, - "nanoseconds": { - "type": "number", - "format": "double", - "description": "The non-negative fractions of a second at nanosecond resolution." - } - }, - "required": [ - "seconds", - "nanoseconds" - ], - "type": "object", - "additionalProperties": false - }, - "Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__": { - "properties": { - "date_of_birth": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "does_snowboarding": { - "type": "boolean" - }, - "does_racing": { - "type": "boolean" - }, - "does_ski": { - "type": "boolean" - }, - "phone_number": { - "type": "number", - "format": "double" - }, - "gender": { - "type": "string" - }, - "emergency_contact": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "dietary_requirements": { - "type": "string" - }, - "ethnicity": { - "type": "string", - "description": "**OPTIONAL** field that the user should have the choice to provide" - }, - "faculty": { - "type": "string" - }, - "university": { - "type": "string" - }, - "student_id": { - "type": "string" - }, - "university_year": { - "type": "string" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_Partial_UserAdditionalInfo_.stripe_id_": { - "$ref": "#/components/schemas/Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "EditSelfRequestBody": { - "properties": { - "updatedInformation": { - "$ref": "#/components/schemas/Omit_Partial_UserAdditionalInfo_.stripe_id_" - } - }, - "required": [ - "updatedInformation" - ], - "type": "object", - "additionalProperties": false - }, - "CommonResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "DeleteUserRequestBody": { - "properties": { - "uid": { - "type": "string" - } - }, - "required": [ - "uid" - ], - "type": "object", - "additionalProperties": false - }, - "UserSignupResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "jwtToken": { - "type": "string" - }, - "uid": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__": { - "properties": { - "date_of_birth": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "does_snowboarding": { - "type": "boolean" - }, - "does_racing": { - "type": "boolean" - }, - "does_ski": { - "type": "boolean" - }, - "phone_number": { - "type": "number", - "format": "double" - }, - "gender": { - "type": "string" - }, - "emergency_contact": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "dietary_requirements": { - "type": "string" - }, - "ethnicity": { - "type": "string", - "description": "**OPTIONAL** field that the user should have the choice to provide" - }, - "faculty": { - "type": "string" - }, - "university": { - "type": "string" - }, - "student_id": { - "type": "string" - }, - "university_year": { - "type": "string" - } - }, - "required": [ - "date_of_birth", - "phone_number", - "first_name", - "last_name", - "dietary_requirements" - ], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_UserAdditionalInfo.stripe_id_": { - "$ref": "#/components/schemas/Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "UserSignupBody": { - "properties": { - "email": { - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/Omit_UserAdditionalInfo.stripe_id_" - } - }, - "required": [ - "email", - "user" - ], - "type": "object", - "additionalProperties": false - }, - "MembershipTypeValues": { - "enum": [ - "uoa_student", - "non_uoa_student", - "returning_member", - "new_non_student" - ], - "type": "string" - }, - "MembershipStripeProductResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "data": { - "items": { - "properties": { - "originalPrice": { - "type": "string" - }, - "displayPrice": { - "type": "string" - }, - "discount": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/MembershipTypeValues" - }, - "productId": { - "type": "string" - } - }, - "required": [ - "displayPrice", - "discount", - "name", - "productId" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "LodgePricingTypeValues": { - "enum": [ - "single_friday_or_saturday", - "normal" - ], - "type": "string" - }, - "LodgeStripeProductResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "data": { - "items": { - "properties": { - "originalPrice": { - "type": "string" - }, - "displayPrice": { - "type": "string" - }, - "discount": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/LodgePricingTypeValues" - }, - "productId": { - "type": "string" - } - }, - "required": [ - "displayPrice", - "discount", - "name", - "productId" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "stripe.Stripe.Checkout.Session.Status": { - "type": "string", - "enum": [ - "complete", - "expired", - "open" - ] - }, - "stripe.Stripe.Metadata": { - "description": "Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", - "properties": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "MembershipPaymentResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "stripeClientSecret": { - "type": "string" - }, - "membershipType": { - "$ref": "#/components/schemas/MembershipTypeValues" - } - }, - "type": "object", - "additionalProperties": false - }, - "UserPaymentRequestModel": { - "properties": { - "membershipType": { - "$ref": "#/components/schemas/MembershipTypeValues" - } - }, - "type": "object", - "additionalProperties": false - }, - "BookingPaymentResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "stripeClientSecret": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "UserBookingRequestingModel": { - "properties": { - "startDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "endDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - } - }, - "type": "object", - "additionalProperties": false - }, - "EventSignupResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "data": { - "properties": { - "email": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "first_name": { - "type": "string" - } - }, - "required": [ - "email", - "last_name", - "first_name" - ], - "type": "object" - } - }, - "type": "object", - "additionalProperties": false - }, - "Pick_EventReservation.Exclude_keyofEventReservation.timestamp__": { - "properties": { - "first_name": { - "type": "string", - "description": "The first name of the user who made this event reservation" - }, - "last_name": { - "type": "string", - "description": "The last name of the user who made this event reservation" - }, - "email": { - "type": "string", - "description": "The email of the user who made this even reservation" - }, - "is_member": { - "type": "boolean", - "description": "Boolean to check if the user is a member", - "example": true - } - }, - "required": [ - "first_name", - "last_name", - "email", - "is_member" - ], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_EventReservation.timestamp_": { - "$ref": "#/components/schemas/Pick_EventReservation.Exclude_keyofEventReservation.timestamp__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "EventSignupBody": { - "properties": { - "event_id": { - "type": "string" - }, - "reservation": { - "$ref": "#/components/schemas/Omit_EventReservation.timestamp_" - } - }, - "required": [ - "event_id", - "reservation" - ], - "type": "object", - "additionalProperties": false - }, - "Event": { - "properties": { - "title": { - "type": "string", - "description": "The title of this event" - }, - "description": { - "type": "string", - "description": "An optional description for this event\r\nThis should be in markdown" - }, - "image_url": { - "type": "string", - "description": "The link for the image to display on the event page (essentially a thumbnail)" - }, - "location": { - "type": "string", - "description": "The location of this event" - }, - "start_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." - }, - "end_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\r\nNote that this date is in UTC time." - }, - "physical_start_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" - }, - "physical_end_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" - }, - "max_occupancy": { - "type": "number", - "format": "double", - "description": "Max number of attendees at this event, left as optional for uncapped", - "example": 30 - } - }, - "required": [ - "title", - "location", - "start_date", - "end_date", - "physical_start_date" - ], - "type": "object", - "additionalProperties": false - }, - "GetAllEventsResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "nextCursor": { - "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" - }, - "data": { - "items": { - "$ref": "#/components/schemas/Event" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "AllUserBookingSlotsResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "dates": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "AvailableDates": { - "properties": { - "availableSpaces": { - "type": "number", - "format": "double" - }, - "maxBookings": { - "type": "number", - "format": "double" - }, - "date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "description": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "availableSpaces", - "maxBookings", - "date", - "id" - ], - "type": "object" - }, - "AvailableDatesResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "data": { - "items": { - "$ref": "#/components/schemas/AvailableDates" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "AvailableDatesRequestModel": { - "properties": { - "startDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "endDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - } - }, - "type": "object", - "additionalProperties": false - }, - "UserAccountTypes": { - "enum": [ - "admin", - "member", - "guest" - ], - "type": "string" - }, - "BookingIdandUserData": { - "properties": { - "date_of_birth": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "does_snowboarding": { - "type": "boolean" - }, - "does_racing": { - "type": "boolean" - }, - "does_ski": { - "type": "boolean" - }, - "phone_number": { - "type": "number", - "format": "double" - }, - "gender": { - "type": "string" - }, - "emergency_contact": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "dietary_requirements": { - "type": "string" - }, - "ethnicity": { - "type": "string", - "description": "**OPTIONAL** field that the user should have the choice to provide" - }, - "faculty": { - "type": "string" - }, - "university": { - "type": "string" - }, - "student_id": { - "type": "string" - }, - "university_year": { - "type": "string" - }, - "stripe_id": { - "type": "string", - "description": "For identification DO NOT RETURN to users in exposed endpoints" - }, - "uid": { - "type": "string", - "description": "Firebase identifier of the user *data* based on the firestore document" - }, - "dateJoined": { - "type": "string", - "description": "Formatted UTC date string of when the account was created" - }, - "email": { - "type": "string", - "description": "The email the user uses to log in" - }, - "membership": { - "$ref": "#/components/schemas/UserAccountTypes", - "description": "What type of account the user has" - }, - "bookingId": { - "type": "string" - } - }, - "required": [ - "date_of_birth", - "phone_number", - "first_name", - "last_name", - "dietary_requirements", - "uid", - "email", - "membership", - "bookingId" - ], - "type": "object", - "additionalProperties": false - }, - "UsersByDateRangeResponse": { - "description": "Represents the response structure for fetching users by date range.", - "properties": { - "data": { - "items": { - "properties": { - "users": { - "items": { - "$ref": "#/components/schemas/BookingIdandUserData" - }, - "type": "array" - }, - "date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - } - }, - "required": [ - "users", - "date" - ], - "type": "object" - }, - "type": "array" - }, - "error": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "BookingsByDateRangeRequestModel": { - "description": "Represents the structure of a request model for fetching bookings within a specific date range.", - "properties": { - "startDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "endDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - } - }, - "required": [ - "startDate", - "endDate" - ], - "type": "object", - "additionalProperties": false - }, - "BookingSlotUpdateResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "updatedBookingSlots": { - "items": { - "properties": { - "bookingSlotId": { - "type": "string" - }, - "date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - } - }, - "required": [ - "bookingSlotId", - "date" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "MakeDatesAvailableRequestBody": { - "properties": { - "startDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "endDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "slots": { - "type": "number", - "format": "double", - "maximum": 32, - "minimum": 0 - } - }, - "required": [ - "startDate", - "endDate" - ], - "type": "object", - "additionalProperties": false - }, - "Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__": { - "properties": { - "startDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "endDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - } - }, - "required": [ - "startDate", - "endDate" - ], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_MakeDatesAvailableRequestBody.slots_": { - "$ref": "#/components/schemas/Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "UIdssByDateRangeResponse": { - "description": "Represents the response structure for fetching user ids by date range.", - "properties": { - "data": { - "items": { - "properties": { - "users": { - "items": { - "type": "string" - }, - "type": "array" - }, - "date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - } - }, - "required": [ - "users", - "date" - ], - "type": "object" - }, - "type": "array" - }, - "error": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "CreateBookingsRequestModel": { - "properties": { - "startDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "endDate": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" - }, - "userId": { - "type": "string", - "description": "List of users to add to the bookings between date range" - } - }, - "required": [ - "startDate", - "endDate", - "userId" - ], - "type": "object", - "additionalProperties": false - }, - "BookingDeleteResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "user_id": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "DeleteBookingRequest": { - "properties": { - "bookingID": { - "type": "string" - } - }, - "required": [ - "bookingID" - ], - "type": "object", - "additionalProperties": false - }, - "CombinedUserData": { - "properties": { - "date_of_birth": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "does_snowboarding": { - "type": "boolean" - }, - "does_racing": { - "type": "boolean" - }, - "does_ski": { - "type": "boolean" - }, - "phone_number": { - "type": "number", - "format": "double" - }, - "gender": { - "type": "string" - }, - "emergency_contact": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "dietary_requirements": { - "type": "string" - }, - "ethnicity": { - "type": "string", - "description": "**OPTIONAL** field that the user should have the choice to provide" - }, - "faculty": { - "type": "string" - }, - "university": { - "type": "string" - }, - "student_id": { - "type": "string" - }, - "university_year": { - "type": "string" - }, - "stripe_id": { - "type": "string", - "description": "For identification DO NOT RETURN to users in exposed endpoints" - }, - "uid": { - "type": "string", - "description": "Firebase identifier of the user *data* based on the firestore document" - }, - "dateJoined": { - "type": "string", - "description": "Formatted UTC date string of when the account was created" - }, - "email": { - "type": "string", - "description": "The email the user uses to log in" - }, - "membership": { - "$ref": "#/components/schemas/UserAccountTypes", - "description": "What type of account the user has" - } - }, - "required": [ - "date_of_birth", - "phone_number", - "first_name", - "last_name", - "dietary_requirements", - "uid", - "email", - "membership" - ], - "type": "object", - "additionalProperties": false - }, - "AllUsersResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "nextCursor": { - "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" - }, - "data": { - "items": { - "$ref": "#/components/schemas/CombinedUserData" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "GetUserResponse": { - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "data": { - "$ref": "#/components/schemas/CombinedUserData" - } - }, - "type": "object", - "additionalProperties": false - }, - "UserAdditionalInfo": { - "properties": { - "date_of_birth": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "does_snowboarding": { - "type": "boolean" - }, - "does_racing": { - "type": "boolean" - }, - "does_ski": { - "type": "boolean" - }, - "phone_number": { - "type": "number", - "format": "double" - }, - "gender": { - "type": "string" - }, - "emergency_contact": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "dietary_requirements": { - "type": "string" - }, - "ethnicity": { - "type": "string", - "description": "**OPTIONAL** field that the user should have the choice to provide" - }, - "faculty": { - "type": "string" - }, - "university": { - "type": "string" - }, - "student_id": { - "type": "string" - }, - "university_year": { - "type": "string" - }, - "stripe_id": { - "type": "string", - "description": "For identification DO NOT RETURN to users in exposed endpoints" - } - }, - "required": [ - "date_of_birth", - "phone_number", - "first_name", - "last_name", - "dietary_requirements" - ], - "type": "object", - "additionalProperties": false - }, - "CreateUserRequestBody": { - "properties": { - "uid": { - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/UserAdditionalInfo" - } - }, - "required": [ - "uid", - "user" - ], - "type": "object", - "additionalProperties": false - }, - "Partial_UserAdditionalInfo_": { - "properties": { - "date_of_birth": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "does_snowboarding": { - "type": "boolean" - }, - "does_racing": { - "type": "boolean" - }, - "does_ski": { - "type": "boolean" - }, - "phone_number": { - "type": "number", - "format": "double" - }, - "gender": { - "type": "string" - }, - "emergency_contact": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "dietary_requirements": { - "type": "string" - }, - "ethnicity": { - "type": "string", - "description": "**OPTIONAL** field that the user should have the choice to provide" - }, - "faculty": { - "type": "string" - }, - "university": { - "type": "string" - }, - "student_id": { - "type": "string" - }, - "university_year": { - "type": "string" - }, - "stripe_id": { - "type": "string", - "description": "For identification DO NOT RETURN to users in exposed endpoints" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "EditUsersRequestBody": { - "properties": { - "users": { - "items": { - "properties": { - "updatedInformation": { - "$ref": "#/components/schemas/Partial_UserAdditionalInfo_" - }, - "uid": { - "type": "string" - } - }, - "required": [ - "updatedInformation", - "uid" - ], - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "users" - ], - "type": "object", - "additionalProperties": false - }, - "PromoteUserRequestBody": { - "properties": { - "uid": { - "type": "string" - } - }, - "required": [ - "uid" - ], - "type": "object", - "additionalProperties": false - }, - "DemoteUserRequestBody": { - "properties": { - "uid": { - "type": "string" - } - }, - "required": [ - "uid" - ], - "type": "object", - "additionalProperties": false - }, - "AddCouponRequestBody": { - "properties": { - "uid": { - "type": "string", - "description": "The UID of the user to whom the coupon will be added." - }, - "quantity": { - "type": "number", - "format": "double", - "description": "The number of the coupon to be added." - } - }, - "required": [ - "uid", - "quantity" - ], - "type": "object", - "additionalProperties": false - }, - "BookingAddedEvent": { - "description": "Event used to track a user being **manually** added to a booking (only possible via admin view)", - "properties": { - "timestamp": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The time which the booking operation was performed. MUST be in UTC format" - }, - "start_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The start of the operated on date range" - }, - "end_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The end of the operated on date range" - }, - "event_type": { - "type": "string", - "enum": [ - "added_user_to_booking" - ], - "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" - }, - "uid": { - "type": "string", - "description": "The id corresponding to the user who had a **manually** added booking" - } - }, - "required": [ - "timestamp", - "start_date", - "end_date", - "event_type", - "uid" - ], - "type": "object", - "additionalProperties": false - }, - "BookingDeletedEvent": { - "description": "Event used to track the removal of a user from a date range (only possible via admin view)", - "properties": { - "timestamp": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The time which the booking operation was performed. MUST be in UTC format" - }, - "start_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The start of the operated on date range" - }, - "end_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The end of the operated on date range" - }, - "event_type": { - "type": "string", - "enum": [ - "removed_user_from_booking" - ], - "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" - }, - "uid": { - "type": "string", - "description": "The id corresponding to the user who had a **manually** deleted booking" - } - }, - "required": [ - "timestamp", - "start_date", - "end_date", - "event_type", - "uid" - ], - "type": "object", - "additionalProperties": false - }, - "BookingAvailabilityChangeEvent": { - "description": "Event used to track the history of the availability of dates changing", - "properties": { - "timestamp": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The time which the booking operation was performed. MUST be in UTC format" - }, - "start_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The start of the operated on date range" - }, - "end_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The end of the operated on date range" - }, - "event_type": { - "type": "string", - "enum": [ - "changed_date_availability" - ], - "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" - }, - "change": { - "type": "number", - "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" - } - }, - "required": [ - "timestamp", - "start_date", - "end_date", - "event_type", - "change" - ], - "type": "object", - "additionalProperties": false - }, - "BookingHistoryEvent": { - "anyOf": [ - { - "$ref": "#/components/schemas/BookingAddedEvent" - }, - { - "$ref": "#/components/schemas/BookingDeletedEvent" - }, - { - "$ref": "#/components/schemas/BookingAvailabilityChangeEvent" - } - ], - "description": "Helper type to specify the possible datastruces for the booking history" - }, - "FetchLatestBookingHistoryEventResponse": { - "properties": { - "nextCursor": { - "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" - }, - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "historyEvents": { - "items": { - "$ref": "#/components/schemas/BookingHistoryEvent" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "CreateEventBody": { - "properties": { - "data": { - "$ref": "#/components/schemas/Event" - } - }, - "required": [ - "data" - ], - "type": "object", - "additionalProperties": false - }, - "Partial_Event_": { - "properties": { - "title": { - "type": "string", - "description": "The title of this event" - }, - "description": { - "type": "string", - "description": "An optional description for this event\r\nThis should be in markdown" - }, - "image_url": { - "type": "string", - "description": "The link for the image to display on the event page (essentially a thumbnail)" - }, - "location": { - "type": "string", - "description": "The location of this event" - }, - "start_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." - }, - "end_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\r\nNote that this date is in UTC time." - }, - "physical_start_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" - }, - "physical_end_date": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" - }, - "max_occupancy": { - "type": "number", - "format": "double", - "description": "Max number of attendees at this event, left as optional for uncapped", - "example": 30 - } - }, - "type": "object", - "description": "Make all properties in T optional" - } - }, - "securitySchemes": { - "jwt": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - } - }, - "info": { - "title": "server", - "version": "1.0.0", - "contact": {} - }, - "paths": { - "/users/self": { - "get": { - "operationId": "GetSelf", - "responses": { - "200": { - "description": "Fetched self data", - "content": { - "application/json": { - "schema": { - "properties": { - "stripe_id": { - "type": "string" - }, - "university_year": { - "type": "string" - }, - "student_id": { - "type": "string" - }, - "university": { - "type": "string" - }, - "faculty": { - "type": "string" - }, - "ethnicity": { - "type": "string" - }, - "dietary_requirements": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "emergency_contact": { - "type": "string" - }, - "gender": { - "type": "string" - }, - "phone_number": { - "type": "number", - "format": "double" - }, - "does_ski": { - "type": "boolean" - }, - "does_racing": { - "type": "boolean" - }, - "does_snowboarding": { - "type": "boolean" - }, - "date_of_birth": { - "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" - }, - "uid": { - "type": "string" - } - }, - "required": [ - "dietary_requirements", - "last_name", - "first_name", - "phone_number", - "date_of_birth", - "uid" - ], - "type": "object" - } - } - } - } - }, - "description": "Fetches users additional info based on their uid.", - "security": [ - { - "jwt": [] - } - ], - "parameters": [] - } - }, - "/users/edit-self": { - "patch": { - "operationId": "EditSelf", - "responses": { - "200": { - "description": "Successful edit" - } - }, - "description": "Edits the user's additional info based on their uid.", - "security": [ - { - "jwt": [] - } - ], - "parameters": [], - "requestBody": { - "description": "- The updated user additional info, note that the stripe_id is omitted.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EditSelfRequestBody", - "description": "- The updated user additional info, note that the stripe_id is omitted." - } - } - } - } - } - }, - "/users/delete-user": { - "delete": { - "operationId": "DeleteUser", - "responses": { - "200": { - "description": "Deleted user", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CommonResponse" - }, - {} - ] - } - } - } - } - }, - "description": "Deletes a user based on their uid. This requires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The uid of the user to be deleted.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteUserRequestBody", - "description": "- The uid of the user to be deleted." - } - } - } - } - } - }, - "/webhook": { - "post": { - "operationId": "ReceiveWebhook", - "responses": { - "200": { - "description": "Webhook post received" - } - }, - "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", - "security": [], - "parameters": [] - } - }, - "/signup": { - "post": { - "operationId": "Signup", - "responses": { - "200": { - "description": "Signup successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserSignupResponse" - } - } - } - } - }, - "description": "Signs up a user and creates a user record in the database. Also creates a JWT token for the user in AuthService.", - "security": [], - "parameters": [], - "requestBody": { - "description": "- The user's email and their user additional info.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserSignupBody", - "description": "- The user's email and their user additional info." - } - } - } - } - } - }, - "/payment/membership_prices": { - "get": { - "operationId": "GetMembershipPrices", - "responses": { - "200": { - "description": "The prices of the membership products.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MembershipStripeProductResponse" - } - } - } - } - }, - "description": "Fetches the prices of the membership products from Stripe.", - "security": [], - "parameters": [] - } - }, - "/payment/lodge_prices": { - "get": { - "operationId": "GetLodgePrices", - "responses": { - "200": { - "description": "The prices of the lodge products.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LodgeStripeProductResponse" - } - } - } - } - }, - "description": "Fetches the prices of the lodge products from Stripe.", - "security": [], - "parameters": [] - } - }, - "/payment/checkout_status": { - "get": { - "operationId": "GetCheckoutSessionDetails", - "responses": { - "200": { - "description": "Session Fetched", - "content": { - "application/json": { - "schema": { - "properties": { - "metadata": { - "$ref": "#/components/schemas/stripe.Stripe.Metadata" - }, - "pricePaid": { - "type": "number", - "format": "double" - }, - "customer_email": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/stripe.Stripe.Checkout.Session.Status" - } - }, - "required": [ - "metadata", - "pricePaid", - "customer_email", - "status" - ], - "type": "object" - } - } - } - } - }, - "description": "Fetches the details of a checkout session based on a stripe checkout session id.", - "security": [ - { - "jwt": [] - } - ], - "parameters": [ - { - "description": "The id of the stripe checkout session to fetch.", - "in": "query", - "name": "sessionId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/payment/membership": { - "post": { - "operationId": "GetMembershipPayment", - "responses": { - "200": { - "description": "Session created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MembershipPaymentResponse" - } - } - } - } - }, - "description": "Creates a checkout session for membership payment.", - "security": [ - { - "jwt": [] - } - ], - "parameters": [], - "requestBody": { - "description": "The request body containing the membership type.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserPaymentRequestModel", - "description": "The request body containing the membership type." - } - } - } - } - } - }, - "/payment/booking": { - "post": { - "operationId": "GetBookingPayment", - "responses": { - "200": { - "description": "Created booking checkout session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingPaymentResponse" - } - } - } - } - }, - "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", - "security": [ - { - "jwt": [ - "member" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "The request body containing the date ranges for the booking.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserBookingRequestingModel", - "description": "The request body containing the date ranges for the booking." - } - } - } - } - } - }, - "/events/signup": { - "post": { - "operationId": "EventSignup", - "responses": { - "200": { - "description": "Successfully signed up for Event", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventSignupResponse" - } - } - } - } - }, - "description": "Signs up for an event", - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventSignupBody" - } - } - } - } - } - }, - "/events": { - "get": { - "operationId": "GetAllEvents", - "responses": { - "200": { - "description": "Successfully fetched all events", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAllEventsResponse" - } - } - } - } - }, - "description": "Fetches latest events starting from the event with the latest starting date\r\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", - "security": [], - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 20, - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "cursor", - "required": false, - "schema": { - "type": "string" - } - } - ] - } - }, - "/events/reservations/stream": { - "get": { - "operationId": "StreamSignupCounts", - "responses": { - "204": { - "description": "No content" - } - }, - "description": "Streams the signup count for active events signups.\r\nNote that when testing this on swagger, the connection will remain open.", - "security": [], - "parameters": [] - } - }, - "/bookings": { - "get": { - "operationId": "GetAllBookings", - "responses": { - "200": { - "description": "Found bookings", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllUserBookingSlotsResponse" - } - } - } - } - }, - "description": "Fetches all bookings for a user based on their UID.", - "security": [ - { - "jwt": [ - "member" - ] - } - ], - "parameters": [] - } - }, - "/bookings/available-dates": { - "post": { - "operationId": "GetAvailableDates", - "responses": { - "200": { - "description": "Availabilities found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AvailableDatesResponse" - } - } - } - } - }, - "description": "Fetches all available booking dates within a date range.", - "security": [ - { - "jwt": [ - "member" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The date range to check for available booking slots.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AvailableDatesRequestModel", - "description": "- The date range to check for available booking slots." - } - } - } - } - } - }, - "/bookings/fetch-users": { - "post": { - "operationId": "FetchUsersByBookingDateRange", - "responses": { - "200": { - "description": "Users found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UsersByDateRangeResponse" - } - } - } - } - }, - "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The date range to check for user bookings.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingsByDateRangeRequestModel", - "description": "- The date range to check for user bookings." - } - } - } - } - } - }, - "/admin/bookings/make-dates-available": { - "post": { - "operationId": "MakeDateAvailable", - "responses": { - "201": { - "description": "Slot made available", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingSlotUpdateResponse" - } - } - } - } - }, - "description": "Booking Operations", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The start and end date of the range and the number of slots to add.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MakeDatesAvailableRequestBody", - "description": "- The start and end date of the range and the number of slots to add." - } - } - } - } - } - }, - "/admin/bookings/make-dates-unavailable": { - "post": { - "operationId": "MakeDateUnavailable", - "responses": { - "201": { - "description": "Slot made unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingSlotUpdateResponse" - } - } - } - } - }, - "description": "Decreases availability count to 0 for all booking slots in a date range.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The start and end date of the range, the number of slots is omitted as we're decreases all slots to 0.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Omit_MakeDatesAvailableRequestBody.slots_", - "description": "- The start and end date of the range, the number of slots is omitted as we're decreases all slots to 0." - } - } - } - } - } - }, - "/admin/bookings/create": { - "post": { - "operationId": "CreateBookings", - "responses": { - "200": { - "description": "Bookings successfully created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UIdssByDateRangeResponse" - } - } - } - } - }, - "description": "An admin method to create bookings for a list of users within a date range.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The date range and list of user ids to create bookings for.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateBookingsRequestModel", - "description": "- The date range and list of user ids to create bookings for." - } - } - } - } - } - }, - "/admin/bookings/delete": { - "post": { - "operationId": "RemoveBooking", - "responses": { - "200": { - "description": "Booking deleted successfuly", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingDeleteResponse" - } - } - } - } - }, - "description": "Delete a users booking by booking ID.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The booking ID to delete.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteBookingRequest", - "description": "- The booking ID to delete." - } - } - } - } - } - }, - "/admin/users": { - "get": { - "operationId": "GetAllUsers", - "responses": { - "200": { - "description": "Users found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllUsersResponse" - } - } - } - } - }, - "description": "User Operations", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [ - { - "description": "- The cursor to start fetching users from. Essentially a pagination token.", - "in": "query", - "name": "cursor", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "- The number of users to fetch. Defaults to 100. Is also a maximum of 100 users per fetch", - "in": "query", - "name": "toFetch", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - } - ] - } - }, - "/admin/users/{uid}": { - "get": { - "operationId": "GetUser", - "responses": { - "200": { - "description": "User found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetUserResponse" - } - } - } - } - }, - "description": "Get a user by their UID.\r\nRequires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [ - { - "description": "- The UID of the user to fetch.", - "in": "path", - "name": "uid", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/admin/users/create": { - "put": { - "operationId": "CreateUser", - "responses": { - "200": { - "description": "Created" - } - }, - "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The user data to create and their UID.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateUserRequestBody", - "description": "- The user data to create and their UID." - } - } - } - } - } - }, - "/admin/users/bulk-edit": { - "patch": { - "operationId": "EditUsers", - "responses": { - "200": { - "description": "Edited" - } - }, - "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The list of users to edit and their updated information.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EditUsersRequestBody", - "description": "- The list of users to edit and their updated information." - } - } - } - } - } - }, - "/admin/users/promote": { - "put": { - "operationId": "PromoteUser", - "responses": { - "200": { - "description": "Promoted user" - } - }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The UID of the user to promote.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PromoteUserRequestBody", - "description": "- The UID of the user to promote." - } - } - } - } - } - }, - "/admin/users/demote": { - "put": { - "operationId": "DemoteUser", - "responses": { - "200": { - "description": "Demoted user" - } - }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The UID of the user to demote.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DemoteUserRequestBody", - "description": "- The UID of the user to demote." - } - } - } - } - } - }, - "/admin/users/demote-all": { - "patch": { - "operationId": "DemoteAllUsers", - "responses": { - "200": { - "description": "Demoted all non-admin users" - } - }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [] - } - }, - "/admin/users/add-coupon": { - "post": { - "operationId": "AddCoupon", - "responses": { - "200": { - "description": "Coupon Added" - } - }, - "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "- The UID of the user to add the coupon to and the quantity of coupons to add.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddCouponRequestBody", - "description": "- The UID of the user to add the coupon to and the quantity of coupons to add." - } - } - } - } - } - }, - "/admin/bookings/history": { - "get": { - "operationId": "GetLatestHistory", - "responses": { - "200": { - "description": "History Events Fetched", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchLatestBookingHistoryEventResponse" - } - } - } - } - }, - "description": "Fetches the **latest** booking history events (uses cursor-based pagination)", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [ - { - "in": "query", - "name": "limit", - "required": true, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "cursor", - "required": false, - "schema": { - "type": "string" - } - } - ] - } - }, - "/admin/events": { - "post": { - "operationId": "CreateNewEvent", - "responses": { - "201": { - "description": "Created Event" - } - }, - "description": "Endpoint for admin to create a new event", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateEventBody" - } - } - } - } - } - }, - "/admin/events/{id}": { - "patch": { - "operationId": "EditEvent", - "responses": { - "200": { - "description": "Successfully edited the event!" - } - }, - "description": "Endpoint for admints to edit an event.", - "security": [ - { - "jwt": [ - "admin" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Partial_Event_" - } - } - } - } - } - } - }, - "servers": [ - { - "url": "/" - } - ] -} \ No newline at end of file From 56e785d9ac4d7d0ce1959ae0a38b73364d63667b Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 5 Oct 2024 07:58:15 +1300 Subject: [PATCH 17/18] codegen --- server/src/middleware/__generated__/routes.ts | 1619 +++++++++++ .../src/middleware/__generated__/swagger.json | 2561 +++++++++++++++++ 2 files changed, 4180 insertions(+) create mode 100644 server/src/middleware/__generated__/routes.ts create mode 100644 server/src/middleware/__generated__/swagger.json diff --git a/server/src/middleware/__generated__/routes.ts b/server/src/middleware/__generated__/routes.ts new file mode 100644 index 000000000..ec44ff08e --- /dev/null +++ b/server/src/middleware/__generated__/routes.ts @@ -0,0 +1,1619 @@ +/* tslint:disable */ +/* eslint-disable */ +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { TsoaRoute, fetchMiddlewares, ExpressTemplateService } from '@tsoa/runtime'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { UsersController } from './../../service-layer/controllers/UserController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { StripeWebhook } from './../../service-layer/controllers/StripeWebhook'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { UserSignup } from './../../service-layer/controllers/SignupController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { PaymentController } from './../../service-layer/controllers/PaymentController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { EventController } from './../../service-layer/controllers/EventController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { BookingController } from './../../service-layer/controllers/BookingController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { AdminController } from './../../service-layer/controllers/AdminController'; +import { expressAuthentication } from './../../business-layer/security/Authentication'; +// @ts-ignore - no great way to install types from subpackage +import type { Request as ExRequest, Response as ExResponse, RequestHandler, Router } from 'express'; + +const expressAuthenticationRecasted = expressAuthentication as (req: ExRequest, securityName: string, scopes?: string[], res?: ExResponse) => Promise; + + +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + +const models: TsoaRoute.Models = { + "FirebaseFirestore.Timestamp": { + "dataType": "refObject", + "properties": { + "seconds": {"dataType":"double","required":true}, + "nanoseconds": {"dataType":"double","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"date_of_birth":{"ref":"FirebaseFirestore.Timestamp"},"does_snowboarding":{"dataType":"boolean"},"does_racing":{"dataType":"boolean"},"does_ski":{"dataType":"boolean"},"phone_number":{"dataType":"double"},"gender":{"dataType":"string"},"emergency_contact":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}},"first_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your First Name"}}},"last_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your Second Name"}}},"dietary_requirements":{"dataType":"string","validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}},"ethnicity":{"dataType":"string"},"faculty":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}},"university":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}},"student_id":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}},"university_year":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Omit_Partial_UserAdditionalInfo_.stripe_id_": { + "dataType": "refAlias", + "type": {"ref":"Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "EditSelfRequestBody": { + "dataType": "refObject", + "properties": { + "updatedInformation": {"ref":"Omit_Partial_UserAdditionalInfo_.stripe_id_","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CommonResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DeleteUserRequestBody": { + "dataType": "refObject", + "properties": { + "uid": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UserSignupResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "jwtToken": {"dataType":"string"}, + "uid": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"date_of_birth":{"ref":"FirebaseFirestore.Timestamp","required":true},"does_snowboarding":{"dataType":"boolean"},"does_racing":{"dataType":"boolean"},"does_ski":{"dataType":"boolean"},"phone_number":{"dataType":"double","required":true},"gender":{"dataType":"string"},"emergency_contact":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}},"first_name":{"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}},"last_name":{"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}},"dietary_requirements":{"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}},"ethnicity":{"dataType":"string"},"faculty":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}},"university":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}},"student_id":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}},"university_year":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Omit_UserAdditionalInfo.stripe_id_": { + "dataType": "refAlias", + "type": {"ref":"Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UserSignupBody": { + "dataType": "refObject", + "properties": { + "email": {"dataType":"string","required":true}, + "user": {"ref":"Omit_UserAdditionalInfo.stripe_id_","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "MembershipTypeValues": { + "dataType": "refEnum", + "enums": ["uoa_student","non_uoa_student","returning_member","new_non_student"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "MembershipStripeProductResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"originalPrice":{"dataType":"string"},"displayPrice":{"dataType":"string","required":true},"discount":{"dataType":"boolean","required":true},"description":{"dataType":"string"},"name":{"ref":"MembershipTypeValues","required":true},"productId":{"dataType":"string","required":true}}}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "LodgePricingTypeValues": { + "dataType": "refEnum", + "enums": ["single_friday_or_saturday","normal"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "LodgeStripeProductResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"originalPrice":{"dataType":"string"},"displayPrice":{"dataType":"string","required":true},"discount":{"dataType":"boolean","required":true},"description":{"dataType":"string"},"name":{"ref":"LodgePricingTypeValues","required":true},"productId":{"dataType":"string","required":true}}}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "stripe.Stripe.Checkout.Session.Status": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["complete"]},{"dataType":"enum","enums":["expired"]},{"dataType":"enum","enums":["open"]}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "stripe.Stripe.Metadata": { + "dataType": "refObject", + "properties": { + }, + "additionalProperties": {"dataType":"string"}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "MembershipPaymentResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "stripeClientSecret": {"dataType":"string"}, + "membershipType": {"ref":"MembershipTypeValues"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UserPaymentRequestModel": { + "dataType": "refObject", + "properties": { + "membershipType": {"ref":"MembershipTypeValues"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingPaymentResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "stripeClientSecret": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UserBookingRequestingModel": { + "dataType": "refObject", + "properties": { + "startDate": {"ref":"FirebaseFirestore.Timestamp"}, + "endDate": {"ref":"FirebaseFirestore.Timestamp"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "EventSignupResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"email":{"dataType":"string","required":true},"last_name":{"dataType":"string","required":true},"first_name":{"dataType":"string","required":true}}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Pick_EventReservation.Exclude_keyofEventReservation.timestamp__": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"first_name":{"dataType":"string","required":true},"last_name":{"dataType":"string","required":true},"email":{"dataType":"string","required":true},"is_member":{"dataType":"boolean","required":true}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Omit_EventReservation.timestamp_": { + "dataType": "refAlias", + "type": {"ref":"Pick_EventReservation.Exclude_keyofEventReservation.timestamp__","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "EventSignupBody": { + "dataType": "refObject", + "properties": { + "event_id": {"dataType":"string","required":true}, + "reservation": {"ref":"Omit_EventReservation.timestamp_","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Event": { + "dataType": "refObject", + "properties": { + "title": {"dataType":"string","required":true}, + "description": {"dataType":"string"}, + "image_url": {"dataType":"string"}, + "location": {"dataType":"string","required":true}, + "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "physical_start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "physical_end_date": {"ref":"FirebaseFirestore.Timestamp"}, + "max_occupancy": {"dataType":"double"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "GetAllEventsResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "nextCursor": {"dataType":"string"}, + "data": {"dataType":"array","array":{"dataType":"refObject","ref":"Event"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AllUserBookingSlotsResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "dates": {"dataType":"array","array":{"dataType":"string"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AvailableDates": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"availableSpaces":{"dataType":"double","required":true},"maxBookings":{"dataType":"double","required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true},"description":{"dataType":"string"},"id":{"dataType":"string","required":true}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AvailableDatesResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "data": {"dataType":"array","array":{"dataType":"refAlias","ref":"AvailableDates"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AvailableDatesRequestModel": { + "dataType": "refObject", + "properties": { + "startDate": {"ref":"FirebaseFirestore.Timestamp"}, + "endDate": {"ref":"FirebaseFirestore.Timestamp"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UserAccountTypes": { + "dataType": "refEnum", + "enums": ["admin","member","guest"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingIdandUserData": { + "dataType": "refObject", + "properties": { + "date_of_birth": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "does_snowboarding": {"dataType":"boolean"}, + "does_racing": {"dataType":"boolean"}, + "does_ski": {"dataType":"boolean"}, + "phone_number": {"dataType":"double","required":true}, + "gender": {"dataType":"string"}, + "emergency_contact": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}}, + "first_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}}, + "last_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}}, + "dietary_requirements": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}}, + "ethnicity": {"dataType":"string"}, + "faculty": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}}, + "university": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}}, + "student_id": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}}, + "university_year": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}, + "stripe_id": {"dataType":"string"}, + "uid": {"dataType":"string","required":true}, + "dateJoined": {"dataType":"string"}, + "email": {"dataType":"string","required":true}, + "membership": {"ref":"UserAccountTypes","required":true}, + "bookingId": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UsersByDateRangeResponse": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"users":{"dataType":"array","array":{"dataType":"refObject","ref":"BookingIdandUserData"},"required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true}}}}, + "error": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingsByDateRangeRequestModel": { + "dataType": "refObject", + "properties": { + "startDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "endDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingSlotUpdateResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "updatedBookingSlots": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"bookingSlotId":{"dataType":"string","required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true}}}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "MakeDatesAvailableRequestBody": { + "dataType": "refObject", + "properties": { + "startDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "endDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "slots": {"dataType":"double","validators":{"maximum":{"errorMsg":"You have exceeded the maximum slots for bookings","value":32},"minimum":{"errorMsg":"must be positive","value":0}}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"startDate":{"ref":"FirebaseFirestore.Timestamp","required":true},"endDate":{"ref":"FirebaseFirestore.Timestamp","required":true}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Omit_MakeDatesAvailableRequestBody.slots_": { + "dataType": "refAlias", + "type": {"ref":"Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UIdssByDateRangeResponse": { + "dataType": "refObject", + "properties": { + "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"users":{"dataType":"array","array":{"dataType":"string"},"required":true},"date":{"ref":"FirebaseFirestore.Timestamp","required":true}}}}, + "error": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CreateBookingsRequestModel": { + "dataType": "refObject", + "properties": { + "startDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "endDate": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "userId": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingDeleteResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "user_id": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DeleteBookingRequest": { + "dataType": "refObject", + "properties": { + "bookingID": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CombinedUserData": { + "dataType": "refObject", + "properties": { + "date_of_birth": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "does_snowboarding": {"dataType":"boolean"}, + "does_racing": {"dataType":"boolean"}, + "does_ski": {"dataType":"boolean"}, + "phone_number": {"dataType":"double","required":true}, + "gender": {"dataType":"string"}, + "emergency_contact": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}}, + "first_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}}, + "last_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}}, + "dietary_requirements": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}}, + "ethnicity": {"dataType":"string"}, + "faculty": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}}, + "university": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}}, + "student_id": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}}, + "university_year": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}, + "stripe_id": {"dataType":"string"}, + "uid": {"dataType":"string","required":true}, + "dateJoined": {"dataType":"string"}, + "email": {"dataType":"string","required":true}, + "membership": {"ref":"UserAccountTypes","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AllUsersResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "nextCursor": {"dataType":"string"}, + "data": {"dataType":"array","array":{"dataType":"refObject","ref":"CombinedUserData"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "GetUserResponse": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "data": {"ref":"CombinedUserData"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "UserAdditionalInfo": { + "dataType": "refObject", + "properties": { + "date_of_birth": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "does_snowboarding": {"dataType":"boolean"}, + "does_racing": {"dataType":"boolean"}, + "does_ski": {"dataType":"boolean"}, + "phone_number": {"dataType":"double","required":true}, + "gender": {"dataType":"string"}, + "emergency_contact": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}}, + "first_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your First Name"}}}, + "last_name": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please enter your Second Name"}}}, + "dietary_requirements": {"dataType":"string","required":true,"validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}}, + "ethnicity": {"dataType":"string"}, + "faculty": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}}, + "university": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}}, + "student_id": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}}, + "university_year": {"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}}, + "stripe_id": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CreateUserRequestBody": { + "dataType": "refObject", + "properties": { + "uid": {"dataType":"string","required":true}, + "user": {"ref":"UserAdditionalInfo","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Partial_UserAdditionalInfo_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"date_of_birth":{"ref":"FirebaseFirestore.Timestamp"},"does_snowboarding":{"dataType":"boolean"},"does_racing":{"dataType":"boolean"},"does_ski":{"dataType":"boolean"},"phone_number":{"dataType":"double"},"gender":{"dataType":"string"},"emergency_contact":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter a name"}}},"first_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your First Name"}}},"last_name":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your Second Name"}}},"dietary_requirements":{"dataType":"string","validators":{"isString":{"errorMsg":"Please write your dietary requirements"}}},"ethnicity":{"dataType":"string"},"faculty":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your faculty"}}},"university":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your university"}}},"student_id":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your student ID"}}},"university_year":{"dataType":"string","validators":{"isString":{"errorMsg":"Please enter your year of study"}}},"stripe_id":{"dataType":"string"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "EditUsersRequestBody": { + "dataType": "refObject", + "properties": { + "users": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"updatedInformation":{"ref":"Partial_UserAdditionalInfo_","required":true},"uid":{"dataType":"string","required":true}}},"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "PromoteUserRequestBody": { + "dataType": "refObject", + "properties": { + "uid": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DemoteUserRequestBody": { + "dataType": "refObject", + "properties": { + "uid": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AddCouponRequestBody": { + "dataType": "refObject", + "properties": { + "uid": {"dataType":"string","required":true}, + "quantity": {"dataType":"double","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingAddedEvent": { + "dataType": "refObject", + "properties": { + "timestamp": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "event_type": {"dataType":"enum","enums":["added_user_to_booking"],"required":true}, + "uid": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingDeletedEvent": { + "dataType": "refObject", + "properties": { + "timestamp": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "event_type": {"dataType":"enum","enums":["removed_user_from_booking"],"required":true}, + "uid": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingAvailabilityChangeEvent": { + "dataType": "refObject", + "properties": { + "timestamp": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "start_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "end_date": {"ref":"FirebaseFirestore.Timestamp","required":true}, + "event_type": {"dataType":"enum","enums":["changed_date_availability"],"required":true}, + "change": {"dataType":"double","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "BookingHistoryEvent": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"ref":"BookingAddedEvent"},{"ref":"BookingDeletedEvent"},{"ref":"BookingAvailabilityChangeEvent"}],"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "FetchLatestBookingHistoryEventResponse": { + "dataType": "refObject", + "properties": { + "nextCursor": {"dataType":"string"}, + "error": {"dataType":"string"}, + "message": {"dataType":"string"}, + "historyEvents": {"dataType":"array","array":{"dataType":"refAlias","ref":"BookingHistoryEvent"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CreateEventBody": { + "dataType": "refObject", + "properties": { + "data": {"ref":"Event","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Partial_Event_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"title":{"dataType":"string"},"description":{"dataType":"string"},"image_url":{"dataType":"string"},"location":{"dataType":"string"},"start_date":{"ref":"FirebaseFirestore.Timestamp"},"end_date":{"ref":"FirebaseFirestore.Timestamp"},"physical_start_date":{"ref":"FirebaseFirestore.Timestamp"},"physical_end_date":{"ref":"FirebaseFirestore.Timestamp"},"max_occupancy":{"dataType":"double"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +}; +const templateService = new ExpressTemplateService(models, {"noImplicitAdditionalProperties":"throw-on-extras","bodyCoercion":true}); + +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + +export function RegisterRoutes(app: Router) { + // ########################################################################################################### + // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look + // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa + // ########################################################################################################### + app.get('/users/self', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.getSelf)), + + function UsersController_getSelf(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UsersController(); + + templateService.apiHandler({ + methodName: 'getSelf', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/users/edit-self', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.editSelf)), + + function UsersController_editSelf(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditSelfRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UsersController(); + + templateService.apiHandler({ + methodName: 'editSelf', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.delete('/users/delete-user', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(UsersController)), + ...(fetchMiddlewares(UsersController.prototype.deleteUser)), + + function UsersController_deleteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UsersController(); + + templateService.apiHandler({ + methodName: 'deleteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/webhook', + ...(fetchMiddlewares(StripeWebhook)), + ...(fetchMiddlewares(StripeWebhook.prototype.receiveWebhook)), + + function StripeWebhook_receiveWebhook(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new StripeWebhook(); + + templateService.apiHandler({ + methodName: 'receiveWebhook', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/signup', + ...(fetchMiddlewares(UserSignup)), + ...(fetchMiddlewares(UserSignup.prototype.signup)), + + function UserSignup_signup(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserSignupBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new UserSignup(); + + templateService.apiHandler({ + methodName: 'signup', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/payment/membership_prices', + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getMembershipPrices)), + + function PaymentController_getMembershipPrices(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + templateService.apiHandler({ + methodName: 'getMembershipPrices', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/payment/lodge_prices', + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getLodgePrices)), + + function PaymentController_getLodgePrices(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + templateService.apiHandler({ + methodName: 'getLodgePrices', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/payment/checkout_status', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getCheckoutSessionDetails)), + + function PaymentController_getCheckoutSessionDetails(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + sessionId: {"in":"query","name":"sessionId","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + templateService.apiHandler({ + methodName: 'getCheckoutSessionDetails', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/payment/membership', + authenticateMiddleware([{"jwt":[]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getMembershipPayment)), + + function PaymentController_getMembershipPayment(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserPaymentRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + templateService.apiHandler({ + methodName: 'getMembershipPayment', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/payment/booking', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(PaymentController)), + ...(fetchMiddlewares(PaymentController.prototype.getBookingPayment)), + + function PaymentController_getBookingPayment(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"UserBookingRequestingModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new PaymentController(); + + templateService.apiHandler({ + methodName: 'getBookingPayment', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/events/signup', + ...(fetchMiddlewares(EventController)), + ...(fetchMiddlewares(EventController.prototype.eventSignup)), + + function EventController_eventSignup(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EventSignupBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new EventController(); + + templateService.apiHandler({ + methodName: 'eventSignup', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/events', + ...(fetchMiddlewares(EventController)), + ...(fetchMiddlewares(EventController.prototype.getAllEvents)), + + function EventController_getAllEvents(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + limit: {"default":20,"in":"query","name":"limit","dataType":"double"}, + cursor: {"in":"query","name":"cursor","dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new EventController(); + + templateService.apiHandler({ + methodName: 'getAllEvents', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/events/reservations/stream', + ...(fetchMiddlewares(EventController)), + ...(fetchMiddlewares(EventController.prototype.streamSignupCounts)), + + function EventController_streamSignupCounts(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + req: {"in":"request","name":"req","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new EventController(); + + templateService.apiHandler({ + methodName: 'streamSignupCounts', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/bookings', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.getAllBookings)), + + function BookingController_getAllBookings(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new BookingController(); + + templateService.apiHandler({ + methodName: 'getAllBookings', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/bookings/available-dates', + authenticateMiddleware([{"jwt":["member"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.getAvailableDates)), + + function BookingController_getAvailableDates(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AvailableDatesRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new BookingController(); + + templateService.apiHandler({ + methodName: 'getAvailableDates', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/bookings/fetch-users', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(BookingController)), + ...(fetchMiddlewares(BookingController.prototype.fetchUsersByBookingDateRange)), + + function BookingController_fetchUsersByBookingDateRange(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"BookingsByDateRangeRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new BookingController(); + + templateService.apiHandler({ + methodName: 'fetchUsersByBookingDateRange', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/make-dates-available', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.makeDateAvailable)), + + function AdminController_makeDateAvailable(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"MakeDatesAvailableRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'makeDateAvailable', + controller, + response, + next, + validatedArgs, + successStatus: 201, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/make-dates-unavailable', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.makeDateUnavailable)), + + function AdminController_makeDateUnavailable(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Omit_MakeDatesAvailableRequestBody.slots_"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'makeDateUnavailable', + controller, + response, + next, + validatedArgs, + successStatus: 201, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/create', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.createBookings)), + + function AdminController_createBookings(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateBookingsRequestModel"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'createBookings', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/bookings/delete', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.removeBooking)), + + function AdminController_removeBooking(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DeleteBookingRequest"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'removeBooking', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/users', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getAllUsers)), + + function AdminController_getAllUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + cursor: {"in":"query","name":"cursor","dataType":"string"}, + toFetch: {"in":"query","name":"toFetch","dataType":"double"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'getAllUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/users/:uid', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getUser)), + + function AdminController_getUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + uid: {"in":"path","name":"uid","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'getUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/create', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.createUser)), + + function AdminController_createUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"CreateUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'createUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/admin/users/bulk-edit', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.editUsers)), + + function AdminController_editUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"EditUsersRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'editUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/promote', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.promoteUser)), + + function AdminController_promoteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"PromoteUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'promoteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.put('/admin/users/demote', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.demoteUser)), + + function AdminController_demoteUser(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"DemoteUserRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'demoteUser', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/admin/users/demote-all', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.demoteAllUsers)), + + function AdminController_demoteAllUsers(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'demoteAllUsers', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/users/add-coupon', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.addCoupon)), + + function AdminController_addCoupon(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddCouponRequestBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'addCoupon', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/admin/bookings/history', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.getLatestHistory)), + + function AdminController_getLatestHistory(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + limit: {"in":"query","name":"limit","required":true,"dataType":"double"}, + cursor: {"in":"query","name":"cursor","dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'getLatestHistory', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/admin/events', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.createNewEvent)), + + function AdminController_createNewEvent(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + body: {"in":"body","name":"body","required":true,"ref":"CreateEventBody"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'createNewEvent', + controller, + response, + next, + validatedArgs, + successStatus: 201, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.patch('/admin/events/:id', + authenticateMiddleware([{"jwt":["admin"]}]), + ...(fetchMiddlewares(AdminController)), + ...(fetchMiddlewares(AdminController.prototype.editEvent)), + + function AdminController_editEvent(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + id: {"in":"path","name":"id","required":true,"dataType":"string"}, + requestBody: {"in":"body","name":"requestBody","required":true,"ref":"Partial_Event_"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const controller = new AdminController(); + + templateService.apiHandler({ + methodName: 'editEvent', + controller, + response, + next, + validatedArgs, + successStatus: 200, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + function authenticateMiddleware(security: TsoaRoute.Security[] = []) { + return async function runAuthenticationMiddleware(request: any, response: any, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + // keep track of failed auth attempts so we can hand back the most + // recent one. This behavior was previously existing so preserving it + // here + const failedAttempts: any[] = []; + const pushAndRethrow = (error: any) => { + failedAttempts.push(error); + throw error; + }; + + const secMethodOrPromises: Promise[] = []; + for (const secMethod of security) { + if (Object.keys(secMethod).length > 1) { + const secMethodAndPromises: Promise[] = []; + + for (const name in secMethod) { + secMethodAndPromises.push( + expressAuthenticationRecasted(request, name, secMethod[name], response) + .catch(pushAndRethrow) + ); + } + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + secMethodOrPromises.push(Promise.all(secMethodAndPromises) + .then(users => { return users[0]; })); + } else { + for (const name in secMethod) { + secMethodOrPromises.push( + expressAuthenticationRecasted(request, name, secMethod[name], response) + .catch(pushAndRethrow) + ); + } + } + } + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + try { + request['user'] = await Promise.any(secMethodOrPromises); + + // Response was sent in middleware, abort + if (response.writableEnded) { + return; + } + + next(); + } + catch(err) { + // Show most recent error as response + const error = failedAttempts.pop(); + error.status = error.status || 401; + + // Response was sent in middleware, abort + if (response.writableEnded) { + return; + } + next(error); + } + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + } + } + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +} + +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json new file mode 100644 index 000000000..c42d6a503 --- /dev/null +++ b/server/src/middleware/__generated__/swagger.json @@ -0,0 +1,2561 @@ +{ + "openapi": "3.0.0", + "components": { + "examples": {}, + "headers": {}, + "parameters": {}, + "requestBodies": {}, + "responses": {}, + "schemas": { + "FirebaseFirestore.Timestamp": { + "description": "A Timestamp represents a point in time independent of any time zone or\ncalendar, represented as seconds and fractions of seconds at nanosecond\nresolution in UTC Epoch time. It is encoded using the Proleptic Gregorian\nCalendar which extends the Gregorian calendar backwards to year one. It is\nencoded assuming all minutes are 60 seconds long, i.e. leap seconds are\n\"smeared\" so that no leap second table is needed for interpretation. Range\nis from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.", + "properties": { + "seconds": { + "type": "number", + "format": "double", + "description": "The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z." + }, + "nanoseconds": { + "type": "number", + "format": "double", + "description": "The non-negative fractions of a second at nanosecond resolution." + } + }, + "required": [ + "seconds", + "nanoseconds" + ], + "type": "object", + "additionalProperties": false + }, + "Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__": { + "properties": { + "date_of_birth": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "does_snowboarding": { + "type": "boolean" + }, + "does_racing": { + "type": "boolean" + }, + "does_ski": { + "type": "boolean" + }, + "phone_number": { + "type": "number", + "format": "double" + }, + "gender": { + "type": "string" + }, + "emergency_contact": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "dietary_requirements": { + "type": "string" + }, + "ethnicity": { + "type": "string", + "description": "**OPTIONAL** field that the user should have the choice to provide" + }, + "faculty": { + "type": "string" + }, + "university": { + "type": "string" + }, + "student_id": { + "type": "string" + }, + "university_year": { + "type": "string" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_Partial_UserAdditionalInfo_.stripe_id_": { + "$ref": "#/components/schemas/Pick_Partial_UserAdditionalInfo_.Exclude_keyofPartial_UserAdditionalInfo_.stripe_id__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "EditSelfRequestBody": { + "properties": { + "updatedInformation": { + "$ref": "#/components/schemas/Omit_Partial_UserAdditionalInfo_.stripe_id_" + } + }, + "required": [ + "updatedInformation" + ], + "type": "object", + "additionalProperties": false + }, + "CommonResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "DeleteUserRequestBody": { + "properties": { + "uid": { + "type": "string" + } + }, + "required": [ + "uid" + ], + "type": "object", + "additionalProperties": false + }, + "UserSignupResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "jwtToken": { + "type": "string" + }, + "uid": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__": { + "properties": { + "date_of_birth": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "does_snowboarding": { + "type": "boolean" + }, + "does_racing": { + "type": "boolean" + }, + "does_ski": { + "type": "boolean" + }, + "phone_number": { + "type": "number", + "format": "double" + }, + "gender": { + "type": "string" + }, + "emergency_contact": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "dietary_requirements": { + "type": "string" + }, + "ethnicity": { + "type": "string", + "description": "**OPTIONAL** field that the user should have the choice to provide" + }, + "faculty": { + "type": "string" + }, + "university": { + "type": "string" + }, + "student_id": { + "type": "string" + }, + "university_year": { + "type": "string" + } + }, + "required": [ + "date_of_birth", + "phone_number", + "first_name", + "last_name", + "dietary_requirements" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_UserAdditionalInfo.stripe_id_": { + "$ref": "#/components/schemas/Pick_UserAdditionalInfo.Exclude_keyofUserAdditionalInfo.stripe_id__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "UserSignupBody": { + "properties": { + "email": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/Omit_UserAdditionalInfo.stripe_id_" + } + }, + "required": [ + "email", + "user" + ], + "type": "object", + "additionalProperties": false + }, + "MembershipTypeValues": { + "enum": [ + "uoa_student", + "non_uoa_student", + "returning_member", + "new_non_student" + ], + "type": "string" + }, + "MembershipStripeProductResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "data": { + "items": { + "properties": { + "originalPrice": { + "type": "string" + }, + "displayPrice": { + "type": "string" + }, + "discount": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/MembershipTypeValues" + }, + "productId": { + "type": "string" + } + }, + "required": [ + "displayPrice", + "discount", + "name", + "productId" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "LodgePricingTypeValues": { + "enum": [ + "single_friday_or_saturday", + "normal" + ], + "type": "string" + }, + "LodgeStripeProductResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "data": { + "items": { + "properties": { + "originalPrice": { + "type": "string" + }, + "displayPrice": { + "type": "string" + }, + "discount": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/LodgePricingTypeValues" + }, + "productId": { + "type": "string" + } + }, + "required": [ + "displayPrice", + "discount", + "name", + "productId" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "stripe.Stripe.Checkout.Session.Status": { + "type": "string", + "enum": [ + "complete", + "expired", + "open" + ] + }, + "stripe.Stripe.Metadata": { + "description": "Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.", + "properties": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "MembershipPaymentResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "stripeClientSecret": { + "type": "string" + }, + "membershipType": { + "$ref": "#/components/schemas/MembershipTypeValues" + } + }, + "type": "object", + "additionalProperties": false + }, + "UserPaymentRequestModel": { + "properties": { + "membershipType": { + "$ref": "#/components/schemas/MembershipTypeValues" + } + }, + "type": "object", + "additionalProperties": false + }, + "BookingPaymentResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "stripeClientSecret": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "UserBookingRequestingModel": { + "properties": { + "startDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "endDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + } + }, + "type": "object", + "additionalProperties": false + }, + "EventSignupResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "data": { + "properties": { + "email": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "first_name": { + "type": "string" + } + }, + "required": [ + "email", + "last_name", + "first_name" + ], + "type": "object" + } + }, + "type": "object", + "additionalProperties": false + }, + "Pick_EventReservation.Exclude_keyofEventReservation.timestamp__": { + "properties": { + "first_name": { + "type": "string", + "description": "The first name of the user who made this event reservation" + }, + "last_name": { + "type": "string", + "description": "The last name of the user who made this event reservation" + }, + "email": { + "type": "string", + "description": "The email of the user who made this even reservation" + }, + "is_member": { + "type": "boolean", + "description": "Boolean to check if the user is a member", + "example": true + } + }, + "required": [ + "first_name", + "last_name", + "email", + "is_member" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_EventReservation.timestamp_": { + "$ref": "#/components/schemas/Pick_EventReservation.Exclude_keyofEventReservation.timestamp__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "EventSignupBody": { + "properties": { + "event_id": { + "type": "string" + }, + "reservation": { + "$ref": "#/components/schemas/Omit_EventReservation.timestamp_" + } + }, + "required": [ + "event_id", + "reservation" + ], + "type": "object", + "additionalProperties": false + }, + "Event": { + "properties": { + "title": { + "type": "string", + "description": "The title of this event" + }, + "description": { + "type": "string", + "description": "An optional description for this event\r\nThis should be in markdown" + }, + "image_url": { + "type": "string", + "description": "The link for the image to display on the event page (essentially a thumbnail)" + }, + "location": { + "type": "string", + "description": "The location of this event" + }, + "start_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." + }, + "end_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The signup period end date.\r\nNote that this date is in UTC time." + }, + "physical_start_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" + }, + "physical_end_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" + }, + "max_occupancy": { + "type": "number", + "format": "double", + "description": "Max number of attendees at this event, left as optional for uncapped", + "example": 30 + } + }, + "required": [ + "title", + "location", + "start_date", + "end_date", + "physical_start_date" + ], + "type": "object", + "additionalProperties": false + }, + "GetAllEventsResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "nextCursor": { + "type": "string", + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + }, + "data": { + "items": { + "$ref": "#/components/schemas/Event" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "AllUserBookingSlotsResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "dates": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "AvailableDates": { + "properties": { + "availableSpaces": { + "type": "number", + "format": "double" + }, + "maxBookings": { + "type": "number", + "format": "double" + }, + "date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "availableSpaces", + "maxBookings", + "date", + "id" + ], + "type": "object" + }, + "AvailableDatesResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "data": { + "items": { + "$ref": "#/components/schemas/AvailableDates" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "AvailableDatesRequestModel": { + "properties": { + "startDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "endDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + } + }, + "type": "object", + "additionalProperties": false + }, + "UserAccountTypes": { + "enum": [ + "admin", + "member", + "guest" + ], + "type": "string" + }, + "BookingIdandUserData": { + "properties": { + "date_of_birth": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "does_snowboarding": { + "type": "boolean" + }, + "does_racing": { + "type": "boolean" + }, + "does_ski": { + "type": "boolean" + }, + "phone_number": { + "type": "number", + "format": "double" + }, + "gender": { + "type": "string" + }, + "emergency_contact": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "dietary_requirements": { + "type": "string" + }, + "ethnicity": { + "type": "string", + "description": "**OPTIONAL** field that the user should have the choice to provide" + }, + "faculty": { + "type": "string" + }, + "university": { + "type": "string" + }, + "student_id": { + "type": "string" + }, + "university_year": { + "type": "string" + }, + "stripe_id": { + "type": "string", + "description": "For identification DO NOT RETURN to users in exposed endpoints" + }, + "uid": { + "type": "string", + "description": "Firebase identifier of the user *data* based on the firestore document" + }, + "dateJoined": { + "type": "string", + "description": "Formatted UTC date string of when the account was created" + }, + "email": { + "type": "string", + "description": "The email the user uses to log in" + }, + "membership": { + "$ref": "#/components/schemas/UserAccountTypes", + "description": "What type of account the user has" + }, + "bookingId": { + "type": "string" + } + }, + "required": [ + "date_of_birth", + "phone_number", + "first_name", + "last_name", + "dietary_requirements", + "uid", + "email", + "membership", + "bookingId" + ], + "type": "object", + "additionalProperties": false + }, + "UsersByDateRangeResponse": { + "description": "Represents the response structure for fetching users by date range.", + "properties": { + "data": { + "items": { + "properties": { + "users": { + "items": { + "$ref": "#/components/schemas/BookingIdandUserData" + }, + "type": "array" + }, + "date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + } + }, + "required": [ + "users", + "date" + ], + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "BookingsByDateRangeRequestModel": { + "description": "Represents the structure of a request model for fetching bookings within a specific date range.", + "properties": { + "startDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "endDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + } + }, + "required": [ + "startDate", + "endDate" + ], + "type": "object", + "additionalProperties": false + }, + "BookingSlotUpdateResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "updatedBookingSlots": { + "items": { + "properties": { + "bookingSlotId": { + "type": "string" + }, + "date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + } + }, + "required": [ + "bookingSlotId", + "date" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "MakeDatesAvailableRequestBody": { + "properties": { + "startDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "endDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "slots": { + "type": "number", + "format": "double", + "maximum": 32, + "minimum": 0 + } + }, + "required": [ + "startDate", + "endDate" + ], + "type": "object", + "additionalProperties": false + }, + "Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__": { + "properties": { + "startDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "endDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + } + }, + "required": [ + "startDate", + "endDate" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_MakeDatesAvailableRequestBody.slots_": { + "$ref": "#/components/schemas/Pick_MakeDatesAvailableRequestBody.Exclude_keyofMakeDatesAvailableRequestBody.slots__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "UIdssByDateRangeResponse": { + "description": "Represents the response structure for fetching user ids by date range.", + "properties": { + "data": { + "items": { + "properties": { + "users": { + "items": { + "type": "string" + }, + "type": "array" + }, + "date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + } + }, + "required": [ + "users", + "date" + ], + "type": "object" + }, + "type": "array" + }, + "error": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "CreateBookingsRequestModel": { + "properties": { + "startDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "endDate": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Firestore timestamp, should represent a UTC date that is set to exactly midnight" + }, + "userId": { + "type": "string", + "description": "List of users to add to the bookings between date range" + } + }, + "required": [ + "startDate", + "endDate", + "userId" + ], + "type": "object", + "additionalProperties": false + }, + "BookingDeleteResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "DeleteBookingRequest": { + "properties": { + "bookingID": { + "type": "string" + } + }, + "required": [ + "bookingID" + ], + "type": "object", + "additionalProperties": false + }, + "CombinedUserData": { + "properties": { + "date_of_birth": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "does_snowboarding": { + "type": "boolean" + }, + "does_racing": { + "type": "boolean" + }, + "does_ski": { + "type": "boolean" + }, + "phone_number": { + "type": "number", + "format": "double" + }, + "gender": { + "type": "string" + }, + "emergency_contact": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "dietary_requirements": { + "type": "string" + }, + "ethnicity": { + "type": "string", + "description": "**OPTIONAL** field that the user should have the choice to provide" + }, + "faculty": { + "type": "string" + }, + "university": { + "type": "string" + }, + "student_id": { + "type": "string" + }, + "university_year": { + "type": "string" + }, + "stripe_id": { + "type": "string", + "description": "For identification DO NOT RETURN to users in exposed endpoints" + }, + "uid": { + "type": "string", + "description": "Firebase identifier of the user *data* based on the firestore document" + }, + "dateJoined": { + "type": "string", + "description": "Formatted UTC date string of when the account was created" + }, + "email": { + "type": "string", + "description": "The email the user uses to log in" + }, + "membership": { + "$ref": "#/components/schemas/UserAccountTypes", + "description": "What type of account the user has" + } + }, + "required": [ + "date_of_birth", + "phone_number", + "first_name", + "last_name", + "dietary_requirements", + "uid", + "email", + "membership" + ], + "type": "object", + "additionalProperties": false + }, + "AllUsersResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "nextCursor": { + "type": "string", + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + }, + "data": { + "items": { + "$ref": "#/components/schemas/CombinedUserData" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "GetUserResponse": { + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/CombinedUserData" + } + }, + "type": "object", + "additionalProperties": false + }, + "UserAdditionalInfo": { + "properties": { + "date_of_birth": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "does_snowboarding": { + "type": "boolean" + }, + "does_racing": { + "type": "boolean" + }, + "does_ski": { + "type": "boolean" + }, + "phone_number": { + "type": "number", + "format": "double" + }, + "gender": { + "type": "string" + }, + "emergency_contact": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "dietary_requirements": { + "type": "string" + }, + "ethnicity": { + "type": "string", + "description": "**OPTIONAL** field that the user should have the choice to provide" + }, + "faculty": { + "type": "string" + }, + "university": { + "type": "string" + }, + "student_id": { + "type": "string" + }, + "university_year": { + "type": "string" + }, + "stripe_id": { + "type": "string", + "description": "For identification DO NOT RETURN to users in exposed endpoints" + } + }, + "required": [ + "date_of_birth", + "phone_number", + "first_name", + "last_name", + "dietary_requirements" + ], + "type": "object", + "additionalProperties": false + }, + "CreateUserRequestBody": { + "properties": { + "uid": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/UserAdditionalInfo" + } + }, + "required": [ + "uid", + "user" + ], + "type": "object", + "additionalProperties": false + }, + "Partial_UserAdditionalInfo_": { + "properties": { + "date_of_birth": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "does_snowboarding": { + "type": "boolean" + }, + "does_racing": { + "type": "boolean" + }, + "does_ski": { + "type": "boolean" + }, + "phone_number": { + "type": "number", + "format": "double" + }, + "gender": { + "type": "string" + }, + "emergency_contact": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "dietary_requirements": { + "type": "string" + }, + "ethnicity": { + "type": "string", + "description": "**OPTIONAL** field that the user should have the choice to provide" + }, + "faculty": { + "type": "string" + }, + "university": { + "type": "string" + }, + "student_id": { + "type": "string" + }, + "university_year": { + "type": "string" + }, + "stripe_id": { + "type": "string", + "description": "For identification DO NOT RETURN to users in exposed endpoints" + } + }, + "type": "object", + "description": "Make all properties in T optional" + }, + "EditUsersRequestBody": { + "properties": { + "users": { + "items": { + "properties": { + "updatedInformation": { + "$ref": "#/components/schemas/Partial_UserAdditionalInfo_" + }, + "uid": { + "type": "string" + } + }, + "required": [ + "updatedInformation", + "uid" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "users" + ], + "type": "object", + "additionalProperties": false + }, + "PromoteUserRequestBody": { + "properties": { + "uid": { + "type": "string" + } + }, + "required": [ + "uid" + ], + "type": "object", + "additionalProperties": false + }, + "DemoteUserRequestBody": { + "properties": { + "uid": { + "type": "string" + } + }, + "required": [ + "uid" + ], + "type": "object", + "additionalProperties": false + }, + "AddCouponRequestBody": { + "properties": { + "uid": { + "type": "string", + "description": "The UID of the user to whom the coupon will be added." + }, + "quantity": { + "type": "number", + "format": "double", + "description": "The number of the coupon to be added." + } + }, + "required": [ + "uid", + "quantity" + ], + "type": "object", + "additionalProperties": false + }, + "BookingAddedEvent": { + "description": "Event used to track a user being **manually** added to a booking (only possible via admin view)", + "properties": { + "timestamp": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The time which the booking operation was performed. MUST be in UTC format" + }, + "start_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The start of the operated on date range" + }, + "end_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The end of the operated on date range" + }, + "event_type": { + "type": "string", + "enum": [ + "added_user_to_booking" + ], + "nullable": false, + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + }, + "uid": { + "type": "string", + "description": "The id corresponding to the user who had a **manually** added booking" + } + }, + "required": [ + "timestamp", + "start_date", + "end_date", + "event_type", + "uid" + ], + "type": "object", + "additionalProperties": false + }, + "BookingDeletedEvent": { + "description": "Event used to track the removal of a user from a date range (only possible via admin view)", + "properties": { + "timestamp": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The time which the booking operation was performed. MUST be in UTC format" + }, + "start_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The start of the operated on date range" + }, + "end_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The end of the operated on date range" + }, + "event_type": { + "type": "string", + "enum": [ + "removed_user_from_booking" + ], + "nullable": false, + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + }, + "uid": { + "type": "string", + "description": "The id corresponding to the user who had a **manually** deleted booking" + } + }, + "required": [ + "timestamp", + "start_date", + "end_date", + "event_type", + "uid" + ], + "type": "object", + "additionalProperties": false + }, + "BookingAvailabilityChangeEvent": { + "description": "Event used to track the history of the availability of dates changing", + "properties": { + "timestamp": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The time which the booking operation was performed. MUST be in UTC format" + }, + "start_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The start of the operated on date range" + }, + "end_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The end of the operated on date range" + }, + "event_type": { + "type": "string", + "enum": [ + "changed_date_availability" + ], + "nullable": false, + "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + }, + "change": { + "type": "number", + "format": "double", + "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" + } + }, + "required": [ + "timestamp", + "start_date", + "end_date", + "event_type", + "change" + ], + "type": "object", + "additionalProperties": false + }, + "BookingHistoryEvent": { + "anyOf": [ + { + "$ref": "#/components/schemas/BookingAddedEvent" + }, + { + "$ref": "#/components/schemas/BookingDeletedEvent" + }, + { + "$ref": "#/components/schemas/BookingAvailabilityChangeEvent" + } + ], + "description": "Helper type to specify the possible datastruces for the booking history" + }, + "FetchLatestBookingHistoryEventResponse": { + "properties": { + "nextCursor": { + "type": "string", + "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + }, + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "historyEvents": { + "items": { + "$ref": "#/components/schemas/BookingHistoryEvent" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "CreateEventBody": { + "properties": { + "data": { + "$ref": "#/components/schemas/Event" + } + }, + "required": [ + "data" + ], + "type": "object", + "additionalProperties": false + }, + "Partial_Event_": { + "properties": { + "title": { + "type": "string", + "description": "The title of this event" + }, + "description": { + "type": "string", + "description": "An optional description for this event\r\nThis should be in markdown" + }, + "image_url": { + "type": "string", + "description": "The link for the image to display on the event page (essentially a thumbnail)" + }, + "location": { + "type": "string", + "description": "The location of this event" + }, + "start_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." + }, + "end_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "The signup period end date.\r\nNote that this date is in UTC time." + }, + "physical_start_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" + }, + "physical_end_date": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", + "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" + }, + "max_occupancy": { + "type": "number", + "format": "double", + "description": "Max number of attendees at this event, left as optional for uncapped", + "example": 30 + } + }, + "type": "object", + "description": "Make all properties in T optional" + } + }, + "securitySchemes": { + "jwt": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + }, + "info": { + "title": "server", + "version": "1.0.0", + "contact": {} + }, + "paths": { + "/users/self": { + "get": { + "operationId": "GetSelf", + "responses": { + "200": { + "description": "Fetched self data", + "content": { + "application/json": { + "schema": { + "properties": { + "stripe_id": { + "type": "string" + }, + "university_year": { + "type": "string" + }, + "student_id": { + "type": "string" + }, + "university": { + "type": "string" + }, + "faculty": { + "type": "string" + }, + "ethnicity": { + "type": "string" + }, + "dietary_requirements": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "emergency_contact": { + "type": "string" + }, + "gender": { + "type": "string" + }, + "phone_number": { + "type": "number", + "format": "double" + }, + "does_ski": { + "type": "boolean" + }, + "does_racing": { + "type": "boolean" + }, + "does_snowboarding": { + "type": "boolean" + }, + "date_of_birth": { + "$ref": "#/components/schemas/FirebaseFirestore.Timestamp" + }, + "uid": { + "type": "string" + } + }, + "required": [ + "dietary_requirements", + "last_name", + "first_name", + "phone_number", + "date_of_birth", + "uid" + ], + "type": "object" + } + } + } + } + }, + "description": "Fetches users additional info based on their uid.", + "security": [ + { + "jwt": [] + } + ], + "parameters": [] + } + }, + "/users/edit-self": { + "patch": { + "operationId": "EditSelf", + "responses": { + "200": { + "description": "Successful edit" + } + }, + "description": "Edits the user's additional info based on their uid.", + "security": [ + { + "jwt": [] + } + ], + "parameters": [], + "requestBody": { + "description": "- The updated user additional info, note that the stripe_id is omitted.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditSelfRequestBody", + "description": "- The updated user additional info, note that the stripe_id is omitted." + } + } + } + } + } + }, + "/users/delete-user": { + "delete": { + "operationId": "DeleteUser", + "responses": { + "200": { + "description": "Deleted user", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CommonResponse" + }, + {} + ] + } + } + } + } + }, + "description": "Deletes a user based on their uid. This requires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The uid of the user to be deleted.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteUserRequestBody", + "description": "- The uid of the user to be deleted." + } + } + } + } + } + }, + "/webhook": { + "post": { + "operationId": "ReceiveWebhook", + "responses": { + "200": { + "description": "Webhook post received" + } + }, + "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "security": [], + "parameters": [] + } + }, + "/signup": { + "post": { + "operationId": "Signup", + "responses": { + "200": { + "description": "Signup successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSignupResponse" + } + } + } + } + }, + "description": "Signs up a user and creates a user record in the database. Also creates a JWT token for the user in AuthService.", + "security": [], + "parameters": [], + "requestBody": { + "description": "- The user's email and their user additional info.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSignupBody", + "description": "- The user's email and their user additional info." + } + } + } + } + } + }, + "/payment/membership_prices": { + "get": { + "operationId": "GetMembershipPrices", + "responses": { + "200": { + "description": "The prices of the membership products.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MembershipStripeProductResponse" + } + } + } + } + }, + "description": "Fetches the prices of the membership products from Stripe.", + "security": [], + "parameters": [] + } + }, + "/payment/lodge_prices": { + "get": { + "operationId": "GetLodgePrices", + "responses": { + "200": { + "description": "The prices of the lodge products.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LodgeStripeProductResponse" + } + } + } + } + }, + "description": "Fetches the prices of the lodge products from Stripe.", + "security": [], + "parameters": [] + } + }, + "/payment/checkout_status": { + "get": { + "operationId": "GetCheckoutSessionDetails", + "responses": { + "200": { + "description": "Session Fetched", + "content": { + "application/json": { + "schema": { + "properties": { + "metadata": { + "$ref": "#/components/schemas/stripe.Stripe.Metadata" + }, + "pricePaid": { + "type": "number", + "format": "double" + }, + "customer_email": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/stripe.Stripe.Checkout.Session.Status" + } + }, + "required": [ + "metadata", + "pricePaid", + "customer_email", + "status" + ], + "type": "object" + } + } + } + } + }, + "description": "Fetches the details of a checkout session based on a stripe checkout session id.", + "security": [ + { + "jwt": [] + } + ], + "parameters": [ + { + "description": "The id of the stripe checkout session to fetch.", + "in": "query", + "name": "sessionId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/payment/membership": { + "post": { + "operationId": "GetMembershipPayment", + "responses": { + "200": { + "description": "Session created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MembershipPaymentResponse" + } + } + } + } + }, + "description": "Creates a checkout session for membership payment.", + "security": [ + { + "jwt": [] + } + ], + "parameters": [], + "requestBody": { + "description": "The request body containing the membership type.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserPaymentRequestModel", + "description": "The request body containing the membership type." + } + } + } + } + } + }, + "/payment/booking": { + "post": { + "operationId": "GetBookingPayment", + "responses": { + "200": { + "description": "Created booking checkout session", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BookingPaymentResponse" + } + } + } + } + }, + "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "security": [ + { + "jwt": [ + "member" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "The request body containing the date ranges for the booking.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserBookingRequestingModel", + "description": "The request body containing the date ranges for the booking." + } + } + } + } + } + }, + "/events/signup": { + "post": { + "operationId": "EventSignup", + "responses": { + "200": { + "description": "Successfully signed up for Event", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventSignupResponse" + } + } + } + } + }, + "description": "Signs up for an event", + "security": [], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventSignupBody" + } + } + } + } + } + }, + "/events": { + "get": { + "operationId": "GetAllEvents", + "responses": { + "200": { + "description": "Successfully fetched all events", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllEventsResponse" + } + } + } + } + }, + "description": "Fetches latest events starting from the event with the latest starting date\r\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", + "security": [], + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/events/reservations/stream": { + "get": { + "operationId": "StreamSignupCounts", + "responses": { + "204": { + "description": "No content" + } + }, + "description": "Streams the signup count for active events signups.\r\nNote that when testing this on swagger, the connection will remain open.", + "security": [], + "parameters": [] + } + }, + "/bookings": { + "get": { + "operationId": "GetAllBookings", + "responses": { + "200": { + "description": "Found bookings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllUserBookingSlotsResponse" + } + } + } + } + }, + "description": "Fetches all bookings for a user based on their UID.", + "security": [ + { + "jwt": [ + "member" + ] + } + ], + "parameters": [] + } + }, + "/bookings/available-dates": { + "post": { + "operationId": "GetAvailableDates", + "responses": { + "200": { + "description": "Availabilities found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailableDatesResponse" + } + } + } + } + }, + "description": "Fetches all available booking dates within a date range.", + "security": [ + { + "jwt": [ + "member" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The date range to check for available booking slots.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailableDatesRequestModel", + "description": "- The date range to check for available booking slots." + } + } + } + } + } + }, + "/bookings/fetch-users": { + "post": { + "operationId": "FetchUsersByBookingDateRange", + "responses": { + "200": { + "description": "Users found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersByDateRangeResponse" + } + } + } + } + }, + "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The date range to check for user bookings.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BookingsByDateRangeRequestModel", + "description": "- The date range to check for user bookings." + } + } + } + } + } + }, + "/admin/bookings/make-dates-available": { + "post": { + "operationId": "MakeDateAvailable", + "responses": { + "201": { + "description": "Slot made available", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BookingSlotUpdateResponse" + } + } + } + } + }, + "description": "Booking Operations", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The start and end date of the range and the number of slots to add.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MakeDatesAvailableRequestBody", + "description": "- The start and end date of the range and the number of slots to add." + } + } + } + } + } + }, + "/admin/bookings/make-dates-unavailable": { + "post": { + "operationId": "MakeDateUnavailable", + "responses": { + "201": { + "description": "Slot made unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BookingSlotUpdateResponse" + } + } + } + } + }, + "description": "Decreases availability count to 0 for all booking slots in a date range.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The start and end date of the range, the number of slots is omitted as we're decreases all slots to 0.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Omit_MakeDatesAvailableRequestBody.slots_", + "description": "- The start and end date of the range, the number of slots is omitted as we're decreases all slots to 0." + } + } + } + } + } + }, + "/admin/bookings/create": { + "post": { + "operationId": "CreateBookings", + "responses": { + "200": { + "description": "Bookings successfully created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UIdssByDateRangeResponse" + } + } + } + } + }, + "description": "An admin method to create bookings for a list of users within a date range.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The date range and list of user ids to create bookings for.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateBookingsRequestModel", + "description": "- The date range and list of user ids to create bookings for." + } + } + } + } + } + }, + "/admin/bookings/delete": { + "post": { + "operationId": "RemoveBooking", + "responses": { + "200": { + "description": "Booking deleted successfuly", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BookingDeleteResponse" + } + } + } + } + }, + "description": "Delete a users booking by booking ID.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The booking ID to delete.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteBookingRequest", + "description": "- The booking ID to delete." + } + } + } + } + } + }, + "/admin/users": { + "get": { + "operationId": "GetAllUsers", + "responses": { + "200": { + "description": "Users found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllUsersResponse" + } + } + } + } + }, + "description": "User Operations", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [ + { + "description": "- The cursor to start fetching users from. Essentially a pagination token.", + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "- The number of users to fetch. Defaults to 100. Is also a maximum of 100 users per fetch", + "in": "query", + "name": "toFetch", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + } + ] + } + }, + "/admin/users/{uid}": { + "get": { + "operationId": "GetUser", + "responses": { + "200": { + "description": "User found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserResponse" + } + } + } + } + }, + "description": "Get a user by their UID.\r\nRequires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [ + { + "description": "- The UID of the user to fetch.", + "in": "path", + "name": "uid", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/admin/users/create": { + "put": { + "operationId": "CreateUser", + "responses": { + "200": { + "description": "Created" + } + }, + "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The user data to create and their UID.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequestBody", + "description": "- The user data to create and their UID." + } + } + } + } + } + }, + "/admin/users/bulk-edit": { + "patch": { + "operationId": "EditUsers", + "responses": { + "200": { + "description": "Edited" + } + }, + "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The list of users to edit and their updated information.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditUsersRequestBody", + "description": "- The list of users to edit and their updated information." + } + } + } + } + } + }, + "/admin/users/promote": { + "put": { + "operationId": "PromoteUser", + "responses": { + "200": { + "description": "Promoted user" + } + }, + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The UID of the user to promote.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromoteUserRequestBody", + "description": "- The UID of the user to promote." + } + } + } + } + } + }, + "/admin/users/demote": { + "put": { + "operationId": "DemoteUser", + "responses": { + "200": { + "description": "Demoted user" + } + }, + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The UID of the user to demote.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DemoteUserRequestBody", + "description": "- The UID of the user to demote." + } + } + } + } + } + }, + "/admin/users/demote-all": { + "patch": { + "operationId": "DemoteAllUsers", + "responses": { + "200": { + "description": "Demoted all non-admin users" + } + }, + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [] + } + }, + "/admin/users/add-coupon": { + "post": { + "operationId": "AddCoupon", + "responses": { + "200": { + "description": "Coupon Added" + } + }, + "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "description": "- The UID of the user to add the coupon to and the quantity of coupons to add.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddCouponRequestBody", + "description": "- The UID of the user to add the coupon to and the quantity of coupons to add." + } + } + } + } + } + }, + "/admin/bookings/history": { + "get": { + "operationId": "GetLatestHistory", + "responses": { + "200": { + "description": "History Events Fetched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchLatestBookingHistoryEventResponse" + } + } + } + } + }, + "description": "Fetches the **latest** booking history events (uses cursor-based pagination)", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [ + { + "in": "query", + "name": "limit", + "required": true, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/admin/events": { + "post": { + "operationId": "CreateNewEvent", + "responses": { + "201": { + "description": "Created Event" + } + }, + "description": "Endpoint for admin to create a new event", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEventBody" + } + } + } + } + } + }, + "/admin/events/{id}": { + "patch": { + "operationId": "EditEvent", + "responses": { + "200": { + "description": "Successfully edited the event!" + } + }, + "description": "Endpoint for admints to edit an event.", + "security": [ + { + "jwt": [ + "admin" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partial_Event_" + } + } + } + } + } + } + }, + "servers": [ + { + "url": "/" + } + ] +} \ No newline at end of file From 7f92c15b33fb7ad8c569abc6827350afca1795b8 Mon Sep 17 00:00:00 2001 From: AzizP786 Date: Sat, 5 Oct 2024 08:01:50 +1300 Subject: [PATCH 18/18] codegen --- .../src/middleware/__generated__/swagger.json | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/server/src/middleware/__generated__/swagger.json b/server/src/middleware/__generated__/swagger.json index c42d6a503..cf914607b 100644 --- a/server/src/middleware/__generated__/swagger.json +++ b/server/src/middleware/__generated__/swagger.json @@ -483,7 +483,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\r\nThis should be in markdown" + "description": "An optional description for this event\nThis should be in markdown" }, "image_url": { "type": "string", @@ -495,19 +495,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\r\nNote that this date is in UTC time." + "description": "The signup period end date.\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -536,7 +536,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1021,7 +1021,7 @@ }, "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "data": { "items": { @@ -1276,7 +1276,7 @@ "added_user_to_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1314,7 +1314,7 @@ "removed_user_from_booking" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "uid": { "type": "string", @@ -1352,12 +1352,12 @@ "changed_date_availability" ], "nullable": false, - "description": "The type of event that the admin performed, used for parsing on the front-end\r\n\r\nEach of these are associated with the following:\r\n\r\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\r\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\r\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" + "description": "The type of event that the admin performed, used for parsing on the front-end\n\nEach of these are associated with the following:\n\n- `\"added_user_to_booking\"`: {@link BookingAddedEvent}\n- `\"removed_user_from_booking\"`: {@link BookingDeletedEvent}\n- `\"changed_date_availability\"`: {@link BookingAvailabilityChangeEvent}" }, "change": { "type": "number", "format": "double", - "description": "The **signed** difference between the newly available slots and the previously available slots.\r\n\r\nFor example, if the original available slots was 32, and the availability was set to 0,\r\nthe `change` in the slots needs to be **0 - 32 = -32**\r\n\r\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\r\nthe `change` would be **32 - 16 = 16**" + "description": "The **signed** difference between the newly available slots and the previously available slots.\n\nFor example, if the original available slots was 32, and the availability was set to 0,\nthe `change` in the slots needs to be **0 - 32 = -32**\n\nAnd vice versa, if the original available slots was 16, and the availability was set to 32,\nthe `change` would be **32 - 16 = 16**" } }, "required": [ @@ -1388,7 +1388,7 @@ "properties": { "nextCursor": { "type": "string", - "description": "Needed for firestore operations which do not support offset\r\nbased pagination\r\n\r\n**Will be undefined in case of last page**" + "description": "Needed for firestore operations which do not support offset\nbased pagination\n\n**Will be undefined in case of last page**" }, "error": { "type": "string" @@ -1426,7 +1426,7 @@ }, "description": { "type": "string", - "description": "An optional description for this event\r\nThis should be in markdown" + "description": "An optional description for this event\nThis should be in markdown" }, "image_url": { "type": "string", @@ -1438,19 +1438,19 @@ }, "start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period start date.\r\nNote that this date is in UTC time.\r\nUse the same start and end date to indicate a 1 day signup period." + "description": "The signup period start date.\nNote that this date is in UTC time.\nUse the same start and end date to indicate a 1 day signup period." }, "end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "The signup period end date.\r\nNote that this date is in UTC time." + "description": "The signup period end date.\nNote that this date is in UTC time." }, "physical_start_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event start date for the event i.e the day members should meet at shads,\r\n**NOT** the signups, refer to {@link start_date} for signup start" + "description": "Event start date for the event i.e the day members should meet at shads,\n**NOT** the signups, refer to {@link start_date} for signup start" }, "physical_end_date": { "$ref": "#/components/schemas/FirebaseFirestore.Timestamp", - "description": "Event end time for the event i.e the last day members will be at the lodge,\r\nis optionial in case of one day events. **NOT** the signups, refer to\r\n{@link end_date} for signup end date" + "description": "Event end time for the event i.e the last day members will be at the lodge,\nis optionial in case of one day events. **NOT** the signups, refer to\n{@link end_date} for signup end date" }, "max_occupancy": { "type": "number", @@ -1643,7 +1643,7 @@ "description": "Webhook post received" } }, - "description": "Webhook endpoint for Stripe events.\r\nThis single endpoint is setup in the Stripe developer config to handle various events.", + "description": "Webhook endpoint for Stripe events.\nThis single endpoint is setup in the Stripe developer config to handle various events.", "security": [], "parameters": [] } @@ -1826,7 +1826,7 @@ } } }, - "description": "Creates a new booking session for the date ranges passed in,\r\nwill return any existing sessions if they have been started in\r\nthe last 30 minutes (the minimum period stripe has to persist a session for)", + "description": "Creates a new booking session for the date ranges passed in,\nwill return any existing sessions if they have been started in\nthe last 30 minutes (the minimum period stripe has to persist a session for)", "security": [ { "jwt": [ @@ -1894,7 +1894,7 @@ } } }, - "description": "Fetches latest events starting from the event with the latest starting date\r\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", + "description": "Fetches latest events starting from the event with the latest starting date\n(**NOT** the signup open date) based on limit. Is paginated with a cursor", "security": [], "parameters": [ { @@ -1926,7 +1926,7 @@ "description": "No content" } }, - "description": "Streams the signup count for active events signups.\r\nNote that when testing this on swagger, the connection will remain open.", + "description": "Streams the signup count for active events signups.\nNote that when testing this on swagger, the connection will remain open.", "security": [], "parameters": [] } @@ -2010,7 +2010,7 @@ } } }, - "description": "This method fetches users based on a booking date range.\r\nThis method requires an admin JWT token.", + "description": "This method fetches users based on a booking date range.\nThis method requires an admin JWT token.", "security": [ { "jwt": [ @@ -2246,7 +2246,7 @@ } } }, - "description": "Get a user by their UID.\r\nRequires an admin JWT token.", + "description": "Get a user by their UID.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2275,7 +2275,7 @@ "description": "Created" } }, - "description": "Adds a new user to the database with their UID and user data.\r\nRequires an admin JWT token.", + "description": "Adds a new user to the database with their UID and user data.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2306,7 +2306,7 @@ "description": "Edited" } }, - "description": "Edits a list of users with updated user additional info.\r\nRequires an admin JWT token.", + "description": "Edits a list of users with updated user additional info.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2337,7 +2337,7 @@ "description": "Promoted user" } }, - "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\r\nRequires an admin JWT token.", + "description": "Promotes a user to a member. This returns a conflict when the user is already a member.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2368,7 +2368,7 @@ "description": "Demoted user" } }, - "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\r\nRequires an admin JWT token.", + "description": "Demotes a member to a guest. This returns a conflict when the user is already a guest.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2399,7 +2399,7 @@ "description": "Demoted all non-admin users" } }, - "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\r\nRequires an admin JWT token.", + "description": "Demotes all non-admin users to guests. This is used to purge all membership statuses at the end of a billing cycle.\nRequires an admin JWT token.", "security": [ { "jwt": [ @@ -2418,7 +2418,7 @@ "description": "Coupon Added" } }, - "description": "Adds a coupon to a user's stripe id.\r\nRequires an admin JWT token.", + "description": "Adds a coupon to a user's stripe id.\nRequires an admin JWT token.", "security": [ { "jwt": [