@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.
- package/package.json +10 -10
- package/src/audit-logs/OrderLogger.ts +1 -1
- package/src/email-replacements/getEmailReplacementsForPayment.ts +6 -6
- package/src/endpoints/admin/members/ChargeMembersEndpoint.ts +4 -4
- package/src/endpoints/admin/memberships/ChargeMembershipsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/ChargeOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/GetOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/PatchOrganizationsEndpoint.ts +8 -8
- package/src/endpoints/admin/registrations/ChargeRegistrationsEndpoint.ts +1 -1
- package/src/endpoints/auth/CreateAdminEndpoint.ts +3 -3
- package/src/endpoints/auth/CreateTokenEndpoint.ts +10 -10
- package/src/endpoints/auth/ForgotPasswordEndpoint.ts +2 -2
- package/src/endpoints/auth/PatchUserEndpoint.ts +9 -9
- package/src/endpoints/auth/SignupEndpoint.ts +2 -2
- package/src/endpoints/auth/VerifyEmailEndpoint.ts +3 -3
- package/src/endpoints/global/audit-logs/GetAuditLogsEndpoint.ts +1 -1
- package/src/endpoints/global/billing/ActivatePackagesEndpoint.ts +3 -3
- package/src/endpoints/global/billing/DeactivatePackageEndpoint.ts +2 -2
- package/src/endpoints/global/email/CreateEmailEndpoint.ts +4 -4
- package/src/endpoints/global/email/GetEmailAddressEndpoint.ts +2 -2
- package/src/endpoints/global/email/GetEmailEndpoint.ts +1 -1
- package/src/endpoints/global/email/GetUserEmailsEndpoint.test.ts +1 -1
- package/src/endpoints/global/email/ManageEmailAddressEndpoint.ts +3 -3
- package/src/endpoints/global/email/PatchEmailEndpoint.test.ts +1 -1
- package/src/endpoints/global/email/PatchEmailEndpoint.ts +8 -8
- package/src/endpoints/global/email-recipients/GetEmailRecipientsEndpoint.ts +1 -1
- package/src/endpoints/global/email-recipients/RetryEmailRecipientEndpoint.ts +3 -3
- package/src/endpoints/global/email-recipients/helpers/validateEmailRecipientFilter.ts +2 -2
- package/src/endpoints/global/events/GetEventNotificationsEndpoint.ts +1 -1
- package/src/endpoints/global/events/PatchEventNotificationsEndpoint.ts +13 -13
- package/src/endpoints/global/events/PatchEventsEndpoint.ts +24 -24
- package/src/endpoints/global/files/ExportToExcelEndpoint.ts +1 -1
- package/src/endpoints/global/files/UploadFile.ts +1 -1
- package/src/endpoints/global/groups/GetGroupsEndpoint.ts +1 -1
- package/src/endpoints/global/members/GetMemberFamilyEndpoint.ts +2 -2
- package/src/endpoints/global/members/GetMembersEndpoint.ts +2 -2
- package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.ts +52 -52
- package/src/endpoints/global/members/helpers/validateGroupFilter.ts +2 -2
- package/src/endpoints/global/organizations/CheckRegisterCodeEndpoint.ts +1 -1
- package/src/endpoints/global/organizations/CreateOrganizationEndpoint.ts +5 -5
- package/src/endpoints/global/platform/PatchPlatformEnpoint.ts +1 -1
- package/src/endpoints/global/registration/GetRegistrationsEndpoint.ts +2 -2
- package/src/endpoints/global/registration/PatchUserMembersEndpoint.ts +4 -4
- package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +18 -18
- package/src/endpoints/global/registration-periods/GetRegistrationPeriodsEndpoint.ts +1 -1
- package/src/endpoints/global/registration-periods/PatchRegistrationPeriodsEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/balance-items/GetBalanceItemsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/balance-items/PatchBalanceItemsEndpoint.ts +11 -11
- package/src/endpoints/organization/dashboard/documents/GetDocumentTemplateXML.ts +1 -1
- package/src/endpoints/organization/dashboard/documents/PatchDocumentEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/documents/PatchDocumentTemplatesEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/email/CheckEmailBouncesEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/email-templates/PatchEmailTemplatesEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/invoices/GetInvoicesEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +16 -16
- package/src/endpoints/organization/dashboard/organization/SetOrganizationDomainEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/organization/SetUitpasClientCredentialsEndpoint.ts +5 -5
- package/src/endpoints/organization/dashboard/payments/GetPaymentsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/payments/PatchPaymentsEndpoint.ts +13 -13
- package/src/endpoints/organization/dashboard/registration-periods/GetOrganizationRegistrationPeriodsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/registration-periods/PatchOrganizationRegistrationPeriodsEndpoint.ts +26 -26
- package/src/endpoints/organization/dashboard/stripe/DeleteStripeAccountEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/GetStripeAccountLinkEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/GetStripeLoginLinkEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/stripe/UpdateStripeAccountEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/users/CreateApiUserEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/users/DeleteUserEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/users/PatchApiUserEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/CreateWebshopEndpoint.ts +4 -4
- package/src/endpoints/organization/dashboard/webshops/DeleteWebshopEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/webshops/PatchDiscountCodesEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.ts +9 -9
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopTicketsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/webshops/SearchUitpasEventsEndpoint.ts +1 -1
- package/src/endpoints/organization/shared/ExchangePaymentEndpoint.ts +1 -1
- package/src/endpoints/organization/shared/GetDocumentHtml.ts +2 -2
- package/src/endpoints/organization/shared/GetPaymentEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/CheckWebshopDiscountCodesEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/GetOrderByPaymentEndpoint.ts +2 -2
- package/src/endpoints/organization/webshops/GetOrderEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/GetTicketsEndpoint.ts +3 -3
- package/src/endpoints/organization/webshops/GetWebshopEndpoint.ts +1 -1
- package/src/endpoints/organization/webshops/PlaceOrderEndpoint.ts +8 -8
- package/src/endpoints/organization/webshops/RetrieveUitpasSocialTariffPriceEndpoint.ts +2 -2
- package/src/excel-loaders/balance-items.ts +15 -15
- package/src/excel-loaders/event-notifications.ts +11 -11
- package/src/excel-loaders/members.ts +41 -41
- package/src/excel-loaders/organizations.ts +23 -23
- package/src/excel-loaders/payments.ts +40 -40
- package/src/excel-loaders/receivable-balances.ts +21 -21
- package/src/excel-loaders/registrations.ts +26 -26
- package/src/helpers/AddressValidator.ts +6 -6
- package/src/helpers/AdminPermissionChecker.ts +4 -4
- package/src/helpers/AuthenticatedStructures.ts +9 -9
- package/src/helpers/BuckarooHelper.ts +1 -1
- package/src/helpers/Context.ts +4 -4
- package/src/helpers/FileCache.ts +7 -7
- package/src/helpers/ForwardHandler.ts +1 -1
- package/src/helpers/MembershipCharger.ts +2 -2
- package/src/helpers/SetupStepUpdater.ts +1 -1
- package/src/helpers/StripeHelper.ts +6 -6
- package/src/helpers/UitpasTokenRepository.ts +7 -7
- package/src/helpers/ViesHelper.ts +1 -1
- package/src/helpers/XlsxTransformerColumnHelper.ts +17 -17
- package/src/helpers/email-html-helpers.ts +10 -10
- package/src/helpers/updateMemberDetailsUitpasNumber.ts +1 -1
- package/src/seeds/1752848561-groups-registration-periods.ts +1 -1
- package/src/seeds/1755790070-fill-email-recipient-errors.ts +6 -6
- package/src/services/EventNotificationService.ts +3 -3
- package/src/services/FileSignService.ts +1 -1
- package/src/services/InvoiceService.ts +3 -3
- package/src/services/MemberNumberService.ts +3 -3
- package/src/services/PaymentService.ts +23 -23
- package/src/services/SSOService.ts +5 -5
- package/src/services/STPackageService.ts +2 -2
- package/src/services/uitpas/PassholderEndpoints.ts +2 -2
- package/src/services/uitpas/UitpasService.ts +5 -5
- package/src/services/uitpas/cancelTicketSales.ts +1 -1
- package/src/services/uitpas/checkPermissionsFor.ts +9 -9
- package/src/services/uitpas/getSocialTariffForEvent.ts +4 -4
- package/src/services/uitpas/getSocialTariffForUitpasNumbers.ts +5 -5
- package/src/services/uitpas/handleUitpasResponse.ts +1 -1
- package/src/services/uitpas/registerTicketSales.ts +4 -4
- package/src/services/uitpas/searchUitpasEvents.ts +3 -3
- package/src/services/uitpas/searchUitpasOrganizers.ts +3 -3
- package/src/sql-filters/base-registration-filter-compilers.ts +2 -2
- package/src/sql-filters/members.ts +6 -6
- 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(`
|
|
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('
|
|
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(`
|
|
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('
|
|
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('
|
|
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(`
|
|
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('
|
|
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('
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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('
|
|
94
|
+
const organizers = Formatter.joinLast(json.map(i => i.organizer.name), ', ', ' ' + $t('%1BM') + ' ');
|
|
95
95
|
return {
|
|
96
96
|
status: UitpasClientCredentialsStatus.NoPermissions,
|
|
97
|
-
human: $t('
|
|
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('
|
|
102
|
+
const missingPermissionsHuman = Formatter.joinLast(missingPermissions.map(p => p.human), ', ', ' ' + $t('%1BM') + ' ');
|
|
103
103
|
return {
|
|
104
104
|
status: UitpasClientCredentialsStatus.MissingPermissions,
|
|
105
|
-
human: $t('
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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('
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(`
|
|
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(
|
|
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('
|
|
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('
|
|
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.
|
|
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(
|
|
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(`
|
|
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(`
|
|
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.
|
|
200
|
+
type: SQLValueType.JSONScalar, // Can be string, number or boolean
|
|
201
201
|
nullable: true,
|
|
202
202
|
}),
|
|
203
203
|
}),
|