@stamhoofd/backend 2.82.0 → 2.83.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/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.ts +9 -9
- 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 +7 -4
- 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
|
@@ -4,11 +4,11 @@ import { Address, CountryHelper, Parent, ParentTypeHelper, PlatformMember, Recor
|
|
|
4
4
|
export class XlsxTransformerColumnHelper {
|
|
5
5
|
static formatBoolean(value: boolean | undefined | null): string {
|
|
6
6
|
if (value === true) {
|
|
7
|
-
return
|
|
7
|
+
return $t(`1ae8cbc7-9ef5-43db-b9a3-0117dfa43be1`);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
if (value === false) {
|
|
11
|
-
return
|
|
11
|
+
return $t(`b8b730fb-f1a3-4c13-8ec4-0aebe08a1449`);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
return '';
|
|
@@ -48,7 +48,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
48
48
|
return [
|
|
49
49
|
{
|
|
50
50
|
id: getId('type'),
|
|
51
|
-
name: getName(
|
|
51
|
+
name: getName($t(`f97ad8c1-31d2-4b61-9e09-3be86eaeba08`)),
|
|
52
52
|
width: 20,
|
|
53
53
|
getValue: (member: PlatformMember) => {
|
|
54
54
|
const parent = getParent(member);
|
|
@@ -60,7 +60,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
id: getId('firstName'),
|
|
63
|
-
name: getName(
|
|
63
|
+
name: getName($t(`efca0579-0543-4636-a996-384bc9f0527e`)),
|
|
64
64
|
width: 20,
|
|
65
65
|
getValue: (member: PlatformMember) => ({
|
|
66
66
|
value: getParent(member)?.firstName ?? '',
|
|
@@ -68,7 +68,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: getId('lastName'),
|
|
71
|
-
name: getName(
|
|
71
|
+
name: getName($t(`4a5e438e-08a1-411e-9b66-410eea7ded73`)),
|
|
72
72
|
width: 20,
|
|
73
73
|
getValue: (member: PlatformMember) => ({
|
|
74
74
|
value: getParent(member)?.lastName ?? '',
|
|
@@ -76,7 +76,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
id: getId('phone'),
|
|
79
|
-
name: getName(
|
|
79
|
+
name: getName($t(`856aaa1c-bc62-4e45-9ae5-4c7e7dca23ab`)),
|
|
80
80
|
width: 20,
|
|
81
81
|
getValue: (member: PlatformMember) => ({
|
|
82
82
|
value: getParent(member)?.phone ?? '',
|
|
@@ -84,7 +84,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
id: getId('email'),
|
|
87
|
-
name: getName(
|
|
87
|
+
name: getName($t(`82f4b6ed-afee-4655-9f07-22802e0e7ad9`)),
|
|
88
88
|
width: 20,
|
|
89
89
|
getValue: (member: PlatformMember) => ({
|
|
90
90
|
value: getParent(member)?.email ?? '',
|
|
@@ -92,7 +92,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
id: getId('nationalRegisterNumber'),
|
|
95
|
-
name: getName(
|
|
95
|
+
name: getName($t(`00881b27-7501-4c56-98de-55618be2bf11`)),
|
|
96
96
|
width: 20,
|
|
97
97
|
getValue: (member: PlatformMember) => ({
|
|
98
98
|
value: getParent(member)?.nationalRegisterNumber?.toString() ?? '',
|
|
@@ -115,7 +115,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
115
115
|
{
|
|
116
116
|
id: getId('street'),
|
|
117
117
|
name: `Straat`,
|
|
118
|
-
defaultCategory:
|
|
118
|
+
defaultCategory: $t(`2f10996e-ea97-4345-b997-c93198c7d67f`), // Ignore this name
|
|
119
119
|
width: 40,
|
|
120
120
|
getValue: (object: T) => {
|
|
121
121
|
const address = getAddress(object);
|
|
@@ -126,8 +126,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
id: getId('number'),
|
|
129
|
-
name:
|
|
130
|
-
defaultCategory:
|
|
129
|
+
name: $t(`cc1cf4a7-0bd2-4fa7-8ff2-0a12470a738d`),
|
|
130
|
+
defaultCategory: $t(`2f10996e-ea97-4345-b997-c93198c7d67f`), // Ignore this name
|
|
131
131
|
width: 20,
|
|
132
132
|
getValue: (object: T) => {
|
|
133
133
|
const address = getAddress(object);
|
|
@@ -138,8 +138,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
id: getId('postalCode'),
|
|
141
|
-
name:
|
|
142
|
-
defaultCategory:
|
|
141
|
+
name: $t(`dafc7b04-dfb2-4dbc-8bcf-f7e9c6356442`),
|
|
142
|
+
defaultCategory: $t(`2f10996e-ea97-4345-b997-c93198c7d67f`), // Ignore this name
|
|
143
143
|
width: 20,
|
|
144
144
|
getValue: (object: T) => {
|
|
145
145
|
const address = getAddress(object);
|
|
@@ -150,8 +150,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
id: getId('city'),
|
|
153
|
-
name:
|
|
154
|
-
defaultCategory:
|
|
153
|
+
name: $t(`3d538399-3585-4be6-b03d-c12afa7183e8`),
|
|
154
|
+
defaultCategory: $t(`2f10996e-ea97-4345-b997-c93198c7d67f`), // Ignore this name
|
|
155
155
|
width: 20,
|
|
156
156
|
getValue: (object: T) => {
|
|
157
157
|
const address = getAddress(object);
|
|
@@ -162,8 +162,8 @@ export class XlsxTransformerColumnHelper {
|
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
id: getId('country'),
|
|
165
|
-
name:
|
|
166
|
-
defaultCategory:
|
|
165
|
+
name: $t(`cce830e0-6c05-405f-a800-4c217dc3235f`),
|
|
166
|
+
defaultCategory: $t(`2f10996e-ea97-4345-b997-c93198c7d67f`), // Ignore this name
|
|
167
167
|
width: 20,
|
|
168
168
|
getValue: (object: T) => {
|
|
169
169
|
const address = getAddress(object);
|
|
@@ -215,7 +215,7 @@ export class XlsxTransformerColumnHelper {
|
|
|
215
215
|
name,
|
|
216
216
|
width: width ?? 20,
|
|
217
217
|
defaultCategory,
|
|
218
|
-
category: recordCategory.name,
|
|
218
|
+
category: recordCategory.name.toString(),
|
|
219
219
|
getValue: (object: T) => {
|
|
220
220
|
const answers = getRecordAnswers(object);
|
|
221
221
|
const b = (answers.get(recordSettingId)?.excelValues[index] ?? {
|
|
@@ -7,7 +7,7 @@ function getGroupFieldsAffectingDocuments(group: Group): PlainObject {
|
|
|
7
7
|
type: group.type,
|
|
8
8
|
startDate: group.settings.startDate.getTime(),
|
|
9
9
|
endDate: group.settings.endDate.getTime(),
|
|
10
|
-
name: group.settings.name,
|
|
10
|
+
name: group.settings.name.toString(),
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -132,7 +132,7 @@ export class EventNotificationService {
|
|
|
132
132
|
}
|
|
133
133
|
const events = EventNotification.events.isLoaded(notification) ? notification.events : await EventNotification.events.load(notification);
|
|
134
134
|
const type = await this.validateType(notification);
|
|
135
|
-
let submitterName =
|
|
135
|
+
let submitterName = $t(`95c51d5c-0945-4fcf-90e9-764940e7f54d`);
|
|
136
136
|
|
|
137
137
|
if (notification.submittedBy) {
|
|
138
138
|
const user = await User.getByID(notification.submittedBy);
|
|
@@ -36,7 +36,7 @@ export class MemberNumberService {
|
|
|
36
36
|
throw new SimpleError({
|
|
37
37
|
code: 'assign_member_number',
|
|
38
38
|
message: error.message,
|
|
39
|
-
human:
|
|
39
|
+
human: $t(`3a2c3e9d-4ac8-44a1-9690-98e8e4623298`),
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -61,7 +61,7 @@ export class MemberNumberService {
|
|
|
61
61
|
throw new SimpleError({
|
|
62
62
|
code: 'assign_member_number',
|
|
63
63
|
message: 'Missing birthDay',
|
|
64
|
-
human:
|
|
64
|
+
human: $t(`3e6429f3-1fc2-42ad-b585-4da7da164267`),
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -123,7 +123,7 @@ export class MemberNumberService {
|
|
|
123
123
|
throw new SimpleError({
|
|
124
124
|
code: 'assign_member_number',
|
|
125
125
|
message: `Duplicate member numbers (last try: ${memberNumber}, tries: ${tries})`,
|
|
126
|
-
human:
|
|
126
|
+
human: $t(`49742012-1ca8-4b91-a176-9ce3e17c1fe0`),
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -204,7 +204,7 @@ export class SSOService {
|
|
|
204
204
|
throw new SimpleError({
|
|
205
205
|
code: 'invalid_user',
|
|
206
206
|
message: 'User not allowed to use this login method',
|
|
207
|
-
human:
|
|
207
|
+
human: $t(`6180b5ee-b9c1-401d-89c1-c18d8ab77d74`),
|
|
208
208
|
statusCode: 400,
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -463,7 +463,7 @@ export class SSOService {
|
|
|
463
463
|
return response;
|
|
464
464
|
}
|
|
465
465
|
catch (e) {
|
|
466
|
-
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() :
|
|
466
|
+
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() : $t(`bcfb1217-01fa-4116-b0bc-54c8c6dae284`));
|
|
467
467
|
console.error('Error in openID callback', e);
|
|
468
468
|
return SSOServiceWithSession.getErrorRedirectResponse(session, message);
|
|
469
469
|
}
|
|
@@ -574,7 +574,7 @@ export class SSOServiceWithSession {
|
|
|
574
574
|
throw new SimpleError({
|
|
575
575
|
code: 'invalid_user',
|
|
576
576
|
message: 'User not found: please log in with the same email address as the user you are trying to link',
|
|
577
|
-
human:
|
|
577
|
+
human: $t(`3321ecb9-7600-498f-8ab9-b1625197804a`),
|
|
578
578
|
statusCode: 404,
|
|
579
579
|
});
|
|
580
580
|
}
|
|
@@ -628,7 +628,7 @@ export class SSOServiceWithSession {
|
|
|
628
628
|
throw new SimpleError({
|
|
629
629
|
code: 'error',
|
|
630
630
|
message: 'Could not generate token',
|
|
631
|
-
human:
|
|
631
|
+
human: $t(`f40ddd3d-a986-4ec1-9db8-32ec1376c4e8`),
|
|
632
632
|
statusCode: 500,
|
|
633
633
|
});
|
|
634
634
|
}
|
|
@@ -648,7 +648,7 @@ export class SSOServiceWithSession {
|
|
|
648
648
|
return response;
|
|
649
649
|
}
|
|
650
650
|
catch (e) {
|
|
651
|
-
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() :
|
|
651
|
+
const message = (isSimpleError(e) || isSimpleErrors(e) ? e.getHuman() : $t(`bcfb1217-01fa-4116-b0bc-54c8c6dae284`));
|
|
652
652
|
console.error('Error in openID callback', e);
|
|
653
653
|
return SSOServiceWithSession.getErrorRedirectResponse(session, message);
|
|
654
654
|
}
|
|
@@ -59,7 +59,7 @@ export const memberFilterCompilers: SQLFilterDefinitions = {
|
|
|
59
59
|
throw new SimpleError({
|
|
60
60
|
code: 'permission_denied',
|
|
61
61
|
message: 'No permissions for financial support filter (organization scope).',
|
|
62
|
-
human:
|
|
62
|
+
human: $t(`64d658fa-0727-4924-9448-b243fe8e10a1`),
|
|
63
63
|
statusCode: 400,
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { File, MemberDetails, MemberWithRegistrationsBlob, RecordCategory, RecordFileAnswer, RecordSettings, RecordType, Version } from '@stamhoofd/structures';
|
|
1
|
+
import { File, MemberDetails, MemberWithRegistrationsBlob, RecordCategory, RecordFileAnswer, RecordSettings, RecordType, TranslatedString, Version } from '@stamhoofd/structures';
|
|
2
2
|
|
|
3
3
|
import { PatchableArray, PatchableArrayAutoEncoder } from '@simonbackx/simple-encoding';
|
|
4
4
|
import { Request } from '@simonbackx/simple-endpoints';
|
|
@@ -16,7 +16,7 @@ const getMembersEndpoint = new GetUserMembersEndpoint();
|
|
|
16
16
|
describe('E2E.PrivateFiles', () => {
|
|
17
17
|
const recordSettings = RecordSettings.create({
|
|
18
18
|
id: 'test',
|
|
19
|
-
name: 'Bestand test',
|
|
19
|
+
name: TranslatedString.create('Bestand test'),
|
|
20
20
|
type: RecordType.File,
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ describe('E2E.PrivateFiles', () => {
|
|
|
25
25
|
|
|
26
26
|
// Add record settings type
|
|
27
27
|
const category = RecordCategory.create({
|
|
28
|
-
name: 'Voorbeeld',
|
|
28
|
+
name: TranslatedString.create('Voorbeeld'),
|
|
29
29
|
defaultEnabled: true,
|
|
30
30
|
records: [
|
|
31
31
|
recordSettings,
|