@stamhoofd/models 2.119.0 → 2.120.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/dist/factories/AddressFactory.d.ts.map +1 -0
- package/dist/factories/AddressFactory.js +38 -0
- package/dist/factories/AddressFactory.js.map +1 -0
- package/dist/factories/BalanceItemFactory.d.ts +29 -0
- package/dist/factories/BalanceItemFactory.d.ts.map +1 -0
- package/dist/factories/BalanceItemFactory.js +56 -0
- package/dist/factories/BalanceItemFactory.js.map +1 -0
- package/dist/factories/DocumentTemplateFactory.d.ts +22 -0
- package/dist/factories/DocumentTemplateFactory.d.ts.map +1 -0
- package/dist/factories/DocumentTemplateFactory.js +145 -0
- package/dist/factories/DocumentTemplateFactory.js.map +1 -0
- package/dist/factories/EmailTemplateFactory.d.ts +18 -0
- package/dist/factories/EmailTemplateFactory.d.ts.map +1 -0
- package/dist/factories/EmailTemplateFactory.js +39 -0
- package/dist/factories/EmailTemplateFactory.js.map +1 -0
- package/dist/factories/EmergencyContactFactory.d.ts.map +1 -0
- package/dist/factories/EmergencyContactFactory.js +38 -0
- package/dist/factories/EmergencyContactFactory.js.map +1 -0
- package/dist/factories/EventFactory.d.ts +19 -0
- package/dist/factories/EventFactory.d.ts.map +1 -0
- package/dist/factories/EventFactory.js +31 -0
- package/dist/factories/EventFactory.js.map +1 -0
- package/dist/factories/EventNotificationFactory.d.ts +23 -0
- package/dist/factories/EventNotificationFactory.d.ts.map +1 -0
- package/dist/factories/EventNotificationFactory.js +40 -0
- package/dist/factories/EventNotificationFactory.js.map +1 -0
- package/dist/factories/EventNotificationTypeFactory.d.ts +12 -0
- package/dist/factories/EventNotificationTypeFactory.d.ts.map +1 -0
- package/dist/factories/EventNotificationTypeFactory.js +21 -0
- package/dist/factories/EventNotificationTypeFactory.js.map +1 -0
- package/dist/factories/GroupFactory.d.ts +27 -0
- package/dist/factories/GroupFactory.d.ts.map +1 -0
- package/dist/factories/GroupFactory.js +88 -0
- package/dist/factories/GroupFactory.js.map +1 -0
- package/dist/factories/MemberFactory.d.ts +26 -0
- package/dist/factories/MemberFactory.d.ts.map +1 -0
- package/dist/factories/MemberFactory.js +131 -0
- package/dist/factories/MemberFactory.js.map +1 -0
- package/dist/factories/MemberResponsibilityRecordFactory.d.ts +15 -0
- package/dist/factories/MemberResponsibilityRecordFactory.d.ts.map +1 -0
- package/dist/factories/MemberResponsibilityRecordFactory.js +30 -0
- package/dist/factories/MemberResponsibilityRecordFactory.js.map +1 -0
- package/dist/factories/OrganizationFactory.d.ts +20 -0
- package/dist/factories/OrganizationFactory.d.ts.map +1 -0
- package/dist/factories/OrganizationFactory.js +61 -0
- package/dist/factories/OrganizationFactory.js.map +1 -0
- package/dist/factories/OrganizationRegistrationPeriodFactory.d.ts +13 -0
- package/dist/factories/OrganizationRegistrationPeriodFactory.d.ts.map +1 -0
- package/dist/factories/OrganizationRegistrationPeriodFactory.js +16 -0
- package/dist/factories/OrganizationRegistrationPeriodFactory.js.map +1 -0
- package/dist/factories/OrganizationTagFactory.d.ts.map +1 -0
- package/dist/factories/OrganizationTagFactory.js +19 -0
- package/dist/factories/OrganizationTagFactory.js.map +1 -0
- package/dist/factories/ParentFactory.d.ts.map +1 -0
- package/dist/factories/ParentFactory.js +39 -0
- package/dist/factories/ParentFactory.js.map +1 -0
- package/dist/factories/PlatformEventTypeFactory.d.ts.map +1 -0
- package/dist/factories/PlatformEventTypeFactory.js +23 -0
- package/dist/factories/PlatformEventTypeFactory.js.map +1 -0
- package/dist/factories/PlatformResponsibilityFactory.d.ts.map +1 -0
- package/dist/factories/PlatformResponsibilityFactory.js +21 -0
- package/dist/factories/PlatformResponsibilityFactory.js.map +1 -0
- package/dist/factories/RecordAnswerFactory.d.ts +18 -0
- package/dist/factories/RecordAnswerFactory.d.ts.map +1 -0
- package/dist/factories/RecordAnswerFactory.js +91 -0
- package/dist/factories/RecordAnswerFactory.js.map +1 -0
- package/dist/factories/RecordCategoryFactory.d.ts +11 -0
- package/dist/factories/RecordCategoryFactory.d.ts.map +1 -0
- package/dist/factories/RecordCategoryFactory.js +19 -0
- package/dist/factories/RecordCategoryFactory.js.map +1 -0
- package/dist/factories/RecordFactory.d.ts.map +1 -0
- package/dist/factories/RecordFactory.js +16 -0
- package/dist/factories/RecordFactory.js.map +1 -0
- package/dist/factories/RegisterCodeFactory.d.ts.map +1 -0
- package/dist/factories/RegisterCodeFactory.js +14 -0
- package/dist/factories/RegisterCodeFactory.js.map +1 -0
- package/dist/factories/RegistrationFactory.d.ts +21 -0
- package/dist/factories/RegistrationFactory.d.ts.map +1 -0
- package/dist/factories/RegistrationFactory.js +21 -0
- package/dist/factories/RegistrationFactory.js.map +1 -0
- package/dist/factories/RegistrationPeriodFactory.d.ts +16 -0
- package/dist/factories/RegistrationPeriodFactory.d.ts.map +1 -0
- package/dist/factories/RegistrationPeriodFactory.js +30 -0
- package/dist/factories/RegistrationPeriodFactory.js.map +1 -0
- package/dist/factories/STPackageFactory.d.ts +15 -0
- package/dist/factories/STPackageFactory.d.ts.map +1 -0
- package/dist/factories/STPackageFactory.js +34 -0
- package/dist/factories/STPackageFactory.js.map +1 -0
- package/dist/factories/UserFactory.d.ts +22 -0
- package/dist/factories/UserFactory.d.ts.map +1 -0
- package/dist/factories/UserFactory.js +63 -0
- package/dist/factories/UserFactory.js.map +1 -0
- package/dist/factories/WebshopFactory.d.ts +17 -0
- package/dist/factories/WebshopFactory.d.ts.map +1 -0
- package/dist/factories/WebshopFactory.js +35 -0
- package/dist/factories/WebshopFactory.js.map +1 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/index.js +27 -0
- package/dist/factories/index.js.map +1 -0
- package/dist/helpers/DNSValidator.d.ts +6 -0
- package/dist/helpers/DNSValidator.d.ts.map +1 -0
- package/dist/helpers/DNSValidator.js +142 -0
- package/dist/helpers/DNSValidator.js.map +1 -0
- package/dist/helpers/EmailBuilder.d.ts +88 -0
- package/dist/helpers/EmailBuilder.d.ts.map +1 -0
- package/dist/helpers/EmailBuilder.js +603 -0
- package/dist/helpers/EmailBuilder.js.map +1 -0
- package/dist/helpers/Handlebars.d.ts.map +1 -0
- package/dist/helpers/Handlebars.js +244 -0
- package/dist/helpers/Handlebars.js.map +1 -0
- package/dist/helpers/MemberMerger.d.ts.map +1 -0
- package/dist/helpers/MemberMerger.js +364 -0
- package/dist/helpers/MemberMerger.js.map +1 -0
- package/dist/helpers/RateLimiter.d.ts.map +1 -0
- package/dist/helpers/RateLimiter.js +64 -0
- package/dist/helpers/RateLimiter.js.map +1 -0
- package/dist/helpers/WebshopCounter.d.ts +8 -0
- package/dist/helpers/WebshopCounter.d.ts.map +1 -0
- package/dist/helpers/WebshopCounter.js +46 -0
- package/dist/helpers/WebshopCounter.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/1605262045-import-postcodes.d.ts.map +1 -0
- package/dist/migrations/1605262045-import-postcodes.js +117 -0
- package/dist/migrations/1605262045-import-postcodes.js.map +1 -0
- package/dist/migrations/1605262046-import-postcodes-nl.d.ts.map +1 -0
- package/dist/migrations/1605262046-import-postcodes-nl.js +80 -0
- package/dist/migrations/1605262046-import-postcodes-nl.js.map +1 -0
- package/dist/migrations/1720080976-convert-charset-leads.d.ts +10 -0
- package/dist/migrations/1720080976-convert-charset-leads.d.ts.map +1 -0
- package/dist/migrations/1720080976-convert-charset-leads.js +41 -0
- package/dist/migrations/1720080976-convert-charset-leads.js.map +1 -0
- package/dist/models/AuditLog.d.ts.map +1 -0
- package/dist/models/AuditLog.js +94 -0
- package/dist/models/AuditLog.js.map +1 -0
- package/dist/models/BalanceItem.d.ts +218 -0
- package/dist/models/BalanceItem.d.ts.map +1 -0
- package/dist/models/BalanceItem.js +626 -0
- package/dist/models/BalanceItem.js.map +1 -0
- package/dist/models/BalanceItemPayment.d.ts +24 -0
- package/dist/models/BalanceItemPayment.d.ts.map +1 -0
- package/dist/models/BalanceItemPayment.js +65 -0
- package/dist/models/BalanceItemPayment.js.map +1 -0
- package/dist/models/BuckarooPayment.d.ts.map +1 -0
- package/dist/models/BuckarooPayment.js +24 -0
- package/dist/models/BuckarooPayment.js.map +1 -0
- package/dist/models/CachedBalance.d.ts +51 -0
- package/dist/models/CachedBalance.d.ts.map +1 -0
- package/dist/models/CachedBalance.js +390 -0
- package/dist/models/CachedBalance.js.map +1 -0
- package/dist/models/Document.d.ts +41 -0
- package/dist/models/Document.d.ts.map +1 -0
- package/dist/models/Document.js +251 -0
- package/dist/models/Document.js.map +1 -0
- package/dist/models/DocumentTemplate.d.ts +56 -0
- package/dist/models/DocumentTemplate.d.ts.map +1 -0
- package/dist/models/DocumentTemplate.js +719 -0
- package/dist/models/DocumentTemplate.js.map +1 -0
- package/dist/models/Email.d.ts +141 -0
- package/dist/models/Email.d.ts.map +1 -0
- package/dist/models/Email.js +1341 -0
- package/dist/models/Email.js.map +1 -0
- package/dist/models/EmailRecipient.d.ts.map +1 -0
- package/dist/models/EmailRecipient.js +194 -0
- package/dist/models/EmailRecipient.js.map +1 -0
- package/dist/models/EmailTemplate.d.ts +24 -0
- package/dist/models/EmailTemplate.d.ts.map +1 -0
- package/dist/models/EmailTemplate.js +79 -0
- package/dist/models/EmailTemplate.js.map +1 -0
- package/dist/models/EmailVerificationCode.d.ts +61 -0
- package/dist/models/EmailVerificationCode.d.ts.map +1 -0
- package/dist/models/EmailVerificationCode.js +339 -0
- package/dist/models/EmailVerificationCode.js.map +1 -0
- package/dist/models/Event.d.ts.map +1 -0
- package/dist/models/Event.js +132 -0
- package/dist/models/Event.js.map +1 -0
- package/dist/models/EventNotification.d.ts +32 -0
- package/dist/models/EventNotification.d.ts.map +1 -0
- package/dist/models/EventNotification.js +98 -0
- package/dist/models/EventNotification.js.map +1 -0
- package/dist/models/Group.d.ts +46 -0
- package/dist/models/Group.d.ts.map +1 -0
- package/dist/models/Group.js +213 -0
- package/dist/models/Group.js.map +1 -0
- package/dist/models/Image.d.ts +17 -0
- package/dist/models/Image.d.ts.map +1 -0
- package/dist/models/Image.js +169 -0
- package/dist/models/Image.js.map +1 -0
- package/dist/models/Invoice.d.ts.map +1 -0
- package/dist/models/Invoice.js +186 -0
- package/dist/models/Invoice.js.map +1 -0
- package/dist/models/InvoicedBalanceItem.d.ts +66 -0
- package/dist/models/InvoicedBalanceItem.d.ts.map +1 -0
- package/dist/models/InvoicedBalanceItem.js +130 -0
- package/dist/models/InvoicedBalanceItem.js.map +1 -0
- package/dist/models/Member.d.ts +114 -0
- package/dist/models/Member.d.ts.map +1 -0
- package/dist/models/Member.js +415 -0
- package/dist/models/Member.js.map +1 -0
- package/dist/models/MemberPlatformMembership.d.ts +48 -0
- package/dist/models/MemberPlatformMembership.d.ts.map +1 -0
- package/dist/models/MemberPlatformMembership.js +377 -0
- package/dist/models/MemberPlatformMembership.js.map +1 -0
- package/dist/models/MemberResponsibilityRecord.d.ts +17 -0
- package/dist/models/MemberResponsibilityRecord.d.ts.map +1 -0
- package/dist/models/MemberResponsibilityRecord.js +65 -0
- package/dist/models/MemberResponsibilityRecord.js.map +1 -0
- package/dist/models/MemberUser.d.ts.map +1 -0
- package/dist/models/MemberUser.js +22 -0
- package/dist/models/MemberUser.js.map +1 -0
- package/dist/models/MergedMember.d.ts +23 -0
- package/dist/models/MergedMember.d.ts.map +1 -0
- package/dist/models/MergedMember.js +123 -0
- package/dist/models/MergedMember.js.map +1 -0
- package/dist/models/MolliePayment.d.ts.map +1 -0
- package/dist/models/MolliePayment.js +24 -0
- package/dist/models/MolliePayment.js.map +1 -0
- package/dist/models/MollieToken.d.ts +45 -0
- package/dist/models/MollieToken.d.ts.map +1 -0
- package/dist/models/MollieToken.js +330 -0
- package/dist/models/MollieToken.js.map +1 -0
- package/dist/models/OneTimeToken.d.ts +38 -0
- package/dist/models/OneTimeToken.d.ts.map +1 -0
- package/dist/models/OneTimeToken.js +125 -0
- package/dist/models/OneTimeToken.js.map +1 -0
- package/dist/models/Order.d.ts +115 -0
- package/dist/models/Order.d.ts.map +1 -0
- package/dist/models/Order.js +908 -0
- package/dist/models/Order.js.map +1 -0
- package/dist/models/Organization.d.ts +128 -0
- package/dist/models/Organization.d.ts.map +1 -0
- package/dist/models/Organization.js +846 -0
- package/dist/models/Organization.js.map +1 -0
- package/dist/models/OrganizationRegistrationPeriod.d.ts +22 -0
- package/dist/models/OrganizationRegistrationPeriod.d.ts.map +1 -0
- package/dist/models/OrganizationRegistrationPeriod.js +129 -0
- package/dist/models/OrganizationRegistrationPeriod.js.map +1 -0
- package/dist/models/PasswordToken.d.ts +31 -0
- package/dist/models/PasswordToken.d.ts.map +1 -0
- package/dist/models/PasswordToken.js +129 -0
- package/dist/models/PasswordToken.js.map +1 -0
- package/dist/models/PayconiqPayment.d.ts +24 -0
- package/dist/models/PayconiqPayment.d.ts.map +1 -0
- package/dist/models/PayconiqPayment.js +272 -0
- package/dist/models/PayconiqPayment.js.map +1 -0
- package/dist/models/Payment.d.ts +120 -0
- package/dist/models/Payment.d.ts.map +1 -0
- package/dist/models/Payment.js +289 -0
- package/dist/models/Payment.js.map +1 -0
- package/dist/models/Platform.d.ts.map +1 -0
- package/dist/models/Platform.js +178 -0
- package/dist/models/Platform.js.map +1 -0
- package/dist/models/RegisterCode.d.ts.map +1 -0
- package/dist/models/RegisterCode.js +76 -0
- package/dist/models/RegisterCode.js.map +1 -0
- package/dist/models/Registration.d.ts +85 -0
- package/dist/models/Registration.d.ts.map +1 -0
- package/dist/models/Registration.js +190 -0
- package/dist/models/Registration.js.map +1 -0
- package/dist/models/RegistrationPeriod.d.ts.map +1 -0
- package/dist/models/RegistrationPeriod.js +140 -0
- package/dist/models/RegistrationPeriod.js.map +1 -0
- package/dist/models/STCredit.d.ts.map +1 -0
- package/dist/models/STCredit.js +61 -0
- package/dist/models/STCredit.js.map +1 -0
- package/dist/models/STInvoice.d.ts +37 -0
- package/dist/models/STInvoice.d.ts.map +1 -0
- package/dist/models/STInvoice.js +139 -0
- package/dist/models/STInvoice.js.map +1 -0
- package/dist/models/STPackage.d.ts.map +1 -0
- package/dist/models/STPackage.js +276 -0
- package/dist/models/STPackage.js.map +1 -0
- package/dist/models/STPendingInvoice.d.ts +26 -0
- package/dist/models/STPendingInvoice.d.ts.map +1 -0
- package/dist/models/STPendingInvoice.js +68 -0
- package/dist/models/STPendingInvoice.js.map +1 -0
- package/dist/models/StripeAccount.d.ts.map +1 -0
- package/dist/models/StripeAccount.js +81 -0
- package/dist/models/StripeAccount.js.map +1 -0
- package/dist/models/StripeCheckoutSession.d.ts.map +1 -0
- package/dist/models/StripeCheckoutSession.js +35 -0
- package/dist/models/StripeCheckoutSession.js.map +1 -0
- package/dist/models/StripePaymentIntent.d.ts.map +1 -0
- package/dist/models/StripePaymentIntent.js +35 -0
- package/dist/models/StripePaymentIntent.js.map +1 -0
- package/dist/models/Ticket.d.ts +65 -0
- package/dist/models/Ticket.d.ts.map +1 -0
- package/dist/models/Ticket.js +157 -0
- package/dist/models/Ticket.js.map +1 -0
- package/dist/models/Token.d.ts +48 -0
- package/dist/models/Token.d.ts.map +1 -0
- package/dist/models/Token.js +208 -0
- package/dist/models/Token.js.map +1 -0
- package/dist/models/UitpasClientCredential.d.ts.map +1 -0
- package/dist/models/UitpasClientCredential.js +62 -0
- package/dist/models/UitpasClientCredential.js.map +1 -0
- package/dist/models/UsedRegisterCode.d.ts.map +1 -0
- package/dist/models/UsedRegisterCode.js +58 -0
- package/dist/models/UsedRegisterCode.js.map +1 -0
- package/dist/models/User.d.ts +76 -0
- package/dist/models/User.d.ts.map +1 -0
- package/dist/models/User.js +484 -0
- package/dist/models/User.js.map +1 -0
- package/dist/models/UserPermissions.d.ts +16 -0
- package/dist/models/UserPermissions.d.ts.map +1 -0
- package/dist/models/UserPermissions.js +56 -0
- package/dist/models/UserPermissions.js.map +1 -0
- package/dist/models/Webshop.d.ts +45 -0
- package/dist/models/Webshop.d.ts.map +1 -0
- package/dist/models/Webshop.js +187 -0
- package/dist/models/Webshop.js.map +1 -0
- package/dist/models/WebshopDiscountCode.d.ts.map +1 -0
- package/dist/models/WebshopDiscountCode.js +89 -0
- package/dist/models/WebshopDiscountCode.js.map +1 -0
- package/dist/models/WebshopUitpasNumber.d.ts.map +1 -0
- package/dist/models/WebshopUitpasNumber.js +91 -0
- package/dist/models/WebshopUitpasNumber.js.map +1 -0
- package/dist/models/_relations.d.ts +8 -0
- package/dist/models/_relations.d.ts.map +1 -0
- package/dist/models/_relations.js +110 -0
- package/dist/models/_relations.js.map +1 -0
- package/dist/models/addresses/City.d.ts +15 -0
- package/dist/models/addresses/City.d.ts.map +1 -0
- package/dist/models/addresses/City.js +35 -0
- package/dist/models/addresses/City.js.map +1 -0
- package/dist/models/addresses/PostalCode.d.ts +21 -0
- package/dist/models/addresses/PostalCode.d.ts.map +1 -0
- package/dist/models/addresses/PostalCode.js +139 -0
- package/dist/models/addresses/PostalCode.js.map +1 -0
- package/dist/models/addresses/Province.d.ts +9 -0
- package/dist/models/addresses/Province.d.ts.map +1 -0
- package/dist/models/addresses/Province.js +24 -0
- package/dist/models/addresses/Province.js.map +1 -0
- package/dist/models/addresses/Street.d.ts.map +1 -0
- package/dist/models/addresses/Street.js +26 -0
- package/dist/models/addresses/Street.js.map +1 -0
- package/dist/models/index.d.ts +55 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +55 -0
- package/dist/models/index.js.map +1 -0
- package/dist/structures/OrganizationServerMetaData.d.ts.map +1 -0
- package/dist/structures/OrganizationServerMetaData.js +130 -0
- package/dist/structures/OrganizationServerMetaData.js.map +1 -0
- package/package.json +13 -10
- package/src/factories/AddressFactory.ts +3 -2
- package/src/factories/BalanceItemFactory.ts +2 -1
- package/src/factories/DocumentTemplateFactory.ts +2 -1
- package/src/factories/EmailTemplateFactory.ts +3 -2
- package/src/factories/EmergencyContactFactory.ts +1 -1
- package/src/factories/EventFactory.ts +2 -2
- package/src/factories/EventNotificationFactory.ts +6 -4
- package/src/factories/EventNotificationTypeFactory.ts +2 -1
- package/src/factories/GroupFactory.ts +4 -3
- package/src/factories/MemberFactory.ts +6 -5
- package/src/factories/MemberResponsibilityRecordFactory.ts +3 -2
- package/src/factories/OrganizationFactory.ts +4 -2
- package/src/factories/OrganizationRegistrationPeriodFactory.ts +2 -2
- package/src/factories/ParentFactory.ts +1 -1
- package/src/factories/RecordAnswerFactory.ts +2 -1
- package/src/factories/RecordCategoryFactory.ts +4 -2
- package/src/factories/RegistrationFactory.ts +5 -4
- package/src/factories/RegistrationPeriodFactory.ts +2 -1
- package/src/factories/STPackageFactory.ts +1 -1
- package/src/factories/UserFactory.ts +3 -2
- package/src/factories/WebshopFactory.ts +3 -2
- package/src/helpers/DNSValidator.ts +2 -1
- package/src/helpers/EmailBuilder.ts +13 -4
- package/src/helpers/Handlebars.ts +3 -3
- package/src/helpers/MemberMerger.test.ts +1 -1
- package/src/helpers/MemberMerger.ts +5 -4
- package/src/helpers/WebshopCounter.ts +1 -1
- package/src/migrations/1605262045-import-postcodes.ts +1 -1
- package/src/migrations/1605262046-import-postcodes-nl.ts +2 -2
- package/src/migrations/1720080976-convert-charset-leads.ts +53 -0
- package/src/models/AuditLog.ts +2 -1
- package/src/models/BalanceItem.ts +4 -3
- package/src/models/BalanceItemPayment.ts +9 -6
- package/src/models/CachedBalance.test.ts +331 -0
- package/src/models/CachedBalance.ts +3 -2
- package/src/models/Document.ts +2 -2
- package/src/models/DocumentTemplate.ts +5 -3
- package/src/models/Email.test.ts +32 -31
- package/src/models/Email.ts +7 -4
- package/src/models/EmailTemplate.ts +2 -1
- package/src/models/EmailVerificationCode.ts +7 -5
- package/src/models/EventNotification.ts +3 -2
- package/src/models/Group.ts +5 -15
- package/src/models/Image.ts +2 -1
- package/src/models/InvoicedBalanceItem.ts +9 -8
- package/src/models/Member.ts +8 -4
- package/src/models/MemberPlatformMembership.ts +1 -1
- package/src/models/MemberResponsibilityRecord.ts +2 -1
- package/src/models/MergedMember.ts +1 -1
- package/src/models/MollieToken.ts +3 -3
- package/src/models/OneTimeToken.ts +1 -1
- package/src/models/Order.ts +17 -9
- package/src/models/Organization.ts +39 -11
- package/src/models/OrganizationRegistrationPeriod.ts +2 -2
- package/src/models/PasswordToken.ts +7 -5
- package/src/models/PayconiqPayment.ts +6 -3
- package/src/models/Payment.ts +8 -5
- package/src/models/Registration.ts +9 -97
- package/src/models/STInvoice.ts +1 -4
- package/src/models/STPackage.ts +1 -1
- package/src/models/STPendingInvoice.ts +5 -4
- package/src/models/Ticket.ts +11 -9
- package/src/models/Token.test.ts +2 -2
- package/src/models/Token.ts +6 -6
- package/src/models/User.ts +7 -8
- package/src/models/UserPermissions.ts +7 -6
- package/src/models/Webshop.ts +5 -5
- package/src/models/_relations.ts +133 -0
- package/src/models/addresses/City.ts +1 -1
- package/src/models/addresses/PostalCode.test.ts +1 -1
- package/src/models/addresses/PostalCode.ts +1 -1
- package/src/models/addresses/Province.ts +1 -1
- package/src/models/index.ts +22 -20
- package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/dist/src/factories/AddressFactory.d.ts.map +0 -1
- package/dist/src/factories/AddressFactory.js +0 -42
- package/dist/src/factories/AddressFactory.js.map +0 -1
- package/dist/src/factories/BalanceItemFactory.d.ts +0 -28
- package/dist/src/factories/BalanceItemFactory.d.ts.map +0 -1
- package/dist/src/factories/BalanceItemFactory.js +0 -60
- package/dist/src/factories/BalanceItemFactory.js.map +0 -1
- package/dist/src/factories/DocumentTemplateFactory.d.ts +0 -21
- package/dist/src/factories/DocumentTemplateFactory.d.ts.map +0 -1
- package/dist/src/factories/DocumentTemplateFactory.js +0 -149
- package/dist/src/factories/DocumentTemplateFactory.js.map +0 -1
- package/dist/src/factories/EmailTemplateFactory.d.ts +0 -18
- package/dist/src/factories/EmailTemplateFactory.d.ts.map +0 -1
- package/dist/src/factories/EmailTemplateFactory.js +0 -43
- package/dist/src/factories/EmailTemplateFactory.js.map +0 -1
- package/dist/src/factories/EmergencyContactFactory.d.ts.map +0 -1
- package/dist/src/factories/EmergencyContactFactory.js +0 -42
- package/dist/src/factories/EmergencyContactFactory.js.map +0 -1
- package/dist/src/factories/EventFactory.d.ts +0 -19
- package/dist/src/factories/EventFactory.d.ts.map +0 -1
- package/dist/src/factories/EventFactory.js +0 -35
- package/dist/src/factories/EventFactory.js.map +0 -1
- package/dist/src/factories/EventNotificationFactory.d.ts +0 -21
- package/dist/src/factories/EventNotificationFactory.d.ts.map +0 -1
- package/dist/src/factories/EventNotificationFactory.js +0 -44
- package/dist/src/factories/EventNotificationFactory.js.map +0 -1
- package/dist/src/factories/EventNotificationTypeFactory.d.ts +0 -11
- package/dist/src/factories/EventNotificationTypeFactory.d.ts.map +0 -1
- package/dist/src/factories/EventNotificationTypeFactory.js +0 -25
- package/dist/src/factories/EventNotificationTypeFactory.js.map +0 -1
- package/dist/src/factories/GroupFactory.d.ts +0 -26
- package/dist/src/factories/GroupFactory.d.ts.map +0 -1
- package/dist/src/factories/GroupFactory.js +0 -92
- package/dist/src/factories/GroupFactory.js.map +0 -1
- package/dist/src/factories/MemberFactory.d.ts +0 -26
- package/dist/src/factories/MemberFactory.d.ts.map +0 -1
- package/dist/src/factories/MemberFactory.js +0 -135
- package/dist/src/factories/MemberFactory.js.map +0 -1
- package/dist/src/factories/MemberResponsibilityRecordFactory.d.ts +0 -14
- package/dist/src/factories/MemberResponsibilityRecordFactory.d.ts.map +0 -1
- package/dist/src/factories/MemberResponsibilityRecordFactory.js +0 -34
- package/dist/src/factories/MemberResponsibilityRecordFactory.js.map +0 -1
- package/dist/src/factories/OrganizationFactory.d.ts +0 -19
- package/dist/src/factories/OrganizationFactory.d.ts.map +0 -1
- package/dist/src/factories/OrganizationFactory.js +0 -64
- package/dist/src/factories/OrganizationFactory.js.map +0 -1
- package/dist/src/factories/OrganizationRegistrationPeriodFactory.d.ts +0 -13
- package/dist/src/factories/OrganizationRegistrationPeriodFactory.d.ts.map +0 -1
- package/dist/src/factories/OrganizationRegistrationPeriodFactory.js +0 -20
- package/dist/src/factories/OrganizationRegistrationPeriodFactory.js.map +0 -1
- package/dist/src/factories/OrganizationTagFactory.d.ts.map +0 -1
- package/dist/src/factories/OrganizationTagFactory.js +0 -23
- package/dist/src/factories/OrganizationTagFactory.js.map +0 -1
- package/dist/src/factories/ParentFactory.d.ts.map +0 -1
- package/dist/src/factories/ParentFactory.js +0 -43
- package/dist/src/factories/ParentFactory.js.map +0 -1
- package/dist/src/factories/PlatformEventTypeFactory.d.ts.map +0 -1
- package/dist/src/factories/PlatformEventTypeFactory.js +0 -27
- package/dist/src/factories/PlatformEventTypeFactory.js.map +0 -1
- package/dist/src/factories/PlatformResponsibilityFactory.d.ts.map +0 -1
- package/dist/src/factories/PlatformResponsibilityFactory.js +0 -25
- package/dist/src/factories/PlatformResponsibilityFactory.js.map +0 -1
- package/dist/src/factories/RecordAnswerFactory.d.ts +0 -17
- package/dist/src/factories/RecordAnswerFactory.d.ts.map +0 -1
- package/dist/src/factories/RecordAnswerFactory.js +0 -95
- package/dist/src/factories/RecordAnswerFactory.js.map +0 -1
- package/dist/src/factories/RecordCategoryFactory.d.ts +0 -11
- package/dist/src/factories/RecordCategoryFactory.d.ts.map +0 -1
- package/dist/src/factories/RecordCategoryFactory.js +0 -23
- package/dist/src/factories/RecordCategoryFactory.js.map +0 -1
- package/dist/src/factories/RecordFactory.d.ts.map +0 -1
- package/dist/src/factories/RecordFactory.js +0 -21
- package/dist/src/factories/RecordFactory.js.map +0 -1
- package/dist/src/factories/RegisterCodeFactory.d.ts.map +0 -1
- package/dist/src/factories/RegisterCodeFactory.js +0 -18
- package/dist/src/factories/RegisterCodeFactory.js.map +0 -1
- package/dist/src/factories/RegistrationFactory.d.ts +0 -21
- package/dist/src/factories/RegistrationFactory.d.ts.map +0 -1
- package/dist/src/factories/RegistrationFactory.js +0 -25
- package/dist/src/factories/RegistrationFactory.js.map +0 -1
- package/dist/src/factories/RegistrationPeriodFactory.d.ts +0 -15
- package/dist/src/factories/RegistrationPeriodFactory.d.ts.map +0 -1
- package/dist/src/factories/RegistrationPeriodFactory.js +0 -34
- package/dist/src/factories/RegistrationPeriodFactory.js.map +0 -1
- package/dist/src/factories/STPackageFactory.d.ts +0 -15
- package/dist/src/factories/STPackageFactory.d.ts.map +0 -1
- package/dist/src/factories/STPackageFactory.js +0 -38
- package/dist/src/factories/STPackageFactory.js.map +0 -1
- package/dist/src/factories/UserFactory.d.ts +0 -22
- package/dist/src/factories/UserFactory.d.ts.map +0 -1
- package/dist/src/factories/UserFactory.js +0 -67
- package/dist/src/factories/UserFactory.js.map +0 -1
- package/dist/src/factories/WebshopFactory.d.ts +0 -16
- package/dist/src/factories/WebshopFactory.d.ts.map +0 -1
- package/dist/src/factories/WebshopFactory.js +0 -39
- package/dist/src/factories/WebshopFactory.js.map +0 -1
- package/dist/src/factories/index.d.ts.map +0 -1
- package/dist/src/factories/index.js +0 -30
- package/dist/src/factories/index.js.map +0 -1
- package/dist/src/helpers/DNSValidator.d.ts +0 -6
- package/dist/src/helpers/DNSValidator.d.ts.map +0 -1
- package/dist/src/helpers/DNSValidator.js +0 -145
- package/dist/src/helpers/DNSValidator.js.map +0 -1
- package/dist/src/helpers/EmailBuilder.d.ts +0 -83
- package/dist/src/helpers/EmailBuilder.d.ts.map +0 -1
- package/dist/src/helpers/EmailBuilder.js +0 -646
- package/dist/src/helpers/EmailBuilder.js.map +0 -1
- package/dist/src/helpers/Handlebars.d.ts.map +0 -1
- package/dist/src/helpers/Handlebars.js +0 -248
- package/dist/src/helpers/Handlebars.js.map +0 -1
- package/dist/src/helpers/MemberMerger.d.ts.map +0 -1
- package/dist/src/helpers/MemberMerger.js +0 -371
- package/dist/src/helpers/MemberMerger.js.map +0 -1
- package/dist/src/helpers/MemberMerger.test.d.ts +0 -2
- package/dist/src/helpers/MemberMerger.test.d.ts.map +0 -1
- package/dist/src/helpers/MemberMerger.test.js +0 -644
- package/dist/src/helpers/MemberMerger.test.js.map +0 -1
- package/dist/src/helpers/RateLimiter.d.ts.map +0 -1
- package/dist/src/helpers/RateLimiter.js +0 -69
- package/dist/src/helpers/RateLimiter.js.map +0 -1
- package/dist/src/helpers/WebshopCounter.d.ts +0 -8
- package/dist/src/helpers/WebshopCounter.d.ts.map +0 -1
- package/dist/src/helpers/WebshopCounter.js +0 -50
- package/dist/src/helpers/WebshopCounter.js.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -14
- package/dist/src/index.js.map +0 -1
- package/dist/src/migrations/1605262045-import-postcodes.js +0 -121
- package/dist/src/migrations/1605262046-import-postcodes-nl.js +0 -83
- package/dist/src/models/AuditLog.d.ts.map +0 -1
- package/dist/src/models/AuditLog.js +0 -98
- package/dist/src/models/AuditLog.js.map +0 -1
- package/dist/src/models/BalanceItem.d.ts +0 -217
- package/dist/src/models/BalanceItem.d.ts.map +0 -1
- package/dist/src/models/BalanceItem.js +0 -630
- package/dist/src/models/BalanceItem.js.map +0 -1
- package/dist/src/models/BalanceItemPayment.d.ts +0 -23
- package/dist/src/models/BalanceItemPayment.d.ts.map +0 -1
- package/dist/src/models/BalanceItemPayment.js +0 -70
- package/dist/src/models/BalanceItemPayment.js.map +0 -1
- package/dist/src/models/BuckarooPayment.d.ts.map +0 -1
- package/dist/src/models/BuckarooPayment.js +0 -28
- package/dist/src/models/BuckarooPayment.js.map +0 -1
- package/dist/src/models/CachedBalance.d.ts +0 -50
- package/dist/src/models/CachedBalance.d.ts.map +0 -1
- package/dist/src/models/CachedBalance.js +0 -394
- package/dist/src/models/CachedBalance.js.map +0 -1
- package/dist/src/models/Document.d.ts +0 -41
- package/dist/src/models/Document.d.ts.map +0 -1
- package/dist/src/models/Document.js +0 -255
- package/dist/src/models/Document.js.map +0 -1
- package/dist/src/models/DocumentTemplate.d.ts +0 -55
- package/dist/src/models/DocumentTemplate.d.ts.map +0 -1
- package/dist/src/models/DocumentTemplate.js +0 -723
- package/dist/src/models/DocumentTemplate.js.map +0 -1
- package/dist/src/models/DocumentTemplate.test.d.ts +0 -2
- package/dist/src/models/DocumentTemplate.test.d.ts.map +0 -1
- package/dist/src/models/DocumentTemplate.test.js +0 -57
- package/dist/src/models/DocumentTemplate.test.js.map +0 -1
- package/dist/src/models/Email.d.ts +0 -140
- package/dist/src/models/Email.d.ts.map +0 -1
- package/dist/src/models/Email.js +0 -1345
- package/dist/src/models/Email.js.map +0 -1
- package/dist/src/models/Email.test.d.ts +0 -2
- package/dist/src/models/Email.test.d.ts.map +0 -1
- package/dist/src/models/Email.test.js +0 -1036
- package/dist/src/models/Email.test.js.map +0 -1
- package/dist/src/models/EmailRecipient.d.ts.map +0 -1
- package/dist/src/models/EmailRecipient.js +0 -198
- package/dist/src/models/EmailRecipient.js.map +0 -1
- package/dist/src/models/EmailTemplate.d.ts +0 -23
- package/dist/src/models/EmailTemplate.d.ts.map +0 -1
- package/dist/src/models/EmailTemplate.js +0 -83
- package/dist/src/models/EmailTemplate.js.map +0 -1
- package/dist/src/models/EmailVerificationCode.d.ts +0 -59
- package/dist/src/models/EmailVerificationCode.d.ts.map +0 -1
- package/dist/src/models/EmailVerificationCode.js +0 -343
- package/dist/src/models/EmailVerificationCode.js.map +0 -1
- package/dist/src/models/Event.d.ts.map +0 -1
- package/dist/src/models/Event.js +0 -136
- package/dist/src/models/Event.js.map +0 -1
- package/dist/src/models/EventNotification.d.ts +0 -31
- package/dist/src/models/EventNotification.d.ts.map +0 -1
- package/dist/src/models/EventNotification.js +0 -102
- package/dist/src/models/EventNotification.js.map +0 -1
- package/dist/src/models/Group.d.ts +0 -45
- package/dist/src/models/Group.d.ts.map +0 -1
- package/dist/src/models/Group.js +0 -228
- package/dist/src/models/Group.js.map +0 -1
- package/dist/src/models/Image.d.ts +0 -16
- package/dist/src/models/Image.d.ts.map +0 -1
- package/dist/src/models/Image.js +0 -173
- package/dist/src/models/Image.js.map +0 -1
- package/dist/src/models/Invoice.d.ts.map +0 -1
- package/dist/src/models/Invoice.js +0 -190
- package/dist/src/models/Invoice.js.map +0 -1
- package/dist/src/models/InvoicedBalanceItem.d.ts +0 -66
- package/dist/src/models/InvoicedBalanceItem.d.ts.map +0 -1
- package/dist/src/models/InvoicedBalanceItem.js +0 -136
- package/dist/src/models/InvoicedBalanceItem.js.map +0 -1
- package/dist/src/models/Member.d.ts +0 -112
- package/dist/src/models/Member.d.ts.map +0 -1
- package/dist/src/models/Member.js +0 -415
- package/dist/src/models/Member.js.map +0 -1
- package/dist/src/models/MemberPlatformMembership.d.ts +0 -48
- package/dist/src/models/MemberPlatformMembership.d.ts.map +0 -1
- package/dist/src/models/MemberPlatformMembership.js +0 -381
- package/dist/src/models/MemberPlatformMembership.js.map +0 -1
- package/dist/src/models/MemberResponsibilityRecord.d.ts +0 -16
- package/dist/src/models/MemberResponsibilityRecord.d.ts.map +0 -1
- package/dist/src/models/MemberResponsibilityRecord.js +0 -69
- package/dist/src/models/MemberResponsibilityRecord.js.map +0 -1
- package/dist/src/models/MemberUser.d.ts.map +0 -1
- package/dist/src/models/MemberUser.js +0 -26
- package/dist/src/models/MemberUser.js.map +0 -1
- package/dist/src/models/MergedMember.d.ts +0 -23
- package/dist/src/models/MergedMember.d.ts.map +0 -1
- package/dist/src/models/MergedMember.js +0 -127
- package/dist/src/models/MergedMember.js.map +0 -1
- package/dist/src/models/MolliePayment.d.ts.map +0 -1
- package/dist/src/models/MolliePayment.js +0 -28
- package/dist/src/models/MolliePayment.js.map +0 -1
- package/dist/src/models/MollieToken.d.ts +0 -45
- package/dist/src/models/MollieToken.d.ts.map +0 -1
- package/dist/src/models/MollieToken.js +0 -334
- package/dist/src/models/MollieToken.js.map +0 -1
- package/dist/src/models/OneTimeToken.d.ts +0 -38
- package/dist/src/models/OneTimeToken.d.ts.map +0 -1
- package/dist/src/models/OneTimeToken.js +0 -129
- package/dist/src/models/OneTimeToken.js.map +0 -1
- package/dist/src/models/Order.d.ts +0 -112
- package/dist/src/models/Order.d.ts.map +0 -1
- package/dist/src/models/Order.js +0 -906
- package/dist/src/models/Order.js.map +0 -1
- package/dist/src/models/Organization.d.ts +0 -120
- package/dist/src/models/Organization.d.ts.map +0 -1
- package/dist/src/models/Organization.js +0 -828
- package/dist/src/models/Organization.js.map +0 -1
- package/dist/src/models/OrganizationRegistrationPeriod.d.ts +0 -22
- package/dist/src/models/OrganizationRegistrationPeriod.d.ts.map +0 -1
- package/dist/src/models/OrganizationRegistrationPeriod.js +0 -133
- package/dist/src/models/OrganizationRegistrationPeriod.js.map +0 -1
- package/dist/src/models/PasswordToken.d.ts +0 -30
- package/dist/src/models/PasswordToken.d.ts.map +0 -1
- package/dist/src/models/PasswordToken.js +0 -133
- package/dist/src/models/PasswordToken.js.map +0 -1
- package/dist/src/models/PayconiqPayment.d.ts +0 -22
- package/dist/src/models/PayconiqPayment.d.ts.map +0 -1
- package/dist/src/models/PayconiqPayment.js +0 -276
- package/dist/src/models/PayconiqPayment.js.map +0 -1
- package/dist/src/models/Payment.d.ts +0 -117
- package/dist/src/models/Payment.d.ts.map +0 -1
- package/dist/src/models/Payment.js +0 -293
- package/dist/src/models/Payment.js.map +0 -1
- package/dist/src/models/Platform.d.ts.map +0 -1
- package/dist/src/models/Platform.js +0 -182
- package/dist/src/models/Platform.js.map +0 -1
- package/dist/src/models/Platform.test.d.ts +0 -2
- package/dist/src/models/Platform.test.d.ts.map +0 -1
- package/dist/src/models/Platform.test.js +0 -90
- package/dist/src/models/Platform.test.js.map +0 -1
- package/dist/src/models/RegisterCode.d.ts.map +0 -1
- package/dist/src/models/RegisterCode.js +0 -80
- package/dist/src/models/RegisterCode.js.map +0 -1
- package/dist/src/models/Registration.d.ts +0 -93
- package/dist/src/models/Registration.d.ts.map +0 -1
- package/dist/src/models/Registration.js +0 -267
- package/dist/src/models/Registration.js.map +0 -1
- package/dist/src/models/RegistrationPeriod.d.ts.map +0 -1
- package/dist/src/models/RegistrationPeriod.js +0 -144
- package/dist/src/models/RegistrationPeriod.js.map +0 -1
- package/dist/src/models/STCredit.d.ts.map +0 -1
- package/dist/src/models/STCredit.js +0 -65
- package/dist/src/models/STCredit.js.map +0 -1
- package/dist/src/models/STInvoice.d.ts +0 -37
- package/dist/src/models/STInvoice.d.ts.map +0 -1
- package/dist/src/models/STInvoice.js +0 -145
- package/dist/src/models/STInvoice.js.map +0 -1
- package/dist/src/models/STPackage.d.ts.map +0 -1
- package/dist/src/models/STPackage.js +0 -280
- package/dist/src/models/STPackage.js.map +0 -1
- package/dist/src/models/STPendingInvoice.d.ts +0 -26
- package/dist/src/models/STPendingInvoice.d.ts.map +0 -1
- package/dist/src/models/STPendingInvoice.js +0 -73
- package/dist/src/models/STPendingInvoice.js.map +0 -1
- package/dist/src/models/StripeAccount.d.ts.map +0 -1
- package/dist/src/models/StripeAccount.js +0 -85
- package/dist/src/models/StripeAccount.js.map +0 -1
- package/dist/src/models/StripeCheckoutSession.d.ts.map +0 -1
- package/dist/src/models/StripeCheckoutSession.js +0 -39
- package/dist/src/models/StripeCheckoutSession.js.map +0 -1
- package/dist/src/models/StripePaymentIntent.d.ts.map +0 -1
- package/dist/src/models/StripePaymentIntent.js +0 -39
- package/dist/src/models/StripePaymentIntent.js.map +0 -1
- package/dist/src/models/Ticket.d.ts +0 -63
- package/dist/src/models/Ticket.d.ts.map +0 -1
- package/dist/src/models/Ticket.js +0 -162
- package/dist/src/models/Ticket.js.map +0 -1
- package/dist/src/models/Token.d.ts +0 -48
- package/dist/src/models/Token.d.ts.map +0 -1
- package/dist/src/models/Token.js +0 -212
- package/dist/src/models/Token.js.map +0 -1
- package/dist/src/models/Token.test.d.ts +0 -2
- package/dist/src/models/Token.test.d.ts.map +0 -1
- package/dist/src/models/Token.test.js +0 -60
- package/dist/src/models/Token.test.js.map +0 -1
- package/dist/src/models/UitpasClientCredential.d.ts.map +0 -1
- package/dist/src/models/UitpasClientCredential.js +0 -66
- package/dist/src/models/UitpasClientCredential.js.map +0 -1
- package/dist/src/models/UsedRegisterCode.d.ts.map +0 -1
- package/dist/src/models/UsedRegisterCode.js +0 -62
- package/dist/src/models/UsedRegisterCode.js.map +0 -1
- package/dist/src/models/User.d.ts +0 -77
- package/dist/src/models/User.d.ts.map +0 -1
- package/dist/src/models/User.js +0 -490
- package/dist/src/models/User.js.map +0 -1
- package/dist/src/models/UserPermissions.d.ts +0 -16
- package/dist/src/models/UserPermissions.d.ts.map +0 -1
- package/dist/src/models/UserPermissions.js +0 -61
- package/dist/src/models/UserPermissions.js.map +0 -1
- package/dist/src/models/Webshop.d.ts +0 -45
- package/dist/src/models/Webshop.d.ts.map +0 -1
- package/dist/src/models/Webshop.js +0 -192
- package/dist/src/models/Webshop.js.map +0 -1
- package/dist/src/models/WebshopDiscountCode.d.ts.map +0 -1
- package/dist/src/models/WebshopDiscountCode.js +0 -93
- package/dist/src/models/WebshopDiscountCode.js.map +0 -1
- package/dist/src/models/WebshopUitpasNumber.d.ts.map +0 -1
- package/dist/src/models/WebshopUitpasNumber.js +0 -95
- package/dist/src/models/WebshopUitpasNumber.js.map +0 -1
- package/dist/src/models/addresses/City.d.ts +0 -15
- package/dist/src/models/addresses/City.d.ts.map +0 -1
- package/dist/src/models/addresses/City.js +0 -39
- package/dist/src/models/addresses/City.js.map +0 -1
- package/dist/src/models/addresses/PostalCode.d.ts +0 -21
- package/dist/src/models/addresses/PostalCode.d.ts.map +0 -1
- package/dist/src/models/addresses/PostalCode.js +0 -143
- package/dist/src/models/addresses/PostalCode.js.map +0 -1
- package/dist/src/models/addresses/PostalCode.test.d.ts +0 -2
- package/dist/src/models/addresses/PostalCode.test.d.ts.map +0 -1
- package/dist/src/models/addresses/PostalCode.test.js +0 -98
- package/dist/src/models/addresses/PostalCode.test.js.map +0 -1
- package/dist/src/models/addresses/Province.d.ts +0 -9
- package/dist/src/models/addresses/Province.d.ts.map +0 -1
- package/dist/src/models/addresses/Province.js +0 -28
- package/dist/src/models/addresses/Province.js.map +0 -1
- package/dist/src/models/addresses/Street.d.ts.map +0 -1
- package/dist/src/models/addresses/Street.js +0 -30
- package/dist/src/models/addresses/Street.js.map +0 -1
- package/dist/src/models/index.d.ts +0 -54
- package/dist/src/models/index.d.ts.map +0 -1
- package/dist/src/models/index.js +0 -69
- package/dist/src/models/index.js.map +0 -1
- package/dist/src/structures/OrganizationServerMetaData.d.ts.map +0 -1
- package/dist/src/structures/OrganizationServerMetaData.js +0 -135
- package/dist/src/structures/OrganizationServerMetaData.js.map +0 -1
- package/dist/tests/jest.global.setup.d.ts +0 -3
- package/dist/tests/jest.global.setup.d.ts.map +0 -1
- package/dist/tests/jest.global.setup.js +0 -33
- package/dist/tests/jest.global.setup.js.map +0 -1
- package/dist/tests/jest.setup.d.ts +0 -2
- package/dist/tests/jest.setup.d.ts.map +0 -1
- package/dist/tests/jest.setup.js +0 -32
- package/dist/tests/jest.setup.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- /package/dist/{src/assets → assets}/Metropolis-Black.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-BlackItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-Bold.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-BoldItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-ExtraBold.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-ExtraBoldItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-ExtraLight.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-ExtraLightItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-Light.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-LightItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-Medium.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-MediumItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-Regular.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-RegularItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-SemiBold.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-SemiBoldItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-Thin.woff2 +0 -0
- /package/dist/{src/assets → assets}/Metropolis-ThinItalic.woff2 +0 -0
- /package/dist/{src/assets → assets}/logo.png +0 -0
- /package/dist/{src/factories → factories}/AddressFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/EmergencyContactFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/OrganizationTagFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/ParentFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/PlatformEventTypeFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/PlatformResponsibilityFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/RecordFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/RegisterCodeFactory.d.ts +0 -0
- /package/dist/{src/factories → factories}/index.d.ts +0 -0
- /package/dist/{src/helpers → helpers}/Handlebars.d.ts +0 -0
- /package/dist/{src/helpers → helpers}/MemberMerger.d.ts +0 -0
- /package/dist/{src/helpers → helpers}/RateLimiter.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/migrations → migrations}/1593773929-create-initial-tables.sql +0 -0
- /package/dist/{src/migrations → migrations}/1605261999-gemeenten-tmp.sql +0 -0
- /package/dist/{src/migrations → migrations}/1605262045-import-postcodes.d.ts +0 -0
- /package/dist/{src/migrations → migrations}/1605262046-import-postcodes-nl.d.ts +0 -0
- /package/dist/{src/migrations → migrations}/1605279038-drop-gemeenten-tmp.sql +0 -0
- /package/dist/{src/migrations → migrations}/1708607340-tickets-deleted-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1710459176-register-code-invoices.sql +0 -0
- /package/dist/{src/migrations → migrations}/1712158247-discount-codes.sql +0 -0
- /package/dist/{src/migrations → migrations}/1713178665-drop-invites.sql +0 -0
- /package/dist/{src/migrations → migrations}/1713178666-drop-keychain.sql +0 -0
- /package/dist/{src/migrations → migrations}/1713178667-drop-challenges.sql +0 -0
- /package/dist/{src/migrations → migrations}/1713178668-drop-user-keys.sql +0 -0
- /package/dist/{src/migrations → migrations}/1713178669-drop-organization-key.sql +0 -0
- /package/dist/{src/migrations → migrations}/1714985451-user-nullable-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1714985452-email-verification-code-nullable-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1714985453-user-organization-permissions.sql +0 -0
- /package/dist/{src/migrations → migrations}/1714985454-user-organization-permissions.sql +0 -0
- /package/dist/{src/migrations → migrations}/1715079362-platform.sql +0 -0
- /package/dist/{src/migrations → migrations}/1715181649-registrations-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1715181650-registrations-organization-id-fill.sql +0 -0
- /package/dist/{src/migrations → migrations}/1715181651-registrations-organization-id-drop-null.sql +0 -0
- /package/dist/{src/migrations → migrations}/1716117067-members-nullable-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719567581-registration-periods.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719567582-organization-registration-periods.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719567881-organization-periodId.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719567882-groups-periodId.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719567883-platform-periodId.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719568079-default-period.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719568080-set-default-period-platform.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719568081-set-default-period-organizations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719568082-set-default-period-groups.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719580828-registrations-periodId.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719580829-set-default-period-registrations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1719931362-groups-default-age-group-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1720080975-convert-charset.sql +0 -0
- /package/dist/{src/migrations → migrations}/1720080976-responsibilities.sql +0 -0
- /package/dist/{src/migrations → migrations}/1720088136-member-membership-types.sql +0 -0
- /package/dist/{src/migrations → migrations}/1720088137-member-membership-types-expire-date.sql +0 -0
- /package/dist/{src/migrations → migrations}/1720444931-organization-active.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721050380-email-table.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721050381-email-recipients-table.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721342679-responsibility-groupId.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721342680-responsibility-groupId-foreign-key.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721400546-users-memberId.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721639159-membership-deleted-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721639160-membership-generated.sql +0 -0
- /package/dist/{src/migrations → migrations}/1721841819-group-type.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722090482-events.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722269236-group-waitinglist-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722525785-balance-item-paying-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722525787-depending-balance-item.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722845608-registration-stock-reservations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722845609-group-stock-reservations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722852362-stripe-intents-account-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722852363-stripe-checkout-sessions-account-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722959111-allow-multiple-registrations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1722963554-registration-group-price-and-options.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723202125-member-number.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723202126-member-number-index.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723218160-balance-item-unit-price.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723218161-balance-item-amount.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723218162-balance-item-type.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723218163-balance-item-type-defaults.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723218164-balance-item-relations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723652795-payments-paying-user-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723652796-payments-paying-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723652797-payments-paying-organization-id-fk.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723652798-payments-customer.sql +0 -0
- /package/dist/{src/migrations → migrations}/1723736282-merged-members.sql +0 -0
- /package/dist/{src/migrations → migrations}/1724076162-setup-steps.sql +0 -0
- /package/dist/{src/migrations → migrations}/1724156666-member-indexes.sql +0 -0
- /package/dist/{src/migrations → migrations}/1724156667-organization-tag-index.sql +0 -0
- /package/dist/{src/migrations → migrations}/1724256125-membership-balance-item-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1724256126-membership-balance-item-fk.sql +0 -0
- /package/dist/{src/migrations → migrations}/1724258844-membershipOrganizationId.sql +0 -0
- /package/dist/{src/migrations → migrations}/1724258845-membershipOrganizationId-fk.sql +0 -0
- /package/dist/{src/migrations → migrations}/1726054851-balance-item-price-pending.sql +0 -0
- /package/dist/{src/migrations → migrations}/1726054852-cached-outstanding-balances.sql +0 -0
- /package/dist/{src/migrations → migrations}/1726668114-maximum-free-amount.sql +0 -0
- /package/dist/{src/migrations → migrations}/1726668115-free-amount.sql +0 -0
- /package/dist/{src/migrations → migrations}/1726668116-price-without-discount.sql +0 -0
- /package/dist/{src/migrations → migrations}/1727947041-registration-record-answers.sql +0 -0
- /package/dist/{src/migrations → migrations}/1729251385-order-extra-filter-columns.sql +0 -0
- /package/dist/{src/migrations → migrations}/1732285080-audit-logs.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733129611-clear-audit-logs.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733129612-audit-logs-source.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733317908-added-missing-organization-fk-on-registrations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733317909-paying-organization-id-registrations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733317910-paying-organization-id-fk.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733410641-audit-log-external-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733418667-desc-audit-log-primary-key.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733909398-balance-items-due-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733909399-recalculate-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1733994454-balance-item-price-open.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734084689-payment-type.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734084690-move-payment-column-order.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734084691-fill-payment-type-refunds.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734084692-fill-payment-type-reallocations.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734429094-registration-trial-until.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734429095-membership-trial-until.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734535120-registration-period-previous-period-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734535121-platform-previous-period-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734626607-cached-balance-amount-open.sql +0 -0
- /package/dist/{src/migrations → migrations}/1734698906-cached-balance-amount-paid.sql +0 -0
- /package/dist/{src/migrations → migrations}/1735573520-emails-email-type.sql +0 -0
- /package/dist/{src/migrations → migrations}/1735573521-email-recipients-email-type.sql +0 -0
- /package/dist/{src/migrations → migrations}/1735573522-emails-indexes.sql +0 -0
- /package/dist/{src/migrations → migrations}/1735982691-cached-balance-email-reminder-counts.sql +0 -0
- /package/dist/{src/migrations → migrations}/1736850097-audit-logs-meta.sql +0 -0
- /package/dist/{src/migrations → migrations}/1736947931-platform-server-config.sql +0 -0
- /package/dist/{src/migrations → migrations}/1738922428-membership-locked.sql +0 -0
- /package/dist/{src/migrations → migrations}/1739017508-event-notifications.sql +0 -0
- /package/dist/{src/migrations → migrations}/1739017509-event-notifications-link.sql +0 -0
- /package/dist/{src/migrations → migrations}/1739282590-event-notifications-submitted-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1741954610-event-notifications-accepted-record-answers.sql +0 -0
- /package/dist/{src/migrations → migrations}/1742579832-audit-log-longer-object-size.sql +0 -0
- /package/dist/{src/migrations → migrations}/1747913433-registration-discounts.sql +0 -0
- /package/dist/{src/migrations → migrations}/1747996262-balance-items-paid-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1747996263-balance-items-paid-at-fill.sql +0 -0
- /package/dist/{src/migrations → migrations}/1751633220-create-uitpas-client-credentials.sql +0 -0
- /package/dist/{src/migrations → migrations}/1751970372-create-webshop-uitpas-numbers.sql +0 -0
- /package/dist/{src/migrations → migrations}/1752655335-events-webshop-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1752678047-confirmation-email.sql +0 -0
- /package/dist/{src/migrations → migrations}/1753363434-service-fees.sql +0 -0
- /package/dist/{src/migrations → migrations}/1753430415-update-webshop-uitpasnumbers.sql +0 -0
- /package/dist/{src/migrations → migrations}/1755529026-email-sender-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1755789797-email-counts-errors.sql +0 -0
- /package/dist/{src/migrations → migrations}/1755789798-email-recipient-errors.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756115313-email-recipient-ids-and-errors.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756115314-email-recipient-email-optional.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756115315-email-recipients-count.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756115316-email-cached-counts.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756115317-email-deleted-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756293494-registration-period-next-period-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756293495-platform-next-period-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756387016-registration-period-custom-name.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756391212-email-recipients-duplicate.sql +0 -0
- /package/dist/{src/migrations → migrations}/1756821154-email-send-as-email.sql +0 -0
- /package/dist/{src/migrations → migrations}/1758034021-email-recipient-previous-error.sql +0 -0
- /package/dist/{src/migrations → migrations}/1760535508-update-cached-balances-object-id-unique-constraint.sql +0 -0
- /package/dist/{src/migrations → migrations}/1761750780-renamed-invoice-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1761750781-rename-index.sql +0 -0
- /package/dist/{src/migrations → migrations}/1761750782-invoices-add-organization-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1761750783-invoices-organization-id-fk.sql +0 -0
- /package/dist/{src/migrations → migrations}/1762521336-did-send-peppol.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216321-multiply-balance-item-payments.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216322-multiply-balance-items.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216323-bigint-cached-balances.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216324-multiply-cached-balances.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216325-multiply-member-platform-memberships.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216326-multiply-payments.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216327-multiply-register-codes.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216328-multiply-credits.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216329-multiply-orders.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216330-multiply-uitpas-numbers.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216331-balance-item-vat-percentages.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216332-balance-item-price-total.sql +0 -0
- /package/dist/{src/migrations → migrations}/1763216333-balance-item-price-total-fill.sql +0 -0
- /package/dist/{src/migrations → migrations}/1765895470-document-year.sql +0 -0
- /package/dist/{src/migrations → migrations}/1766150401-document-published-at.sql +0 -0
- /package/dist/{src/migrations → migrations}/1766410598-registration-end-date.sql +0 -0
- /package/dist/{src/migrations → migrations}/1769087807-invoices-table.sql +0 -0
- /package/dist/{src/migrations → migrations}/1769087808-invoiced-balance-items-table.sql +0 -0
- /package/dist/{src/migrations → migrations}/1769087809-payments-invoice-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1769621227-payments-rounding-amount.sql +0 -0
- /package/dist/{src/migrations → migrations}/1770917406-create-cached-balances-global-index.sql +0 -0
- /package/dist/{src/migrations → migrations}/1770917407-create-member-name-ordering-index.sql +0 -0
- /package/dist/{src/migrations → migrations}/1770917408-create-member-name-ordering-index-desc.sql +0 -0
- /package/dist/{src/migrations → migrations}/1770917409-create-member-age-ordering-index.sql +0 -0
- /package/dist/{src/migrations → migrations}/1770917410-create-member-age-ordering-index-desc.sql +0 -0
- /package/dist/{src/migrations → migrations}/1770917411-drop-duplicate-member-indexes.sql +0 -0
- /package/dist/{src/migrations → migrations}/1771510518-events-index-organization-id-start-date.sql +0 -0
- /package/dist/{src/migrations → migrations}/1771918307-membership-active-filter-index.sql +0 -0
- /package/dist/{src/migrations → migrations}/1772033555-balance-item-package-id.sql +0 -0
- /package/dist/{src/migrations → migrations}/1772033715-balance-item-start-end-date.sql +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Drenthe +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Flevoland +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Friesland +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Gelderland +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Groningen +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Limburg +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Noord-Brabant +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Noord-Holland +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Overrijsel +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Utrecht +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Zeeland +0 -0
- /package/dist/{src/migrations → migrations}/data/postcodes/nl/Zuid-Holland +0 -0
- /package/dist/{src/models → models}/AuditLog.d.ts +0 -0
- /package/dist/{src/models → models}/BuckarooPayment.d.ts +0 -0
- /package/dist/{src/models → models}/EmailRecipient.d.ts +0 -0
- /package/dist/{src/models → models}/Event.d.ts +0 -0
- /package/dist/{src/models → models}/Invoice.d.ts +0 -0
- /package/dist/{src/models → models}/MemberUser.d.ts +0 -0
- /package/dist/{src/models → models}/MolliePayment.d.ts +0 -0
- /package/dist/{src/models → models}/Platform.d.ts +0 -0
- /package/dist/{src/models → models}/RegisterCode.d.ts +0 -0
- /package/dist/{src/models → models}/RegistrationPeriod.d.ts +0 -0
- /package/dist/{src/models → models}/STCredit.d.ts +0 -0
- /package/dist/{src/models → models}/STPackage.d.ts +0 -0
- /package/dist/{src/models → models}/StripeAccount.d.ts +0 -0
- /package/dist/{src/models → models}/StripeCheckoutSession.d.ts +0 -0
- /package/dist/{src/models → models}/StripePaymentIntent.d.ts +0 -0
- /package/dist/{src/models → models}/UitpasClientCredential.d.ts +0 -0
- /package/dist/{src/models → models}/UsedRegisterCode.d.ts +0 -0
- /package/dist/{src/models → models}/WebshopDiscountCode.d.ts +0 -0
- /package/dist/{src/models → models}/WebshopUitpasNumber.d.ts +0 -0
- /package/dist/{src/models → models}/addresses/Street.d.ts +0 -0
- /package/dist/{src/structures → structures}/OrganizationServerMetaData.d.ts +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { column, Database, ManyToOneRelation } from '@simonbackx/simple-database';
|
|
3
|
+
import { SimpleError } from '@simonbackx/simple-errors';
|
|
4
|
+
import { QueryableModel } from '@stamhoofd/sql';
|
|
5
|
+
import { Country } from '@stamhoofd/types/Country';
|
|
6
|
+
import { Formatter, StringCompare } from '@stamhoofd/utility';
|
|
7
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
8
|
+
import { City } from './City.js';
|
|
9
|
+
export class PostalCode extends QueryableModel {
|
|
10
|
+
static table = 'postal_codes';
|
|
11
|
+
id;
|
|
12
|
+
postalCode;
|
|
13
|
+
cityId;
|
|
14
|
+
country;
|
|
15
|
+
static city = new ManyToOneRelation(City, 'city');
|
|
16
|
+
/**
|
|
17
|
+
* Search for a given city via it's postal code and country, collecting information about the city (id), parentCity (id) and province (id)
|
|
18
|
+
*/
|
|
19
|
+
static async getCity(postalCode, cityName, country) {
|
|
20
|
+
let query = `SELECT ${City.getDefaultSelect()}from \`${PostalCode.table}\`\n`;
|
|
21
|
+
query += `JOIN \`${City.table}\` ON \`${PostalCode.table}\`.\`${PostalCode.city.foreignKey}\` = \`${City.table}\`.\`${City.primary.name}\`\n`;
|
|
22
|
+
// We do an extra join because we also need to get the other registrations of each member (only one regitration has to match the query)
|
|
23
|
+
query += `where \`${PostalCode.table}\`.\`postalCode\` = ? AND \`${PostalCode.table}\`.\`country\` = ?`;
|
|
24
|
+
const [results] = await Database.select(query, [postalCode, country]);
|
|
25
|
+
const cities = City.fromRows(results, City.table);
|
|
26
|
+
if (cities.length == 1) {
|
|
27
|
+
return cities[0];
|
|
28
|
+
}
|
|
29
|
+
// Search by city name (first exact match, then allow errors)
|
|
30
|
+
let bestScore = 0;
|
|
31
|
+
let bestCity = null;
|
|
32
|
+
for (const city of cities) {
|
|
33
|
+
const typo = StringCompare.typoCount(cityName, city.name);
|
|
34
|
+
if (typo == 0) {
|
|
35
|
+
return city;
|
|
36
|
+
}
|
|
37
|
+
if (bestCity === null || typo < bestScore) {
|
|
38
|
+
bestCity = city;
|
|
39
|
+
bestScore = typo;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (bestCity && (bestScore < 3 || StringCompare.contains(cityName, bestCity.name) || StringCompare.contains(bestCity.name, cityName))) {
|
|
43
|
+
return bestCity;
|
|
44
|
+
}
|
|
45
|
+
bestScore = 0;
|
|
46
|
+
bestCity = null;
|
|
47
|
+
for (const city of cities) {
|
|
48
|
+
const match = StringCompare.matchCount(cityName, city.name);
|
|
49
|
+
if (bestCity === null || match > bestScore) {
|
|
50
|
+
bestCity = city;
|
|
51
|
+
bestScore = match;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (bestCity && (bestScore > cityName.length / 2 || StringCompare.contains(cityName, bestCity.name))) {
|
|
55
|
+
return bestCity;
|
|
56
|
+
}
|
|
57
|
+
if (cities.length >= 1 && cities[0].parentCityId !== null && cities.every(c => c.parentCityId === cities[0].parentCityId)) {
|
|
58
|
+
// Might have put a postal code of the parent city
|
|
59
|
+
const parent = await City.getByID(cities[0].parentCityId);
|
|
60
|
+
if (parent) {
|
|
61
|
+
const typo = StringCompare.typoCount(cityName, parent.name);
|
|
62
|
+
if (typo < 4 || StringCompare.contains(cityName, parent.name)) {
|
|
63
|
+
if (cities.length > 1) {
|
|
64
|
+
throw new SimpleError({
|
|
65
|
+
code: 'invalid_field',
|
|
66
|
+
message: 'Invalid city. Suggestions: ' + Formatter.joinLast(cities.map(c => c.name), ', ', ' of ') + '?',
|
|
67
|
+
human: $t(`%GS`) + ' ' + Formatter.joinLast(cities.map(c => c.name), ', ', ' ' + $t(`%GT`) + ' ') + '?',
|
|
68
|
+
field: 'city',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return cities[0]; // do not return parent here, because the postal code has priority
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// Search parent in belgium only
|
|
76
|
+
if (country == Country.Belgium) {
|
|
77
|
+
return this.getCityByParent(postalCode, cityName, country);
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Search for a given city via it's postal code and country, collecting information about the city (id), parentCity (id) and province (id)
|
|
83
|
+
*/
|
|
84
|
+
static async getCityByParent(postalCode, cityName, country) {
|
|
85
|
+
let query = `SELECT ${City.getDefaultSelect()}from \`${PostalCode.table}\`\n`;
|
|
86
|
+
query += `JOIN \`${City.table}\` as parent ON \`${PostalCode.table}\`.\`${PostalCode.city.foreignKey}\` = \`parent\`.\`${City.primary.name}\`\n`;
|
|
87
|
+
query += `JOIN \`${City.table}\` ON \`parent\`.\`${City.primary.name}\` = \`${City.table}\`.\`${City.parentCity.foreignKey}\`\n`;
|
|
88
|
+
// We do an extra join because we also need to get the other registrations of each member (only one regitration has to match the query)
|
|
89
|
+
query += `where \`${PostalCode.table}\`.\`postalCode\` = ? AND \`${PostalCode.table}\`.\`country\` = ?`;
|
|
90
|
+
const [results] = await Database.select(query, [postalCode, country]);
|
|
91
|
+
const cities = City.fromRows(results, City.table);
|
|
92
|
+
// Search by city name (first exact match, then allow errors)
|
|
93
|
+
let bestScore = 0;
|
|
94
|
+
let bestCity = null;
|
|
95
|
+
for (const city of cities) {
|
|
96
|
+
const typo = StringCompare.typoCount(cityName, city.name);
|
|
97
|
+
if (typo == 0) {
|
|
98
|
+
return city;
|
|
99
|
+
}
|
|
100
|
+
if (bestCity === null || typo < bestScore) {
|
|
101
|
+
bestCity = city;
|
|
102
|
+
bestScore = typo;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (bestCity && (bestScore < 3 || StringCompare.contains(cityName, bestCity.name) || StringCompare.contains(bestCity.name, cityName))) {
|
|
106
|
+
return bestCity;
|
|
107
|
+
}
|
|
108
|
+
bestScore = 0;
|
|
109
|
+
bestCity = null;
|
|
110
|
+
for (const city of cities) {
|
|
111
|
+
const match = StringCompare.matchCount(cityName, city.name);
|
|
112
|
+
if (bestCity === null || match > bestScore) {
|
|
113
|
+
bestCity = city;
|
|
114
|
+
bestScore = match;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (bestCity && (bestScore > cityName.length / 2 || StringCompare.contains(cityName, bestCity.name))) {
|
|
118
|
+
return bestCity;
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
__decorate([
|
|
124
|
+
column({
|
|
125
|
+
primary: true, type: 'string', beforeSave(value) {
|
|
126
|
+
return value ?? uuidv4();
|
|
127
|
+
},
|
|
128
|
+
})
|
|
129
|
+
], PostalCode.prototype, "id", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
column({ type: 'string' })
|
|
132
|
+
], PostalCode.prototype, "postalCode", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
column({ type: 'string', foreignKey: PostalCode.city })
|
|
135
|
+
], PostalCode.prototype, "cityId", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
column({ type: 'string' })
|
|
138
|
+
], PostalCode.prototype, "country", void 0);
|
|
139
|
+
//# sourceMappingURL=PostalCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostalCode.js","sourceRoot":"","sources":["../../../src/models/addresses/PostalCode.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,OAAO,UAAW,SAAQ,cAAc;IAC1C,MAAM,CAAC,KAAK,GAAG,cAAc,CAAC;IAO9B,EAAE,CAAU;IAGZ,UAAU,CAAS;IAGnB,MAAM,CAAS;IAGf,OAAO,CAAU;IAEjB,MAAM,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAEl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EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC;YACpI,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,SAAS,GAAG,CAAC,CAAC;QACd,QAAQ,GAAG,IAAI,CAAC;QAEhB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,aAAa,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAE5D,IAAI,QAAQ,KAAK,IAAI,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;gBACzC,QAAQ,GAAG,IAAI,CAAC;gBAChB,SAAS,GAAG,KAAK,CAAC;YACtB,CAAC;QACL,CAAC;QAED,IAAI,QAAQ,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACnG,OAAO,QAAQ,CAAC;QACpB,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;;AAlJD;IALC,MAAM,CAAC;QACJ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK;YAC3C,OAAO,KAAK,IAAI,MAAM,EAAE,CAAC;QAC7B,CAAC;KACJ,CAAC;sCACU;AAGZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;8CACR;AAGnB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;0CACzC;AAGf;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;2CACV"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { QueryableModel } from '@stamhoofd/sql';
|
|
2
|
+
import type { Country } from '@stamhoofd/types/Country';
|
|
3
|
+
export declare class Province extends QueryableModel {
|
|
4
|
+
static table: string;
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
country: Country;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=Province.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Province.d.ts","sourceRoot":"","sources":["../../../src/models/addresses/Province.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGxD,qBAAa,QAAS,SAAQ,cAAc;IACxC,MAAM,CAAC,KAAK,SAAe;IAO3B,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { column } from '@simonbackx/simple-database';
|
|
3
|
+
import { QueryableModel } from '@stamhoofd/sql';
|
|
4
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
5
|
+
export class Province extends QueryableModel {
|
|
6
|
+
static table = 'provinces';
|
|
7
|
+
id;
|
|
8
|
+
name;
|
|
9
|
+
country;
|
|
10
|
+
}
|
|
11
|
+
__decorate([
|
|
12
|
+
column({
|
|
13
|
+
primary: true, type: 'string', beforeSave(value) {
|
|
14
|
+
return value ?? uuidv4();
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
], Province.prototype, "id", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
column({ type: 'string' })
|
|
20
|
+
], Province.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
column({ type: 'string' })
|
|
23
|
+
], Province.prototype, "country", void 0);
|
|
24
|
+
//# sourceMappingURL=Province.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Province.js","sourceRoot":"","sources":["../../../src/models/addresses/Province.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,OAAO,QAAS,SAAQ,cAAc;IACxC,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;IAO3B,EAAE,CAAU;IAGZ,IAAI,CAAS;IAGb,OAAO,CAAU;;AANjB;IALC,MAAM,CAAC;QACJ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK;YAC3C,OAAO,KAAK,IAAI,MAAM,EAAE,CAAC;QAC7B,CAAC;KACJ,CAAC;oCACU;AAGZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;sCACd;AAGb;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;yCACV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Street.d.ts","sourceRoot":"","sources":["../../../src/models/addresses/Street.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,qBAAa,MAAO,SAAQ,cAAc;IACtC,MAAM,CAAC,KAAK,SAAa;IAOzB,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,IAAI,kCAAuC;CACrD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { column, ManyToOneRelation } from '@simonbackx/simple-database';
|
|
3
|
+
import { QueryableModel } from '@stamhoofd/sql';
|
|
4
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
5
|
+
import { City } from './City.js';
|
|
6
|
+
export class Street extends QueryableModel {
|
|
7
|
+
static table = 'streets';
|
|
8
|
+
id;
|
|
9
|
+
name;
|
|
10
|
+
cityId;
|
|
11
|
+
static city = new ManyToOneRelation(City, 'city');
|
|
12
|
+
}
|
|
13
|
+
__decorate([
|
|
14
|
+
column({
|
|
15
|
+
primary: true, type: 'string', beforeSave(value) {
|
|
16
|
+
return value ?? uuidv4();
|
|
17
|
+
},
|
|
18
|
+
})
|
|
19
|
+
], Street.prototype, "id", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
column({ type: 'string' })
|
|
22
|
+
], Street.prototype, "name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
column({ type: 'string', foreignKey: Street.city })
|
|
25
|
+
], Street.prototype, "cityId", void 0);
|
|
26
|
+
//# sourceMappingURL=Street.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Street.js","sourceRoot":"","sources":["../../../src/models/addresses/Street.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,OAAO,MAAO,SAAQ,cAAc;IACtC,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IAOzB,EAAE,CAAU;IAGZ,IAAI,CAAS;IAGb,MAAM,CAAS;IAEf,MAAM,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;;AARlD;IALC,MAAM,CAAC;QACJ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK;YAC3C,OAAO,KAAK,IAAI,MAAM,EAAE,CAAC;QAC7B,CAAC;KACJ,CAAC;kCACU;AAGZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;oCACd;AAGb;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;sCACrC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export * from './Member.js';
|
|
2
|
+
export { MergedMember } from './MergedMember.js';
|
|
3
|
+
export { Organization } from './Organization.js';
|
|
4
|
+
export { Payment } from './Payment.js';
|
|
5
|
+
export { Registration } from './Registration.js';
|
|
6
|
+
export { User } from './User.js';
|
|
7
|
+
export * from './EmailVerificationCode.js';
|
|
8
|
+
export { BalanceItem } from './BalanceItem.js';
|
|
9
|
+
export { BalanceItemPayment } from './BalanceItemPayment.js';
|
|
10
|
+
export * from './BuckarooPayment.js';
|
|
11
|
+
export * from './EmailTemplate.js';
|
|
12
|
+
export { Group } from './Group.js';
|
|
13
|
+
export * from './Image.js';
|
|
14
|
+
export * from './MolliePayment.js';
|
|
15
|
+
export * from './MollieToken.js';
|
|
16
|
+
export { Order } from './Order.js';
|
|
17
|
+
export * from './PasswordToken.js';
|
|
18
|
+
export * from './PayconiqPayment.js';
|
|
19
|
+
export * from './RegisterCode.js';
|
|
20
|
+
export * from './STCredit.js';
|
|
21
|
+
export * from './STInvoice.js';
|
|
22
|
+
export * from './STPackage.js';
|
|
23
|
+
export { STPendingInvoice } from './STPendingInvoice.js';
|
|
24
|
+
export * from './Ticket.js';
|
|
25
|
+
export { Token, type TokenWithUser } from './Token.js';
|
|
26
|
+
export * from './UsedRegisterCode.js';
|
|
27
|
+
export * from './Webshop.js';
|
|
28
|
+
export * from './addresses/City.js';
|
|
29
|
+
export * from './addresses/PostalCode.js';
|
|
30
|
+
export * from './addresses/Province.js';
|
|
31
|
+
export * from './addresses/Street.js';
|
|
32
|
+
export * from './StripeAccount.js';
|
|
33
|
+
export * from './StripeCheckoutSession.js';
|
|
34
|
+
export * from './StripePaymentIntent.js';
|
|
35
|
+
export * from './Document.js';
|
|
36
|
+
export * from './DocumentTemplate.js';
|
|
37
|
+
export * from './WebshopDiscountCode.js';
|
|
38
|
+
export * from './WebshopUitpasNumber.js';
|
|
39
|
+
export * from './MemberResponsibilityRecord.js';
|
|
40
|
+
export * from './Platform.js';
|
|
41
|
+
export * from './AuditLog.js';
|
|
42
|
+
export * from './CachedBalance.js';
|
|
43
|
+
export * from './Email.js';
|
|
44
|
+
export * from './EmailRecipient.js';
|
|
45
|
+
export * from './Event.js';
|
|
46
|
+
export * from './EventNotification.js';
|
|
47
|
+
export * from './MemberPlatformMembership.js';
|
|
48
|
+
export * from './MemberUser.js';
|
|
49
|
+
export * from './OrganizationRegistrationPeriod.js';
|
|
50
|
+
export * from './RegistrationPeriod.js';
|
|
51
|
+
export * from './UitpasClientCredential.js';
|
|
52
|
+
export * from './Invoice.js';
|
|
53
|
+
export * from './InvoicedBalanceItem.js';
|
|
54
|
+
import './_relations.js';
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,cAAc,4BAA4B,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EA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C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export * from './Member.js';
|
|
2
|
+
export { MergedMember } from './MergedMember.js';
|
|
3
|
+
export { Organization } from './Organization.js';
|
|
4
|
+
export { Payment } from './Payment.js';
|
|
5
|
+
export { Registration } from './Registration.js';
|
|
6
|
+
export { User } from './User.js';
|
|
7
|
+
export * from './EmailVerificationCode.js';
|
|
8
|
+
export { BalanceItem } from './BalanceItem.js';
|
|
9
|
+
export { BalanceItemPayment } from './BalanceItemPayment.js';
|
|
10
|
+
export * from './BuckarooPayment.js';
|
|
11
|
+
export * from './EmailTemplate.js';
|
|
12
|
+
export { Group } from './Group.js';
|
|
13
|
+
export * from './Image.js';
|
|
14
|
+
export * from './MolliePayment.js';
|
|
15
|
+
export * from './MollieToken.js';
|
|
16
|
+
export { Order } from './Order.js';
|
|
17
|
+
export * from './PasswordToken.js';
|
|
18
|
+
export * from './PayconiqPayment.js';
|
|
19
|
+
export * from './RegisterCode.js';
|
|
20
|
+
export * from './STCredit.js';
|
|
21
|
+
export * from './STInvoice.js';
|
|
22
|
+
export * from './STPackage.js';
|
|
23
|
+
export { STPendingInvoice } from './STPendingInvoice.js';
|
|
24
|
+
export * from './Ticket.js';
|
|
25
|
+
export { Token } from './Token.js';
|
|
26
|
+
export * from './UsedRegisterCode.js';
|
|
27
|
+
export * from './Webshop.js';
|
|
28
|
+
export * from './addresses/City.js';
|
|
29
|
+
export * from './addresses/PostalCode.js';
|
|
30
|
+
export * from './addresses/Province.js';
|
|
31
|
+
export * from './addresses/Street.js';
|
|
32
|
+
export * from './StripeAccount.js';
|
|
33
|
+
export * from './StripeCheckoutSession.js';
|
|
34
|
+
export * from './StripePaymentIntent.js';
|
|
35
|
+
export * from './Document.js';
|
|
36
|
+
export * from './DocumentTemplate.js';
|
|
37
|
+
export * from './WebshopDiscountCode.js';
|
|
38
|
+
export * from './WebshopUitpasNumber.js';
|
|
39
|
+
export * from './MemberResponsibilityRecord.js';
|
|
40
|
+
export * from './Platform.js';
|
|
41
|
+
export * from './AuditLog.js';
|
|
42
|
+
export * from './CachedBalance.js';
|
|
43
|
+
export * from './Email.js';
|
|
44
|
+
export * from './EmailRecipient.js';
|
|
45
|
+
export * from './Event.js';
|
|
46
|
+
export * from './EventNotification.js';
|
|
47
|
+
export * from './MemberPlatformMembership.js';
|
|
48
|
+
export * from './MemberUser.js';
|
|
49
|
+
export * from './OrganizationRegistrationPeriod.js';
|
|
50
|
+
export * from './RegistrationPeriod.js';
|
|
51
|
+
export * from './UitpasClientCredential.js';
|
|
52
|
+
export * from './Invoice.js';
|
|
53
|
+
export * from './InvoicedBalanceItem.js';
|
|
54
|
+
import './_relations.js';
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,cAAc,4BAA4B,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,C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AAuB,CAAC;AAElE,qBAAa,SAAU,SAAQ,WAAW;IAEtC,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,OAAc;CACrB;AAED,qBAAa,0BAA2B,SAAQ,WAAW;IAEvD,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IAEH,sBAAsB,CAAC,EAAE,IAAI,CAAC;IAE9B;;;OAGG;IAEH,sBAAsB,UAAQ;IAE9B;;;OAGG;IAEH,qBAAqB,SAAK;IAG1B,mBAAmB,CAAC,EAAE,IAAI,EAAE,CAAC;IAG7B,aAAa,EAAE,OAAO,CAAS;IAG/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGtC,gBAAgB,EAAE,yBAAyB,GAAG,IAAI,CAAQ;IAE1D;;OAEG;IAaH,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAa;IAElD,YAAY;IAMZ,cAAc;IAed;;OAEG;IACH,wBAAwB;IAKxB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAM3B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW;CAU5D"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ArrayDecoder, AutoEncoder, BooleanDecoder, DateDecoder, field, IntegerDecoder, MapDecoder, StringDecoder } from '@simonbackx/simple-encoding';
|
|
3
|
+
import { OpenIDClientConfiguration } from '@stamhoofd/structures';
|
|
4
|
+
export class DripEmail extends AutoEncoder {
|
|
5
|
+
id;
|
|
6
|
+
date = new Date();
|
|
7
|
+
}
|
|
8
|
+
__decorate([
|
|
9
|
+
field({ decoder: StringDecoder })
|
|
10
|
+
], DripEmail.prototype, "id", void 0);
|
|
11
|
+
__decorate([
|
|
12
|
+
field({ decoder: DateDecoder })
|
|
13
|
+
], DripEmail.prototype, "date", void 0);
|
|
14
|
+
export class OrganizationServerMetaData extends AutoEncoder {
|
|
15
|
+
privateDKIMKey;
|
|
16
|
+
publicDKIMKey;
|
|
17
|
+
usedRegisterCode;
|
|
18
|
+
/**
|
|
19
|
+
* When the DNS records are invalid for the first time, this timestamp will get set.
|
|
20
|
+
* When DNS is valid again, this will get cleared
|
|
21
|
+
*/
|
|
22
|
+
firstInvalidDNSRecords;
|
|
23
|
+
/**
|
|
24
|
+
* Whether an email has been send to say that the domain is setup correctly
|
|
25
|
+
* Set back to false when changing the domain
|
|
26
|
+
*/
|
|
27
|
+
didSendDomainSetupMail = true;
|
|
28
|
+
/**
|
|
29
|
+
* When the DNS records are invalid for the first time, this timestamp will get set.
|
|
30
|
+
* When DNS is valid again, this will get cleared
|
|
31
|
+
*/
|
|
32
|
+
DNSRecordWarningCount = 0;
|
|
33
|
+
lastInvalidDNSDates;
|
|
34
|
+
isDNSUnstable = false;
|
|
35
|
+
mollieCustomerId;
|
|
36
|
+
mollieMandateId = null;
|
|
37
|
+
ssoConfiguration = null;
|
|
38
|
+
/**
|
|
39
|
+
* List of specific emails that were send to this organization
|
|
40
|
+
*/
|
|
41
|
+
dripEmailList = new Map();
|
|
42
|
+
markDNSValid() {
|
|
43
|
+
// Reset if longer than 14 days without invalid DNS
|
|
44
|
+
this.isDNSUnstable = this.recalculateIsDNSUnstable();
|
|
45
|
+
this.firstInvalidDNSRecords = undefined;
|
|
46
|
+
}
|
|
47
|
+
markDNSFailure() {
|
|
48
|
+
if (this.firstInvalidDNSRecords) {
|
|
49
|
+
// Hasn't been valid
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
console.warn('DNS settings became invalid');
|
|
53
|
+
this.firstInvalidDNSRecords = new Date();
|
|
54
|
+
// Remove all dates longer than 14 days ago, or more than 6 events
|
|
55
|
+
const d14 = new Date(Date.now() - 1000 * 60 * 60 * 24 * 14);
|
|
56
|
+
const maxLength = 6;
|
|
57
|
+
this.lastInvalidDNSDates = [...(this.lastInvalidDNSDates ?? []), new Date()].filter(d => d > d14).slice(0, maxLength);
|
|
58
|
+
this.isDNSUnstable = this.recalculateIsDNSUnstable();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* DNS is unstable if it was marked invalid 4 times in the last 2 weeks. Then it stays unstable until there were no invalid DNS moments in the last 2 weeks.
|
|
62
|
+
*/
|
|
63
|
+
recalculateIsDNSUnstable() {
|
|
64
|
+
const d14 = new Date(Date.now() - 1000 * 60 * 60 * 24 * 14);
|
|
65
|
+
return (this.lastInvalidDNSDates ?? []).filter(d => d > d14).length > (this.isDNSUnstable ? 0 : 4);
|
|
66
|
+
}
|
|
67
|
+
addEmail(identifier) {
|
|
68
|
+
console.log('Marked email ', identifier);
|
|
69
|
+
const email = DripEmail.create({ id: identifier });
|
|
70
|
+
this.dripEmailList.set(email.id, email);
|
|
71
|
+
}
|
|
72
|
+
hasEmail(identifier, lastMs = null) {
|
|
73
|
+
if (!this.dripEmailList.has(identifier)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
if (lastMs === null) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
const email = this.dripEmailList.get(identifier);
|
|
80
|
+
return email.date.getTime() > Date.now() - lastMs;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
__decorate([
|
|
84
|
+
field({ decoder: StringDecoder, optional: true })
|
|
85
|
+
], OrganizationServerMetaData.prototype, "privateDKIMKey", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
field({ decoder: StringDecoder, optional: true })
|
|
88
|
+
], OrganizationServerMetaData.prototype, "publicDKIMKey", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
field({ decoder: StringDecoder, optional: true, version: 24 })
|
|
91
|
+
], OrganizationServerMetaData.prototype, "usedRegisterCode", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
field({ decoder: DateDecoder, optional: true, version: 37 })
|
|
94
|
+
], OrganizationServerMetaData.prototype, "firstInvalidDNSRecords", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
field({ decoder: BooleanDecoder, optional: true, version: 157 })
|
|
97
|
+
], OrganizationServerMetaData.prototype, "didSendDomainSetupMail", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
field({ decoder: IntegerDecoder, version: 37 })
|
|
100
|
+
], OrganizationServerMetaData.prototype, "DNSRecordWarningCount", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
field({ decoder: new ArrayDecoder(DateDecoder), optional: true, version: 230 })
|
|
103
|
+
], OrganizationServerMetaData.prototype, "lastInvalidDNSDates", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
field({ decoder: BooleanDecoder, version: 230 })
|
|
106
|
+
], OrganizationServerMetaData.prototype, "isDNSUnstable", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
field({ decoder: StringDecoder, optional: true, version: 86 })
|
|
109
|
+
], OrganizationServerMetaData.prototype, "mollieCustomerId", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
field({ decoder: StringDecoder, optional: true, nullable: true })
|
|
112
|
+
], OrganizationServerMetaData.prototype, "mollieMandateId", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
field({ decoder: OpenIDClientConfiguration, nullable: true, version: 189 })
|
|
115
|
+
], OrganizationServerMetaData.prototype, "ssoConfiguration", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
field({ decoder: new MapDecoder(StringDecoder, DripEmail), optional: true, version: 230, upgrade: () => {
|
|
118
|
+
const m = new Map();
|
|
119
|
+
const identifier = 'OrganizationDripWelcome';
|
|
120
|
+
m.set(identifier, DripEmail.create({ id: identifier }));
|
|
121
|
+
return m;
|
|
122
|
+
} }),
|
|
123
|
+
field({ decoder: new MapDecoder(StringDecoder, DripEmail), optional: true, version: 232, upgrade: () => {
|
|
124
|
+
const m = new Map();
|
|
125
|
+
const identifier = 'OrganizationDripWelcome';
|
|
126
|
+
m.set(identifier, DripEmail.create({ id: identifier }));
|
|
127
|
+
return m;
|
|
128
|
+
} })
|
|
129
|
+
], OrganizationServerMetaData.prototype, "dripEmailList", void 0);
|
|
130
|
+
//# sourceMappingURL=OrganizationServerMetaData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationServerMetaData.js","sourceRoot":"","sources":["../../src/structures/OrganizationServerMetaData.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACvJ,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,MAAM,OAAO,SAAU,SAAQ,WAAW;IAEtC,EAAE,CAAS;IAGX,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;CACrB;AAJG;IADC,KAAK,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;qCACvB;AAGX;IADC,KAAK,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;uCACd;AAGtB,MAAM,OAAO,0BAA2B,SAAQ,WAAW;IAEvD,cAAc,CAAU;IAGxB,aAAa,CAAU;IAGvB,gBAAgB,CAAU;IAE1B;;;OAGG;IAEH,sBAAsB,CAAQ;IAE9B;;;OAGG;IAEH,sBAAsB,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IAEH,qBAAqB,GAAG,CAAC,CAAC;IAG1B,mBAAmB,CAAU;IAG7B,aAAa,GAAY,KAAK,CAAC;IAG/B,gBAAgB,CAAU;IAG1B,eAAe,GAAkB,IAAI,CAAC;IAGtC,gBAAgB,GAAqC,IAAI,CAAC;IAE1D;;OAEG;IAaH,aAAa,GAA2B,IAAI,GAAG,EAAE,CAAC;IAElD,YAAY;QACR,mDAAmD;QACnD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,wBAAwB,EAAE,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B,CAAC;YACvC,MAAM,UAAU,GAAG,yBAAyB,CAAC;YAC7C,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;YACxD,OAAO,CAAC,CAAC;QACb,CAAC,EAAE,CAAC;iEAC8C"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stamhoofd/models",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"
|
|
5
|
-
"types": "./dist/
|
|
3
|
+
"version": "2.120.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"main": "./dist/index.js",
|
|
6
7
|
"license": "UNLICENCED",
|
|
7
|
-
"sideEffects":
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"./src/models/_relations.ts",
|
|
10
|
+
"./dist/models/_relations.js"
|
|
11
|
+
],
|
|
8
12
|
"files": [
|
|
9
13
|
"dist",
|
|
10
14
|
"src"
|
|
11
15
|
],
|
|
12
16
|
"scripts": {
|
|
13
|
-
"build": "tsc
|
|
14
|
-
"test": "
|
|
15
|
-
"test:build": "yarn -s build && yarn -s test",
|
|
17
|
+
"build": "tsc --build tsconfig.build.json && mkdir -p ./dist/migrations && rsync --delete --exclude='*.ts' --exclude='*.js' --exclude='*.map' -r --checksum ./src/migrations/ ./dist/migrations/ && rsync -r --checksum ./src/assets/ ./dist/assets/",
|
|
18
|
+
"test": "vitest",
|
|
16
19
|
"lint": "eslint"
|
|
17
20
|
},
|
|
18
21
|
"peerDependencies": {
|
|
19
|
-
"@simonbackx/simple-database": "1.
|
|
22
|
+
"@simonbackx/simple-database": "1.36.12",
|
|
20
23
|
"@stamhoofd/email": "*",
|
|
21
24
|
"@stamhoofd/queues": "*"
|
|
22
25
|
},
|
|
@@ -25,10 +28,10 @@
|
|
|
25
28
|
"base-x": "^3.0.11"
|
|
26
29
|
},
|
|
27
30
|
"devDependencies": {
|
|
28
|
-
"@simonbackx/simple-database": "1.
|
|
31
|
+
"@simonbackx/simple-database": "1.36.12"
|
|
29
32
|
},
|
|
30
33
|
"publishConfig": {
|
|
31
34
|
"access": "public"
|
|
32
35
|
},
|
|
33
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "00f65fc28d68feb86c30789784181a8954d638d7"
|
|
34
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Factory } from '@simonbackx/simple-database';
|
|
2
|
-
import StreetNames from '@simonbackx/simple-database/
|
|
3
|
-
import { Address
|
|
2
|
+
import StreetNames from '@simonbackx/simple-database/data/streets';
|
|
3
|
+
import { Address } from '@stamhoofd/structures';
|
|
4
|
+
import { Country } from '@stamhoofd/types/Country';
|
|
4
5
|
|
|
5
6
|
type Options = Record<string, never>;
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Factory } from '@simonbackx/simple-database';
|
|
2
2
|
|
|
3
|
-
import { BalanceItemRelation, BalanceItemRelationType,
|
|
3
|
+
import type { BalanceItemRelation, BalanceItemRelationType, BalanceItemType } from '@stamhoofd/structures';
|
|
4
|
+
import { BalanceItemStatus } from '@stamhoofd/structures';
|
|
4
5
|
import { BalanceItem } from '../models/index.js';
|
|
5
6
|
|
|
6
7
|
class Options {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Factory } from '@simonbackx/simple-database';
|
|
2
2
|
|
|
3
3
|
import { DocumentPrivateSettings, DocumentSettings, DocumentStatus, DocumentTemplateDefinition, DocumentTemplateGroup, NamedObject, RecordCategory, RecordSettings, RecordType } from '@stamhoofd/structures';
|
|
4
|
-
import {
|
|
4
|
+
import type { Group } from '../models/index.js';
|
|
5
|
+
import { DocumentTemplate } from '../models/index.js';
|
|
5
6
|
import { OrganizationFactory } from './OrganizationFactory.js';
|
|
6
7
|
|
|
7
8
|
class Options {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Factory } from '@simonbackx/simple-database';
|
|
2
2
|
|
|
3
3
|
import { EmailTemplate } from '../models/index.js';
|
|
4
|
-
import { Organization } from '../models/Organization.js';
|
|
5
|
-
import { EmailTemplateType
|
|
4
|
+
import type { Organization } from '../models/Organization.js';
|
|
5
|
+
import type { EmailTemplateType} from '@stamhoofd/structures';
|
|
6
|
+
import { EmailTemplate as EmailTemplateStruct } from '@stamhoofd/structures';
|
|
6
7
|
|
|
7
8
|
class Options {
|
|
8
9
|
organization?: Organization;
|
|
@@ -5,7 +5,7 @@ type Options = Record<string, never>;
|
|
|
5
5
|
|
|
6
6
|
export class EmergencyContactFactory extends Factory<Options, EmergencyContact> {
|
|
7
7
|
create(): Promise<EmergencyContact> {
|
|
8
|
-
const contact =
|
|
8
|
+
const contact = EmergencyContact.create({});
|
|
9
9
|
contact.title = this.randomArray([
|
|
10
10
|
'Oma',
|
|
11
11
|
'Opa',
|
|
@@ -2,9 +2,9 @@ import { Factory } from '@simonbackx/simple-database';
|
|
|
2
2
|
import { EventMeta } from '@stamhoofd/structures';
|
|
3
3
|
|
|
4
4
|
import { Event } from '../models/Event.js';
|
|
5
|
-
import { Organization } from '../models/Organization.js';
|
|
5
|
+
import type { Organization } from '../models/Organization.js';
|
|
6
6
|
import { PlatformEventTypeFactory } from './PlatformEventTypeFactory.js';
|
|
7
|
-
import { Group } from '../models/Group.js';
|
|
7
|
+
import type { Group } from '../models/Group.js';
|
|
8
8
|
|
|
9
9
|
class Options {
|
|
10
10
|
organization?: Organization;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Factory } from '@simonbackx/simple-database';
|
|
2
|
-
import {
|
|
2
|
+
import type { RecordAnswer } from '@stamhoofd/structures';
|
|
3
|
+
import { EventNotificationStatus } from '@stamhoofd/structures';
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { User } from '../models/index.js';
|
|
6
|
+
import { EventNotification } from '../models/index.js';
|
|
7
|
+
import type { Event } from '../models/Event.js';
|
|
8
|
+
import type { Organization } from '../models/Organization.js';
|
|
7
9
|
import { EventFactory } from './EventFactory.js';
|
|
8
10
|
import { EventNotificationTypeFactory } from './EventNotificationTypeFactory.js';
|
|
9
11
|
|