@stamhoofd/models 2.39.0 → 2.40.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/dist/src/factories/AddressFactory.d.ts +3 -4
- package/dist/src/factories/AddressFactory.d.ts.map +1 -1
- package/dist/src/factories/AddressFactory.js +13 -13
- package/dist/src/factories/EmergencyContactFactory.d.ts +3 -4
- package/dist/src/factories/EmergencyContactFactory.d.ts.map +1 -1
- package/dist/src/factories/EmergencyContactFactory.js +27 -27
- package/dist/src/factories/EmergencyContactFactory.js.map +1 -1
- package/dist/src/factories/GroupFactory.d.ts +4 -4
- package/dist/src/factories/GroupFactory.d.ts.map +1 -1
- package/dist/src/factories/GroupFactory.js +8 -8
- package/dist/src/factories/GroupFactory.js.map +1 -1
- package/dist/src/factories/MemberFactory.d.ts +4 -4
- package/dist/src/factories/MemberFactory.d.ts.map +1 -1
- package/dist/src/factories/MemberFactory.js +17 -17
- package/dist/src/factories/MemberFactory.js.map +1 -1
- package/dist/src/factories/OrganizationFactory.d.ts +4 -4
- package/dist/src/factories/OrganizationFactory.js +8 -8
- package/dist/src/factories/OrganizationFactory.js.map +1 -1
- package/dist/src/factories/ParentFactory.d.ts +1 -1
- package/dist/src/factories/ParentFactory.js +19 -19
- package/dist/src/factories/ParentFactory.js.map +1 -1
- package/dist/src/factories/RecordFactory.d.ts +2 -3
- package/dist/src/factories/RecordFactory.d.ts.map +1 -1
- package/dist/src/factories/RecordFactory.js +1 -1
- package/dist/src/factories/RecordFactory.js.map +1 -1
- package/dist/src/factories/RegisterCodeFactory.d.ts +2 -2
- package/dist/src/factories/RegisterCodeFactory.d.ts.map +1 -1
- package/dist/src/factories/RegisterCodeFactory.js +2 -2
- package/dist/src/factories/RegistrationFactory.d.ts +3 -3
- package/dist/src/factories/RegistrationFactory.d.ts.map +1 -1
- package/dist/src/factories/RegistrationFactory.js.map +1 -1
- package/dist/src/factories/RegistrationPeriodFactory.d.ts +2 -2
- package/dist/src/factories/RegistrationPeriodFactory.js.map +1 -1
- package/dist/src/factories/UserFactory.d.ts +3 -3
- package/dist/src/factories/UserFactory.d.ts.map +1 -1
- package/dist/src/factories/UserFactory.js +3 -3
- package/dist/src/factories/UserFactory.js.map +1 -1
- package/dist/src/factories/WebshopFactory.d.ts +4 -4
- package/dist/src/factories/WebshopFactory.d.ts.map +1 -1
- package/dist/src/factories/WebshopFactory.js +1 -1
- package/dist/src/factories/WebshopFactory.js.map +1 -1
- package/dist/src/helpers/DNSValidator.d.ts +1 -1
- package/dist/src/helpers/DNSValidator.d.ts.map +1 -1
- package/dist/src/helpers/DNSValidator.js +33 -33
- package/dist/src/helpers/DNSValidator.js.map +1 -1
- package/dist/src/helpers/EmailBuilder.d.ts +10 -10
- package/dist/src/helpers/EmailBuilder.d.ts.map +1 -1
- package/dist/src/helpers/EmailBuilder.js +34 -34
- package/dist/src/helpers/EmailBuilder.js.map +1 -1
- package/dist/src/helpers/GroupBuilder.d.ts.map +1 -1
- package/dist/src/helpers/GroupBuilder.js +57 -57
- package/dist/src/helpers/GroupBuilder.js.map +1 -1
- package/dist/src/helpers/Handlebars.d.ts.map +1 -1
- package/dist/src/helpers/Handlebars.js +29 -29
- package/dist/src/helpers/Handlebars.js.map +1 -1
- package/dist/src/helpers/MemberMerger.d.ts +1 -1
- package/dist/src/helpers/MemberMerger.d.ts.map +1 -1
- package/dist/src/helpers/MemberMerger.js +33 -33
- package/dist/src/helpers/MemberMerger.js.map +1 -1
- package/dist/src/helpers/MemberMerger.test.js +194 -194
- package/dist/src/helpers/MemberMerger.test.js.map +1 -1
- package/dist/src/helpers/RateLimiter.d.ts.map +1 -1
- package/dist/src/helpers/RateLimiter.js +2 -2
- package/dist/src/helpers/RateLimiter.js.map +1 -1
- package/dist/src/helpers/SetupStepsUpdater.d.ts +22 -0
- package/dist/src/helpers/SetupStepsUpdater.d.ts.map +1 -0
- package/dist/src/helpers/SetupStepsUpdater.js +255 -0
- package/dist/src/helpers/SetupStepsUpdater.js.map +1 -0
- package/dist/src/helpers/WebshopCounter.d.ts +1 -1
- package/dist/src/helpers/WebshopCounter.d.ts.map +1 -1
- package/dist/src/helpers/WebshopCounter.js +1 -1
- package/dist/src/helpers/WebshopCounter.js.map +1 -1
- package/dist/src/helpers/WebshopCounter.test.js +6 -6
- package/dist/src/helpers/WebshopCounter.test.js.map +1 -1
- package/dist/src/index.d.ts +20 -19
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/migrations/1605262045-import-postcodes.js +12 -12
- package/dist/src/migrations/1605262046-import-postcodes-nl.js +10 -10
- package/dist/src/models/BalanceItem.d.ts.map +1 -1
- package/dist/src/models/BalanceItem.js +37 -37
- package/dist/src/models/BalanceItem.js.map +1 -1
- package/dist/src/models/BalanceItemPayment.d.ts.map +1 -1
- package/dist/src/models/BalanceItemPayment.js +13 -13
- package/dist/src/models/BalanceItemPayment.js.map +1 -1
- package/dist/src/models/BuckarooPayment.d.ts +1 -1
- package/dist/src/models/BuckarooPayment.d.ts.map +1 -1
- package/dist/src/models/BuckarooPayment.js +5 -5
- package/dist/src/models/BuckarooPayment.js.map +1 -1
- package/dist/src/models/CachedOutstandingBalance.d.ts.map +1 -1
- package/dist/src/models/CachedOutstandingBalance.js +37 -37
- package/dist/src/models/CachedOutstandingBalance.js.map +1 -1
- package/dist/src/models/Document.d.ts +4 -4
- package/dist/src/models/Document.d.ts.map +1 -1
- package/dist/src/models/Document.js +27 -27
- package/dist/src/models/Document.js.map +1 -1
- package/dist/src/models/DocumentTemplate.d.ts +4 -4
- package/dist/src/models/DocumentTemplate.d.ts.map +1 -1
- package/dist/src/models/DocumentTemplate.js +72 -72
- package/dist/src/models/DocumentTemplate.js.map +1 -1
- package/dist/src/models/Email.d.ts.map +1 -1
- package/dist/src/models/Email.js +63 -64
- package/dist/src/models/Email.js.map +1 -1
- package/dist/src/models/EmailRecipient.d.ts.map +1 -1
- package/dist/src/models/EmailRecipient.js +20 -20
- package/dist/src/models/EmailRecipient.js.map +1 -1
- package/dist/src/models/EmailTemplate.d.ts +3 -3
- package/dist/src/models/EmailTemplate.d.ts.map +1 -1
- package/dist/src/models/EmailTemplate.js +16 -16
- package/dist/src/models/EmailTemplate.js.map +1 -1
- package/dist/src/models/EmailVerificationCode.d.ts +2 -2
- package/dist/src/models/EmailVerificationCode.d.ts.map +1 -1
- package/dist/src/models/EmailVerificationCode.js +57 -55
- package/dist/src/models/EmailVerificationCode.js.map +1 -1
- package/dist/src/models/Event.d.ts +2 -2
- package/dist/src/models/Event.d.ts.map +1 -1
- package/dist/src/models/Event.js +15 -15
- package/dist/src/models/Event.js.map +1 -1
- package/dist/src/models/Group.d.ts +3 -1
- package/dist/src/models/Group.d.ts.map +1 -1
- package/dist/src/models/Group.js +46 -35
- package/dist/src/models/Group.js.map +1 -1
- package/dist/src/models/Image.d.ts +1 -1
- package/dist/src/models/Image.d.ts.map +1 -1
- package/dist/src/models/Image.js +26 -26
- package/dist/src/models/Image.js.map +1 -1
- package/dist/src/models/Member.d.ts +8 -8
- package/dist/src/models/Member.d.ts.map +1 -1
- package/dist/src/models/Member.js +60 -60
- package/dist/src/models/Member.js.map +1 -1
- package/dist/src/models/MemberPlatformMembership.d.ts +3 -3
- package/dist/src/models/MemberPlatformMembership.d.ts.map +1 -1
- package/dist/src/models/MemberPlatformMembership.js +26 -26
- package/dist/src/models/MemberPlatformMembership.js.map +1 -1
- package/dist/src/models/MemberResponsibilityRecord.d.ts.map +1 -1
- package/dist/src/models/MemberResponsibilityRecord.js +13 -13
- package/dist/src/models/MemberResponsibilityRecord.js.map +1 -1
- package/dist/src/models/MergedMember.d.ts +3 -3
- package/dist/src/models/MergedMember.d.ts.map +1 -1
- package/dist/src/models/MergedMember.js +19 -19
- package/dist/src/models/MergedMember.js.map +1 -1
- package/dist/src/models/MolliePayment.d.ts +1 -1
- package/dist/src/models/MolliePayment.d.ts.map +1 -1
- package/dist/src/models/MolliePayment.js +5 -5
- package/dist/src/models/MolliePayment.js.map +1 -1
- package/dist/src/models/MollieToken.d.ts.map +1 -1
- package/dist/src/models/MollieToken.js +60 -60
- package/dist/src/models/MollieToken.js.map +1 -1
- package/dist/src/models/OneTimeToken.d.ts +2 -2
- package/dist/src/models/OneTimeToken.d.ts.map +1 -1
- package/dist/src/models/OneTimeToken.js +13 -13
- package/dist/src/models/OneTimeToken.js.map +1 -1
- package/dist/src/models/Order.d.ts +1 -1
- package/dist/src/models/Order.d.ts.map +1 -1
- package/dist/src/models/Order.js +70 -70
- package/dist/src/models/Order.js.map +1 -1
- package/dist/src/models/Organization.d.ts +5 -5
- package/dist/src/models/Organization.d.ts.map +1 -1
- package/dist/src/models/Organization.js +127 -127
- package/dist/src/models/Organization.js.map +1 -1
- package/dist/src/models/OrganizationRegistrationPeriod.d.ts.map +1 -1
- package/dist/src/models/OrganizationRegistrationPeriod.js +15 -15
- package/dist/src/models/OrganizationRegistrationPeriod.js.map +1 -1
- package/dist/src/models/PasswordToken.d.ts +3 -3
- package/dist/src/models/PasswordToken.d.ts.map +1 -1
- package/dist/src/models/PasswordToken.js +17 -17
- package/dist/src/models/PasswordToken.js.map +1 -1
- package/dist/src/models/PayconiqPayment.d.ts +1 -1
- package/dist/src/models/PayconiqPayment.d.ts.map +1 -1
- package/dist/src/models/PayconiqPayment.js +49 -49
- package/dist/src/models/PayconiqPayment.js.map +1 -1
- package/dist/src/models/Payment.d.ts +3 -3
- package/dist/src/models/Payment.d.ts.map +1 -1
- package/dist/src/models/Payment.js +36 -36
- package/dist/src/models/Payment.js.map +1 -1
- package/dist/src/models/Platform.d.ts +2 -2
- package/dist/src/models/Platform.d.ts.map +1 -1
- package/dist/src/models/Platform.js +8 -8
- package/dist/src/models/Platform.js.map +1 -1
- package/dist/src/models/RegisterCode.d.ts +1 -1
- package/dist/src/models/RegisterCode.d.ts.map +1 -1
- package/dist/src/models/RegisterCode.js +11 -11
- package/dist/src/models/RegisterCode.js.map +1 -1
- package/dist/src/models/Registration.d.ts +1 -1
- package/dist/src/models/Registration.d.ts.map +1 -1
- package/dist/src/models/Registration.js +88 -88
- package/dist/src/models/Registration.js.map +1 -1
- package/dist/src/models/RegistrationPeriod.d.ts.map +1 -1
- package/dist/src/models/RegistrationPeriod.js +12 -12
- package/dist/src/models/RegistrationPeriod.js.map +1 -1
- package/dist/src/models/STCredit.d.ts +1 -1
- package/dist/src/models/STCredit.d.ts.map +1 -1
- package/dist/src/models/STCredit.js +12 -12
- package/dist/src/models/STCredit.js.map +1 -1
- package/dist/src/models/STInvoice.d.ts +1 -1
- package/dist/src/models/STInvoice.d.ts.map +1 -1
- package/dist/src/models/STInvoice.js +16 -16
- package/dist/src/models/STInvoice.js.map +1 -1
- package/dist/src/models/STPackage.d.ts +1 -1
- package/dist/src/models/STPackage.d.ts.map +1 -1
- package/dist/src/models/STPackage.js +39 -39
- package/dist/src/models/STPackage.js.map +1 -1
- package/dist/src/models/STPendingInvoice.d.ts +1 -1
- package/dist/src/models/STPendingInvoice.d.ts.map +1 -1
- package/dist/src/models/STPendingInvoice.js +11 -11
- package/dist/src/models/STPendingInvoice.js.map +1 -1
- package/dist/src/models/StripeAccount.d.ts.map +1 -1
- package/dist/src/models/StripeAccount.js +13 -13
- package/dist/src/models/StripeAccount.js.map +1 -1
- package/dist/src/models/StripeCheckoutSession.d.ts +1 -1
- package/dist/src/models/StripeCheckoutSession.d.ts.map +1 -1
- package/dist/src/models/StripeCheckoutSession.js +7 -7
- package/dist/src/models/StripeCheckoutSession.js.map +1 -1
- package/dist/src/models/StripePaymentIntent.d.ts +1 -1
- package/dist/src/models/StripePaymentIntent.d.ts.map +1 -1
- package/dist/src/models/StripePaymentIntent.js +7 -7
- package/dist/src/models/StripePaymentIntent.js.map +1 -1
- package/dist/src/models/Ticket.d.ts +2 -2
- package/dist/src/models/Ticket.d.ts.map +1 -1
- package/dist/src/models/Ticket.js +23 -23
- package/dist/src/models/Ticket.js.map +1 -1
- package/dist/src/models/Token.d.ts +3 -3
- package/dist/src/models/Token.d.ts.map +1 -1
- package/dist/src/models/Token.js +27 -27
- package/dist/src/models/Token.js.map +1 -1
- package/dist/src/models/Token.test.js +11 -11
- package/dist/src/models/UsedRegisterCode.d.ts +1 -1
- package/dist/src/models/UsedRegisterCode.d.ts.map +1 -1
- package/dist/src/models/UsedRegisterCode.js +10 -10
- package/dist/src/models/UsedRegisterCode.js.map +1 -1
- package/dist/src/models/User.d.ts +4 -4
- package/dist/src/models/User.d.ts.map +1 -1
- package/dist/src/models/User.js +53 -51
- package/dist/src/models/User.js.map +1 -1
- package/dist/src/models/UserPermissions.d.ts +3 -3
- package/dist/src/models/UserPermissions.d.ts.map +1 -1
- package/dist/src/models/UserPermissions.js +12 -12
- package/dist/src/models/UserPermissions.js.map +1 -1
- package/dist/src/models/Webshop.d.ts +1 -1
- package/dist/src/models/Webshop.d.ts.map +1 -1
- package/dist/src/models/Webshop.js +23 -23
- package/dist/src/models/Webshop.js.map +1 -1
- package/dist/src/models/WebshopDiscountCode.d.ts +1 -1
- package/dist/src/models/WebshopDiscountCode.d.ts.map +1 -1
- package/dist/src/models/WebshopDiscountCode.js +16 -16
- package/dist/src/models/WebshopDiscountCode.js.map +1 -1
- package/dist/src/models/addresses/City.d.ts.map +1 -1
- package/dist/src/models/addresses/City.js +9 -9
- package/dist/src/models/addresses/City.js.map +1 -1
- package/dist/src/models/addresses/PostalCode.d.ts.map +1 -1
- package/dist/src/models/addresses/PostalCode.js +11 -11
- package/dist/src/models/addresses/PostalCode.js.map +1 -1
- package/dist/src/models/addresses/PostalCode.test.js +22 -22
- package/dist/src/models/addresses/PostalCode.test.js.map +1 -1
- package/dist/src/models/addresses/Province.d.ts.map +1 -1
- package/dist/src/models/addresses/Province.js +5 -5
- package/dist/src/models/addresses/Province.js.map +1 -1
- package/dist/src/models/addresses/Street.d.ts.map +1 -1
- package/dist/src/models/addresses/Street.js +6 -6
- package/dist/src/models/addresses/Street.js.map +1 -1
- package/dist/src/models/index.d.ts +46 -46
- package/dist/src/models/index.d.ts.map +1 -1
- package/dist/src/models/index.js +0 -1
- package/dist/src/models/index.js.map +1 -1
- package/dist/src/structures/OrganizationServerMetaData.d.ts.map +1 -1
- package/dist/src/structures/OrganizationServerMetaData.js +4 -4
- package/dist/src/structures/OrganizationServerMetaData.js.map +1 -1
- package/dist/tests/jest.global.setup.d.ts.map +1 -1
- package/dist/tests/jest.global.setup.js +15 -13
- package/dist/tests/jest.global.setup.js.map +1 -1
- package/dist/tests/jest.setup.js +3 -1
- package/dist/tests/jest.setup.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -3
- package/src/factories/AddressFactory.ts +17 -17
- package/src/factories/EmergencyContactFactory.ts +30 -31
- package/src/factories/GroupFactory.ts +30 -30
- package/src/factories/MemberFactory.ts +41 -38
- package/src/factories/OrganizationFactory.ts +15 -15
- package/src/factories/ParentFactory.ts +24 -24
- package/src/factories/RecordFactory.ts +5 -4
- package/src/factories/RegisterCodeFactory.ts +7 -7
- package/src/factories/RegistrationFactory.ts +16 -16
- package/src/factories/RegistrationPeriodFactory.ts +5 -5
- package/src/factories/UserFactory.ts +20 -19
- package/src/factories/WebshopFactory.ts +14 -14
- package/src/helpers/DNSValidator.ts +89 -84
- package/src/helpers/EmailBuilder.ts +141 -135
- package/src/helpers/GroupBuilder.ts +181 -181
- package/src/helpers/Handlebars.ts +57 -54
- package/src/helpers/MemberMerger.test.ts +702 -702
- package/src/helpers/MemberMerger.ts +83 -77
- package/src/helpers/RateLimiter.ts +25 -27
- package/src/helpers/SetupStepsUpdater.ts +402 -0
- package/src/helpers/WebshopCounter.test.ts +12 -12
- package/src/helpers/WebshopCounter.ts +20 -19
- package/src/index.ts +20 -19
- package/src/migrations/1605262045-import-postcodes.ts +59 -63
- package/src/migrations/1605262046-import-postcodes-nl.ts +41 -43
- package/src/models/BalanceItem.ts +173 -172
- package/src/models/BalanceItemPayment.ts +32 -33
- package/src/models/BuckarooPayment.ts +7 -7
- package/src/models/CachedOutstandingBalance.ts +98 -99
- package/src/models/Document.ts +90 -87
- package/src/models/DocumentTemplate.ts +207 -198
- package/src/models/Email.ts +198 -200
- package/src/models/EmailRecipient.ts +38 -39
- package/src/models/EmailTemplate.ts +36 -37
- package/src/models/EmailVerificationCode.ts +146 -142
- package/src/models/Event.ts +53 -53
- package/src/models/Group.ts +136 -123
- package/src/models/Image.ts +48 -48
- package/src/models/Member.ts +277 -275
- package/src/models/MemberPlatformMembership.ts +71 -71
- package/src/models/MemberResponsibilityRecord.ts +32 -32
- package/src/models/MergedMember.ts +77 -77
- package/src/models/MolliePayment.ts +7 -7
- package/src/models/MollieToken.ts +131 -126
- package/src/models/OneTimeToken.ts +40 -39
- package/src/models/Order.ts +379 -372
- package/src/models/Organization.ts +332 -325
- package/src/models/OrganizationRegistrationPeriod.ts +50 -50
- package/src/models/PasswordToken.ts +42 -42
- package/src/models/PayconiqPayment.ts +80 -76
- package/src/models/Payment.ts +86 -86
- package/src/models/Platform.ts +21 -22
- package/src/models/RegisterCode.ts +26 -26
- package/src/models/Registration.ts +167 -168
- package/src/models/RegistrationPeriod.ts +29 -29
- package/src/models/STCredit.ts +24 -25
- package/src/models/STInvoice.ts +34 -34
- package/src/models/STPackage.ts +143 -136
- package/src/models/STPendingInvoice.ts +26 -26
- package/src/models/StripeAccount.ts +27 -27
- package/src/models/StripeCheckoutSession.ts +10 -10
- package/src/models/StripePaymentIntent.ts +10 -10
- package/src/models/Ticket.ts +51 -52
- package/src/models/Token.test.ts +13 -13
- package/src/models/Token.ts +64 -63
- package/src/models/UsedRegisterCode.ts +20 -21
- package/src/models/User.ts +148 -144
- package/src/models/UserPermissions.ts +25 -28
- package/src/models/Webshop.ts +53 -53
- package/src/models/WebshopDiscountCode.ts +33 -33
- package/src/models/addresses/City.ts +12 -12
- package/src/models/addresses/PostalCode.test.ts +68 -69
- package/src/models/addresses/PostalCode.ts +57 -57
- package/src/models/addresses/Province.ts +8 -8
- package/src/models/addresses/Street.ts +10 -12
- package/src/models/index.ts +54 -55
- package/src/structures/OrganizationServerMetaData.ts +36 -36
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { SimpleError } from '@simonbackx/simple-errors';
|
|
2
|
+
import { QueueHandler } from '@stamhoofd/queues';
|
|
3
|
+
import { SQL, SQLWhereSign } from '@stamhoofd/sql';
|
|
4
|
+
import {
|
|
5
|
+
GroupType,
|
|
6
|
+
MemberResponsibility,
|
|
7
|
+
Platform as PlatformStruct,
|
|
8
|
+
SetupStepType,
|
|
9
|
+
SetupSteps,
|
|
10
|
+
minimumRegistrationCount,
|
|
11
|
+
} from '@stamhoofd/structures';
|
|
12
|
+
import { Formatter } from '@stamhoofd/utility';
|
|
13
|
+
import {
|
|
14
|
+
Group,
|
|
15
|
+
Member,
|
|
16
|
+
MemberResponsibilityRecord,
|
|
17
|
+
Organization,
|
|
18
|
+
OrganizationRegistrationPeriod,
|
|
19
|
+
Platform,
|
|
20
|
+
} from '../models';
|
|
21
|
+
|
|
22
|
+
type SetupStepOperation = (setupSteps: SetupSteps, organization: Organization, platform: PlatformStruct) => void | Promise<void>;
|
|
23
|
+
|
|
24
|
+
export class SetupStepUpdater {
|
|
25
|
+
private static readonly STEP_TYPE_OPERATIONS: Record<
|
|
26
|
+
SetupStepType,
|
|
27
|
+
SetupStepOperation
|
|
28
|
+
> = {
|
|
29
|
+
[SetupStepType.Responsibilities]: this.updateStepResponsibilities,
|
|
30
|
+
[SetupStepType.Companies]: this.updateStepCompanies,
|
|
31
|
+
[SetupStepType.Groups]: this.updateStepGroups,
|
|
32
|
+
[SetupStepType.Premises]: this.updateStepPremises,
|
|
33
|
+
[SetupStepType.Emails]: this.updateStepEmails,
|
|
34
|
+
[SetupStepType.Payment]: this.updateStepPayment,
|
|
35
|
+
[SetupStepType.Registrations]: this.updateStepRegistrations,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
static async updateSetupStepsForAllOrganizationsInCurrentPeriod({
|
|
39
|
+
batchSize,
|
|
40
|
+
}: { batchSize?: number } = {}) {
|
|
41
|
+
const tag = 'updateSetupStepsForAllOrganizationsInCurrentPeriod';
|
|
42
|
+
QueueHandler.cancel(tag);
|
|
43
|
+
|
|
44
|
+
await QueueHandler.schedule(tag, async () => {
|
|
45
|
+
const platform = (await Platform.getSharedPrivateStruct()).clone();
|
|
46
|
+
|
|
47
|
+
const periodId = platform.period.id;
|
|
48
|
+
|
|
49
|
+
let lastId = '';
|
|
50
|
+
|
|
51
|
+
while (true) {
|
|
52
|
+
const organizationRegistrationPeriods
|
|
53
|
+
= await OrganizationRegistrationPeriod.where(
|
|
54
|
+
{
|
|
55
|
+
id: { sign: '>', value: lastId },
|
|
56
|
+
periodId: periodId,
|
|
57
|
+
},
|
|
58
|
+
{ limit: batchSize ?? 10, sort: ['id'] },
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
if (organizationRegistrationPeriods.length === 0) {
|
|
62
|
+
lastId = '';
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const organizationPeriodMap = new Map(
|
|
67
|
+
organizationRegistrationPeriods.map((period) => {
|
|
68
|
+
return [period.organizationId, period];
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const organizations = await Organization.getByIDs(
|
|
73
|
+
...organizationPeriodMap.keys(),
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
for (const organization of organizations) {
|
|
77
|
+
const organizationId = organization.id;
|
|
78
|
+
const organizationRegistrationPeriod
|
|
79
|
+
= organizationPeriodMap.get(organizationId);
|
|
80
|
+
|
|
81
|
+
if (!organizationRegistrationPeriod) {
|
|
82
|
+
console.error(
|
|
83
|
+
`[FLAG-MOMENT] organizationRegistrationPeriod not found for organization with id ${organizationId}`,
|
|
84
|
+
);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
console.log(
|
|
89
|
+
'[FLAG-MOMENT] checking flag moments for '
|
|
90
|
+
+ organizationId,
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
await SetupStepUpdater.updateFor(
|
|
94
|
+
organizationRegistrationPeriod,
|
|
95
|
+
platform,
|
|
96
|
+
organization,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
lastId
|
|
101
|
+
= organizationRegistrationPeriods[
|
|
102
|
+
organizationRegistrationPeriods.length - 1
|
|
103
|
+
].id;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
static async updateForOrganizationId(id: string) {
|
|
109
|
+
const organization = await Organization.getByID(id);
|
|
110
|
+
if (!organization) {
|
|
111
|
+
throw new SimpleError({
|
|
112
|
+
code: 'not_found',
|
|
113
|
+
message: 'Organization not found',
|
|
114
|
+
human: 'De organisatie werd niet gevonden',
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
await this.updateForOrganization(organization);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
static async updateForOrganization(
|
|
122
|
+
organization: Organization,
|
|
123
|
+
{
|
|
124
|
+
platform,
|
|
125
|
+
organizationRegistrationPeriod,
|
|
126
|
+
}: {
|
|
127
|
+
platform?: PlatformStruct;
|
|
128
|
+
organizationRegistrationPeriod?: OrganizationRegistrationPeriod;
|
|
129
|
+
} = {},
|
|
130
|
+
) {
|
|
131
|
+
if (!platform) {
|
|
132
|
+
platform = await Platform.getSharedPrivateStruct();
|
|
133
|
+
if (!platform) {
|
|
134
|
+
console.error('No platform not found');
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (!organizationRegistrationPeriod) {
|
|
140
|
+
const periodId = platform.period.id;
|
|
141
|
+
organizationRegistrationPeriod = (
|
|
142
|
+
await OrganizationRegistrationPeriod.where({
|
|
143
|
+
organizationId: organization.id,
|
|
144
|
+
periodId: periodId,
|
|
145
|
+
})
|
|
146
|
+
)[0];
|
|
147
|
+
|
|
148
|
+
if (!organizationRegistrationPeriod) {
|
|
149
|
+
console.error(
|
|
150
|
+
`OrganizationRegistrationPeriod with organizationId ${organization.id} and periodId ${periodId} not found`,
|
|
151
|
+
);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
await this.updateFor(
|
|
157
|
+
organizationRegistrationPeriod,
|
|
158
|
+
platform,
|
|
159
|
+
organization,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
private static async updateFor(
|
|
164
|
+
organizationRegistrationPeriod: OrganizationRegistrationPeriod,
|
|
165
|
+
platform: PlatformStruct,
|
|
166
|
+
organization: Organization,
|
|
167
|
+
) {
|
|
168
|
+
const setupSteps = organizationRegistrationPeriod.setupSteps;
|
|
169
|
+
|
|
170
|
+
for (const stepType of Object.values(SetupStepType)) {
|
|
171
|
+
const operation = this.STEP_TYPE_OPERATIONS[stepType];
|
|
172
|
+
await operation(setupSteps, organization, platform);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
await organizationRegistrationPeriod.save();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
private static updateStepPremises(
|
|
179
|
+
setupSteps: SetupSteps,
|
|
180
|
+
organization: Organization,
|
|
181
|
+
platform: PlatformStruct,
|
|
182
|
+
) {
|
|
183
|
+
let totalSteps = 0;
|
|
184
|
+
let finishedSteps = 0;
|
|
185
|
+
|
|
186
|
+
const premiseTypes = platform.config.premiseTypes;
|
|
187
|
+
|
|
188
|
+
for (const premiseType of premiseTypes) {
|
|
189
|
+
const { min, max } = premiseType;
|
|
190
|
+
|
|
191
|
+
// only add step if premise type has restrictions
|
|
192
|
+
if (min === null && max === null) {
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
totalSteps++;
|
|
197
|
+
|
|
198
|
+
const premiseTypeId = premiseType.id;
|
|
199
|
+
let totalPremisesOfThisType = 0;
|
|
200
|
+
|
|
201
|
+
for (const premise of organization.privateMeta.premises) {
|
|
202
|
+
if (premise.premiseTypeIds.includes(premiseTypeId)) {
|
|
203
|
+
totalPremisesOfThisType++;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (max !== null && totalPremisesOfThisType > max) {
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (min !== null && totalPremisesOfThisType < min) {
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
finishedSteps++;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
setupSteps.update(SetupStepType.Premises, {
|
|
219
|
+
totalSteps,
|
|
220
|
+
finishedSteps,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
private static updateStepGroups(
|
|
225
|
+
setupSteps: SetupSteps,
|
|
226
|
+
_organization: Organization,
|
|
227
|
+
_platform: PlatformStruct,
|
|
228
|
+
) {
|
|
229
|
+
setupSteps.update(SetupStepType.Groups, {
|
|
230
|
+
totalSteps: 0,
|
|
231
|
+
finishedSteps: 0,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
private static updateStepCompanies(
|
|
236
|
+
setupSteps: SetupSteps,
|
|
237
|
+
organization: Organization,
|
|
238
|
+
_platform: PlatformStruct,
|
|
239
|
+
) {
|
|
240
|
+
const totalSteps = 1;
|
|
241
|
+
let finishedSteps = 0;
|
|
242
|
+
|
|
243
|
+
if (organization.meta.companies.length) {
|
|
244
|
+
finishedSteps = 1;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
setupSteps.update(SetupStepType.Companies, {
|
|
248
|
+
totalSteps,
|
|
249
|
+
finishedSteps,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
private static async updateStepResponsibilities(
|
|
254
|
+
setupSteps: SetupSteps,
|
|
255
|
+
organization: Organization,
|
|
256
|
+
platform: PlatformStruct,
|
|
257
|
+
) {
|
|
258
|
+
const now = new Date();
|
|
259
|
+
const organizationBasedResponsibilitiesWithRestriction = platform.config.responsibilities
|
|
260
|
+
.filter(r => r.organizationBased && (r.minimumMembers || r.maximumMembers));
|
|
261
|
+
|
|
262
|
+
const responsibilityIds = organizationBasedResponsibilitiesWithRestriction.map(r => r.id);
|
|
263
|
+
|
|
264
|
+
const allRecords = responsibilityIds.length === 0
|
|
265
|
+
? []
|
|
266
|
+
: await MemberResponsibilityRecord.select()
|
|
267
|
+
.where('responsibilityId', responsibilityIds)
|
|
268
|
+
.where('organizationId', organization.id)
|
|
269
|
+
.where(SQL.where('endDate', SQLWhereSign.Greater, now).or('endDate', null))
|
|
270
|
+
.fetch();
|
|
271
|
+
|
|
272
|
+
// Remove invalid responsibilities: members that are not registered in the current period
|
|
273
|
+
const memberIds = Formatter.uniqueArray(allRecords.map(r => r.memberId));
|
|
274
|
+
const members = await Member.getBlobByIds(...memberIds);
|
|
275
|
+
const validMembers = members.filter(m => m.registrations.some(r => r.organizationId === organization.id && r.periodId === organization.periodId && r.group.type === GroupType.Membership && r.deactivatedAt === null && r.registeredAt !== null));
|
|
276
|
+
|
|
277
|
+
const validMembersIds = validMembers.map(m => m.id);
|
|
278
|
+
|
|
279
|
+
const records = allRecords.filter(r => validMembersIds.includes(r.memberId));
|
|
280
|
+
|
|
281
|
+
let totalSteps = 0;
|
|
282
|
+
let finishedSteps = 0;
|
|
283
|
+
|
|
284
|
+
const groups = await Group.getAll(organization.id, organization.periodId);
|
|
285
|
+
|
|
286
|
+
const flatResponsibilities: { responsibility: MemberResponsibility; group: Group | null }[] = organizationBasedResponsibilitiesWithRestriction
|
|
287
|
+
.flatMap((responsibility) => {
|
|
288
|
+
const defaultAgeGroupIds = responsibility.defaultAgeGroupIds;
|
|
289
|
+
if (defaultAgeGroupIds === null) {
|
|
290
|
+
const item: { responsibility: MemberResponsibility; group: Group | null } = {
|
|
291
|
+
responsibility,
|
|
292
|
+
group: null,
|
|
293
|
+
};
|
|
294
|
+
return [item];
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return groups
|
|
298
|
+
.filter(g => g.defaultAgeGroupId !== null && defaultAgeGroupIds.includes(g.defaultAgeGroupId))
|
|
299
|
+
.map((group) => {
|
|
300
|
+
return {
|
|
301
|
+
responsibility,
|
|
302
|
+
group,
|
|
303
|
+
};
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
for (const { responsibility, group } of flatResponsibilities) {
|
|
308
|
+
const { minimumMembers: min, maximumMembers: max } = responsibility;
|
|
309
|
+
|
|
310
|
+
if (min === null) {
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
totalSteps += min;
|
|
315
|
+
|
|
316
|
+
const responsibilityId = responsibility.id;
|
|
317
|
+
let totalRecordsWithThisResponsibility = 0;
|
|
318
|
+
|
|
319
|
+
if (group === null) {
|
|
320
|
+
for (const record of records) {
|
|
321
|
+
if (record.responsibilityId === responsibilityId) {
|
|
322
|
+
totalRecordsWithThisResponsibility++;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
for (const record of records) {
|
|
328
|
+
if (record.responsibilityId === responsibilityId && record.groupId === group.id) {
|
|
329
|
+
totalRecordsWithThisResponsibility++;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (max !== null && totalRecordsWithThisResponsibility > max) {
|
|
335
|
+
// Not added
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
finishedSteps += Math.min(min, totalRecordsWithThisResponsibility);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
setupSteps.update(SetupStepType.Responsibilities, {
|
|
343
|
+
totalSteps,
|
|
344
|
+
finishedSteps,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
private static updateStepEmails(setupSteps: SetupSteps,
|
|
349
|
+
organization: Organization,
|
|
350
|
+
_platform: PlatformStruct) {
|
|
351
|
+
const totalSteps = 1;
|
|
352
|
+
let finishedSteps = 0;
|
|
353
|
+
|
|
354
|
+
const emails = organization.privateMeta.emails;
|
|
355
|
+
|
|
356
|
+
// organization should have 1 default email
|
|
357
|
+
if (emails.some(e => e.default)) {
|
|
358
|
+
finishedSteps = 1;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
setupSteps.update(SetupStepType.Emails, {
|
|
362
|
+
totalSteps,
|
|
363
|
+
finishedSteps,
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
setupSteps.markReviewed(SetupStepType.Emails, { userId: 'backend', userName: 'backend' });
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
private static updateStepPayment(setupSteps: SetupSteps,
|
|
370
|
+
_organization: Organization,
|
|
371
|
+
_platform: PlatformStruct) {
|
|
372
|
+
setupSteps.update(SetupStepType.Payment, {
|
|
373
|
+
totalSteps: 0,
|
|
374
|
+
finishedSteps: 0,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
private static async updateStepRegistrations(setupSteps: SetupSteps,
|
|
379
|
+
organization: Organization,
|
|
380
|
+
platform: PlatformStruct) {
|
|
381
|
+
const defaultAgeGroupIds = platform.config.defaultAgeGroups.map(x => x.id);
|
|
382
|
+
|
|
383
|
+
const groupsWithDefaultAgeGroupIdQuery = SQL.select().from(
|
|
384
|
+
SQL.table(Group.table),
|
|
385
|
+
)
|
|
386
|
+
.where(SQL.column('organizationId'), organization.id)
|
|
387
|
+
.where(SQL.column('periodId'), organization.periodId)
|
|
388
|
+
.where(SQL.column('defaultAgeGroupId'), defaultAgeGroupIds);
|
|
389
|
+
|
|
390
|
+
const totalSteps = await groupsWithDefaultAgeGroupIdQuery.count();
|
|
391
|
+
const finishedSteps = await groupsWithDefaultAgeGroupIdQuery
|
|
392
|
+
.where(SQL.jsonValue(SQL.column('settings'), '$.value.registeredMembers'), SQLWhereSign.GreaterEqual, minimumRegistrationCount)
|
|
393
|
+
.count();
|
|
394
|
+
|
|
395
|
+
setupSteps.update(SetupStepType.Registrations, {
|
|
396
|
+
totalSteps,
|
|
397
|
+
finishedSteps,
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
setupSteps.markReviewed(SetupStepType.Registrations, { userId: 'backend', userName: 'backend' });
|
|
401
|
+
}
|
|
402
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { WebshopNumberingType } from
|
|
2
|
-
import { WebshopCounter } from
|
|
1
|
+
import { WebshopNumberingType } from '@stamhoofd/structures';
|
|
2
|
+
import { WebshopCounter } from './WebshopCounter';
|
|
3
3
|
|
|
4
|
-
describe(
|
|
5
|
-
test(
|
|
6
|
-
const first = WebshopCounter.getNextNumber(
|
|
7
|
-
const second = WebshopCounter.getNextNumber(
|
|
8
|
-
const other = WebshopCounter.getNextNumber(
|
|
9
|
-
const last = WebshopCounter.getNextNumber(
|
|
4
|
+
describe('WebshopCounter', () => {
|
|
5
|
+
test('Create multiple order numbers', async () => {
|
|
6
|
+
const first = WebshopCounter.getNextNumber('ADGS', WebshopNumberingType.Continuous);
|
|
7
|
+
const second = WebshopCounter.getNextNumber('ADGS', WebshopNumberingType.Continuous);
|
|
8
|
+
const other = WebshopCounter.getNextNumber('ZEGQ', WebshopNumberingType.Continuous);
|
|
9
|
+
const last = WebshopCounter.getNextNumber('ADGS', WebshopNumberingType.Continuous);
|
|
10
10
|
|
|
11
|
-
await expect(first).resolves.toEqual(1)
|
|
12
|
-
await expect(second).resolves.toEqual(2)
|
|
13
|
-
await expect(last).resolves.toEqual(3)
|
|
14
|
-
await expect(other).resolves.toEqual(1)
|
|
11
|
+
await expect(first).resolves.toEqual(1);
|
|
12
|
+
await expect(second).resolves.toEqual(2);
|
|
13
|
+
await expect(last).resolves.toEqual(3);
|
|
14
|
+
await expect(other).resolves.toEqual(1);
|
|
15
15
|
});
|
|
16
16
|
});
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { Database } from
|
|
2
|
-
import { QueueHandler } from
|
|
3
|
-
import { WebshopNumberingType } from
|
|
1
|
+
import { Database } from '@simonbackx/simple-database';
|
|
2
|
+
import { QueueHandler } from '@stamhoofd/queues';
|
|
3
|
+
import { WebshopNumberingType } from '@stamhoofd/structures';
|
|
4
4
|
|
|
5
|
-
export class WebshopCounter
|
|
6
|
-
static numberCache: Map<string, number> = new Map()
|
|
5
|
+
export class WebshopCounter {
|
|
6
|
+
static numberCache: Map<string, number> = new Map();
|
|
7
7
|
|
|
8
8
|
static async getNextNumber(webshopId: string, numberingType: WebshopNumberingType): Promise<number> {
|
|
9
9
|
if (numberingType == WebshopNumberingType.Random) {
|
|
10
|
-
return Math.floor(Math.random() * 1000000000)
|
|
10
|
+
return Math.floor(Math.random() * 1000000000);
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
// Prevent race conditions: create a queue
|
|
14
14
|
// The queue can only run one at a time for the same webshop (so multiple webshops at the same time are allowed)
|
|
15
|
-
return await QueueHandler.schedule(
|
|
15
|
+
return await QueueHandler.schedule('webshop/numbers-' + webshopId, async () => {
|
|
16
16
|
if (this.numberCache.has(webshopId)) {
|
|
17
|
-
const nextNumber = this.numberCache.get(webshopId)
|
|
18
|
-
this.numberCache.set(webshopId, nextNumber + 1)
|
|
19
|
-
return nextNumber
|
|
17
|
+
const nextNumber = this.numberCache.get(webshopId)!;
|
|
18
|
+
this.numberCache.set(webshopId, nextNumber + 1);
|
|
19
|
+
return nextNumber;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const [rows] = await Database.select(`select max(number) as previousNumber from webshop_orders where webshopId = ?`, [webshopId]);
|
|
23
|
-
let nextNumber: number | undefined
|
|
23
|
+
let nextNumber: number | undefined;
|
|
24
24
|
|
|
25
25
|
if (rows.length == 0) {
|
|
26
|
-
nextNumber = 1
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
nextNumber = 1;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const previousNumber: number | null = rows[0]['']['previousNumber'] as number | null;
|
|
30
|
+
nextNumber = (previousNumber ?? 0) + 1;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
this.numberCache.set(webshopId, nextNumber + 1
|
|
33
|
-
return nextNumber
|
|
34
|
-
})
|
|
33
|
+
this.numberCache.set(webshopId, nextNumber + 1);
|
|
34
|
+
return nextNumber;
|
|
35
|
+
});
|
|
35
36
|
}
|
|
36
37
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
1
|
+
export * from './factories/AddressFactory';
|
|
2
|
+
export * from './factories/EmergencyContactFactory';
|
|
3
|
+
export * from './factories/GroupFactory';
|
|
4
|
+
export * from './factories/MemberFactory';
|
|
5
|
+
export * from './factories/OrganizationFactory';
|
|
6
|
+
export * from './factories/ParentFactory';
|
|
7
|
+
export * from './factories/RecordFactory';
|
|
8
|
+
export * from './factories/RegisterCodeFactory';
|
|
9
|
+
export * from './factories/RegistrationFactory';
|
|
10
|
+
export * from './factories/UserFactory';
|
|
11
|
+
export * from './factories/WebshopFactory';
|
|
12
|
+
export * from './factories/RegistrationPeriodFactory';
|
|
13
13
|
|
|
14
14
|
// Helpers
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
15
|
+
export * from './helpers/EmailBuilder';
|
|
16
|
+
export * from './helpers/GroupBuilder';
|
|
17
|
+
export * from './helpers/RateLimiter';
|
|
18
|
+
export * from './helpers/WebshopCounter';
|
|
19
|
+
export * from './helpers/MemberMerger';
|
|
20
|
+
export * from './helpers/SetupStepsUpdater';
|
|
20
21
|
|
|
21
22
|
// Models
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
23
|
+
export * from './models';
|
|
24
|
+
export * from './structures/OrganizationServerMetaData';
|