@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
@@ -79,7 +79,7 @@ function getUitpasTicketSales(order: Order): UitpasTicketSale[] {
79
79
  throw new SimpleError({
80
80
  code: 'missing_uitpas_base_product_price',
81
81
  message: `Missing UiTPAS base product price`,
82
- human: $t(`f7eea411-fb92-458f-bf3e-e36ed870591b`),
82
+ human: $t(`%1DP`),
83
83
  });
84
84
  }
85
85
  const label = makeBaseProductPriceLabel(item.product, baseProductPrice);
@@ -401,7 +401,7 @@ export class UitpasService {
401
401
  throw new SimpleError({
402
402
  code: 'uitpas_number_already_used',
403
403
  message: 'One or more uitpas numbers are already used',
404
- human: $t('f3daff19-a227-4e45-b19a-c770bd7a6687'),
404
+ human: $t('%1DM'),
405
405
  field: 'uitpasNumbers',
406
406
  });
407
407
  }
@@ -413,7 +413,7 @@ export class UitpasService {
413
413
  throw new SimpleError({
414
414
  code: 'missing_uitpas_base_product_price',
415
415
  message: `Missing UiTPAS base product price`,
416
- human: $t(`3d08a166-11a7-4429-8ff7-84458bbe3e9a`),
416
+ human: $t(`%1DP`),
417
417
  });
418
418
  }
419
419
 
@@ -423,7 +423,7 @@ export class UitpasService {
423
423
  throw new SimpleError({
424
424
  code: 'uitpas_social_tariff_price_mismatch',
425
425
  message: 'UiTPAS wrong number of prices returned',
426
- human: $t('83c472b8-4bc5-4282-bbc9-1c6a2d382171'),
426
+ human: $t('%1DN'),
427
427
  field: 'uitpasNumbers',
428
428
  });
429
429
  }
@@ -436,7 +436,7 @@ export class UitpasService {
436
436
  throw new SimpleError({
437
437
  code: 'uitpas_social_tariff_price_mismatch',
438
438
  message: 'UiTPAS social tariff have a different price',
439
- human: $t('9a0ad099-99e3-4341-beac-f14feb3fb9d1', { correctPrice: Formatter.price(verified[i].price), orderPrice: Formatter.price(item.uitpasNumbers[i].price) }),
439
+ human: $t('%1DO', { correctPrice: Formatter.price(verified[i].price), orderPrice: Formatter.price(item.uitpasNumbers[i].price) }),
440
440
  field: 'uitpasNumbers.' + i.toString(),
441
441
  });
442
442
  }
@@ -24,7 +24,7 @@ async function cancelTicketSale(access_token: string, ticketSaleId: string) {
24
24
  throw new SimpleError({
25
25
  code: 'unsuccessful_response_registering_ticket_sales',
26
26
  message: `Unsuccessful response when registering UiTPAS ticket sales`,
27
- human: $t(`ed4e876c-6a40-49a7-ab65-2a4d5f31c13f`),
27
+ human: $t(`%18C`),
28
28
  });
29
29
  }
30
30
  return ticketSaleId;
@@ -16,7 +16,7 @@ function assertIsPermissionsResponse(json: unknown): asserts json is Permissions
16
16
  throw new SimpleError({
17
17
  code: 'invalid_permissions_response',
18
18
  message: 'Invalid response format for permissions',
19
- human: $t('7d3a6b57-f81a-4d58-bc2b-babb2261c40b'),
19
+ human: $t('%1BL'),
20
20
  });
21
21
  }
22
22
 
@@ -35,7 +35,7 @@ function assertIsPermissionsResponse(json: unknown): asserts json is Permissions
35
35
  throw new SimpleError({
36
36
  code: 'invalid_permissions_response',
37
37
  message: 'Invalid response format for permissions',
38
- human: $t('7d3a6b57-f81a-4d58-bc2b-babb2261c40b'),
38
+ human: $t('%1BL'),
39
39
  });
40
40
  }
41
41
  }
@@ -54,7 +54,7 @@ export async function checkPermissionsFor(access_token: string, organizationId:
54
54
  throw new SimpleError({
55
55
  code: 'uitpas_unreachable_checking_permissions',
56
56
  message: `Network issue when checking UiTPAS permissions`,
57
- human: $t(`542b793c-3edf-4505-b33d-199ea409bbda`),
57
+ human: $t(`%1BP`),
58
58
  });
59
59
  });
60
60
  if (!response.ok) {
@@ -62,7 +62,7 @@ export async function checkPermissionsFor(access_token: string, organizationId:
62
62
  throw new SimpleError({
63
63
  code: 'unsuccessful_response_checking_permissions',
64
64
  message: `Unsuccesful response when checking UiTPAS permissions`,
65
- human: $t(`ed4e876c-6a40-49a7-ab65-2a4d5f31c13f`),
65
+ human: $t(`%18C`),
66
66
  });
67
67
  }
68
68
  const json = await response.json().catch(() => {
@@ -70,7 +70,7 @@ export async function checkPermissionsFor(access_token: string, organizationId:
70
70
  throw new SimpleError({
71
71
  code: 'invalid_json_checking_permissions',
72
72
  message: `Invalid json when checking UiTPAS permissions`,
73
- human: $t(`93004d03-955a-4a9a-937d-2f30841dc5cc`),
73
+ human: $t(`%18A`),
74
74
  });
75
75
  });
76
76
  assertIsPermissionsResponse(json);
@@ -91,18 +91,18 @@ export async function checkPermissionsFor(access_token: string, organizationId:
91
91
  }];
92
92
  const item = json.find(item => item.organizer.id === uitpasOrganizerId);
93
93
  if (!item) {
94
- const organizers = Formatter.joinLast(json.map(i => i.organizer.name), ', ', ' ' + $t('6d35156d-e452-4b0f-80f4-b1e9024d08ee') + ' ');
94
+ const organizers = Formatter.joinLast(json.map(i => i.organizer.name), ', ', ' ' + $t('%1BM') + ' ');
95
95
  return {
96
96
  status: UitpasClientCredentialsStatus.NoPermissions,
97
- human: $t('96c8a719-dba5-47ce-bb61-ee0754a5f776') + organizers,
97
+ human: $t('%1BN') + organizers,
98
98
  };
99
99
  }
100
100
  const missingPermissions = neededPermissions.filter(needed => !item.permissions.includes(needed.permission));
101
101
  if (missingPermissions.length > 0) {
102
- const missingPermissionsHuman = Formatter.joinLast(missingPermissions.map(p => p.human), ', ', ' ' + $t('6d35156d-e452-4b0f-80f4-b1e9024d08ee') + ' ');
102
+ const missingPermissionsHuman = Formatter.joinLast(missingPermissions.map(p => p.human), ', ', ' ' + $t('%1BM') + ' ');
103
103
  return {
104
104
  status: UitpasClientCredentialsStatus.MissingPermissions,
105
- human: $t('040fa935-5cbc-4a85-b578-354bf9d7fc04') + missingPermissionsHuman,
105
+ human: $t('%1BO') + missingPermissionsHuman,
106
106
  };
107
107
  }
108
108
  return {
@@ -21,7 +21,7 @@ function assertsIsStaticSocialTariffResponse(json: unknown): asserts json is Sta
21
21
  throw new SimpleError({
22
22
  code: 'invalid_response_getting_static_uitpas_social_tariff',
23
23
  message: `Invalid response when getting static UiTPAS social tariff`,
24
- human: $t(`a56854af-464a-45a4-8c39-10a9264b6ce4`),
24
+ human: $t(`%1BR`),
25
25
  });
26
26
  }
27
27
  }
@@ -35,7 +35,7 @@ export async function getSocialTariffForEvent(access_token: string, basePrice: n
35
35
  throw new SimpleError({
36
36
  code: 'invalid_uitpas_event_url',
37
37
  message: `Invalid UiTPAS event URL: ${uitpasEventUrl}`,
38
- human: $t(`85fb6e02-9b69-43cc-acf7-96a576461560`),
38
+ human: $t(`%1BS`),
39
39
  });
40
40
  }
41
41
  params.append('eventId', eventId);
@@ -61,7 +61,7 @@ export async function getSocialTariffForEvent(access_token: string, basePrice: n
61
61
  throw new SimpleError({
62
62
  code: 'unsuccessful_response_getting_static_uitpas_social_tariff',
63
63
  message: `Unsuccessful response when getting static UiTPAS social tariff`,
64
- human: $t(`ed4e876c-6a40-49a7-ab65-2a4d5f31c13f`),
64
+ human: $t(`%18C`),
65
65
  });
66
66
  }
67
67
  const json = await response.json().catch(() => {
@@ -80,7 +80,7 @@ export async function getSocialTariffForEvent(access_token: string, basePrice: n
80
80
  throw new SimpleError({
81
81
  code: 'no_social_tariff_available',
82
82
  message: `No social tariff available for event ${eventId}`,
83
- human: $t(`ccd8e8b4-01a7-4e7c-8ae0-92d2a4c659eb`),
83
+ human: $t(`%1BT`),
84
84
  });
85
85
  }
86
86
  if (json.available.length > 1) {
@@ -34,7 +34,7 @@ function assertsIsSocialTariffResponse(json: unknown): asserts json is SocialTar
34
34
  throw new SimpleError({
35
35
  code: 'invalid_response_getting_uitpas_social_tariff',
36
36
  message: `Invalid response when getting UiTPAS social tariff`,
37
- human: $t(`466844b9-c042-4bc7-b77d-3f87376086b5`),
37
+ human: $t(`%1BU`),
38
38
  });
39
39
  }
40
40
  }
@@ -60,7 +60,7 @@ async function getSocialTariffForUitpasNumber(access_token: string, uitpasNumber
60
60
  throw new SimpleError({
61
61
  code: 'invalid_uitpas_event_url',
62
62
  message: `Invalid UiTPAS event URL: ${uitpasEventUrl}`,
63
- human: $t(`85fb6e02-9b69-43cc-acf7-96a576461560`),
63
+ human: $t(`%1BS`),
64
64
  });
65
65
  }
66
66
  params.append('eventId', eventId);
@@ -110,7 +110,7 @@ async function getSocialTariffForUitpasNumber(access_token: string, uitpasNumber
110
110
  throw new SimpleError({
111
111
  code: 'unsuccessful_and_unexpected_response_retrieving_social_tariff_by_uitpas_number',
112
112
  message: `Unsuccesful response without message when retrieving social tariff by UiTPAS number`,
113
- human: $t(`1572d069-abda-4b31-a373-f0c3760c79b1`),
113
+ human: $t(`%1BV`),
114
114
  });
115
115
  }
116
116
  const json = await response.json().catch(() => {
@@ -136,7 +136,7 @@ async function getSocialTariffForUitpasNumber(access_token: string, uitpasNumber
136
136
  throw new SimpleError({
137
137
  code: 'no_social_tariff_available',
138
138
  message: `No social tariff available for event ${uitpasEventUrl}`,
139
- human: $t(`ccd8e8b4-01a7-4e7c-8ae0-92d2a4c659eb`),
139
+ human: $t(`%1BT`),
140
140
  });
141
141
  }
142
142
  if (json.available.length > 1) {
@@ -150,7 +150,7 @@ async function getSocialTariffForUitpasNumber(access_token: string, uitpasNumber
150
150
  throw new SimpleError({
151
151
  code: 'no_remaining_social_tariff',
152
152
  message: `No remaining social tariff for event ${uitpasEventUrl} and UiTPAS number ${uitpasNumber}`,
153
- human: $t(`f9d6bc51-e7c9-4d3f-a13f-27871a018d83`),
153
+ human: $t(`%1BW`),
154
154
  });
155
155
  }
156
156
  console.log('Social tariff for UiTPAS number', uitpasNumber, 'with event id', uitpasEventUrl, 'is', json.available[0].price, 'euros');
@@ -45,7 +45,7 @@ async function uitpasErrorToSimpleError(response: Response) {
45
45
  statusCode,
46
46
  code: code ?? 'get-uitpas-error',
47
47
  message: message ?? `Error when retrieving pass by UiTPAS number`,
48
- human: human ?? $t('2fcd8eb2-603e-44bb-8b8d-faa131936888'),
48
+ human: human ?? $t('%1Iz'),
49
49
  });
50
50
  }
51
51
 
@@ -46,7 +46,7 @@ function assertisSuccessResponse(json: unknown): asserts json is SuccessResponse
46
46
  throw new SimpleError({
47
47
  code: 'invalid_register_ticket_sale_response',
48
48
  message: `Invalid register ticket sale response`,
49
- human: $t(`f5cac12d-ced6-43e6-bbd9-81b381807154`),
49
+ human: $t(`%1BX`),
50
50
  });
51
51
  }
52
52
  }
@@ -69,7 +69,7 @@ export async function registerTicketSales(access_token: string, registerTicketSa
69
69
  throw new SimpleError({
70
70
  code: 'invalid_uitpas_event_url',
71
71
  message: `Invalid UiTPAS event URL: ${ticketSale.uitpasEventUrl}`,
72
- human: $t(`85fb6e02-9b69-43cc-acf7-96a576461560`),
72
+ human: $t(`%1BS`),
73
73
  });
74
74
  }
75
75
 
@@ -108,7 +108,7 @@ export async function registerTicketSales(access_token: string, registerTicketSa
108
108
  throw new SimpleError({
109
109
  code: 'unsuccessful_response_registering_ticket_sales',
110
110
  message: `Unsuccessful response when registering UiTPAS ticket sales`,
111
- human: $t(`ed4e876c-6a40-49a7-ab65-2a4d5f31c13f`),
111
+ human: $t(`%18C`),
112
112
  });
113
113
  }
114
114
  const json = await response.json().catch(() => {});
@@ -117,7 +117,7 @@ export async function registerTicketSales(access_token: string, registerTicketSa
117
117
  throw new SimpleError({
118
118
  code: 'invalid_response_registering_ticket_sales',
119
119
  message: `Invalid response when registering ticket sales`,
120
- human: $t(`f5cac12d-ced6-43e6-bbd9-81b381807154`),
120
+ human: $t(`%1BX`),
121
121
  });
122
122
  }
123
123
  const now = new Date();
@@ -49,7 +49,7 @@ function assertIsEventsResponse(json: unknown): asserts json is EventsResponse {
49
49
  throw new SimpleError({
50
50
  code: 'invalid_events_response',
51
51
  message: `Invalid events response`,
52
- human: $t(`0b610eb8-551f-4ef6-acdc-fb3267dfc2a8`),
52
+ human: $t(`%1BY`),
53
53
  });
54
54
  }
55
55
  }
@@ -61,7 +61,7 @@ export async function searchUitpasEvents(clientId: string, uitpasOrganizerId: st
61
61
  throw new SimpleError({
62
62
  code: 'no_client_id_for_uitpas_events',
63
63
  message: `No client ID configured for Uitpas events`,
64
- human: $t(`0009cce2-9d13-4f03-9258-345d8f8e396e`),
64
+ human: $t(`%1BZ`),
65
65
  });
66
66
  }
67
67
  const baseUrl = 'https://search-test.uitdatabank.be/events';
@@ -97,7 +97,7 @@ export async function searchUitpasEvents(clientId: string, uitpasOrganizerId: st
97
97
  throw new SimpleError({
98
98
  code: 'unsuccessful_response_searching_uitpas_events',
99
99
  message: `Unsuccessful response when searching for UiTPAS events`,
100
- human: $t(`ed4e876c-6a40-49a7-ab65-2a4d5f31c13f`),
100
+ human: $t(`%18C`),
101
101
  });
102
102
  }
103
103
  const json = await response.json().catch(() => {
@@ -25,7 +25,7 @@ function assertIsOrganizersResponse(json: unknown): asserts json is OrganizersRe
25
25
  throw new SimpleError({
26
26
  code: 'invalid_response_searching_uitpas_organizers',
27
27
  message: `Invalid response when searching for UiTPAS organizers`,
28
- human: $t(`e1aab1a7-fded-4e5e-b994-6607684764ac`),
28
+ human: $t(`%1Ba`),
29
29
  });
30
30
  }
31
31
  }
@@ -37,7 +37,7 @@ export async function searchUitpasOrganizers(access_token: string, name: string)
37
37
  throw new SimpleError({
38
38
  code: 'empty_uitpas_organizer_name',
39
39
  message: `Empty name when searching for UiTPAS organizers`,
40
- human: $t(`963105d8-a70a-4ba4-9ddc-b7f908d44664`),
40
+ human: $t(`%1Bb`),
41
41
  });
42
42
  }
43
43
  const baseUrl = 'https://api-test.uitpas.be/organizers';
@@ -66,7 +66,7 @@ export async function searchUitpasOrganizers(access_token: string, name: string)
66
66
  throw new SimpleError({
67
67
  code: 'unsuccessful_response_searching_uitpas_organizers',
68
68
  message: `Unsuccessful response when searching for UiTPAS organizers`,
69
- human: $t(`ed4e876c-6a40-49a7-ab65-2a4d5f31c13f`),
69
+ human: $t(`%18C`),
70
70
  });
71
71
  }
72
72
  const json = await response.json().catch(() => {
@@ -18,7 +18,7 @@ async function checkGroupIdFilterAccess(filter: StamhoofdFilter, permissionLevel
18
18
  code: 'invalid_field',
19
19
  field: 'filter',
20
20
  message: 'You must filter on a group of the organization you are trying to access',
21
- human: $t(`d0ef2e12-dfa2-4d2a-9ee7-793e52e6b94f`),
21
+ human: $t(`%1HG`),
22
22
  });
23
23
  }
24
24
 
@@ -48,7 +48,7 @@ async function checkGroupIdFilterAccess(filter: StamhoofdFilter, permissionLevel
48
48
  }
49
49
  throw Context.auth.error({
50
50
  message: 'You do not have access to this group',
51
- human: $t(`45eedf49-0f0a-442c-a0bd-7881c2682698`, { groupName: group.settings.name }),
51
+ human: $t(`%15f`, { groupName: group.settings.name }),
52
52
  });
53
53
  }
54
54
  }
@@ -453,14 +453,14 @@ export const memberFilterCompilers: SQLFilterDefinitions = {
453
453
  throw new SimpleError({
454
454
  code: 'not_found',
455
455
  message: 'This email does not exist.',
456
- human: $t('491156e4-a75d-4487-a97e-b208cd3a1d11'),
456
+ human: $t('%1E5'),
457
457
  statusCode: 404,
458
458
  });
459
459
  }
460
460
  if (!await Context.auth.canAccessEmail(email)) {
461
461
  throw Context.auth.error({
462
462
  message: 'No permissions to access this email.',
463
- human: $t('be46002c-d77e-42ca-b163-23bde0bc628c'),
463
+ human: $t('%1E6'),
464
464
  });
465
465
  }
466
466
  },
@@ -500,7 +500,7 @@ export const memberFilterCompilers: SQLFilterDefinitions = {
500
500
  },
501
501
  value: createColumnFilter({
502
502
  expression: SQL.jsonExtract(SQL.column('details'), `$.value.recordAnswers.${SQLJsonExtract.escapePathComponent(key)}.value`, true),
503
- type: SQLValueType.JSONString,
503
+ type: SQLValueType.JSONScalar, // Can be string, number or boolean
504
504
  nullable: true,
505
505
  }),
506
506
  }),
@@ -511,7 +511,7 @@ export const memberFilterCompilers: SQLFilterDefinitions = {
511
511
  throw new SimpleError({
512
512
  code: 'permission_denied',
513
513
  message: 'No permissions to filter on record ' + key,
514
- human: result.record ? $t(`3560487e-3f2c-4cc9-ad7f-4e9a0fc1bbb8`, { recordName: result.record.name }) : $t(`Je hebt niet voldoende toegangsrechten om te filteren op dit gegevensveld`),
514
+ human: result.record ? $t(`%1Bc`, { recordName: result.record.name }) : $t(`Je hebt niet voldoende toegangsrechten om te filteren op dit gegevensveld`),
515
515
  statusCode: 400,
516
516
  });
517
517
  }
@@ -542,7 +542,7 @@ async function throwIfNoFinancialReadAccess() {
542
542
  throw new SimpleError({
543
543
  code: 'permission_denied',
544
544
  message: 'No permissions for financial support filter.',
545
- human: $t(`64d658fa-0727-4924-9448-b243fe8e10a1`),
545
+ human: $t(`%G2`),
546
546
  statusCode: 400,
547
547
  });
548
548
  }
@@ -555,7 +555,7 @@ async function throwIfNoFinancialReadAccess() {
555
555
  throw new SimpleError({
556
556
  code: 'permission_denied',
557
557
  message: 'No permissions for financial support filter (organization scope).',
558
- human: $t(`64d658fa-0727-4924-9448-b243fe8e10a1`),
558
+ human: $t(`%G2`),
559
559
  statusCode: 400,
560
560
  });
561
561
  }
@@ -197,7 +197,7 @@ export const orderFilterCompilers: SQLFilterDefinitions = {
197
197
  },
198
198
  value: createColumnFilter({
199
199
  expression: SQL.jsonExtract(SQL.column('data'), `$.value.recordAnswers.${SQLJsonExtract.escapePathComponent(key)}.value`, true),
200
- type: SQLValueType.JSONString,
200
+ type: SQLValueType.JSONScalar, // Can be string, number or boolean
201
201
  nullable: true,
202
202
  }),
203
203
  }),