@stamhoofd/backend 2.134.0 → 2.135.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 +17 -17
- package/src/endpoints/auth/VerifyEmailEndpoint.test.ts +154 -0
- package/src/endpoints/auth/VerifyEmailEndpoint.ts +4 -0
- package/src/endpoints/global/members/GetMembersEndpoint.test.ts +224 -2
- package/src/endpoints/global/registration/RegisterMembersEndpoint.test.ts +150 -0
- package/src/endpoints/global/registration/RegisterMembersEndpoint.ts +4 -3
- package/src/endpoints/organization/dashboard/organization/PatchOrganizationEndpoint.ts +2 -0
- package/src/endpoints/organization/dashboard/organization/SetUitpasClientCredentialsEndpoint.ts +1 -8
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopEndpoint.test.ts +49 -0
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopOrdersEndpoint.test.ts +71 -0
- package/src/endpoints/organization/dashboard/webshops/PatchWebshopOrdersEndpoint.ts +4 -0
- package/src/endpoints/organization/webshops/GetWebshopEndpoint.test.ts +11 -0
- package/src/endpoints/organization/webshops/OrderConfirmationEmailLanguage.test.ts +70 -0
- package/src/endpoints/organization/webshops/PlaceOrderEndpoint.test.ts +68 -1
- package/src/endpoints/organization/webshops/PlaceOrderEndpoint.ts +8 -0
- package/src/helpers/GlobalHelper.ts +1 -1
- package/src/helpers/MembershipCharger.ts +2 -1
- package/src/helpers/UitpasTokenRepository.ts +12 -11
- package/src/seeds/1783097277-update-member-last-registered.sql +6 -0
- package/src/seeds/1783939632-mark-zero-price-payments-succeeded.ts +90 -0
- package/src/services/PaymentService.ts +33 -8
- package/src/services/PlatformMembershipService.ts +2 -1
- package/src/services/RegistrationService.ts +5 -0
- package/src/services/uitpas/UitpasService.ts +3 -4
- package/src/sql-filters/members.ts +5 -0
- package/src/sql-sorters/members.ts +12 -1
|
@@ -368,14 +368,13 @@ export class UitpasService {
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
/**
|
|
371
|
-
* Store the uitpas client credentials if they are valid
|
|
371
|
+
* Store the uitpas client credentials if they are valid, throws otherwise
|
|
372
372
|
* @param organizationId null for platform
|
|
373
373
|
* @param clientId
|
|
374
374
|
* @param clientSecret
|
|
375
|
-
* @returns wether the credentials were valid and thus stored successfully
|
|
376
375
|
*/
|
|
377
|
-
static async storeIfValid(organizationId: string | null, clientId: string, clientSecret: string): Promise<
|
|
378
|
-
|
|
376
|
+
static async storeIfValid(organizationId: string | null, clientId: string, clientSecret: string): Promise<void> {
|
|
377
|
+
await UitpasTokenRepository.storeIfValid(organizationId, clientId, clientSecret);
|
|
379
378
|
}
|
|
380
379
|
|
|
381
380
|
static async clearClientCredentialsFor(organizationId: string | null) {
|
|
@@ -65,6 +65,11 @@ export const memberFilterCompilers: SQLFilterDefinitions = {
|
|
|
65
65
|
type: SQLValueType.Datetime,
|
|
66
66
|
nullable: false,
|
|
67
67
|
}),
|
|
68
|
+
'lastRegisteredAt': createColumnFilter({
|
|
69
|
+
expression: SQL.column(membersTable, 'lastRegisteredAt'),
|
|
70
|
+
type: SQLValueType.Datetime,
|
|
71
|
+
nullable: true,
|
|
72
|
+
}),
|
|
68
73
|
'organizationName': createColumnFilter({
|
|
69
74
|
expression: SQL.column('organizations', 'name'),
|
|
70
75
|
type: SQLValueType.String,
|
|
@@ -69,7 +69,7 @@ export const memberSorters: SQLSortDefinitions<MemberWithUsersRegistrationsAndGr
|
|
|
69
69
|
},
|
|
70
70
|
createdAt: {
|
|
71
71
|
getValue(a) {
|
|
72
|
-
return a.createdAt;
|
|
72
|
+
return Formatter.dateTimeIso(a.createdAt, 'UTC');
|
|
73
73
|
},
|
|
74
74
|
toSQL: (direction: SQLOrderByDirection): SQLOrderBy => {
|
|
75
75
|
return new SQLOrderBy({
|
|
@@ -78,4 +78,15 @@ export const memberSorters: SQLSortDefinitions<MemberWithUsersRegistrationsAndGr
|
|
|
78
78
|
});
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
|
+
lastRegisteredAt: {
|
|
82
|
+
getValue(a) {
|
|
83
|
+
return a.lastRegisteredAt ? Formatter.dateTimeIso(a.lastRegisteredAt, 'UTC') : null;
|
|
84
|
+
},
|
|
85
|
+
toSQL: (direction: SQLOrderByDirection): SQLOrderBy => {
|
|
86
|
+
return new SQLOrderBy({
|
|
87
|
+
column: SQL.column('lastRegisteredAt'),
|
|
88
|
+
direction,
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
},
|
|
81
92
|
};
|