@stamhoofd/backend 2.118.1 → 2.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -111,7 +111,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
111
111
|
throw new SimpleError({
|
|
112
112
|
code: 'missing_organization',
|
|
113
113
|
message: 'Missing organization',
|
|
114
|
-
human: $t(`
|
|
114
|
+
human: $t(`%Di`),
|
|
115
115
|
statusCode: 400,
|
|
116
116
|
});
|
|
117
117
|
}
|
|
@@ -162,7 +162,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
162
162
|
throw new SimpleError({
|
|
163
163
|
code: 'not_allowed',
|
|
164
164
|
message: 'Cannot override details',
|
|
165
|
-
human: $t(`
|
|
165
|
+
human: $t(`%Dj`),
|
|
166
166
|
field: 'details',
|
|
167
167
|
});
|
|
168
168
|
}
|
|
@@ -215,7 +215,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
215
215
|
// Update responsibilities
|
|
216
216
|
for (const patchResponsibility of patch.responsibilities.getPatches()) {
|
|
217
217
|
if (!Context.auth.hasPlatformFullAccess() && !(organization && await Context.auth.hasFullAccess(organization.id))) {
|
|
218
|
-
throw Context.auth.error($t(`
|
|
218
|
+
throw Context.auth.error($t(`%Dk`));
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
const responsibilityRecord = await MemberResponsibilityRecord.getByID(patchResponsibility.id);
|
|
@@ -223,21 +223,21 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
223
223
|
throw new SimpleError({
|
|
224
224
|
code: 'permission_denied',
|
|
225
225
|
message: "You don't have permissions to access this endpoint",
|
|
226
|
-
human: $t(`
|
|
226
|
+
human: $t(`%Dl`),
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
const responsibility = platform.config.responsibilities.find(r => r.id === patchResponsibility.responsibilityId);
|
|
231
231
|
|
|
232
232
|
if (responsibility && !responsibility.organizationBased && !Context.auth.hasPlatformFullAccess()) {
|
|
233
|
-
throw Context.auth.error($t(`
|
|
233
|
+
throw Context.auth.error($t(`%Dm`));
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// Allow patching begin and end date
|
|
237
237
|
if (patchResponsibility.endDate !== undefined) {
|
|
238
238
|
if (responsibilityRecord.endDate) {
|
|
239
239
|
if (!Context.auth.hasPlatformFullAccess()) {
|
|
240
|
-
throw Context.auth.error($t(`
|
|
240
|
+
throw Context.auth.error($t(`%Dn`));
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
responsibilityRecord.endDate = patchResponsibility.endDate;
|
|
@@ -245,7 +245,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
245
245
|
|
|
246
246
|
if (patchResponsibility.startDate !== undefined) {
|
|
247
247
|
if (patchResponsibility.startDate.getTime() > Date.now() + 5 * 60 * 1000) {
|
|
248
|
-
throw Context.auth.error($t(`
|
|
248
|
+
throw Context.auth.error($t(`%Do`));
|
|
249
249
|
}
|
|
250
250
|
if (patchResponsibility.startDate.getTime() > Date.now()) {
|
|
251
251
|
patchResponsibility.startDate = new Date(); // force now
|
|
@@ -254,7 +254,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
254
254
|
const daysDiff = Math.abs((new Date().getTime() - patchResponsibility.startDate.getTime()) / (1000 * 60 * 60 * 24));
|
|
255
255
|
|
|
256
256
|
if (daysDiff > 60 && !Context.auth.hasPlatformFullAccess()) {
|
|
257
|
-
throw Context.auth.error($t(`
|
|
257
|
+
throw Context.auth.error($t(`%Dp`));
|
|
258
258
|
}
|
|
259
259
|
responsibilityRecord.startDate = patchResponsibility.startDate;
|
|
260
260
|
}
|
|
@@ -271,7 +271,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
271
271
|
// Create responsibilities
|
|
272
272
|
for (const { put } of patch.responsibilities.getPuts()) {
|
|
273
273
|
if (!Context.auth.hasPlatformFullAccess() && !(organization && await Context.auth.hasFullAccess(organization.id))) {
|
|
274
|
-
throw Context.auth.error($t(`
|
|
274
|
+
throw Context.auth.error($t(`%Dk`));
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
const platformResponsibility = platform.config.responsibilities.find(r => r.id === put.responsibilityId);
|
|
@@ -281,7 +281,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
281
281
|
throw new SimpleError({
|
|
282
282
|
code: 'invalid_field',
|
|
283
283
|
message: 'Invalid organization',
|
|
284
|
-
human: $t(`
|
|
284
|
+
human: $t(`%Dq`),
|
|
285
285
|
field: 'organizationId',
|
|
286
286
|
});
|
|
287
287
|
}
|
|
@@ -291,7 +291,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
291
291
|
throw new SimpleError({
|
|
292
292
|
code: 'invalid_field',
|
|
293
293
|
message: 'Invalid responsibility',
|
|
294
|
-
human: $t(`
|
|
294
|
+
human: $t(`%Dr`),
|
|
295
295
|
field: 'responsibilityId',
|
|
296
296
|
});
|
|
297
297
|
}
|
|
@@ -300,7 +300,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
300
300
|
throw new SimpleError({
|
|
301
301
|
code: 'invalid_field',
|
|
302
302
|
message: 'Invalid organization',
|
|
303
|
-
human: $t(`
|
|
303
|
+
human: $t(`%Ds`),
|
|
304
304
|
field: 'organizationId',
|
|
305
305
|
});
|
|
306
306
|
}
|
|
@@ -329,7 +329,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
329
329
|
throw new SimpleError({
|
|
330
330
|
code: 'invalid_field',
|
|
331
331
|
message: 'Invalid organization',
|
|
332
|
-
human: platformResponsibility ? $t('
|
|
332
|
+
human: platformResponsibility ? $t('%1B9') : $t('%8G'),
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
335
|
|
|
@@ -342,7 +342,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
342
342
|
throw new SimpleError({
|
|
343
343
|
code: 'invalid_field',
|
|
344
344
|
message: 'Invalid organization',
|
|
345
|
-
human: $t(`
|
|
345
|
+
human: $t(`%Dt`),
|
|
346
346
|
field: 'organizationId',
|
|
347
347
|
});
|
|
348
348
|
}
|
|
@@ -352,7 +352,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
352
352
|
throw new SimpleError({
|
|
353
353
|
code: 'invalid_field',
|
|
354
354
|
message: 'Missing groupId',
|
|
355
|
-
human: $t(`
|
|
355
|
+
human: $t(`%Du`),
|
|
356
356
|
field: 'groupId',
|
|
357
357
|
});
|
|
358
358
|
}
|
|
@@ -362,7 +362,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
362
362
|
throw new SimpleError({
|
|
363
363
|
code: 'invalid_field',
|
|
364
364
|
message: 'Invalid groupId',
|
|
365
|
-
human: $t(`
|
|
365
|
+
human: $t(`%Dv`),
|
|
366
366
|
field: 'groupId',
|
|
367
367
|
});
|
|
368
368
|
}
|
|
@@ -371,7 +371,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
371
371
|
throw new SimpleError({
|
|
372
372
|
code: 'invalid_field',
|
|
373
373
|
message: 'Invalid groupId',
|
|
374
|
-
human: $t(`
|
|
374
|
+
human: $t(`%Dw`),
|
|
375
375
|
field: 'groupId',
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -383,7 +383,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
383
383
|
model.endDate = put.endDate;
|
|
384
384
|
|
|
385
385
|
if (put.startDate.getTime() > Date.now() + 5 * 60 * 1000) {
|
|
386
|
-
throw Context.auth.error($t(`
|
|
386
|
+
throw Context.auth.error($t(`%Do`));
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
if (put.startDate.getTime() > Date.now()) {
|
|
@@ -391,7 +391,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
if (put.endDate && put.endDate > new Date(Date.now() + 60 * 1000)) {
|
|
394
|
-
throw Context.auth.error($t(`
|
|
394
|
+
throw Context.auth.error($t(`%Dx`));
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
model.startDate = put.startDate;
|
|
@@ -418,7 +418,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
418
418
|
throw new SimpleError({
|
|
419
419
|
code: 'invalid_field',
|
|
420
420
|
message: 'Invalid email',
|
|
421
|
-
human: $t(`
|
|
421
|
+
human: $t(`%Dy`),
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
|
|
@@ -435,7 +435,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
435
435
|
throw new SimpleError({
|
|
436
436
|
code: 'invalid_field',
|
|
437
437
|
message: 'Invalid period',
|
|
438
|
-
human: Context.i18n.$t(`
|
|
438
|
+
human: Context.i18n.$t(`%A9`),
|
|
439
439
|
field: 'periodId',
|
|
440
440
|
});
|
|
441
441
|
}
|
|
@@ -444,7 +444,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
444
444
|
throw new SimpleError({
|
|
445
445
|
code: 'invalid_field',
|
|
446
446
|
message: 'Invalid period',
|
|
447
|
-
human: Context.i18n.$t(
|
|
447
|
+
human: Context.i18n.$t(`%AA`, { period: period?.getBaseStructure().name }),
|
|
448
448
|
field: 'periodId',
|
|
449
449
|
});
|
|
450
450
|
}
|
|
@@ -454,13 +454,13 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
454
454
|
throw new SimpleError({
|
|
455
455
|
code: 'invalid_field',
|
|
456
456
|
message: 'Invalid organization',
|
|
457
|
-
human: $t(`
|
|
457
|
+
human: $t(`%Dz`),
|
|
458
458
|
field: 'organizationId',
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
if (!await Context.auth.hasFullAccess(put.organizationId)) {
|
|
463
|
-
throw Context.auth.error($t(`
|
|
463
|
+
throw Context.auth.error($t(`%E0`));
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
const putForOrganization = await Context.auth.getOrganization(put.organizationId);
|
|
@@ -472,7 +472,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
472
472
|
code: 'invalid_field',
|
|
473
473
|
field: 'membershipTypeId',
|
|
474
474
|
message: 'Invalid membership type',
|
|
475
|
-
human: $t(`
|
|
475
|
+
human: $t(`%E1`),
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
|
|
@@ -494,7 +494,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
494
494
|
code: 'invalid_field',
|
|
495
495
|
field: 'membershipTypeId',
|
|
496
496
|
message: 'Invalid membership type',
|
|
497
|
-
human: $t(`
|
|
497
|
+
human: $t(`%E2`),
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
500
|
|
|
@@ -541,7 +541,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
541
541
|
code: 'invalid_field',
|
|
542
542
|
field: 'startDate',
|
|
543
543
|
message: 'Overlapping memberships',
|
|
544
|
-
human: $t(`
|
|
544
|
+
human: $t(`%1NA`),
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
547
|
if (existing.locked) {
|
|
@@ -549,7 +549,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
549
549
|
code: 'invalid_field',
|
|
550
550
|
field: 'startDate',
|
|
551
551
|
message: 'Overlapping memberships',
|
|
552
|
-
human: $t(`
|
|
552
|
+
human: $t(`%1NB`),
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
555
|
if (!existing.generated) {
|
|
@@ -557,14 +557,14 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
557
557
|
code: 'invalid_field',
|
|
558
558
|
field: 'startDate',
|
|
559
559
|
message: 'Overlapping memberships',
|
|
560
|
-
human: $t(`
|
|
560
|
+
human: $t(`%1NC`),
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
563
|
throw new SimpleError({
|
|
564
564
|
code: 'invalid_field',
|
|
565
565
|
field: 'startDate',
|
|
566
566
|
message: 'Overlapping memberships',
|
|
567
|
-
human: $t(`
|
|
567
|
+
human: $t(`%1ND`),
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
else if (existing) {
|
|
@@ -596,12 +596,12 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
596
596
|
code: 'invalid_field',
|
|
597
597
|
field: 'id',
|
|
598
598
|
message: 'Invalid id',
|
|
599
|
-
human: $t(`
|
|
599
|
+
human: $t(`%E3`),
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
if (!await Context.auth.hasFullAccess(membership.organizationId)) {
|
|
604
|
-
throw Context.auth.error($t(`
|
|
604
|
+
throw Context.auth.error($t(`%E4`));
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
if (membership.periodId !== platform.periodId) {
|
|
@@ -611,7 +611,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
611
611
|
throw new SimpleError({
|
|
612
612
|
code: 'invalid_field',
|
|
613
613
|
message: 'Invalid period',
|
|
614
|
-
human: $t(`
|
|
614
|
+
human: $t(`%BZ`),
|
|
615
615
|
field: 'periodId',
|
|
616
616
|
});
|
|
617
617
|
}
|
|
@@ -620,7 +620,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
620
620
|
throw new SimpleError({
|
|
621
621
|
code: 'invalid_field',
|
|
622
622
|
message: 'Invalid period',
|
|
623
|
-
human: $t(`
|
|
623
|
+
human: $t(`%Ba`),
|
|
624
624
|
field: 'periodId',
|
|
625
625
|
});
|
|
626
626
|
}
|
|
@@ -633,11 +633,11 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
633
633
|
}
|
|
634
634
|
else {
|
|
635
635
|
if (p.locked === true) {
|
|
636
|
-
throw Context.auth.error($t('
|
|
636
|
+
throw Context.auth.error($t('%BX'));
|
|
637
637
|
}
|
|
638
638
|
|
|
639
639
|
if (p.locked === false) {
|
|
640
|
-
throw Context.auth.error($t('
|
|
640
|
+
throw Context.auth.error($t('%BY'));
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
|
|
@@ -654,12 +654,12 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
654
654
|
code: 'invalid_field',
|
|
655
655
|
field: 'id',
|
|
656
656
|
message: 'Invalid id',
|
|
657
|
-
human: $t(`
|
|
657
|
+
human: $t(`%E3`),
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
660
|
|
|
661
661
|
if (!await Context.auth.hasFullAccess(membership.organizationId)) {
|
|
662
|
-
throw Context.auth.error($t(`
|
|
662
|
+
throw Context.auth.error($t(`%E5`));
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
if (membership.periodId !== platform.periodId) {
|
|
@@ -669,7 +669,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
669
669
|
throw new SimpleError({
|
|
670
670
|
code: 'invalid_field',
|
|
671
671
|
message: 'Invalid period',
|
|
672
|
-
human: Context.i18n.$t(`
|
|
672
|
+
human: Context.i18n.$t(`%AB`),
|
|
673
673
|
field: 'periodId',
|
|
674
674
|
});
|
|
675
675
|
}
|
|
@@ -678,7 +678,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
678
678
|
throw new SimpleError({
|
|
679
679
|
code: 'invalid_field',
|
|
680
680
|
message: 'Invalid period',
|
|
681
|
-
human: Context.i18n.$t(
|
|
681
|
+
human: Context.i18n.$t(`%AC`, { period: period?.getBaseStructure().name }),
|
|
682
682
|
field: 'periodId',
|
|
683
683
|
});
|
|
684
684
|
}
|
|
@@ -689,14 +689,14 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
689
689
|
throw new SimpleError({
|
|
690
690
|
code: 'invalid_field',
|
|
691
691
|
message: 'Invalid invoice',
|
|
692
|
-
human: $t(`
|
|
692
|
+
human: $t(`%E6`),
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
throw new SimpleError({
|
|
697
697
|
code: 'invalid_field',
|
|
698
698
|
message: 'Invalid invoice',
|
|
699
|
-
human: $t(`
|
|
699
|
+
human: $t(`%E7`),
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
702
|
|
|
@@ -746,7 +746,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
746
746
|
for (const id of ids) {
|
|
747
747
|
const member = await Member.getByIdWithUsersAndRegistrations(id);
|
|
748
748
|
if (!member || !await Context.auth.canDeleteMember(member)) {
|
|
749
|
-
throw Context.auth.error($t(`
|
|
749
|
+
throw Context.auth.error($t(`%E8`));
|
|
750
750
|
}
|
|
751
751
|
|
|
752
752
|
await MemberUserSyncer.onDeleteMember(member);
|
|
@@ -939,14 +939,14 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
939
939
|
}
|
|
940
940
|
catch (e) {
|
|
941
941
|
Email.sendWebmaster({
|
|
942
|
-
subject: $t(`
|
|
943
|
-
text: $t(`
|
|
942
|
+
subject: $t(`%E9`),
|
|
943
|
+
text: $t(`%EA`) + ' ' + member.details.name + ' ' + $t(`%1G`) + ' ' + member.id + ')' + '\n\n' + e.message + '\n\nStamhoofd',
|
|
944
944
|
});
|
|
945
945
|
|
|
946
946
|
throw new SimpleError({
|
|
947
947
|
code: 'too_many_tries',
|
|
948
948
|
message: 'Too many securityCodes limited',
|
|
949
|
-
human: $t(`
|
|
949
|
+
human: $t(`%EB`),
|
|
950
950
|
field: 'details.securityCode',
|
|
951
951
|
});
|
|
952
952
|
}
|
|
@@ -958,7 +958,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
958
958
|
code: 'invalid_field',
|
|
959
959
|
field: 'details.securityCode',
|
|
960
960
|
message: 'Invalid security code',
|
|
961
|
-
human: Context.i18n.$t('
|
|
961
|
+
human: Context.i18n.$t('%2i'),
|
|
962
962
|
statusCode: 400,
|
|
963
963
|
});
|
|
964
964
|
}
|
|
@@ -999,7 +999,7 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
999
999
|
throw new SimpleError({
|
|
1000
1000
|
code: 'known_member_missing_rights',
|
|
1001
1001
|
message: 'Creating known member without sufficient access rights',
|
|
1002
|
-
human: $t(
|
|
1002
|
+
human: $t(`%1BA`, { member: member.details.firstName }),
|
|
1003
1003
|
statusCode: 400,
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
@@ -1069,11 +1069,11 @@ export class PatchOrganizationMembersEndpoint extends Endpoint<Params, Query, Bo
|
|
|
1069
1069
|
message: 'Maximum members reached',
|
|
1070
1070
|
human: responsibility.maximumMembers === 1
|
|
1071
1071
|
? (model.groupId
|
|
1072
|
-
? $t('
|
|
1073
|
-
: $t('
|
|
1072
|
+
? $t('%C5', { responsibility: responsibility.name })
|
|
1073
|
+
: $t('%C6', { responsibility: responsibility.name }))
|
|
1074
1074
|
: (model.groupId
|
|
1075
|
-
? $t('
|
|
1076
|
-
: $t('
|
|
1075
|
+
? $t('%C7', { count: responsibility.maximumMembers.toFixed(), responsibility: responsibility.name })
|
|
1076
|
+
: $t('%C8', { count: responsibility.maximumMembers.toFixed(), responsibility: responsibility.name })),
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
@@ -32,7 +32,7 @@ export async function validateGroupFilter({ filter, permissionLevel, key }: { fi
|
|
|
32
32
|
code: 'invalid_field',
|
|
33
33
|
field: 'filter',
|
|
34
34
|
message: 'You must filter on a group of the organization you are trying to access',
|
|
35
|
-
human: $t(`
|
|
35
|
+
human: $t(`%15e`),
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -63,7 +63,7 @@ export async function validateGroupFilter({ filter, permissionLevel, key }: { fi
|
|
|
63
63
|
if (permissionLevel !== PermissionLevel.Read || !group.settings.implicitlyAllowViewRegistrations) {
|
|
64
64
|
throw Context.auth.error({
|
|
65
65
|
message: 'You do not have access to this group',
|
|
66
|
-
human: $t(
|
|
66
|
+
human: $t(`%15f`, { groupName: group.settings.name }),
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
@@ -36,7 +36,7 @@ export class CheckRegisterCodeEndpoint extends Endpoint<Params, Query, Body, Res
|
|
|
36
36
|
throw new SimpleError({
|
|
37
37
|
code: 'invalid_code',
|
|
38
38
|
message: 'Invalid code',
|
|
39
|
-
human: $t(`
|
|
39
|
+
human: $t(`%EC`),
|
|
40
40
|
field: 'registerCode',
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -32,7 +32,7 @@ export class CreateOrganizationEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
32
32
|
throw new SimpleError({
|
|
33
33
|
code: 'invalid_field',
|
|
34
34
|
message: 'Not allowed',
|
|
35
|
-
human: $t(`
|
|
35
|
+
human: $t(`%ED`),
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ export class CreateOrganizationEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
41
41
|
throw new SimpleError({
|
|
42
42
|
code: 'invalid_field',
|
|
43
43
|
message: 'Should not be empty',
|
|
44
|
-
human: $t(`
|
|
44
|
+
human: $t(`%Cz`),
|
|
45
45
|
field: 'organization.name',
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -49,7 +49,7 @@ export class CreateOrganizationEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
49
49
|
throw new SimpleError({
|
|
50
50
|
code: 'invalid_field',
|
|
51
51
|
message: 'Field is too short',
|
|
52
|
-
human: $t(`
|
|
52
|
+
human: $t(`%D0`),
|
|
53
53
|
field: 'organization.name',
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -60,7 +60,7 @@ export class CreateOrganizationEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
60
60
|
throw new SimpleError({
|
|
61
61
|
code: 'invalid_field',
|
|
62
62
|
message: 'Field is too long',
|
|
63
|
-
human: $t(`
|
|
63
|
+
human: $t(`%D1`),
|
|
64
64
|
field: 'organization.name',
|
|
65
65
|
});
|
|
66
66
|
}
|
|
@@ -70,7 +70,7 @@ export class CreateOrganizationEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
70
70
|
throw new SimpleError({
|
|
71
71
|
code: 'name_taken',
|
|
72
72
|
message: 'An organization with the same name already exists',
|
|
73
|
-
human: $t(`
|
|
73
|
+
human: $t(`%D3`),
|
|
74
74
|
field: 'name',
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -163,7 +163,7 @@ export class PatchPlatformEndpoint extends Endpoint<
|
|
|
163
163
|
throw new SimpleError({
|
|
164
164
|
code: 'cannot_set_locked_period',
|
|
165
165
|
message: 'Platform period cannot be set to a locked period',
|
|
166
|
-
human: $t(`
|
|
166
|
+
human: $t(`%EE`),
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
platform.periodId = period.id;
|
|
@@ -135,7 +135,7 @@ export class GetRegistrationsEndpoint extends Endpoint<Params, Query, Body, Resp
|
|
|
135
135
|
if (groupIds.length === 0) {
|
|
136
136
|
throw Context.auth.error({
|
|
137
137
|
message: 'You must filter on a group of the organization you are trying to access',
|
|
138
|
-
human: $t(`
|
|
138
|
+
human: $t(`%15g`),
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -205,7 +205,7 @@ export class GetRegistrationsEndpoint extends Endpoint<Params, Query, Body, Resp
|
|
|
205
205
|
throw new SimpleError({
|
|
206
206
|
code: 'timeout',
|
|
207
207
|
message: 'Query took too long',
|
|
208
|
-
human: $t(`
|
|
208
|
+
human: $t(`%Cv`),
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
throw error;
|
|
@@ -98,7 +98,7 @@ export class PatchUserMembersEndpoint extends Endpoint<Params, Query, Body, Resp
|
|
|
98
98
|
throw new SimpleError({
|
|
99
99
|
code: 'not_allowed',
|
|
100
100
|
message: 'Cannot override details',
|
|
101
|
-
human: $t(`
|
|
101
|
+
human: $t(`%Dj`),
|
|
102
102
|
field: 'details',
|
|
103
103
|
});
|
|
104
104
|
}
|
|
@@ -122,7 +122,7 @@ export class PatchUserMembersEndpoint extends Endpoint<Params, Query, Body, Resp
|
|
|
122
122
|
throw new SimpleError({
|
|
123
123
|
code: 'invalid_data',
|
|
124
124
|
message: 'No details provided',
|
|
125
|
-
human: $t(`
|
|
125
|
+
human: $t(`%EG`),
|
|
126
126
|
field: 'details',
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -186,7 +186,7 @@ export class PatchUserMembersEndpoint extends Endpoint<Params, Query, Body, Resp
|
|
|
186
186
|
if (details.firstName.length < 2) {
|
|
187
187
|
throw new SimpleError({
|
|
188
188
|
code: 'invalid_field',
|
|
189
|
-
message: $t(`
|
|
189
|
+
message: $t(`%EH`),
|
|
190
190
|
field: 'firstName',
|
|
191
191
|
});
|
|
192
192
|
}
|
|
@@ -194,7 +194,7 @@ export class PatchUserMembersEndpoint extends Endpoint<Params, Query, Body, Resp
|
|
|
194
194
|
if (details.lastName.length < 2) {
|
|
195
195
|
throw new SimpleError({
|
|
196
196
|
code: 'invalid_field',
|
|
197
|
-
message: $t(`
|
|
197
|
+
message: $t(`%EI`),
|
|
198
198
|
field: 'lastName',
|
|
199
199
|
});
|
|
200
200
|
}
|