@stamhoofd/backend 2.82.0 → 2.83.1
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/GroupLogger.ts +3 -3
- package/src/audit-logs/MemberResponsibilityRecordLogger.ts +1 -1
- package/src/audit-logs/OrderLogger.ts +1 -1
- package/src/audit-logs/RegistrationLogger.ts +1 -1
- 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 +5 -5
- package/src/endpoints/admin/organizations/GetOrganizationsEndpoint.ts +1 -1
- package/src/endpoints/admin/organizations/PatchOrganizationsEndpoint.ts +8 -8
- package/src/endpoints/auth/CreateAdminEndpoint.ts +2 -2
- 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/email/GetEmailAddressEndpoint.ts +1 -1
- package/src/endpoints/global/email/GetEmailEndpoint.ts +1 -1
- package/src/endpoints/global/email/ManageEmailAddressEndpoint.ts +1 -1
- package/src/endpoints/global/email/PatchEmailEndpoint.ts +4 -4
- package/src/endpoints/global/events/GetEventNotificationsEndpoint.ts +1 -1
- package/src/endpoints/global/events/PatchEventNotificationsEndpoint.ts +1 -1
- package/src/endpoints/global/events/PatchEventsEndpoint.ts +22 -16
- package/src/endpoints/global/files/ExportToExcelEndpoint.ts +1 -1
- package/src/endpoints/global/files/UploadFile.ts +14 -2
- package/src/endpoints/global/files/UploadImage.ts +2 -2
- package/src/endpoints/global/members/GetMemberFamilyEndpoint.ts +2 -2
- package/src/endpoints/global/members/GetMembersEndpoint.ts +1 -1
- package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.test.ts +11 -11
- package/src/endpoints/global/members/PatchOrganizationMembersEndpoint.ts +34 -34
- 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/GetPaymentRegistrations.ts +2 -2
- package/src/endpoints/global/registration/PatchUserMembersEndpoint.test.ts +10 -10
- package/src/endpoints/global/registration/PatchUserMembersEndpoint.ts +4 -4
- package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +37 -37
- package/src/endpoints/global/registration-periods/PatchRegistrationPeriodsEndpoint.ts +2 -2
- 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/PatchDocumentTemplateEndpoint.ts +2 -2
- 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/organization/PatchOrganizationEndpoint.test.ts +1218 -3
- package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +136 -12
- package/src/endpoints/organization/dashboard/organization/SetOrganizationDomainEndpoint.ts +3 -3
- package/src/endpoints/organization/dashboard/payments/GetMemberBalanceEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/payments/GetPaymentsEndpoint.ts +1 -1
- package/src/endpoints/organization/dashboard/payments/PatchBalanceItemsEndpoint.ts +11 -11
- package/src/endpoints/organization/dashboard/payments/PatchPaymentsEndpoint.ts +13 -13
- package/src/endpoints/organization/dashboard/registration-periods/PatchOrganizationRegistrationPeriodsEndpoint.ts +16 -16
- 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/PatchDiscountCodesEndpoint.ts +2 -2
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.ts +8 -8
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopTicketsEndpoint.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 +10 -8
- package/src/excel-loaders/event-notifications.ts +11 -11
- package/src/excel-loaders/members.ts +34 -34
- package/src/excel-loaders/organizations.ts +23 -23
- package/src/excel-loaders/payments.ts +39 -39
- package/src/excel-loaders/receivable-balances.ts +21 -21
- package/src/helpers/AddressValidator.ts +6 -6
- package/src/helpers/AdminPermissionChecker.ts +29 -5
- package/src/helpers/AuthenticatedStructures.ts +8 -8
- package/src/helpers/BuckarooHelper.ts +1 -1
- package/src/helpers/Context.ts +3 -3
- package/src/helpers/FileCache.ts +7 -7
- package/src/helpers/ForwardHandler.ts +1 -1
- package/src/helpers/GlobalHelper.ts +6 -4
- package/src/helpers/MembershipCharger.ts +2 -2
- package/src/helpers/SetupStepUpdater.ts +1 -1
- package/src/helpers/StripeHelper.ts +7 -7
- package/src/helpers/XlsxTransformerColumnHelper.ts +18 -18
- package/src/services/DocumentService.ts +1 -1
- package/src/services/EventNotificationService.ts +1 -1
- package/src/services/MemberNumberService.ts +3 -3
- package/src/services/SSOService.ts +5 -5
- package/src/sql-filters/members.ts +1 -1
- package/tests/e2e/private-files.test.ts +3 -3
|
@@ -53,7 +53,7 @@ export class GetStripeLoginLinkEndpoint extends Endpoint<Params, Query, Body, Re
|
|
|
53
53
|
if (!model || model.organizationId !== organization.id || model.status !== 'active') {
|
|
54
54
|
throw new SimpleError({
|
|
55
55
|
code: 'not_found',
|
|
56
|
-
message:
|
|
56
|
+
message: $t(`e5f6d64c-b3fe-4c8a-a711-ebdb14098c98`),
|
|
57
57
|
statusCode: 400,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -38,7 +38,7 @@ export class UpdateStripeAccountEndpoint extends Endpoint<Params, Query, Body, R
|
|
|
38
38
|
// Search account in database
|
|
39
39
|
const model = await StripeAccount.getByID(request.params.id);
|
|
40
40
|
if (!model || model.organizationId !== organization.id) {
|
|
41
|
-
throw Context.auth.notFoundOrNoAccess(
|
|
41
|
+
throw Context.auth.notFoundOrNoAccess($t(`e5f6d64c-b3fe-4c8a-a711-ebdb14098c98`));
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// Get account
|
|
@@ -61,7 +61,7 @@ export class CreateApiUserEndpoint extends Endpoint<Params, Query, Body, Respons
|
|
|
61
61
|
const rateLimits = request.body.meta.rateLimits;
|
|
62
62
|
if (rateLimits) {
|
|
63
63
|
if (!Context.auth.hasPlatformFullAccess()) {
|
|
64
|
-
throw Context.auth.error($t('
|
|
64
|
+
throw Context.auth.error($t('370932fc-6614-44be-bb8f-ff921305fadd'));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
admin.meta = admin.meta ?? UserMeta.create({});
|
|
@@ -41,7 +41,7 @@ export class DeleteUserEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
41
41
|
if (user.id == request.params.id) {
|
|
42
42
|
throw new SimpleError({
|
|
43
43
|
code: 'permission_denied',
|
|
44
|
-
message:
|
|
44
|
+
message: $t(`253f8a6e-bef8-4a3a-8a7c-2580d8bad49c`),
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -49,7 +49,7 @@ export class DeleteUserEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
49
49
|
if (!editUser || !Context.auth.checkScope(editUser.organizationId)) {
|
|
50
50
|
throw new SimpleError({
|
|
51
51
|
code: 'permission_denied',
|
|
52
|
-
message:
|
|
52
|
+
message: $t(`dd63dfe1-1a13-476b-b729-10b9df944e88`),
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -41,7 +41,7 @@ export class PatchApiUserEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
41
41
|
const editUser = request.body.id === user.id ? user : await User.getByID(request.body.id);
|
|
42
42
|
|
|
43
43
|
if (!editUser || !await Context.auth.canAccessUser(editUser, PermissionLevel.Write) || !editUser.isApiUser) {
|
|
44
|
-
throw Context.auth.notFoundOrNoAccess(
|
|
44
|
+
throw Context.auth.notFoundOrNoAccess($t(`cd099f48-7a5e-4993-854d-697104201871`));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
editUser.firstName = request.body.name ?? editUser.name;
|
|
@@ -96,7 +96,7 @@ export class PatchApiUserEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
96
96
|
const rateLimits = request.body.meta.rateLimits;
|
|
97
97
|
if (rateLimits && rateLimits !== editUser.meta?.rateLimits) {
|
|
98
98
|
if (!Context.auth.hasPlatformFullAccess()) {
|
|
99
|
-
throw Context.auth.error($t('
|
|
99
|
+
throw Context.auth.error($t('370932fc-6614-44be-bb8f-ff921305fadd'));
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
editUser.meta = editUser.meta ?? UserMeta.create({});
|
|
@@ -38,7 +38,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
|
|
|
38
38
|
|
|
39
39
|
// Fast throw first (more in depth checking for patches later)
|
|
40
40
|
if (!await Context.auth.canCreateWebshops(organization.id)) {
|
|
41
|
-
throw Context.auth.error(
|
|
41
|
+
throw Context.auth.error($t(`e97dabba-7c7f-4705-b5be-fa4ea9f701ed`));
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const errors = new SimpleErrors();
|
|
@@ -141,7 +141,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
|
|
|
141
141
|
throw new SimpleError({
|
|
142
142
|
code: 'failed_to_generate_unique_uri',
|
|
143
143
|
message: 'Failed to generate unique uri',
|
|
144
|
-
human:
|
|
144
|
+
human: $t(`a159e71b-e975-48c0-a33b-fdb52ad22299`),
|
|
145
145
|
statusCode: 500,
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -168,7 +168,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
|
|
|
168
168
|
throw new SimpleError({
|
|
169
169
|
code: 'missing_permissions',
|
|
170
170
|
message: 'You cannot create a webshop without having full permissions on the created webshop',
|
|
171
|
-
human:
|
|
171
|
+
human: $t(`28f1afe6-b40d-495c-a58e-2b665c20a294`),
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -211,7 +211,7 @@ export class CreateWebshopEndpoint extends Endpoint<Params, Query, Body, Respons
|
|
|
211
211
|
throw new SimpleError({
|
|
212
212
|
code: 'failed_to_generate_unique_domainUri',
|
|
213
213
|
message: 'Failed to generate unique domainUri',
|
|
214
|
-
human:
|
|
214
|
+
human: $t(`a159e71b-e975-48c0-a33b-fdb52ad22299`),
|
|
215
215
|
statusCode: 500,
|
|
216
216
|
});
|
|
217
217
|
}
|
|
@@ -66,7 +66,7 @@ export class PatchWebshopDiscountCodesEndpoint extends Endpoint<Params, Query, B
|
|
|
66
66
|
throw new SimpleError({
|
|
67
67
|
code: 'used_code',
|
|
68
68
|
message: 'Discount code already in use',
|
|
69
|
-
human:
|
|
69
|
+
human: $t(`d8cf1267-28dd-4d70-9f5f-1ed800729f6d`) + ' ' + struct.code + $t(`9145b0bf-8539-4ddc-8867-859f8716f026`),
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
throw e;
|
|
@@ -98,7 +98,7 @@ export class PatchWebshopDiscountCodesEndpoint extends Endpoint<Params, Query, B
|
|
|
98
98
|
throw new SimpleError({
|
|
99
99
|
code: 'used_code',
|
|
100
100
|
message: 'Discount code already in use',
|
|
101
|
-
human:
|
|
101
|
+
human: $t(`d8cf1267-28dd-4d70-9f5f-1ed800729f6d`) + ' ' + model.code + $t(`9145b0bf-8539-4ddc-8867-859f8716f026`),
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
throw e;
|
|
@@ -91,7 +91,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
91
91
|
throw new SimpleError({
|
|
92
92
|
code: 'domain_already_used',
|
|
93
93
|
message: 'This domain is already used by another organization',
|
|
94
|
-
human:
|
|
94
|
+
human: $t(`91e43562-956f-41ac-b5b6-a8bcb63edd66`),
|
|
95
95
|
statusCode: 400,
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -107,7 +107,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
107
107
|
throw new SimpleError({
|
|
108
108
|
code: 'invalid_field',
|
|
109
109
|
message: 'Invalid domain',
|
|
110
|
-
human:
|
|
110
|
+
human: $t(`0aa565ac-c12a-4b38-9612-0a615e6a67e0`),
|
|
111
111
|
field: 'customUrl',
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -128,7 +128,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
128
128
|
throw new SimpleError({
|
|
129
129
|
code: 'invalid_field',
|
|
130
130
|
message: 'domainUri contains invalid characters',
|
|
131
|
-
human:
|
|
131
|
+
human: $t(`4e842c04-da6c-4690-a187-665fa4a60bae`),
|
|
132
132
|
field: 'customUrl',
|
|
133
133
|
});
|
|
134
134
|
}
|
|
@@ -139,7 +139,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
139
139
|
throw new SimpleError({
|
|
140
140
|
code: 'invalid_domain',
|
|
141
141
|
message: 'This domain is already in use',
|
|
142
|
-
human:
|
|
142
|
+
human: $t(`11064157-89fd-4c12-b56a-1f5f236a010d`) + ' ' + existing.meta.name + $t(`42dccb0d-88b1-4a18-9250-04aa969b1299`),
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -159,7 +159,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
159
159
|
throw new SimpleError({
|
|
160
160
|
code: 'invalid_field',
|
|
161
161
|
message: 'Uri cannot be empty',
|
|
162
|
-
human:
|
|
162
|
+
human: $t(`6af872f3-4547-4fd2-8949-0163e6473c04`),
|
|
163
163
|
field: 'uri',
|
|
164
164
|
});
|
|
165
165
|
}
|
|
@@ -168,7 +168,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
168
168
|
throw new SimpleError({
|
|
169
169
|
code: 'invalid_field',
|
|
170
170
|
message: 'Uri contains invalid characters',
|
|
171
|
-
human:
|
|
171
|
+
human: $t(`4e842c04-da6c-4690-a187-665fa4a60bae`),
|
|
172
172
|
field: 'uri',
|
|
173
173
|
});
|
|
174
174
|
}
|
|
@@ -181,7 +181,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
181
181
|
throw new SimpleError({
|
|
182
182
|
code: 'missing_permissions',
|
|
183
183
|
message: 'You cannot restrict your own permissions',
|
|
184
|
-
human:
|
|
184
|
+
human: $t(`0b70b194-296a-457e-804b-abe800bd5b4c`),
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
|
|
@@ -194,7 +194,7 @@ export class PatchWebshopEndpoint extends Endpoint<Params, Query, Body, Response
|
|
|
194
194
|
throw new SimpleError({
|
|
195
195
|
code: 'invalid_field',
|
|
196
196
|
message: 'Uri already in use',
|
|
197
|
-
human:
|
|
197
|
+
human: $t(`17267b0d-0be9-4d04-b837-7687da20347f`),
|
|
198
198
|
field: 'uri',
|
|
199
199
|
});
|
|
200
200
|
}
|
|
@@ -42,7 +42,7 @@ export class PatchWebshopTicketsEndpoint extends Endpoint<Params, Query, Body, R
|
|
|
42
42
|
|
|
43
43
|
const webshop = await Webshop.getByID(request.params.id);
|
|
44
44
|
if (!webshop || !await Context.auth.canAccessWebshopTickets(webshop, PermissionLevel.Write)) {
|
|
45
|
-
throw Context.auth.notFoundOrNoAccess(
|
|
45
|
+
throw Context.auth.notFoundOrNoAccess($t(`b4969b2f-c128-44ed-a8de-279c1dd55382`));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const tickets: Ticket[] = [];
|
|
@@ -31,7 +31,7 @@ export class GetDocumentHtml extends Endpoint<Params, Query, Body, ResponseBody>
|
|
|
31
31
|
if (!document || !(await Context.auth.canAccessDocument(document))) {
|
|
32
32
|
throw new SimpleError({
|
|
33
33
|
code: 'not_found',
|
|
34
|
-
message: '
|
|
34
|
+
message: $t('a9860203-6a6d-4612-b4d4-7851e47d4dad'),
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@ export class GetDocumentHtml extends Endpoint<Params, Query, Body, ResponseBody>
|
|
|
48
48
|
if (!html) {
|
|
49
49
|
throw new SimpleError({
|
|
50
50
|
code: 'failed_generating',
|
|
51
|
-
message: '
|
|
51
|
+
message: $t('74ba486a-60b2-4d94-a6fd-159a3adfca8b'),
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -34,7 +34,7 @@ export class GetPaymentEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
34
34
|
throw new SimpleError({
|
|
35
35
|
code: 'not_found',
|
|
36
36
|
message: 'Payment not found',
|
|
37
|
-
human:
|
|
37
|
+
human: $t(`6024d1b5-f0a0-42f4-b972-636286edf929`),
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -34,7 +34,7 @@ export class CheckWebshopDiscountCodesEndpoint extends Endpoint<Params, Query, B
|
|
|
34
34
|
throw new SimpleError({
|
|
35
35
|
code: 'not_found',
|
|
36
36
|
message: 'Webshop not found',
|
|
37
|
-
human:
|
|
37
|
+
human: $t(`45c039cd-e937-42cd-934b-a2bb4ee0abdd`),
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -33,7 +33,7 @@ export class GetOrderByPaymentEndpoint extends Endpoint<Params, Query, Body, Res
|
|
|
33
33
|
throw new SimpleError({
|
|
34
34
|
code: 'not_found',
|
|
35
35
|
message: 'Order not found',
|
|
36
|
-
human:
|
|
36
|
+
human: $t(`1aced6e8-6b32-4da5-b176-906df0a1cc0a`),
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
const [order] = await Order.where({ paymentId: payment.id }, { limit: 1 });
|
|
@@ -41,7 +41,7 @@ export class GetOrderByPaymentEndpoint extends Endpoint<Params, Query, Body, Res
|
|
|
41
41
|
throw new SimpleError({
|
|
42
42
|
code: 'not_found',
|
|
43
43
|
message: 'Order not found',
|
|
44
|
-
human:
|
|
44
|
+
human: $t(`1aced6e8-6b32-4da5-b176-906df0a1cc0a`),
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -31,7 +31,7 @@ export class GetOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBody
|
|
|
31
31
|
throw new SimpleError({
|
|
32
32
|
code: 'not_found',
|
|
33
33
|
message: 'Order not found',
|
|
34
|
-
human:
|
|
34
|
+
human: $t(`1aced6e8-6b32-4da5-b176-906df0a1cc0a`),
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -55,7 +55,7 @@ export class GetTicketsEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
55
55
|
throw new SimpleError({
|
|
56
56
|
code: 'not_found',
|
|
57
57
|
message: 'Ticket not found',
|
|
58
|
-
human:
|
|
58
|
+
human: $t(`d7f095ca-0f05-4c8a-9a65-bbbf69b28af0`),
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -67,7 +67,7 @@ export class GetTicketsEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
67
67
|
throw new SimpleError({
|
|
68
68
|
code: 'not_found',
|
|
69
69
|
message: 'Ticket not found',
|
|
70
|
-
human:
|
|
70
|
+
human: $t(`d7f095ca-0f05-4c8a-9a65-bbbf69b28af0`),
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -79,7 +79,7 @@ export class GetTicketsEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
79
79
|
throw new SimpleError({
|
|
80
80
|
code: 'not_found',
|
|
81
81
|
message: 'Ticket not found',
|
|
82
|
-
human:
|
|
82
|
+
human: $t(`d7f095ca-0f05-4c8a-9a65-bbbf69b28af0`),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -40,7 +40,7 @@ export class GetWebshopEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
40
40
|
throw new SimpleError({
|
|
41
41
|
code: 'not_found',
|
|
42
42
|
message: 'Webshop not found',
|
|
43
|
-
human:
|
|
43
|
+
human: $t(`45c039cd-e937-42cd-934b-a2bb4ee0abdd`),
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -63,7 +63,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
63
63
|
throw new SimpleError({
|
|
64
64
|
code: 'not_found',
|
|
65
65
|
message: 'Webshop not found',
|
|
66
|
-
human:
|
|
66
|
+
human: $t(`648708e0-b2f1-4336-979a-3ec3ca9cb8fd`),
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -74,7 +74,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
74
74
|
throw new SimpleError({
|
|
75
75
|
code: 'not_authenticated',
|
|
76
76
|
message: 'Not authenticated',
|
|
77
|
-
human:
|
|
77
|
+
human: $t(`2d5e0e5a-3fbe-4c75-ac6e-0fe8fb534716`),
|
|
78
78
|
statusCode: 401,
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -95,7 +95,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
95
95
|
throw new SimpleError({
|
|
96
96
|
code: 'too_many_emails_period',
|
|
97
97
|
message: 'Too many e-mails limited',
|
|
98
|
-
human:
|
|
98
|
+
human: $t(`a0e947ed-42d6-4cb8-98de-e38c27afc4db`),
|
|
99
99
|
field: 'recipients',
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -110,7 +110,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
110
110
|
throw new SimpleError({
|
|
111
111
|
code: 'duplicate_codes',
|
|
112
112
|
message: 'Duplicate usage of discount codes',
|
|
113
|
-
human:
|
|
113
|
+
human: $t(`3de5ff97-4f7c-4eb3-8ead-21563ae8fbe1`),
|
|
114
114
|
field: 'cart.discountCodes',
|
|
115
115
|
});
|
|
116
116
|
}
|
|
@@ -122,7 +122,7 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
122
122
|
throw new SimpleError({
|
|
123
123
|
code: 'invalid_code',
|
|
124
124
|
message: 'Invalid discount code',
|
|
125
|
-
human:
|
|
125
|
+
human: $t(`c119c353-14ad-4a9e-958f-44189725f105`),
|
|
126
126
|
field: 'cart.discountCodes',
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -280,14 +280,14 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
280
280
|
if (!token) {
|
|
281
281
|
throw new SimpleError({
|
|
282
282
|
code: '',
|
|
283
|
-
message:
|
|
283
|
+
message: $t(`b77e1f68-8928-42a2-802b-059fa73bedc3`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
const profileId = organization.privateMeta.mollieProfile?.id ?? await token.getProfileId(webshop.getHost());
|
|
287
287
|
if (!profileId) {
|
|
288
288
|
throw new SimpleError({
|
|
289
289
|
code: '',
|
|
290
|
-
message:
|
|
290
|
+
message: $t(`5574469f-8eee-47fe-9fb6-1b097142ac75`, { method: PaymentMethodHelper.getName(payment.method) }),
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
const mollieClient = createMollieClient({ accessToken: await token.getAccessToken() });
|
|
@@ -335,7 +335,9 @@ export class PlaceOrderEndpoint extends Endpoint<Params, Query, Body, ResponseBo
|
|
|
335
335
|
if ((payment.status as any) === PaymentStatus.Failed) {
|
|
336
336
|
throw new SimpleError({
|
|
337
337
|
code: 'payment_failed',
|
|
338
|
-
message:
|
|
338
|
+
message: $t(`b77e1f68-8928-42a2-802b-059fa73bedc3`, {
|
|
339
|
+
method: PaymentMethodHelper.getName(payment.method),
|
|
340
|
+
}),
|
|
339
341
|
});
|
|
340
342
|
}
|
|
341
343
|
}
|
|
@@ -8,11 +8,11 @@ import { XlsxTransformerColumnHelper } from '../helpers/XlsxTransformerColumnHel
|
|
|
8
8
|
// Assign to a typed variable to assure we have correct type checking in place
|
|
9
9
|
const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
10
10
|
id: 'event-notifications',
|
|
11
|
-
name:
|
|
11
|
+
name: $t(`bdb23973-b215-447f-8077-f1e2c0bc3034`),
|
|
12
12
|
columns: [
|
|
13
13
|
{
|
|
14
14
|
id: 'id',
|
|
15
|
-
name:
|
|
15
|
+
name: $t(`29360811-3663-496c-8d8f-c9fdf9467a74`),
|
|
16
16
|
width: 40,
|
|
17
17
|
getValue: (notification: EventNotification) => ({
|
|
18
18
|
value: notification.id,
|
|
@@ -20,7 +20,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
id: 'name',
|
|
23
|
-
name:
|
|
23
|
+
name: $t(`394aafa1-811b-4ed4-bfc6-c12ae59ff9b6`),
|
|
24
24
|
width: 40,
|
|
25
25
|
getValue: (notification: EventNotification) => ({
|
|
26
26
|
value: notification.events.map(e => e.name).join(', '),
|
|
@@ -28,7 +28,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
id: 'organization.name',
|
|
31
|
-
name:
|
|
31
|
+
name: $t(`afd7843d-f355-445b-a158-ddacf469a5b1`),
|
|
32
32
|
width: 40,
|
|
33
33
|
getValue: (notification: EventNotification) => ({
|
|
34
34
|
value: notification.organization.name,
|
|
@@ -36,7 +36,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
id: 'organization.uri',
|
|
39
|
-
name:
|
|
39
|
+
name: $t(`27cfaf26-6b88-4ebc-a50a-627a9f0f9e64`),
|
|
40
40
|
width: 30,
|
|
41
41
|
getValue: (notification: EventNotification) => ({
|
|
42
42
|
value: notification.organization.uri,
|
|
@@ -44,7 +44,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: 'status',
|
|
47
|
-
name:
|
|
47
|
+
name: $t(`d7003b29-cc92-4ef4-b07b-f283193ef2ae`),
|
|
48
48
|
width: 30,
|
|
49
49
|
getValue: (notification: EventNotification) => ({
|
|
50
50
|
value: Formatter.capitalizeFirstLetter(EventNotificationStatusHelper.getName(notification.status)),
|
|
@@ -52,7 +52,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
id: 'feedbackText',
|
|
55
|
-
name:
|
|
55
|
+
name: $t(`c4cc50fc-f2f1-4af4-abaf-fe41d5fe8c0e`),
|
|
56
56
|
width: 80,
|
|
57
57
|
getValue: (notification: EventNotification) => ({
|
|
58
58
|
value: notification.status !== EventNotificationStatus.Accepted ? notification.feedbackText : null,
|
|
@@ -65,7 +65,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
id: 'startDate',
|
|
68
|
-
name:
|
|
68
|
+
name: $t(`bbe0af99-b574-4719-a505-ca2285fa86e4`),
|
|
69
69
|
width: 20,
|
|
70
70
|
getValue: (notification: EventNotification) => ({
|
|
71
71
|
value: notification.startDate,
|
|
@@ -78,7 +78,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
id: 'endDate',
|
|
81
|
-
name:
|
|
81
|
+
name: $t(`3c90169c-9776-4d40-bda0-dba27a5bad69`),
|
|
82
82
|
width: 20,
|
|
83
83
|
getValue: (notification: EventNotification) => ({
|
|
84
84
|
value: notification.endDate,
|
|
@@ -91,7 +91,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
id: 'submittedAt',
|
|
94
|
-
name:
|
|
94
|
+
name: $t(`5a1dedb6-6d67-4538-9719-e0a511fca6dd`),
|
|
95
95
|
width: 20,
|
|
96
96
|
getValue: (notification: EventNotification) => ({
|
|
97
97
|
value: notification.submittedAt,
|
|
@@ -104,7 +104,7 @@ const sheet: XlsxTransformerSheet<EventNotification, EventNotification> = {
|
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
id: 'submittedBy',
|
|
107
|
-
name:
|
|
107
|
+
name: $t(`aaa24b94-c733-40e1-9a25-76d1c65d3737`),
|
|
108
108
|
width: 40,
|
|
109
109
|
getValue: (notification: EventNotification) => ({
|
|
110
110
|
value: notification.submittedBy?.name ?? '',
|