@stamhoofd/backend 2.118.1 → 2.119.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/package.json +10 -10
  2. package/src/audit-logs/OrderLogger.ts +1 -1
  3. package/src/email-replacements/getEmailReplacementsForPayment.ts +6 -6
  4. package/src/endpoints/admin/members/ChargeMembersEndpoint.ts +4 -4
  5. package/src/endpoints/admin/memberships/ChargeMembershipsEndpoint.ts +1 -1
  6. package/src/endpoints/admin/organizations/ChargeOrganizationsEndpoint.ts +1 -1
  7. package/src/endpoints/admin/organizations/GetOrganizationsEndpoint.ts +1 -1
  8. package/src/endpoints/admin/organizations/PatchOrganizationsEndpoint.ts +8 -8
  9. package/src/endpoints/admin/registrations/ChargeRegistrationsEndpoint.ts +1 -1
  10. package/src/endpoints/auth/CreateAdminEndpoint.ts +3 -3
  11. package/src/endpoints/auth/CreateTokenEndpoint.ts +10 -10
  12. package/src/endpoints/auth/ForgotPasswordEndpoint.ts +2 -2
  13. package/src/endpoints/auth/PatchUserEndpoint.ts +9 -9
  14. package/src/endpoints/auth/SignupEndpoint.ts +2 -2
  15. package/src/endpoints/auth/VerifyEmailEndpoint.ts +3 -3
  16. package/src/endpoints/global/audit-logs/GetAuditLogsEndpoint.ts +1 -1
  17. package/src/endpoints/global/billing/ActivatePackagesEndpoint.ts +3 -3
  18. package/src/endpoints/global/billing/DeactivatePackageEndpoint.ts +2 -2
  19. package/src/endpoints/global/email/CreateEmailEndpoint.ts +4 -4
  20. package/src/endpoints/global/email/GetEmailAddressEndpoint.ts +2 -2
  21. package/src/endpoints/global/email/GetEmailEndpoint.ts +1 -1
  22. package/src/endpoints/global/email/GetUserEmailsEndpoint.test.ts +1 -1
  23. package/src/endpoints/global/email/ManageEmailAddressEndpoint.ts +3 -3
  24. package/src/endpoints/global/email/PatchEmailEndpoint.test.ts +1 -1
  25. package/src/endpoints/global/email/PatchEmailEndpoint.ts +8 -8
  26. package/src/endpoints/global/email-recipients/GetEmailRecipientsEndpoint.ts +1 -1
  27. package/src/endpoints/global/email-recipients/RetryEmailRecipientEndpoint.ts +3 -3
  28. package/src/endpoints/global/email-recipients/helpers/validateEmailRecipientFilter.ts +2 -2
  29. package/src/endpoints/global/events/GetEventNotificationsEndpoint.ts +1 -1
  30. package/src/endpoints/global/events/PatchEventNotificationsEndpoint.ts +13 -13
  31. package/src/endpoints/global/events/PatchEventsEndpoint.ts +24 -24
  32. package/src/endpoints/global/files/ExportToExcelEndpoint.ts +1 -1
  33. package/src/endpoints/global/files/UploadFile.ts +1 -1
  34. package/src/endpoints/global/groups/GetGroupsEndpoint.ts +1 -1
  35. package/src/endpoints/global/members/GetMemberFamilyEndpoint.ts +2 -2
  36. package/src/endpoints/global/members/GetMembersEndpoint.ts +2 -2
  37. package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.ts +52 -52
  38. package/src/endpoints/global/members/helpers/validateGroupFilter.ts +2 -2
  39. package/src/endpoints/global/organizations/CheckRegisterCodeEndpoint.ts +1 -1
  40. package/src/endpoints/global/organizations/CreateOrganizationEndpoint.ts +5 -5
  41. package/src/endpoints/global/platform/PatchPlatformEnpoint.ts +1 -1
  42. package/src/endpoints/global/registration/GetRegistrationsEndpoint.ts +2 -2
  43. package/src/endpoints/global/registration/PatchUserMembersEndpoint.ts +4 -4
  44. package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +18 -18
  45. package/src/endpoints/global/registration-periods/GetRegistrationPeriodsEndpoint.ts +1 -1
  46. package/src/endpoints/global/registration-periods/PatchRegistrationPeriodsEndpoint.ts +5 -5
  47. package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemEndpoint.ts +1 -1
  48. package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemsEndpoint.ts +1 -1
  49. package/src/endpoints/organization/dashboard/balance-items/PatchBalanceItemsEndpoint.ts +11 -11
  50. package/src/endpoints/organization/dashboard/documents/GetDocumentTemplateXML.ts +1 -1
  51. package/src/endpoints/organization/dashboard/documents/PatchDocumentEndpoint.ts +5 -5
  52. package/src/endpoints/organization/dashboard/documents/PatchDocumentTemplatesEndpoint.ts +3 -3
  53. package/src/endpoints/organization/dashboard/email/CheckEmailBouncesEndpoint.ts +1 -1
  54. package/src/endpoints/organization/dashboard/email-templates/PatchEmailTemplatesEndpoint.ts +3 -3
  55. package/src/endpoints/organization/dashboard/invoices/GetInvoicesEndpoint.ts +1 -1
  56. package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +16 -16
  57. package/src/endpoints/organization/dashboard/organization/SetOrganizationDomainEndpoint.ts +3 -3
  58. package/src/endpoints/organization/dashboard/organization/SetUitpasClientCredentialsEndpoint.ts +5 -5
  59. package/src/endpoints/organization/dashboard/payments/GetPaymentsEndpoint.ts +1 -1
  60. package/src/endpoints/organization/dashboard/payments/PatchPaymentsEndpoint.ts +13 -13
  61. package/src/endpoints/organization/dashboard/registration-periods/GetOrganizationRegistrationPeriodsEndpoint.ts +1 -1
  62. package/src/endpoints/organization/dashboard/registration-periods/PatchOrganizationRegistrationPeriodsEndpoint.ts +26 -26
  63. package/src/endpoints/organization/dashboard/stripe/DeleteStripeAccountEndpoint.ts +1 -1
  64. package/src/endpoints/organization/dashboard/stripe/GetStripeAccountLinkEndpoint.ts +1 -1
  65. package/src/endpoints/organization/dashboard/stripe/GetStripeLoginLinkEndpoint.ts +1 -1
  66. package/src/endpoints/organization/dashboard/stripe/UpdateStripeAccountEndpoint.ts +1 -1
  67. package/src/endpoints/organization/dashboard/users/CreateApiUserEndpoint.ts +1 -1
  68. package/src/endpoints/organization/dashboard/users/DeleteUserEndpoint.ts +2 -2
  69. package/src/endpoints/organization/dashboard/users/PatchApiUserEndpoint.ts +2 -2
  70. package/src/endpoints/organization/dashboard/webshops/CreateWebshopEndpoint.ts +4 -4
  71. package/src/endpoints/organization/dashboard/webshops/DeleteWebshopEndpoint.ts +1 -1
  72. package/src/endpoints/organization/dashboard/webshops/PatchDiscountCodesEndpoint.ts +2 -2
  73. package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.ts +9 -9
  74. package/src/endpoints/organization/dashboard/webshops/PatchWebshopTicketsEndpoint.ts +1 -1
  75. package/src/endpoints/organization/dashboard/webshops/SearchUitpasEventsEndpoint.ts +1 -1
  76. package/src/endpoints/organization/shared/ExchangePaymentEndpoint.ts +1 -1
  77. package/src/endpoints/organization/shared/GetDocumentHtml.ts +2 -2
  78. package/src/endpoints/organization/shared/GetPaymentEndpoint.ts +1 -1
  79. package/src/endpoints/organization/webshops/CheckWebshopDiscountCodesEndpoint.ts +1 -1
  80. package/src/endpoints/organization/webshops/GetOrderByPaymentEndpoint.ts +2 -2
  81. package/src/endpoints/organization/webshops/GetOrderEndpoint.ts +1 -1
  82. package/src/endpoints/organization/webshops/GetTicketsEndpoint.ts +3 -3
  83. package/src/endpoints/organization/webshops/GetWebshopEndpoint.ts +1 -1
  84. package/src/endpoints/organization/webshops/PlaceOrderEndpoint.ts +8 -8
  85. package/src/endpoints/organization/webshops/RetrieveUitpasSocialTariffPriceEndpoint.ts +2 -2
  86. package/src/excel-loaders/balance-items.ts +15 -15
  87. package/src/excel-loaders/event-notifications.ts +11 -11
  88. package/src/excel-loaders/members.ts +41 -41
  89. package/src/excel-loaders/organizations.ts +23 -23
  90. package/src/excel-loaders/payments.ts +40 -40
  91. package/src/excel-loaders/receivable-balances.ts +21 -21
  92. package/src/excel-loaders/registrations.ts +26 -26
  93. package/src/helpers/AddressValidator.ts +6 -6
  94. package/src/helpers/AdminPermissionChecker.ts +4 -4
  95. package/src/helpers/AuthenticatedStructures.ts +9 -9
  96. package/src/helpers/BuckarooHelper.ts +1 -1
  97. package/src/helpers/Context.ts +4 -4
  98. package/src/helpers/FileCache.ts +7 -7
  99. package/src/helpers/ForwardHandler.ts +1 -1
  100. package/src/helpers/MembershipCharger.ts +2 -2
  101. package/src/helpers/SetupStepUpdater.ts +1 -1
  102. package/src/helpers/StripeHelper.ts +6 -6
  103. package/src/helpers/UitpasTokenRepository.ts +7 -7
  104. package/src/helpers/ViesHelper.ts +1 -1
  105. package/src/helpers/XlsxTransformerColumnHelper.ts +17 -17
  106. package/src/helpers/email-html-helpers.ts +10 -10
  107. package/src/helpers/updateMemberDetailsUitpasNumber.ts +1 -1
  108. package/src/seeds/1752848561-groups-registration-periods.ts +1 -1
  109. package/src/seeds/1755790070-fill-email-recipient-errors.ts +6 -6
  110. package/src/services/EventNotificationService.ts +3 -3
  111. package/src/services/FileSignService.ts +1 -1
  112. package/src/services/InvoiceService.ts +3 -3
  113. package/src/services/MemberNumberService.ts +3 -3
  114. package/src/services/PaymentService.ts +23 -23
  115. package/src/services/SSOService.ts +5 -5
  116. package/src/services/STPackageService.ts +2 -2
  117. package/src/services/uitpas/PassholderEndpoints.ts +2 -2
  118. package/src/services/uitpas/UitpasService.ts +5 -5
  119. package/src/services/uitpas/cancelTicketSales.ts +1 -1
  120. package/src/services/uitpas/checkPermissionsFor.ts +9 -9
  121. package/src/services/uitpas/getSocialTariffForEvent.ts +4 -4
  122. package/src/services/uitpas/getSocialTariffForUitpasNumbers.ts +5 -5
  123. package/src/services/uitpas/handleUitpasResponse.ts +1 -1
  124. package/src/services/uitpas/registerTicketSales.ts +4 -4
  125. package/src/services/uitpas/searchUitpasEvents.ts +3 -3
  126. package/src/services/uitpas/searchUitpasOrganizers.ts +3 -3
  127. package/src/sql-filters/base-registration-filter-compilers.ts +2 -2
  128. package/src/sql-filters/members.ts +6 -6
  129. package/src/sql-filters/orders.ts +1 -1
@@ -51,7 +51,7 @@ export class SetUitpasClientCredentialsEndpoint extends Endpoint<Params, Query,
51
51
  throw new SimpleError({
52
52
  message: 'You must provide a client id',
53
53
  code: 'missing_client_id',
54
- human: $t('9b9ec483-63b8-4696-ade6-0eb18f9008e6'),
54
+ human: $t('%1BC'),
55
55
  field: 'clientId',
56
56
  });
57
57
  }
@@ -59,7 +59,7 @@ export class SetUitpasClientCredentialsEndpoint extends Endpoint<Params, Query,
59
59
  throw new SimpleError({
60
60
  message: 'You must provide a client secret',
61
61
  code: 'missing_client_secret',
62
- human: $t('58de00fb-3b0a-45a6-9214-7d11b4175779'),
62
+ human: $t('%1BD'),
63
63
  field: 'clientSecret',
64
64
  });
65
65
  }
@@ -67,7 +67,7 @@ export class SetUitpasClientCredentialsEndpoint extends Endpoint<Params, Query,
67
67
  throw new SimpleError({
68
68
  message: 'You cannot use the placeholder client secret for a different client id',
69
69
  code: 'invalid_client_secret',
70
- human: $t('bbc79280-7ae2-4b8d-a900-2d7cbb552428'),
70
+ human: $t('%1BE'),
71
71
  field: 'clientSecret',
72
72
  });
73
73
  }
@@ -77,7 +77,7 @@ export class SetUitpasClientCredentialsEndpoint extends Endpoint<Params, Query,
77
77
  throw new SimpleError({
78
78
  message: 'This organization does not have a uitpas organizer id set',
79
79
  code: 'missing_uitpas_organizer_id',
80
- human: $t('80fcde9c-c8c7-4fe1-b9a6-51684a23d850'),
80
+ human: $t('%1BF'),
81
81
  });
82
82
  }
83
83
 
@@ -88,7 +88,7 @@ export class SetUitpasClientCredentialsEndpoint extends Endpoint<Params, Query,
88
88
  throw new SimpleError({
89
89
  message: 'The provided client credentials are not valid',
90
90
  code: 'invalid_client_credentials',
91
- human: $t('42bbd5c0-8789-4ca1-b667-1c9ecf4d0190'),
91
+ human: $t('%1BG'),
92
92
  });
93
93
  }
94
94
  }
@@ -171,7 +171,7 @@ export class GetPaymentsEndpoint extends Endpoint<Params, Query, Body, ResponseB
171
171
  throw new SimpleError({
172
172
  code: 'timeout',
173
173
  message: 'Query took too long',
174
- human: $t(`dce51638-6129-448b-8a15-e6d778f3a76a`),
174
+ human: $t(`%Cv`),
175
175
  });
176
176
  }
177
177
  throw error;
@@ -53,7 +53,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
53
53
  throw new SimpleError({
54
54
  code: 'invalid_field',
55
55
  message: 'You need to add at least one balance item payment',
56
- human: $t(`8b093b22-3e43-484d-b28c-da7f8db46aa0`),
56
+ human: $t(`%Em`),
57
57
  field: 'balanceItemPayments',
58
58
  });
59
59
  }
@@ -62,7 +62,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
62
62
  throw new SimpleError({
63
63
  code: 'invalid_field',
64
64
  message: 'Invalid payment method',
65
- human: $t(`27b3013c-af5d-4c8e-9363-415c56b138b6`),
65
+ human: $t(`%En`),
66
66
  field: 'method',
67
67
  });
68
68
  }
@@ -115,7 +115,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
115
115
  throw new SimpleError({
116
116
  code: 'invalid_field',
117
117
  message: 'Transfer settings are required',
118
- human: $t(`c6cdb321-3eb3-4689-aaed-0626e7ea0844`),
118
+ human: $t(`%Eo`),
119
119
  field: 'transferSettings',
120
120
  });
121
121
  }
@@ -126,7 +126,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
126
126
  throw new SimpleError({
127
127
  code: 'invalid_field',
128
128
  message: 'Transfer description is required',
129
- human: $t(`16e792b1-bb90-4d09-b9c8-a1e382a2eafe`),
129
+ human: $t(`%Ep`),
130
130
  field: 'transferDescription',
131
131
  });
132
132
  }
@@ -140,7 +140,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
140
140
  for (const item of put.balanceItemPayments) {
141
141
  const balanceItem = await BalanceItem.getByID(item.balanceItem.id);
142
142
  if (!balanceItem || balanceItem.organizationId !== organization.id) {
143
- throw Context.auth.notFoundOrNoAccess($t(`701966b1-07e0-4ce6-9779-2193c1596825`));
143
+ throw Context.auth.notFoundOrNoAccess($t(`%Eq`));
144
144
  }
145
145
  balanceItems.push(balanceItem);
146
146
 
@@ -158,7 +158,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
158
158
 
159
159
  // Check permissions
160
160
  if (!(await Context.auth.canAccessBalanceItems(balanceItems, PermissionLevel.Write))) {
161
- throw Context.auth.error($t(`19bc226c-2b4b-49bf-94a5-28e3d679ecc7`));
161
+ throw Context.auth.error($t(`%Er`));
162
162
  }
163
163
 
164
164
  // Check total price
@@ -172,7 +172,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
172
172
  throw new SimpleError({
173
173
  code: 'invalid_field',
174
174
  message: 'The price should be greater than zero',
175
- human: $t(`f4070936-7a8f-4373-af03-ca53200bb11b`),
175
+ human: $t(`%Es`),
176
176
  field: 'price',
177
177
  });
178
178
  }
@@ -185,7 +185,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
185
185
  throw new SimpleError({
186
186
  code: 'invalid_field',
187
187
  message: 'The price should be smaller than zero',
188
- human: $t(`9ebba3e9-d126-4e87-971e-1563c17a122e`),
188
+ human: $t(`%Et`),
189
189
  field: 'price',
190
190
  });
191
191
  }
@@ -198,7 +198,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
198
198
  throw new SimpleError({
199
199
  code: 'invalid_field',
200
200
  message: 'Total price should be zero',
201
- human: $t(`5b5ec7ff-d48f-4943-80c3-f3d0e4b32989`),
201
+ human: $t(`%Eu`),
202
202
  field: 'price',
203
203
  });
204
204
  }
@@ -207,7 +207,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
207
207
  throw new SimpleError({
208
208
  code: 'missing_items',
209
209
  message: 'At least two items are required for a reallocation',
210
- human: $t(`7b2fb731-37d9-4601-82c4-162abb2803f9`),
210
+ human: $t(`%Ev`),
211
211
  });
212
212
  }
213
213
  break;
@@ -249,7 +249,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
249
249
  throw new SimpleError({
250
250
  code: 'not_found',
251
251
  message: 'Payment not found',
252
- human: $t(`29e79d32-8805-4458-84db-c90e591f9727`),
252
+ human: $t(`%Ew`),
253
253
  });
254
254
  }
255
255
 
@@ -258,7 +258,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
258
258
  throw new SimpleError({
259
259
  code: 'invalid_field',
260
260
  message: 'Invalid payment method',
261
- human: $t(`6afcf043-3ccf-41e3-a840-36a18a8af809`),
261
+ human: $t(`%Ex`),
262
262
  });
263
263
  }
264
264
  }
@@ -277,7 +277,7 @@ export class PatchPaymentsEndpoint extends Endpoint<Params, Query, Body, Respons
277
277
  throw new SimpleError({
278
278
  code: 'invalid_field',
279
279
  message: 'Invalid payment method',
280
- human: $t(`eb03febc-d83b-4789-bb4d-0d97d542edfa`),
280
+ human: $t(`%Ey`),
281
281
  field: 'method',
282
282
  });
283
283
  }
@@ -115,7 +115,7 @@ export class GetOrganizationRegistrationPeriodsEndpoint extends Endpoint<Params,
115
115
  code: 'client_update_required',
116
116
  statusCode: 400,
117
117
  message: 'Er is een noodzakelijke update beschikbaar. Herlaad de pagina en wis indien nodig de cache van jouw browser.',
118
- human: $t(`adb0e7c8-aed7-43f5-bfcc-a350f03aaabe`),
118
+ human: $t(`%G8`),
119
119
  });
120
120
  }
121
121
 
@@ -60,7 +60,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
60
60
  throw new SimpleError({
61
61
  code: 'not_found',
62
62
  message: 'Period not found',
63
- human: $t('347463a0-1e9a-40fe-996c-d77ba13bc05b'),
63
+ human: $t('%15j'),
64
64
  statusCode: 404,
65
65
  });
66
66
  }
@@ -71,7 +71,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
71
71
  throw new SimpleError({
72
72
  code: 'not_found',
73
73
  message: 'Period not found',
74
- human: $t('347463a0-1e9a-40fe-996c-d77ba13bc05b'),
74
+ human: $t('%15j'),
75
75
  statusCode: 404,
76
76
  });
77
77
  }
@@ -80,7 +80,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
80
80
  throw new SimpleError({
81
81
  code: 'locked_period',
82
82
  message: 'This period is locked',
83
- human: $t(`cc658db0-ee90-40fc-8a8c-1074a4f1f2f2`, { '2000-2001': period.getStructure().nameShort }),
83
+ human: $t(`%15m`, { '2000-2001': period.getStructure().nameShort }),
84
84
  });
85
85
  }
86
86
 
@@ -125,7 +125,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
125
125
  }
126
126
 
127
127
  if (!await Context.auth.canCreateGroupInCategory(organization.id, category)) {
128
- throw Context.auth.error($t(`cdee3a74-4c03-46bc-ade1-7b8275a85400`));
128
+ throw Context.auth.error($t(`%Ez`));
129
129
  }
130
130
 
131
131
  // Only process puts
@@ -149,7 +149,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
149
149
  code: 'invalid_field',
150
150
  field: 'categories',
151
151
  message: 'Cannot have groups and categories combined',
152
- human: $t(`c3834052-ea84-4d95-bc67-194e233cb11a`),
152
+ human: $t(`%F0`),
153
153
  });
154
154
  }
155
155
  }
@@ -170,7 +170,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
170
170
  const isDeleted = refCountAfter < refCountBefore;
171
171
 
172
172
  if (isDeleted) {
173
- throw Context.auth.error($t(`55ddf8ff-ffcf-4577-bcbf-78c82637f245`));
173
+ throw Context.auth.error($t(`%F1`));
174
174
  }
175
175
  }
176
176
 
@@ -178,11 +178,11 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
178
178
 
179
179
  if (!categoryAfter) {
180
180
  if (locked) {
181
- throw Context.auth.error($t(`55ddf8ff-ffcf-4577-bcbf-78c82637f245`));
181
+ throw Context.auth.error($t(`%F1`));
182
182
  }
183
183
  }
184
184
  else if (locked !== categoryAfter.settings.locked) {
185
- throw Context.auth.error($t(`a8982f4f-0c87-4f22-8f43-33ca26b73fc4`));
185
+ throw Context.auth.error($t(`%F2`));
186
186
  }
187
187
 
188
188
  if (!locked || !categoryAfter) {
@@ -193,7 +193,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
193
193
  const settingsAfter = categoryAfter.settings;
194
194
 
195
195
  if (settingsBefore.name !== settingsAfter.name) {
196
- throw Context.auth.error($t(`2529c09e-f582-486a-b3eb-a8b96d8efa26`));
196
+ throw Context.auth.error($t(`%F3`));
197
197
  }
198
198
  }
199
199
  }
@@ -219,7 +219,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
219
219
  throw new SimpleError({
220
220
  code: 'invalid_group_type',
221
221
  message: 'Cannot create groups for events via this endpoint',
222
- human: $t(`40dde58e-47fb-4adb-971a-537b16c479d5`),
222
+ human: $t(`%1HF`),
223
223
  });
224
224
  }
225
225
 
@@ -272,7 +272,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
272
272
  throw new SimpleError({
273
273
  code: 'invalid_default_age_group',
274
274
  message: 'Invalid default age group',
275
- human: $t(`d81fc0f4-14e5-499c-9749-dd8941cdeb45`),
275
+ human: $t(`%F4`),
276
276
  statusCode: 400,
277
277
  });
278
278
  }
@@ -280,7 +280,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
280
280
  throw new SimpleError({
281
281
  code: 'invalid_default_age_group',
282
282
  message: 'Invalid default age group',
283
- human: $t(`79672bcc-aa78-4d1d-ab82-f7c3c01ab4ff`),
283
+ human: $t(`%F5`),
284
284
  statusCode: 400,
285
285
  });
286
286
  }
@@ -292,7 +292,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
292
292
  throw new SimpleError({
293
293
  code: 'not_found',
294
294
  message: 'Period not found',
295
- human: $t('347463a0-1e9a-40fe-996c-d77ba13bc05b'),
295
+ human: $t('%15j'),
296
296
  statusCode: 404,
297
297
  });
298
298
  }
@@ -309,7 +309,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
309
309
  throw new SimpleError({
310
310
  code: 'locked_period',
311
311
  message: 'Period is locked',
312
- human: $t(`cc658db0-ee90-40fc-8a8c-1074a4f1f2f2`, { '2000-2001': period.getStructure().nameShort }),
312
+ human: $t(`%15m`, { '2000-2001': period.getStructure().nameShort }),
313
313
  });
314
314
  }
315
315
 
@@ -318,7 +318,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
318
318
  throw new SimpleError({
319
319
  code: 'invalid_field',
320
320
  message: 'Period start date is too far in the future',
321
- human: $t('2655c006-55af-47e6-959c-16acdb1917dc'),
321
+ human: $t('%15k'),
322
322
  field: 'period',
323
323
  });
324
324
  }
@@ -328,7 +328,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
328
328
  throw new SimpleError({
329
329
  code: 'invalid_field',
330
330
  message: 'Period has ended',
331
- human: $t('44ff6618-ecbf-408b-9cc1-b1479e8ba8a2'),
331
+ human: $t('%15l'),
332
332
  field: 'period',
333
333
  });
334
334
  }
@@ -363,7 +363,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
363
363
  static async deleteGroup(id: string) {
364
364
  const model = await Group.getByID(id);
365
365
  if (!model || !await Context.auth.canAccessGroup(model, PermissionLevel.Full)) {
366
- throw Context.auth.error($t(`ab05b3fe-fb52-49d7-a7d5-2d3bcc6dde3e`));
366
+ throw Context.auth.error($t(`%F6`));
367
367
  }
368
368
 
369
369
  model.deletedAt = new Date();
@@ -382,7 +382,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
382
382
  const model = await Group.getByID(struct.id);
383
383
 
384
384
  if (!model || !await Context.auth.canAccessGroup(model, PermissionLevel.Full)) {
385
- throw Context.auth.error($t(`0d382103-4a15-4f12-8e3d-feb4d184639d`));
385
+ throw Context.auth.error($t(`%F7`));
386
386
  }
387
387
 
388
388
  if (struct.settings) {
@@ -401,7 +401,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
401
401
  throw new SimpleError({
402
402
  code: 'missing_permissions',
403
403
  message: 'You cannot restrict your own permissions',
404
- human: $t(`8c220808-51af-4ea3-a941-9e9e39cd8d20`),
404
+ human: $t(`%F8`),
405
405
  });
406
406
  }
407
407
  }
@@ -440,7 +440,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
440
440
  throw new SimpleError({
441
441
  code: 'locked_period',
442
442
  message: 'This period is locked',
443
- human: Context.i18n.$t('f544b972-416c-471d-8836-d7f3b16f947d'),
443
+ human: Context.i18n.$t('%AW'),
444
444
  });
445
445
  }
446
446
  }
@@ -478,7 +478,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
478
478
  throw new SimpleError({
479
479
  code: 'locked_period',
480
480
  message: 'This period is locked',
481
- human: $t('e115a9d1-11a6-42b9-a781-c6ab9d8a4b9c'),
481
+ human: $t('%1HS'),
482
482
  });
483
483
  }
484
484
  }
@@ -536,7 +536,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
536
536
  code: 'invalid_field',
537
537
  field: 'periodId',
538
538
  message: 'Group has waiting list with other groups in the current period',
539
- human: $t('753684e1-94aa-4663-a81c-9656a51283ae'),
539
+ human: $t('%1HT'),
540
540
  });
541
541
  }
542
542
  }
@@ -591,7 +591,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
591
591
  code: 'invalid_field',
592
592
  field: 'waitingList',
593
593
  message: 'Waiting list group is already used in another period',
594
- human: $t(`b906c293-2afa-4ebe-9b33-2d64ab46da34`),
594
+ human: $t(`%F9`),
595
595
  });
596
596
  }
597
597
 
@@ -658,7 +658,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
658
658
 
659
659
  if (struct.type !== GroupType.EventRegistration && !allowedIds.includes(struct.id)) {
660
660
  if (!await Context.auth.hasFullAccess(organizationId)) {
661
- throw Context.auth.error($t(`153a7443-e2d9-4126-8e10-089b54964fb8`));
661
+ throw Context.auth.error($t(`%FA`));
662
662
  }
663
663
  }
664
664
  else {
@@ -669,7 +669,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
669
669
  throw new SimpleError({
670
670
  code: 'invalid_period',
671
671
  message: 'Period is locked',
672
- human: Context.i18n.$t('f544b972-416c-471d-8836-d7f3b16f947d'),
672
+ human: Context.i18n.$t('%AW'),
673
673
  });
674
674
  }
675
675
 
@@ -730,7 +730,7 @@ export class PatchOrganizationRegistrationPeriodsEndpoint extends Endpoint<Param
730
730
  throw new SimpleError({
731
731
  code: 'missing_permissions',
732
732
  message: 'You cannot restrict your own permissions',
733
- human: $t(`4f4e52b6-288d-4893-a82b-15be8d07acbc`),
733
+ human: $t(`%FB`),
734
734
  });
735
735
  }
736
736
  }
@@ -39,7 +39,7 @@ export class DeleteStripeAccountEndpoint extends Endpoint<Params, Query, Body, R
39
39
  // Search account in database
40
40
  const model = await StripeAccount.getByID(request.params.id);
41
41
  if (!model || model.organizationId !== organization.id || model.status !== 'active') {
42
- throw Context.auth.notFoundOrNoAccess($t(`e5f6d64c-b3fe-4c8a-a711-ebdb14098c98`));
42
+ throw Context.auth.notFoundOrNoAccess($t(`%FC`));
43
43
  }
44
44
 
45
45
  if (STAMHOOFD.STRIPE_ACCOUNT_ID && model.accountId === STAMHOOFD.STRIPE_ACCOUNT_ID) {
@@ -57,7 +57,7 @@ export class GetStripeAccountLinkEndpoint extends Endpoint<Params, Query, Body,
57
57
  // Search account in database
58
58
  const model = await StripeAccount.getByID(request.body.accountId);
59
59
  if (!model || model.organizationId !== organization.id || model.status !== 'active') {
60
- throw Context.auth.notFoundOrNoAccess($t(`e5f6d64c-b3fe-4c8a-a711-ebdb14098c98`));
60
+ throw Context.auth.notFoundOrNoAccess($t(`%FC`));
61
61
  }
62
62
 
63
63
  // Get account
@@ -53,7 +53,7 @@ export class GetStripeLoginLinkEndpoint extends Endpoint<Params, Query, Body, Re
53
53
  if (!model || model.organizationId !== organization.id || model.status !== 'active') {
54
54
  throw new SimpleError({
55
55
  code: 'not_found',
56
- message: $t(`e5f6d64c-b3fe-4c8a-a711-ebdb14098c98`),
56
+ message: $t(`%FC`),
57
57
  statusCode: 400,
58
58
  });
59
59
  }
@@ -38,7 +38,7 @@ export class UpdateStripeAccountEndpoint extends Endpoint<Params, Query, Body, R
38
38
  // Search account in database
39
39
  const model = await StripeAccount.getByID(request.params.id);
40
40
  if (!model || model.organizationId !== organization.id) {
41
- throw Context.auth.notFoundOrNoAccess($t(`e5f6d64c-b3fe-4c8a-a711-ebdb14098c98`));
41
+ throw Context.auth.notFoundOrNoAccess($t(`%FC`));
42
42
  }
43
43
 
44
44
  // Get account
@@ -61,7 +61,7 @@ export class CreateApiUserEndpoint extends Endpoint<Params, Query, Body, Respons
61
61
  const rateLimits = request.body.meta.rateLimits;
62
62
  if (rateLimits) {
63
63
  if (!Context.auth.hasPlatformFullAccess()) {
64
- throw Context.auth.error($t('370932fc-6614-44be-bb8f-ff921305fadd'));
64
+ throw Context.auth.error($t('%FD'));
65
65
  }
66
66
 
67
67
  admin.meta = admin.meta ?? UserMeta.create({});
@@ -41,7 +41,7 @@ export class DeleteUserEndpoint extends Endpoint<Params, Query, Body, ResponseBo
41
41
  if (user.id == request.params.id) {
42
42
  throw new SimpleError({
43
43
  code: 'permission_denied',
44
- message: $t(`253f8a6e-bef8-4a3a-8a7c-2580d8bad49c`),
44
+ message: $t(`%FE`),
45
45
  });
46
46
  }
47
47
 
@@ -49,7 +49,7 @@ export class DeleteUserEndpoint extends Endpoint<Params, Query, Body, ResponseBo
49
49
  if (!editUser || !Context.auth.checkScope(editUser.organizationId)) {
50
50
  throw new SimpleError({
51
51
  code: 'permission_denied',
52
- message: $t(`dd63dfe1-1a13-476b-b729-10b9df944e88`),
52
+ message: $t(`%FF`),
53
53
  });
54
54
  }
55
55
 
@@ -41,7 +41,7 @@ export class PatchApiUserEndpoint extends Endpoint<Params, Query, Body, Response
41
41
  const editUser = request.body.id === user.id ? user : await User.getByID(request.body.id);
42
42
 
43
43
  if (!editUser || !await Context.auth.canAccessUser(editUser, PermissionLevel.Write) || !editUser.isApiUser) {
44
- throw Context.auth.notFoundOrNoAccess($t(`cd099f48-7a5e-4993-854d-697104201871`));
44
+ throw Context.auth.notFoundOrNoAccess($t(`%FG`));
45
45
  }
46
46
 
47
47
  editUser.firstName = request.body.name ?? editUser.name;
@@ -96,7 +96,7 @@ export class PatchApiUserEndpoint extends Endpoint<Params, Query, Body, Response
96
96
  const rateLimits = request.body.meta.rateLimits;
97
97
  if (rateLimits && rateLimits !== editUser.meta?.rateLimits) {
98
98
  if (!Context.auth.hasPlatformFullAccess()) {
99
- throw Context.auth.error($t('370932fc-6614-44be-bb8f-ff921305fadd'));
99
+ throw Context.auth.error($t('%FD'));
100
100
  }
101
101
 
102
102
  editUser.meta = editUser.meta ?? UserMeta.create({});
@@ -38,7 +38,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
38
38
 
39
39
  // Fast throw first (more in depth checking for patches later)
40
40
  if (!await Context.auth.canCreateWebshops(organization.id)) {
41
- throw Context.auth.error($t(`e97dabba-7c7f-4705-b5be-fa4ea9f701ed`));
41
+ throw Context.auth.error($t(`%FH`));
42
42
  }
43
43
 
44
44
  const errors = new SimpleErrors();
@@ -141,7 +141,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
141
141
  throw new SimpleError({
142
142
  code: 'failed_to_generate_unique_uri',
143
143
  message: 'Failed to generate unique uri',
144
- human: $t(`a159e71b-e975-48c0-a33b-fdb52ad22299`),
144
+ human: $t(`%FI`),
145
145
  statusCode: 500,
146
146
  });
147
147
  }
@@ -168,7 +168,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
168
168
  throw new SimpleError({
169
169
  code: 'missing_permissions',
170
170
  message: 'You cannot create a webshop without having full permissions on the created webshop',
171
- human: $t(`28f1afe6-b40d-495c-a58e-2b665c20a294`),
171
+ human: $t(`%FJ`),
172
172
  });
173
173
  }
174
174
 
@@ -211,7 +211,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
211
211
  throw new SimpleError({
212
212
  code: 'failed_to_generate_unique_domainUri',
213
213
  message: 'Failed to generate unique domainUri',
214
- human: $t(`a159e71b-e975-48c0-a33b-fdb52ad22299`),
214
+ human: $t(`%FI`),
215
215
  statusCode: 500,
216
216
  });
217
217
  }
@@ -47,7 +47,7 @@ export class DeleteWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
47
47
  throw new SimpleError({
48
48
  code: 'webshop_has_registered_ticket_sales',
49
49
  message: `Webshop ${webshop.id} has registered ticket sales`,
50
- human: $t(`0b3d6ea1-a70b-428c-9ba4-cc0c327ed415`),
50
+ human: $t(`%1DL`),
51
51
  });
52
52
  }
53
53
 
@@ -66,7 +66,7 @@ export class PatchWebshopDiscountCodesEndpoint extends Endpoint<Params, Query, B
66
66
  throw new SimpleError({
67
67
  code: 'used_code',
68
68
  message: 'Discount code already in use',
69
- human: $t(`d8cf1267-28dd-4d70-9f5f-1ed800729f6d`) + ' ' + struct.code + $t(`9145b0bf-8539-4ddc-8867-859f8716f026`),
69
+ human: $t(`%FK`) + ' ' + struct.code + $t(`%FL`),
70
70
  });
71
71
  }
72
72
  throw e;
@@ -98,7 +98,7 @@ export class PatchWebshopDiscountCodesEndpoint extends Endpoint<Params, Query, B
98
98
  throw new SimpleError({
99
99
  code: 'used_code',
100
100
  message: 'Discount code already in use',
101
- human: $t(`d8cf1267-28dd-4d70-9f5f-1ed800729f6d`) + ' ' + model.code + $t(`9145b0bf-8539-4ddc-8867-859f8716f026`),
101
+ human: $t(`%FK`) + ' ' + model.code + $t(`%FL`),
102
102
  });
103
103
  }
104
104
  throw e;
@@ -53,7 +53,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
53
53
  if (request.body.meta) {
54
54
  request.body.meta.domainActive = undefined;
55
55
  if (request.body.meta.customCode !== undefined && !await Context.auth.hasFullAccess(organization.id)) {
56
- throw Context.auth.error($t('c8e499c2-8d90-480c-a15e-d9da5291b40e'));
56
+ throw Context.auth.error($t('%15n'));
57
57
  }
58
58
  webshop.meta.patchOrPut(request.body.meta);
59
59
  }
@@ -94,7 +94,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
94
94
  throw new SimpleError({
95
95
  code: 'domain_already_used',
96
96
  message: 'This domain is already used by another organization',
97
- human: $t(`91e43562-956f-41ac-b5b6-a8bcb63edd66`),
97
+ human: $t(`%FM`),
98
98
  statusCode: 400,
99
99
  });
100
100
  }
@@ -110,7 +110,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
110
110
  throw new SimpleError({
111
111
  code: 'invalid_field',
112
112
  message: 'Invalid domain',
113
- human: $t(`0aa565ac-c12a-4b38-9612-0a615e6a67e0`),
113
+ human: $t(`%FN`),
114
114
  field: 'customUrl',
115
115
  });
116
116
  }
@@ -131,7 +131,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
131
131
  throw new SimpleError({
132
132
  code: 'invalid_field',
133
133
  message: 'domainUri contains invalid characters',
134
- human: $t(`4e842c04-da6c-4690-a187-665fa4a60bae`),
134
+ human: $t(`%FO`),
135
135
  field: 'customUrl',
136
136
  });
137
137
  }
@@ -142,7 +142,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
142
142
  throw new SimpleError({
143
143
  code: 'invalid_domain',
144
144
  message: 'This domain is already in use',
145
- human: $t(`11064157-89fd-4c12-b56a-1f5f236a010d`) + ' ' + existing.meta.name + $t(`42dccb0d-88b1-4a18-9250-04aa969b1299`),
145
+ human: $t(`%FP`) + ' ' + existing.meta.name + $t(`%FQ`),
146
146
  });
147
147
  }
148
148
  }
@@ -162,7 +162,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
162
162
  throw new SimpleError({
163
163
  code: 'invalid_field',
164
164
  message: 'Uri cannot be empty',
165
- human: $t(`6af872f3-4547-4fd2-8949-0163e6473c04`),
165
+ human: $t(`%FR`),
166
166
  field: 'uri',
167
167
  });
168
168
  }
@@ -171,7 +171,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
171
171
  throw new SimpleError({
172
172
  code: 'invalid_field',
173
173
  message: 'Uri contains invalid characters',
174
- human: $t(`4e842c04-da6c-4690-a187-665fa4a60bae`),
174
+ human: $t(`%FO`),
175
175
  field: 'uri',
176
176
  });
177
177
  }
@@ -184,7 +184,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
184
184
  throw new SimpleError({
185
185
  code: 'missing_permissions',
186
186
  message: 'You cannot restrict your own permissions',
187
- human: $t(`0b70b194-296a-457e-804b-abe800bd5b4c`),
187
+ human: $t(`%FS`),
188
188
  });
189
189
  }
190
190
 
@@ -197,7 +197,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
197
197
  throw new SimpleError({
198
198
  code: 'invalid_field',
199
199
  message: 'Uri already in use',
200
- human: $t(`17267b0d-0be9-4d04-b837-7687da20347f`),
200
+ human: $t(`%FT`),
201
201
  field: 'uri',
202
202
  });
203
203
  }
@@ -42,7 +42,7 @@ export class PatchWebshopTicketsEndpoint extends Endpoint<Params, Query, Body, R
42
42
 
43
43
  const webshop = await Webshop.getByID(request.params.id);
44
44
  if (!webshop || !await Context.auth.canAccessWebshopTickets(webshop, PermissionLevel.Write)) {
45
- throw Context.auth.notFoundOrNoAccess($t(`b4969b2f-c128-44ed-a8de-279c1dd55382`));
45
+ throw Context.auth.notFoundOrNoAccess($t(`%FU`));
46
46
  }
47
47
 
48
48
  const tickets: Ticket[] = [];