@stamhoofd/backend 2.118.0 → 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
@@ -57,7 +57,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
57
57
  throw new SimpleError({
58
58
  code: 'not_supported',
59
59
  message: 'This version is no longer supported',
60
- human: $t(`47f56c92-fcfb-4ef4-8d0b-fb0c959fb624`),
60
+ human: $t(`%vd`),
61
61
  });
62
62
  }
63
63
  return [true, params as Params];
@@ -78,7 +78,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
78
78
  throw new SimpleError({
79
79
  code: 'forbidden',
80
80
  message: 'No permission to register members manually',
81
- human: $t(`62fe6e39-f6b0-4836-b0f7-dc84d22a81e3`),
81
+ human: $t(`%ve`),
82
82
  statusCode: 403,
83
83
  });
84
84
  }
@@ -93,7 +93,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
93
93
  throw new SimpleError({
94
94
  code: 'forbidden',
95
95
  message: 'No permission to checkout as this organization for a different organization',
96
- human: $t(`eff21f4c-2d50-4553-9eb9-8a9e399f4124`),
96
+ human: $t(`%1HR`),
97
97
  statusCode: 403,
98
98
  });
99
99
  }
@@ -118,7 +118,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
118
118
  throw new SimpleError({
119
119
  code: 'too_many_emails_period',
120
120
  message: 'Too many e-mails limited',
121
- human: $t(`28fb7a27-9b8e-44e0-833b-44c72ab61306`),
121
+ human: $t(`%vf`),
122
122
  field: 'recipients',
123
123
  });
124
124
  }
@@ -139,7 +139,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
139
139
  if (balanceItemsModels.length !== balanceItemIds.length) {
140
140
  throw new SimpleError({
141
141
  code: 'invalid_data',
142
- message: $t(`3e10f812-8871-458c-ae03-c508abfd3ca5`),
142
+ message: $t(`%vg`),
143
143
  });
144
144
  }
145
145
  memberBalanceItemsStructs = balanceItemsModels.map(i => i.getStructure());
@@ -163,7 +163,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
163
163
  if (group.organizationId !== organization.id) {
164
164
  throw new SimpleError({
165
165
  code: 'invalid_data',
166
- message: $t(`57d57c76-4e76-4b0e-93b5-57ef8025f5ec`),
166
+ message: $t(`%vh`),
167
167
  });
168
168
  }
169
169
  }
@@ -178,7 +178,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
178
178
  throw new SimpleError({
179
179
  code: 'forbidden',
180
180
  message: 'No permission to register this member',
181
- human: $t(`7b7c4b2b-f30c-4cad-ba13-caad591bafde`),
181
+ human: $t(`%vi`),
182
182
  statusCode: 403,
183
183
  });
184
184
  }
@@ -242,7 +242,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
242
242
  throw new SimpleError({
243
243
  code: 'forbidden',
244
244
  message: 'No permission to register as this organization for a different organization',
245
- human: $t(`62fe6e39-f6b0-4836-b0f7-dc84d22a81e3`),
245
+ human: $t(`%ve`),
246
246
  statusCode: 403,
247
247
  });
248
248
  }
@@ -278,7 +278,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
278
278
  if (checkout.cart.isEmpty) {
279
279
  throw new SimpleError({
280
280
  code: 'empty_data',
281
- message: $t(`29d8bd5c-da83-49b9-a822-c44db58edd1a`),
281
+ message: $t(`%vj`),
282
282
  });
283
283
  }
284
284
 
@@ -298,7 +298,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
298
298
  // This never leaks information because in this case the user already has full access to the organization (asOrganizationId) or the member
299
299
  throw new SimpleError({
300
300
  code: 'changed_price',
301
- message: $t(`e424d549-2bb8-4103-9a14-ac4063d7d454`, { total: Formatter.price(totalPrice) }),
301
+ message: $t(`%vk`, { total: Formatter.price(totalPrice) }),
302
302
  });
303
303
  }
304
304
  }
@@ -318,7 +318,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
318
318
  if (!member) {
319
319
  throw new SimpleError({
320
320
  code: 'invalid_member',
321
- message: $t(`bded79ec-0c69-47b1-9944-b9f3821b566e`),
321
+ message: $t(`%vm`),
322
322
  });
323
323
  }
324
324
 
@@ -326,7 +326,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
326
326
  if (!group) {
327
327
  throw new SimpleError({
328
328
  code: 'invalid_member',
329
- message: $t(`c4896202-dd3b-4445-a530-3fed231259c2`),
329
+ message: $t(`%vn`),
330
330
  });
331
331
  }
332
332
 
@@ -336,7 +336,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
336
336
  throw new SimpleError({
337
337
  code: 'forbidden',
338
338
  message: 'No permission to register in this group',
339
- human: $t('36e8f895-91df-4c88-88e7-d4f0e9d1b5bf', { group: group.settings.name.toString() }),
339
+ human: $t('%C9', { group: group.settings.name.toString() }),
340
340
  statusCode: 403,
341
341
  });
342
342
  }
@@ -359,7 +359,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
359
359
  if (existingRegistration.registeredAt !== null && existingRegistration.deactivatedAt === null) {
360
360
  throw new SimpleError({
361
361
  code: 'already_registered',
362
- message: $t(`04d77a26-25c2-4a3e-a268-98bea9df45a2`, { member: member.firstName, group: group.settings.name }),
362
+ message: $t(`%vo`, { member: member.firstName, group: group.settings.name }),
363
363
  });
364
364
  }
365
365
  }
@@ -469,7 +469,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
469
469
  throw new SimpleError({
470
470
  code: 'forbidden',
471
471
  message: 'Permission denied: you are not allowed to delete registrations',
472
- human: $t(`d47bdfdd-5940-4818-a664-1cd072294a26`),
472
+ human: $t(`%vr`),
473
473
  statusCode: 403,
474
474
  });
475
475
  }
@@ -478,7 +478,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
478
478
  if (!existingRegistration || existingRegistration.organizationId !== organization.id) {
479
479
  throw new SimpleError({
480
480
  code: 'invalid_data',
481
- message: $t(`282a7491-d129-4e43-9a14-e55c72ef5c5d`),
481
+ message: $t(`%vs`),
482
482
  });
483
483
  }
484
484
 
@@ -486,7 +486,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
486
486
  throw new SimpleError({
487
487
  code: 'forbidden',
488
488
  message: 'No permission to delete this registration',
489
- human: $t(`9b772fd5-a36e-4997-85fa-251bb3a97a0a`),
489
+ human: $t(`%vt`),
490
490
  statusCode: 403,
491
491
  });
492
492
  }
@@ -495,7 +495,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
495
495
  throw new SimpleError({
496
496
  code: 'invalid_data',
497
497
  message: 'Cannot delete inactive registration',
498
- human: $t(`a0f43131-c880-4a8e-98e3-bf78df27336c`),
498
+ human: $t(`%vu`),
499
499
  });
500
500
  }
501
501
 
@@ -123,7 +123,7 @@ export class GetRegistrationPeriodsEndpoint extends Endpoint<Params, Query, Body
123
123
  code: 'client_update_required',
124
124
  statusCode: 400,
125
125
  message: 'Er is een noodzakelijke update beschikbaar. Herlaad de pagina en wis indien nodig de cache van jouw browser.',
126
- human: $t(`adb0e7c8-aed7-43f5-bfcc-a350f03aaabe`),
126
+ human: $t(`%G8`),
127
127
  });
128
128
  }
129
129
 
@@ -42,7 +42,7 @@ export class PatchRegistrationPeriodsEndpoint extends Endpoint<Params, Query, Bo
42
42
  throw new SimpleError({
43
43
  code: 'only_platform',
44
44
  message: 'Period id should only be used if userMode is platform',
45
- human: $t(`8a50ee7d-f37e-46cc-9ce7-30c7b37cefe8`),
45
+ human: $t(`%1AD`),
46
46
  });
47
47
  }
48
48
 
@@ -80,7 +80,7 @@ export class PatchRegistrationPeriodsEndpoint extends Endpoint<Params, Query, Bo
80
80
  if (put.endDate < put.startDate) {
81
81
  throw new SimpleError({
82
82
  code: 'invalid_field',
83
- message: $t('186723cd-2cd4-45fd-aa9c-020c9d92b225'),
83
+ message: $t('%1Gv'),
84
84
  field: 'endDate',
85
85
  });
86
86
  }
@@ -102,7 +102,7 @@ export class PatchRegistrationPeriodsEndpoint extends Endpoint<Params, Query, Bo
102
102
  throw new SimpleError({
103
103
  code: 'cannot_lock_current_period',
104
104
  message: 'Current registration period cannot be locked',
105
- human: $t(`1401fb57-4172-4211-acdb-0afbc87af86e`),
105
+ human: $t(`%EJ`),
106
106
  });
107
107
  }
108
108
  }
@@ -131,7 +131,7 @@ export class PatchRegistrationPeriodsEndpoint extends Endpoint<Params, Query, Bo
131
131
  throw new SimpleError({
132
132
  code: 'cannot_lock_current_period',
133
133
  message: 'Current registration period cannot be locked',
134
- human: $t(`1401fb57-4172-4211-acdb-0afbc87af86e`),
134
+ human: $t(`%EJ`),
135
135
  });
136
136
  }
137
137
  }
@@ -148,7 +148,7 @@ export class PatchRegistrationPeriodsEndpoint extends Endpoint<Params, Query, Bo
148
148
  if ((patch.startDate || patch.endDate) && model.endDate < model.startDate) {
149
149
  throw new SimpleError({
150
150
  code: 'invalid_field',
151
- message: $t('186723cd-2cd4-45fd-aa9c-020c9d92b225'),
151
+ message: $t('%1Gv'),
152
152
  field: 'endDate',
153
153
  });
154
154
  }
@@ -40,7 +40,7 @@ export class GetBalanceItemEndpoint extends Endpoint<Params, Query, Body, Respon
40
40
  code: 'not_found',
41
41
  statusCode: 404,
42
42
  message: 'Balance item not found',
43
- human: $t('7bc08947-2409-4a7c-b597-2d6d43884a96'),
43
+ human: $t('%1L6'),
44
44
  });
45
45
  }
46
46
 
@@ -99,7 +99,7 @@ export class GetBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Respo
99
99
  throw new SimpleError({
100
100
  code: 'timeout',
101
101
  message: 'Query took too long',
102
- human: $t(`dce51638-6129-448b-8a15-e6d778f3a76a`),
102
+ human: $t(`%Cv`),
103
103
  });
104
104
  }
105
105
  throw error;
@@ -74,13 +74,13 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
74
74
  if (put.payingOrganizationId) {
75
75
  // Not allowed if not full admin
76
76
  if (!Context.auth.hasPlatformFullAccess()) {
77
- throw Context.auth.error($t(`fafaf0c2-cbf4-4f5b-8669-eb09303efe1e`));
77
+ throw Context.auth.error($t(`%Ef`));
78
78
  }
79
79
  if (put.payingOrganizationId === model.organizationId) {
80
80
  throw new SimpleError({
81
81
  code: 'invalid_field',
82
82
  message: 'payingOrganizationId cannot be the same as organizationId',
83
- human: $t(`7b181446-ef56-4957-ad13-54644e6d0987`),
83
+ human: $t(`%Eg`),
84
84
  field: 'payingOrganizationId',
85
85
  });
86
86
  }
@@ -92,7 +92,7 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
92
92
  throw new SimpleError({
93
93
  code: 'invalid_price',
94
94
  message: 'Cannot create negative balance in the future',
95
- human: $t(`ad8ee48a-8176-4b5f-b6fc-54bc615c2564`),
95
+ human: $t(`%Eh`),
96
96
  });
97
97
  }
98
98
 
@@ -100,7 +100,7 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
100
100
  throw new SimpleError({
101
101
  code: 'invalid_field',
102
102
  message: 'createdAt cannot be in the future',
103
- human: $t(`8bdc9bf1-1d05-4579-9cc4-7fe11c1f031b`),
103
+ human: $t(`%Ei`),
104
104
  field: 'createdAt',
105
105
  });
106
106
  }
@@ -130,13 +130,13 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
130
130
  if (patch.payingOrganizationId !== undefined) {
131
131
  // Not allowed if not full admin
132
132
  if (!Context.auth.hasPlatformFullAccess()) {
133
- throw Context.auth.error($t(`fafaf0c2-cbf4-4f5b-8669-eb09303efe1e`));
133
+ throw Context.auth.error($t(`%Ef`));
134
134
  }
135
135
  if (patch.payingOrganizationId === model.organizationId) {
136
136
  throw new SimpleError({
137
137
  code: 'invalid_field',
138
138
  message: 'payingOrganizationId cannot be the same as organizationId',
139
- human: $t(`7b181446-ef56-4957-ad13-54644e6d0987`),
139
+ human: $t(`%Eg`),
140
140
  field: 'payingOrganizationId',
141
141
  });
142
142
  }
@@ -158,7 +158,7 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
158
158
  throw new SimpleError({
159
159
  code: 'invalid_field',
160
160
  message: 'No user or member provided',
161
- human: $t(`ace2c298-5b2a-42cd-900d-624e1e375aeb`),
161
+ human: $t(`%Ej`),
162
162
  field: 'memberId',
163
163
  });
164
164
  }
@@ -176,7 +176,7 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
176
176
  throw new SimpleError({
177
177
  code: 'invalid_field',
178
178
  message: 'createdAt cannot be in the future',
179
- human: $t(`8bdc9bf1-1d05-4579-9cc4-7fe11c1f031b`),
179
+ human: $t(`%Ei`),
180
180
  field: 'createdAt',
181
181
  });
182
182
  }
@@ -194,7 +194,7 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
194
194
  throw new SimpleError({
195
195
  code: 'invalid_price',
196
196
  message: 'Cannot create negative balance in the future',
197
- human: $t(`ad8ee48a-8176-4b5f-b6fc-54bc615c2564`),
197
+ human: $t(`%Eh`),
198
198
  field: 'dueAt',
199
199
  });
200
200
  }
@@ -248,7 +248,7 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
248
248
  throw new SimpleError({
249
249
  code: 'permission_denied',
250
250
  message: 'No permission to link balance items to this member',
251
- human: $t(`59197811-88ca-423c-b3b1-940d3c42704d`),
251
+ human: $t(`%Ek`),
252
252
  field: 'memberId',
253
253
  });
254
254
  }
@@ -262,7 +262,7 @@ export class PatchBalanceItemsEndpoint extends Endpoint<Params, Query, Body, Res
262
262
  throw new SimpleError({
263
263
  code: 'permission_denied',
264
264
  message: 'No permission to link balance items to this user',
265
- human: $t(`2ca03c93-d221-4a02-93be-9f187426f563`),
265
+ human: $t(`%El`),
266
266
  field: 'userId',
267
267
  });
268
268
  }
@@ -37,7 +37,7 @@ export class GetDocumentTemplateXMLEndpoint extends Endpoint<Params, Query, Body
37
37
 
38
38
  const template = await DocumentTemplate.getByID(request.params.id);
39
39
  if (!template || !await Context.auth.canAccessDocumentTemplate(template)) {
40
- throw Context.auth.notFoundOrNoAccess($t(`a9860203-6a6d-4612-b4d4-7851e47d4dad`));
40
+ throw Context.auth.notFoundOrNoAccess($t(`%EK`));
41
41
  }
42
42
 
43
43
  // Update documents
@@ -40,7 +40,7 @@ export class PatchDocumentEndpoint extends Endpoint<Params, Query, Body, Respons
40
40
  for (const patch of request.body.getPatches()) {
41
41
  const document = await Document.getByID(patch.id);
42
42
  if (!document || !(await Context.auth.canAccessDocument(document, PermissionLevel.Write))) {
43
- throw Context.auth.notFoundOrNoAccess($t(`a9860203-6a6d-4612-b4d4-7851e47d4dad`));
43
+ throw Context.auth.notFoundOrNoAccess($t(`%EK`));
44
44
  }
45
45
 
46
46
  if (patch.data) {
@@ -57,7 +57,7 @@ export class PatchDocumentEndpoint extends Endpoint<Params, Query, Body, Respons
57
57
  throw new SimpleError({
58
58
  code: 'not_found',
59
59
  message: 'Document not found',
60
- human: $t(`b6ffe33d-566e-4c9a-85b2-82930d653548`),
60
+ human: $t(`%EL`),
61
61
  });
62
62
  }
63
63
 
@@ -78,7 +78,7 @@ export class PatchDocumentEndpoint extends Endpoint<Params, Query, Body, Respons
78
78
  throw new SimpleError({
79
79
  code: 'not_found',
80
80
  message: 'Document template not found',
81
- human: $t(`f428c3d5-9b0f-485b-971e-b7e5d76533d4`),
81
+ human: $t(`%EM`),
82
82
  });
83
83
  }
84
84
  const document = new Document();
@@ -97,7 +97,7 @@ export class PatchDocumentEndpoint extends Endpoint<Params, Query, Body, Respons
97
97
  throw new SimpleError({
98
98
  code: 'not_found',
99
99
  message: 'Registration not found',
100
- human: $t(`5756fd57-7f2b-4ce4-8be1-ba0dd4313c75`),
100
+ human: $t(`%EN`),
101
101
  });
102
102
  }
103
103
  document.registrationId = put.registrationId;
@@ -109,7 +109,7 @@ export class PatchDocumentEndpoint extends Endpoint<Params, Query, Body, Respons
109
109
  throw new SimpleError({
110
110
  code: 'not_found',
111
111
  message: 'Member not found',
112
- human: $t(`9cfa48c7-980c-4cd5-85ed-2656db040b4c`),
112
+ human: $t(`%EO`),
113
113
  });
114
114
  }
115
115
  document.memberId = put.memberId;
@@ -67,7 +67,7 @@ export class PatchDocumentTemplatesEndpoint extends Endpoint<Params, Query, Body
67
67
  for (const patch of request.body.getPatches()) {
68
68
  const template = await DocumentTemplate.getByID(patch.id);
69
69
  if (!template || !await Context.auth.canAccessDocumentTemplate(template, PermissionLevel.Full)) {
70
- throw Context.auth.notFoundOrNoAccess($t(`148bfab7-ca0e-4fac-8a0a-302ca7855fc8`));
70
+ throw Context.auth.notFoundOrNoAccess($t(`%EP`));
71
71
  }
72
72
 
73
73
  let shouldCheckIfAlreadyHasFiscalDocument = false;
@@ -124,7 +124,7 @@ export class PatchDocumentTemplatesEndpoint extends Endpoint<Params, Query, Body
124
124
  throw new SimpleError({
125
125
  code: 'not_found',
126
126
  message: 'Template not found',
127
- human: $t(`10aa55e6-5ad6-4ac1-8e7f-3a414e26e22e`),
127
+ human: $t(`%EQ`),
128
128
  });
129
129
  }
130
130
 
@@ -158,7 +158,7 @@ export class PatchDocumentTemplatesEndpoint extends Endpoint<Params, Query, Body
158
158
  code: 'double_fiscal_document',
159
159
  field: 'year',
160
160
  message: 'This year already has a fiscal document',
161
- human: $t('475f5f96-86bf-4124-a005-9904aaf72b37'),
161
+ human: $t('%1IS'),
162
162
  });
163
163
  }
164
164
  }
@@ -42,7 +42,7 @@ export class CheckEmailBouncesEndpoint extends Endpoint<Params, Query, Body, Res
42
42
  throw new SimpleError({
43
43
  code: 'too_many_recipients',
44
44
  message: 'Too many recipients',
45
- human: $t(`0a406ba7-037a-405b-93f8-de308a66f3e3`),
45
+ human: $t(`%ER`),
46
46
  field: 'recipients',
47
47
  });
48
48
  }
@@ -43,7 +43,7 @@ export class PatchEmailTemplatesEndpoint extends Endpoint<Params, Query, Body, R
43
43
  for (const patch of request.body.getPatches()) {
44
44
  const template = await EmailTemplate.getByID(patch.id);
45
45
  if (!template || !(await Context.auth.canAccessEmailTemplate(template, PermissionLevel.Write))) {
46
- throw Context.auth.notFoundOrNoAccess($t(`ca80fb17-1557-491f-9e9d-554d842a74d7`));
46
+ throw Context.auth.notFoundOrNoAccess($t(`%ES`));
47
47
  }
48
48
 
49
49
  template.html = patch.html ?? template.html;
@@ -98,7 +98,7 @@ export class PatchEmailTemplatesEndpoint extends Endpoint<Params, Query, Body, R
98
98
 
99
99
  // Check if valid + write permissions
100
100
  if (!(await Context.auth.canAccessEmailTemplate(template, PermissionLevel.Write))) {
101
- throw Context.auth.error($t(`a2afb95e-1dc5-452d-a919-70720fd4e8a6`));
101
+ throw Context.auth.error($t(`%ET`));
102
102
  }
103
103
 
104
104
  await template.save();
@@ -109,7 +109,7 @@ export class PatchEmailTemplatesEndpoint extends Endpoint<Params, Query, Body, R
109
109
  for (const id of request.body.getDeletes()) {
110
110
  const template = await EmailTemplate.getByID(id);
111
111
  if (!template || !(await Context.auth.canAccessEmailTemplate(template, PermissionLevel.Write))) {
112
- throw Context.auth.notFoundOrNoAccess($t(`54599fe6-d0a3-471d-bbe4-b41c367f9aa2`));
112
+ throw Context.auth.notFoundOrNoAccess($t(`%EU`));
113
113
  }
114
114
 
115
115
  await template.delete();
@@ -158,7 +158,7 @@ export class GetInvoicesEndpoint extends Endpoint<Params, Query, Body, ResponseB
158
158
  throw new SimpleError({
159
159
  code: 'timeout',
160
160
  message: 'Query took too long',
161
- human: $t(`dce51638-6129-448b-8a15-e6d778f3a76a`),
161
+ human: $t(`%Cv`),
162
162
  });
163
163
  }
164
164
  throw error;
@@ -51,7 +51,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
51
51
  throw new SimpleError({
52
52
  code: 'permission_denied',
53
53
  message: 'You do not have permissions to edit an inactive organization',
54
- human: $t(`b33ba9f0-c12d-4918-ac9d-7aeec5de41a5`),
54
+ human: $t(`%EV`),
55
55
  statusCode: 403,
56
56
  });
57
57
  }
@@ -77,7 +77,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
77
77
  code: 'invalid_field',
78
78
  message: 'Name is too short',
79
79
  field: 'name',
80
- human: $t('50b198a4-af37-4514-8d82-b9e4c41d9e91'),
80
+ human: $t('%1L7'),
81
81
  });
82
82
  }
83
83
  organization.name = request.body.name ?? organization.name;
@@ -97,7 +97,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
97
97
  throw new SimpleError({
98
98
  code: 'invalid_field',
99
99
  message: 'Field is too long',
100
- human: $t(`864675a2-7376-4a61-9c7d-f488e7906d7b`),
100
+ human: $t(`%EW`),
101
101
  field: 'uri',
102
102
  });
103
103
  }
@@ -106,7 +106,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
106
106
  throw new SimpleError({
107
107
  code: 'invalid_field',
108
108
  message: 'Field is too short',
109
- human: $t(`0fa660da-1e74-4940-af88-eafafb1094b6`),
109
+ human: $t(`%EX`),
110
110
  field: 'uri',
111
111
  });
112
112
  }
@@ -116,7 +116,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
116
116
  throw new SimpleError({
117
117
  code: 'name_taken',
118
118
  message: 'An organization with the same URI already exists',
119
- human: $t(`daa7dc61-e8c9-4629-97b6-a75f39eaebac`),
119
+ human: $t(`%EY`),
120
120
  field: 'uri',
121
121
  });
122
122
  }
@@ -329,7 +329,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
329
329
  throw new SimpleError({
330
330
  code: 'invalid_field',
331
331
  message: 'You cannot set the uitpasClientCredentialsStatus manually',
332
- human: $t('d8937ba8-6689-4c76-9841-d5a00c99074b'),
332
+ human: $t('%1BB'),
333
333
  });
334
334
  }
335
335
 
@@ -357,7 +357,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
357
357
 
358
358
  if (request.body.active !== undefined) {
359
359
  if (!Context.auth.hasPlatformFullAccess()) {
360
- throw Context.auth.error($t(`e46f34cd-f166-421e-be97-28ccecdf9c73`));
360
+ throw Context.auth.error($t(`%EZ`));
361
361
  }
362
362
  organization.active = request.body.active;
363
363
  }
@@ -373,7 +373,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
373
373
  throw new SimpleError({
374
374
  code: 'name_taken',
375
375
  message: 'An organization with the same name already exists',
376
- human: $t(`6e675a7d-b124-4507-bf0c-9b70013e98ca`),
376
+ human: $t(`%D2`),
377
377
  field: 'name',
378
378
  });
379
379
  }
@@ -387,7 +387,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
387
387
  throw new SimpleError({
388
388
  code: 'invalid_field',
389
389
  message: 'The period you want to set does not exist (anymore)',
390
- human: $t('a3795bf6-ed50-4aa6-9caf-33820292c159'),
390
+ human: $t('%15h'),
391
391
  field: 'period',
392
392
  });
393
393
  }
@@ -398,7 +398,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
398
398
  throw new SimpleError({
399
399
  code: 'invalid_field',
400
400
  message: 'The period you want to set does not exist (anymore)',
401
- human: $t('a3795bf6-ed50-4aa6-9caf-33820292c159'),
401
+ human: $t('%15h'),
402
402
  field: 'period',
403
403
  });
404
404
  }
@@ -408,7 +408,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
408
408
  throw new SimpleError({
409
409
  code: 'invalid_field',
410
410
  message: 'The period has no organization id',
411
- human: $t('d004e93c-e67f-48ab-bf3d-7b4ad86c7a38'),
411
+ human: $t('%1Gw'),
412
412
  field: 'period',
413
413
  });
414
414
  }
@@ -417,7 +417,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
417
417
  throw new SimpleError({
418
418
  code: 'invalid_field',
419
419
  message: 'The period you want to set is already closed',
420
- human: $t('b6bc2fef-71ac-43a1-b430-50945427a9e3'),
420
+ human: $t('%15i'),
421
421
  field: 'period',
422
422
  });
423
423
  }
@@ -427,7 +427,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
427
427
  throw new SimpleError({
428
428
  code: 'invalid_field',
429
429
  message: 'The period you want to set has not started yet',
430
- human: $t('e0fff936-3f3c-46b8-adcf-c723c33907a2'),
430
+ human: $t('%15k'),
431
431
  field: 'period',
432
432
  });
433
433
  }
@@ -580,7 +580,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
580
580
 
581
581
  if (!model || !await Context.auth.canAccessWebshop(model, PermissionLevel.Full)) {
582
582
  errors.addError(
583
- Context.auth.error($t(`5e92a9b3-a94d-41db-9d0e-c58122400725`)),
583
+ Context.auth.error($t(`%Ea`)),
584
584
  );
585
585
  continue;
586
586
  }
@@ -636,7 +636,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
636
636
  throw new SimpleError({
637
637
  code: 'invalid_field',
638
638
  message: 'Too many companies',
639
- human: $t(`35d462bc-121e-46ad-824b-a7838a6665ae`),
639
+ human: $t(`%Eb`),
640
640
  field: 'companies',
641
641
  });
642
642
  }
@@ -649,7 +649,7 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
649
649
  throw new SimpleError({
650
650
  code: 'invalid_field',
651
651
  message: 'Too many companies',
652
- human: $t(`35d462bc-121e-46ad-824b-a7838a6665ae`),
652
+ human: $t(`%Eb`),
653
653
  field: 'companies',
654
654
  });
655
655
  }
@@ -56,7 +56,7 @@ export class SetOrganizationDomainEndpoint extends Endpoint<Params, Query, Body,
56
56
  throw new SimpleError({
57
57
  code: 'invalid_domain',
58
58
  message: 'registerDomain is invalid',
59
- human: $t(`50fc6c16-b3d2-4015-b04c-7f11c6e4d497`),
59
+ human: $t(`%Ec`),
60
60
  field: 'registerDomain',
61
61
  });
62
62
  }
@@ -65,7 +65,7 @@ export class SetOrganizationDomainEndpoint extends Endpoint<Params, Query, Body,
65
65
  throw new SimpleError({
66
66
  code: 'invalid_domain',
67
67
  message: 'mailDomain is invalid',
68
- human: $t(`da31b8f3-ef8c-4235-b9ba-7eb6d6433a61`),
68
+ human: $t(`%Ed`),
69
69
  field: 'mailDomain',
70
70
  });
71
71
  }
@@ -165,7 +165,7 @@ export class SetOrganizationDomainEndpoint extends Endpoint<Params, Query, Body,
165
165
  type: DNSRecordType.TXT,
166
166
  name: '_dmarc.' + organization.privateMeta.pendingMailDomain + '.',
167
167
  value: 'v=DMARC1; p=quarantine; pct=100; sp=quarantine; aspf=r; adkim=r;',
168
- description: $t(`dfd0d85f-262e-4d5a-b8e4-8a9e67c60652`),
168
+ description: $t(`%Ee`),
169
169
  optional: true,
170
170
  }));
171
171
  }