@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
|
@@ -81,7 +81,7 @@ export class ManageEmailAddressEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
81
81
|
throw new SimpleError({
|
|
82
82
|
code: 'invalid_fields',
|
|
83
83
|
message: 'Invalid token or id',
|
|
84
|
-
human: $t(`
|
|
84
|
+
human: $t(`%DQ`),
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -120,7 +120,7 @@ export class ManageEmailAddressEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
120
120
|
throw new SimpleError({
|
|
121
121
|
code: 'not_found',
|
|
122
122
|
message: 'Email not found',
|
|
123
|
-
human: $t(`
|
|
123
|
+
human: $t(`%DR`),
|
|
124
124
|
statusCode: 404,
|
|
125
125
|
});
|
|
126
126
|
}
|
|
@@ -155,7 +155,7 @@ export class ManageEmailAddressEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
155
155
|
throw new SimpleError({
|
|
156
156
|
code: 'too_many_unblocks',
|
|
157
157
|
message: 'Too many unblocks',
|
|
158
|
-
human: $t(`
|
|
158
|
+
human: $t(`%1L5`),
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -707,7 +707,7 @@ describe('Endpoint.PatchEmailEndpoint', () => {
|
|
|
707
707
|
|
|
708
708
|
const balanceTable = recipient.replacements.find(r => r.token === 'balanceTable');
|
|
709
709
|
expect(balanceTable).toBeDefined();
|
|
710
|
-
expect(balanceTable?.html).toInclude($t('
|
|
710
|
+
expect(balanceTable?.html).toInclude($t('%hX'));
|
|
711
711
|
|
|
712
712
|
// Outstanding balance
|
|
713
713
|
const outstandingBalance = recipient.replacements.find(r => r.token === 'outstandingBalance');
|
|
@@ -41,7 +41,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
41
41
|
throw new SimpleError({
|
|
42
42
|
code: 'not_found',
|
|
43
43
|
message: 'Email not found',
|
|
44
|
-
human: $t(`
|
|
44
|
+
human: $t(`%DR`),
|
|
45
45
|
statusCode: 404,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -63,7 +63,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
63
63
|
if (!await Context.auth.canSendEmailsFrom(organization, sender.id)) {
|
|
64
64
|
throw Context.auth.error({
|
|
65
65
|
message: 'Cannot send emails from this sender',
|
|
66
|
-
human: $t('
|
|
66
|
+
human: $t('%1Cw'),
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
model.senderId = sender.id;
|
|
@@ -79,7 +79,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
79
79
|
throw new SimpleError({
|
|
80
80
|
code: 'invalid_sender',
|
|
81
81
|
message: 'Sender not found',
|
|
82
|
-
human: $t(`
|
|
82
|
+
human: $t(`%1Cx`),
|
|
83
83
|
statusCode: 400,
|
|
84
84
|
});
|
|
85
85
|
}
|
|
@@ -96,7 +96,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
96
96
|
throw new SimpleError({
|
|
97
97
|
code: 'invalid_sender',
|
|
98
98
|
message: 'Sender not found',
|
|
99
|
-
human: $t(`
|
|
99
|
+
human: $t(`%1Cy`),
|
|
100
100
|
statusCode: 400,
|
|
101
101
|
});
|
|
102
102
|
}
|
|
@@ -119,7 +119,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
119
119
|
throw new SimpleError({
|
|
120
120
|
code: 'not_draft',
|
|
121
121
|
message: 'Email is not a draft',
|
|
122
|
-
human: $t(`
|
|
122
|
+
human: $t(`%1Dy`),
|
|
123
123
|
statusCode: 400,
|
|
124
124
|
});
|
|
125
125
|
}
|
|
@@ -128,7 +128,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
128
128
|
throw new SimpleError({
|
|
129
129
|
code: 'already_created',
|
|
130
130
|
message: 'Recipients already created',
|
|
131
|
-
human: $t(`
|
|
131
|
+
human: $t(`%1Ko`),
|
|
132
132
|
statusCode: 400,
|
|
133
133
|
});
|
|
134
134
|
}
|
|
@@ -142,7 +142,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
142
142
|
throw new SimpleError({
|
|
143
143
|
code: 'not_draft',
|
|
144
144
|
message: 'Email is not a draft',
|
|
145
|
-
human: $t(`
|
|
145
|
+
human: $t(`%1Dz`),
|
|
146
146
|
statusCode: 400,
|
|
147
147
|
});
|
|
148
148
|
}
|
|
@@ -184,7 +184,7 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
184
184
|
if (!await Context.auth.canSendEmail(model)) {
|
|
185
185
|
throw Context.auth.error({
|
|
186
186
|
message: 'Cannot send emails from this sender',
|
|
187
|
-
human: $t('
|
|
187
|
+
human: $t('%1Cw'),
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -50,7 +50,7 @@ export class GetEmailRecipientsEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
50
50
|
if (!await validateEmailRecipientFilter({ filter: q.filter, permissionLevel: PermissionLevel.Read })) {
|
|
51
51
|
throw Context.auth.error({
|
|
52
52
|
message: 'You do not have sufficient permissions to view all email recipients',
|
|
53
|
-
human: $t(`
|
|
53
|
+
human: $t(`%1E0`),
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -37,7 +37,7 @@ export class RetryEmailRecipientEndpoint extends Endpoint<Params, Query, Body, R
|
|
|
37
37
|
throw new SimpleError({
|
|
38
38
|
code: 'not_found',
|
|
39
39
|
message: 'Email recipient not found',
|
|
40
|
-
human: $t(`
|
|
40
|
+
human: $t(`%1GZ`),
|
|
41
41
|
statusCode: 404,
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -47,7 +47,7 @@ export class RetryEmailRecipientEndpoint extends Endpoint<Params, Query, Body, R
|
|
|
47
47
|
throw new SimpleError({
|
|
48
48
|
code: 'not_found',
|
|
49
49
|
message: 'Email not found',
|
|
50
|
-
human: $t(`
|
|
50
|
+
human: $t(`%DR`),
|
|
51
51
|
statusCode: 404,
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -68,7 +68,7 @@ export class RetryEmailRecipientEndpoint extends Endpoint<Params, Query, Body, R
|
|
|
68
68
|
throw new SimpleError({
|
|
69
69
|
code: 'already_sent',
|
|
70
70
|
message: 'Cant retry email recipient that is already sent',
|
|
71
|
-
human: $t(`
|
|
71
|
+
human: $t(`%1Ga`),
|
|
72
72
|
statusCode: 400,
|
|
73
73
|
});
|
|
74
74
|
}
|
|
@@ -42,7 +42,7 @@ export async function validateEmailRecipientFilter({ filter, permissionLevel }:
|
|
|
42
42
|
code: 'invalid_field',
|
|
43
43
|
field: 'filter',
|
|
44
44
|
message: 'You must filter on an email id of the email recipients you are trying to access',
|
|
45
|
-
human: $t(`
|
|
45
|
+
human: $t(`%1E1`),
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -72,7 +72,7 @@ export async function validateEmailRecipientFilter({ filter, permissionLevel }:
|
|
|
72
72
|
if (!await Context.auth.canAccessEmail(email, permissionLevel)) {
|
|
73
73
|
throw Context.auth.error({
|
|
74
74
|
message: 'You do not have access to this email',
|
|
75
|
-
human: $t(`
|
|
75
|
+
human: $t(`%1E2`),
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -142,7 +142,7 @@ export class GetEventNotificationsEndpoint extends Endpoint<Params, Query, Body,
|
|
|
142
142
|
|
|
143
143
|
for (const notification of notifications) {
|
|
144
144
|
if (!await Context.auth.canAccessEventNotification(notification)) {
|
|
145
|
-
throw Context.auth.error($t(`
|
|
145
|
+
throw Context.auth.error($t(`%DT`));
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -69,7 +69,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
69
69
|
throw new SimpleError({
|
|
70
70
|
code: 'invalid_field',
|
|
71
71
|
message: 'Invalid event',
|
|
72
|
-
human: $t(`
|
|
72
|
+
human: $t(`%DU`),
|
|
73
73
|
field: 'events',
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -87,7 +87,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
87
87
|
throw new SimpleError({
|
|
88
88
|
code: 'invalid_period',
|
|
89
89
|
message: 'No period found for this start date',
|
|
90
|
-
human: Context.i18n.$t('
|
|
90
|
+
human: Context.i18n.$t('%8F'),
|
|
91
91
|
field: 'startDate',
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -96,7 +96,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
96
96
|
throw new SimpleError({
|
|
97
97
|
code: 'invalid_period',
|
|
98
98
|
message: 'Period is locked',
|
|
99
|
-
human: Context.i18n.$t('
|
|
99
|
+
human: Context.i18n.$t('%AM'),
|
|
100
100
|
field: 'startDate',
|
|
101
101
|
});
|
|
102
102
|
}
|
|
@@ -132,7 +132,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
132
132
|
throw new SimpleError({
|
|
133
133
|
code: 'not_found',
|
|
134
134
|
message: 'EventNotification not found',
|
|
135
|
-
human: Context.i18n.$t('
|
|
135
|
+
human: Context.i18n.$t('%AN'),
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -150,12 +150,12 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
150
150
|
if (!await Context.auth.canAccessEventNotification(notification, requiredPermissionLevel)) {
|
|
151
151
|
// Requires `OrganizationEventNotificationReviewer` access right for the organization
|
|
152
152
|
if (notification.status === EventNotificationStatus.Pending) {
|
|
153
|
-
throw Context.auth.error(Context.i18n.$t('
|
|
153
|
+
throw Context.auth.error(Context.i18n.$t('%AO'));
|
|
154
154
|
}
|
|
155
155
|
if (notification.status === EventNotificationStatus.Accepted) {
|
|
156
|
-
throw Context.auth.error(Context.i18n.$t('
|
|
156
|
+
throw Context.auth.error(Context.i18n.$t('%AP'));
|
|
157
157
|
}
|
|
158
|
-
throw Context.auth.error(Context.i18n.$t('
|
|
158
|
+
throw Context.auth.error(Context.i18n.$t('%AQ'));
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
const period = await RegistrationPeriod.getByID(notification.periodId);
|
|
@@ -163,7 +163,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
163
163
|
throw new SimpleError({
|
|
164
164
|
code: 'not_found',
|
|
165
165
|
message: 'Period not found',
|
|
166
|
-
human: Context.i18n.$t('
|
|
166
|
+
human: Context.i18n.$t('%AR'),
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -171,7 +171,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
171
171
|
throw new SimpleError({
|
|
172
172
|
code: 'invalid_period',
|
|
173
173
|
message: 'Period is locked',
|
|
174
|
-
human: Context.i18n.$t('
|
|
174
|
+
human: Context.i18n.$t('%AS'),
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -234,7 +234,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
234
234
|
throw new SimpleError({
|
|
235
235
|
code: 'not_found',
|
|
236
236
|
message: 'EventNotification not found',
|
|
237
|
-
human: Context.i18n.$t('
|
|
237
|
+
human: Context.i18n.$t('%AN'),
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -259,7 +259,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
259
259
|
throw new SimpleError({
|
|
260
260
|
code: 'invalid_field',
|
|
261
261
|
message: 'Invalid type',
|
|
262
|
-
human: Context.i18n.$t('
|
|
262
|
+
human: Context.i18n.$t('%AT'),
|
|
263
263
|
field: 'typeId',
|
|
264
264
|
});
|
|
265
265
|
}
|
|
@@ -287,7 +287,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
287
287
|
throw new SimpleError({
|
|
288
288
|
code: 'invalid_field',
|
|
289
289
|
message: 'Invalid start date',
|
|
290
|
-
human: Context.i18n.$t('
|
|
290
|
+
human: Context.i18n.$t('%AU'),
|
|
291
291
|
field: 'startDate',
|
|
292
292
|
});
|
|
293
293
|
}
|
|
@@ -296,7 +296,7 @@ export class PatchEventNotificationsEndpoint extends Endpoint<Params, Query, Bod
|
|
|
296
296
|
throw new SimpleError({
|
|
297
297
|
code: 'invalid_field',
|
|
298
298
|
message: 'Invalid end date',
|
|
299
|
-
human: Context.i18n.$t('
|
|
299
|
+
human: Context.i18n.$t('%AV'),
|
|
300
300
|
field: 'endDate',
|
|
301
301
|
});
|
|
302
302
|
}
|
|
@@ -39,7 +39,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
39
39
|
throw new SimpleError({
|
|
40
40
|
code: 'invalid_period',
|
|
41
41
|
message: 'No period found for this start date: ' + Formatter.dateIso(event.startDate),
|
|
42
|
-
human: Context.i18n.$t('
|
|
42
|
+
human: Context.i18n.$t('%8F'),
|
|
43
43
|
field: 'startDate',
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -53,7 +53,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (!await Context.auth.canAccessGroupsInPeriod(period.id, putGroup.organizationId)) {
|
|
56
|
-
throw Context.auth.error($t(`
|
|
56
|
+
throw Context.auth.error($t(`%1HQ`));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (!group) {
|
|
@@ -109,7 +109,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
109
109
|
throw new SimpleError({
|
|
110
110
|
code: 'invalid_field',
|
|
111
111
|
message: 'Empty groups',
|
|
112
|
-
human: $t(`
|
|
112
|
+
human: $t(`%DV`),
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -117,7 +117,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
117
117
|
throw new SimpleError({
|
|
118
118
|
code: 'invalid_field',
|
|
119
119
|
message: 'Empty default age groups',
|
|
120
|
-
human: $t(`
|
|
120
|
+
human: $t(`%DW`),
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -125,7 +125,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
125
125
|
throw new SimpleError({
|
|
126
126
|
code: 'invalid_field',
|
|
127
127
|
message: 'Empty organization tag ids',
|
|
128
|
-
human: $t(`
|
|
128
|
+
human: $t(`%DX`),
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -158,7 +158,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
158
158
|
throw new SimpleError({
|
|
159
159
|
code: 'not_found',
|
|
160
160
|
message: 'Event not found',
|
|
161
|
-
human: $t(`
|
|
161
|
+
human: $t(`%DY`),
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -168,7 +168,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
168
168
|
throw new SimpleError({
|
|
169
169
|
code: 'invalid_field',
|
|
170
170
|
message: 'Cannot patch organizationCache',
|
|
171
|
-
human: $t(`
|
|
171
|
+
human: $t(`%DZ`),
|
|
172
172
|
field: 'meta.organizationCache',
|
|
173
173
|
});
|
|
174
174
|
}
|
|
@@ -188,7 +188,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
188
188
|
throw new SimpleError({
|
|
189
189
|
code: 'invalid_field',
|
|
190
190
|
message: 'Empty groups',
|
|
191
|
-
human: $t(`
|
|
191
|
+
human: $t(`%DV`),
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -196,7 +196,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
196
196
|
throw new SimpleError({
|
|
197
197
|
code: 'invalid_field',
|
|
198
198
|
message: 'Empty default age groups',
|
|
199
|
-
human: $t(`
|
|
199
|
+
human: $t(`%DW`),
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -204,7 +204,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
204
204
|
throw new SimpleError({
|
|
205
205
|
code: 'invalid_field',
|
|
206
206
|
message: 'Empty organization tag ids',
|
|
207
|
-
human: $t(`
|
|
207
|
+
human: $t(`%DX`),
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
|
|
@@ -300,7 +300,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
300
300
|
throw new SimpleError({
|
|
301
301
|
code: 'invalid_group',
|
|
302
302
|
message: 'Group is not of the same organization',
|
|
303
|
-
human: $t('
|
|
303
|
+
human: $t('%15c'),
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -317,12 +317,12 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
317
317
|
throw new SimpleError({
|
|
318
318
|
code: 'not_found',
|
|
319
319
|
message: 'Webshop not found',
|
|
320
|
-
human: $t(`
|
|
320
|
+
human: $t(`%DY`),
|
|
321
321
|
field: 'webshopId',
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
324
|
if (!await Context.auth.canAccessWebshop(webshop, PermissionLevel.Read)) {
|
|
325
|
-
throw Context.auth.error($t('
|
|
325
|
+
throw Context.auth.error($t('%185'));
|
|
326
326
|
}
|
|
327
327
|
event.webshopId = webshop.id;
|
|
328
328
|
}
|
|
@@ -375,7 +375,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
375
375
|
throw new SimpleError({
|
|
376
376
|
code: 'invalid_field',
|
|
377
377
|
message: 'Invalid typeId',
|
|
378
|
-
human: $t(`
|
|
378
|
+
human: $t(`%Da`),
|
|
379
379
|
field: 'typeId',
|
|
380
380
|
});
|
|
381
381
|
}
|
|
@@ -392,7 +392,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
392
392
|
throw new SimpleError({
|
|
393
393
|
code: 'invalid_field',
|
|
394
394
|
message: 'Empty number',
|
|
395
|
-
human: $t(`
|
|
395
|
+
human: $t(`%vQ`),
|
|
396
396
|
field: 'event_required',
|
|
397
397
|
});
|
|
398
398
|
}
|
|
@@ -404,7 +404,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
404
404
|
throw new SimpleError({
|
|
405
405
|
code: 'invalid_field',
|
|
406
406
|
message: 'Name is too short',
|
|
407
|
-
human: $t(`
|
|
407
|
+
human: $t(`%Db`),
|
|
408
408
|
field: 'name',
|
|
409
409
|
});
|
|
410
410
|
}
|
|
@@ -413,7 +413,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
413
413
|
throw new SimpleError({
|
|
414
414
|
code: 'invalid_dates',
|
|
415
415
|
message: 'End date is before start date',
|
|
416
|
-
human: $t(`
|
|
416
|
+
human: $t(`%Dc`),
|
|
417
417
|
field: 'endDate',
|
|
418
418
|
});
|
|
419
419
|
}
|
|
@@ -430,9 +430,9 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
430
430
|
throw new SimpleError({
|
|
431
431
|
code: 'minimum_days',
|
|
432
432
|
message: 'An event with this type has a minimum of ' + type.minimumDays + ' days',
|
|
433
|
-
human: $t(
|
|
433
|
+
human: $t(`%14D`, {
|
|
434
434
|
name: type.name,
|
|
435
|
-
days: Formatter.pluralText(type.minimumDays, $t(`
|
|
435
|
+
days: Formatter.pluralText(type.minimumDays, $t(`%1N7`), $t(`%1N6`)),
|
|
436
436
|
}),
|
|
437
437
|
field: 'startDate',
|
|
438
438
|
});
|
|
@@ -442,9 +442,9 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
442
442
|
throw new SimpleError({
|
|
443
443
|
code: 'maximum_days',
|
|
444
444
|
message: 'An event with this type has a maximum of ' + type.maximumDays + ' days',
|
|
445
|
-
human: $t(
|
|
445
|
+
human: $t(`%14E`, {
|
|
446
446
|
name: type.name,
|
|
447
|
-
days: Formatter.pluralText(type.maximumDays, $t(`
|
|
447
|
+
days: Formatter.pluralText(type.maximumDays, $t(`%1N7`), $t(`%1N6`)),
|
|
448
448
|
}),
|
|
449
449
|
field: 'startDate',
|
|
450
450
|
});
|
|
@@ -469,7 +469,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
469
469
|
throw new SimpleError({
|
|
470
470
|
code: 'type_maximum_reached',
|
|
471
471
|
message: 'Maximum number of events with this type reached',
|
|
472
|
-
human: $t(`
|
|
472
|
+
human: $t(`%Dd`) + ' ' + type.name + ' ' + $t(`%De`) + type.maximum + ')',
|
|
473
473
|
field: 'typeId',
|
|
474
474
|
});
|
|
475
475
|
}
|
|
@@ -478,7 +478,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
478
478
|
throw new SimpleError({
|
|
479
479
|
code: 'invalid_period',
|
|
480
480
|
message: 'No period found for this start date',
|
|
481
|
-
human: $t(`
|
|
481
|
+
human: $t(`%Df`),
|
|
482
482
|
field: 'startDate',
|
|
483
483
|
});
|
|
484
484
|
}
|
|
@@ -499,7 +499,7 @@ export class PatchEventsEndpoint extends Endpoint<Params, Query, Body, ResponseB
|
|
|
499
499
|
const originalGroupType = existingGroup.type;
|
|
500
500
|
|
|
501
501
|
if (!await Context.auth.canAccessGroup(existingGroup)) {
|
|
502
|
-
throw Context.auth.error($t(`
|
|
502
|
+
throw Context.auth.error($t(`%1N9`));
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
if (event.organizationId !== existingGroup.organizationId) {
|
|
@@ -65,7 +65,7 @@ export class ExportToExcelEndpoint extends Endpoint<Params, Query, Body, Respons
|
|
|
65
65
|
throw new SimpleError({
|
|
66
66
|
code: 'not_allowed',
|
|
67
67
|
message: 'Export is pending',
|
|
68
|
-
human: $t(`
|
|
68
|
+
human: $t(`%Dg`),
|
|
69
69
|
statusCode: 403,
|
|
70
70
|
});
|
|
71
71
|
}
|
|
@@ -156,7 +156,7 @@ export class UploadFile extends Endpoint<Params, Query, Body, ResponseBody> {
|
|
|
156
156
|
throw new SimpleError({
|
|
157
157
|
code: 'failed_to_sign',
|
|
158
158
|
message: 'Failed to sign file',
|
|
159
|
-
human: $t('
|
|
159
|
+
human: $t('%B6'),
|
|
160
160
|
statusCode: 500,
|
|
161
161
|
});
|
|
162
162
|
}
|
|
@@ -115,7 +115,7 @@ export class GetGroupsEndpoint extends Endpoint<Params, Query, Body, ResponseBod
|
|
|
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(`
|
|
118
|
+
human: $t(`%G8`),
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -55,7 +55,7 @@ export class GetMemberFamilyEndpoint extends Endpoint<Params, Query, Body, Respo
|
|
|
55
55
|
|
|
56
56
|
// Check access to this member (this will automatically give access to the family)
|
|
57
57
|
if (!await Context.auth.canAccessMember(member)) {
|
|
58
|
-
throw Context.auth.error($t(`
|
|
58
|
+
throw Context.auth.error($t(`%Dh`));
|
|
59
59
|
}
|
|
60
60
|
validatedMembers.push(member);
|
|
61
61
|
continue;
|
|
@@ -67,7 +67,7 @@ export class GetMemberFamilyEndpoint extends Endpoint<Params, Query, Body, Respo
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
if (!foundMember) {
|
|
70
|
-
throw Context.auth.error($t(`
|
|
70
|
+
throw Context.auth.error($t(`%Dh`));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
return new Response(
|
|
@@ -109,7 +109,7 @@ export class GetMembersEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
109
109
|
if (groupIds.length === 0) {
|
|
110
110
|
throw Context.auth.error({
|
|
111
111
|
message: 'You must filter on a group of the organization you are trying to access',
|
|
112
|
-
human: $t(`
|
|
112
|
+
human: $t(`%15d`),
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -264,7 +264,7 @@ export class GetMembersEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
264
264
|
throw new SimpleError({
|
|
265
265
|
code: 'timeout',
|
|
266
266
|
message: 'Query took too long',
|
|
267
|
-
human: $t(`
|
|
267
|
+
human: $t(`%Cv`),
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
throw error;
|