@stamhoofd/models 2.1.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/src/assets/Metropolis-Black.woff2 +0 -0
- package/dist/src/assets/Metropolis-BlackItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-Bold.woff2 +0 -0
- package/dist/src/assets/Metropolis-BoldItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-ExtraBold.woff2 +0 -0
- package/dist/src/assets/Metropolis-ExtraBoldItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-ExtraLight.woff2 +0 -0
- package/dist/src/assets/Metropolis-ExtraLightItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-Light.woff2 +0 -0
- package/dist/src/assets/Metropolis-LightItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-Medium.woff2 +0 -0
- package/dist/src/assets/Metropolis-MediumItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-Regular.woff2 +0 -0
- package/dist/src/assets/Metropolis-RegularItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-SemiBold.woff2 +0 -0
- package/dist/src/assets/Metropolis-SemiBoldItalic.woff2 +0 -0
- package/dist/src/assets/Metropolis-Thin.woff2 +0 -0
- package/dist/src/assets/Metropolis-ThinItalic.woff2 +0 -0
- 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/assets/logo.png +0 -0
- package/dist/src/factories/AddressFactory.d.ts +10 -0
- package/dist/src/factories/AddressFactory.d.ts.map +1 -0
- package/dist/src/factories/AddressFactory.js +42 -0
- package/dist/src/factories/AddressFactory.js.map +1 -0
- package/dist/src/factories/EmergencyContactFactory.d.ts +9 -0
- package/dist/src/factories/EmergencyContactFactory.d.ts.map +1 -0
- package/dist/src/factories/EmergencyContactFactory.js +42 -0
- package/dist/src/factories/EmergencyContactFactory.js.map +1 -0
- package/dist/src/factories/GroupFactory.d.ts +19 -0
- package/dist/src/factories/GroupFactory.d.ts.map +1 -0
- package/dist/src/factories/GroupFactory.js +52 -0
- package/dist/src/factories/GroupFactory.js.map +1 -0
- package/dist/src/factories/MemberFactory.d.ts +16 -0
- package/dist/src/factories/MemberFactory.d.ts.map +1 -0
- package/dist/src/factories/MemberFactory.js +98 -0
- package/dist/src/factories/MemberFactory.js.map +1 -0
- package/dist/src/factories/OrganizationFactory.d.ts +16 -0
- package/dist/src/factories/OrganizationFactory.d.ts.map +1 -0
- package/dist/src/factories/OrganizationFactory.js +40 -0
- package/dist/src/factories/OrganizationFactory.js.map +1 -0
- package/dist/src/factories/ParentFactory.d.ts +10 -0
- package/dist/src/factories/ParentFactory.d.ts.map +1 -0
- package/dist/src/factories/ParentFactory.js +44 -0
- package/dist/src/factories/ParentFactory.js.map +1 -0
- package/dist/src/factories/RecordFactory.d.ts +10 -0
- package/dist/src/factories/RecordFactory.d.ts.map +1 -0
- package/dist/src/factories/RecordFactory.js +14 -0
- package/dist/src/factories/RecordFactory.js.map +1 -0
- package/dist/src/factories/RegisterCodeFactory.d.ts +18 -0
- package/dist/src/factories/RegisterCodeFactory.d.ts.map +1 -0
- package/dist/src/factories/RegisterCodeFactory.js +19 -0
- package/dist/src/factories/RegisterCodeFactory.js.map +1 -0
- package/dist/src/factories/RegistrationFactory.d.ts +14 -0
- package/dist/src/factories/RegistrationFactory.d.ts.map +1 -0
- package/dist/src/factories/RegistrationFactory.js +26 -0
- package/dist/src/factories/RegistrationFactory.js.map +1 -0
- package/dist/src/factories/UserFactory.d.ts +21 -0
- package/dist/src/factories/UserFactory.d.ts.map +1 -0
- package/dist/src/factories/UserFactory.js +41 -0
- package/dist/src/factories/UserFactory.js.map +1 -0
- package/dist/src/factories/WebshopFactory.d.ts +16 -0
- package/dist/src/factories/WebshopFactory.d.ts.map +1 -0
- package/dist/src/factories/WebshopFactory.js +35 -0
- package/dist/src/factories/WebshopFactory.js.map +1 -0
- package/dist/src/helpers/DNSValidator.d.ts +6 -0
- package/dist/src/helpers/DNSValidator.d.ts.map +1 -0
- package/dist/src/helpers/DNSValidator.js +144 -0
- package/dist/src/helpers/DNSValidator.js.map +1 -0
- package/dist/src/helpers/EmailBuilder.d.ts +22 -0
- package/dist/src/helpers/EmailBuilder.d.ts.map +1 -0
- package/dist/src/helpers/EmailBuilder.js +100 -0
- package/dist/src/helpers/EmailBuilder.js.map +1 -0
- package/dist/src/helpers/GroupBuilder.d.ts +9 -0
- package/dist/src/helpers/GroupBuilder.d.ts.map +1 -0
- package/dist/src/helpers/GroupBuilder.js +382 -0
- package/dist/src/helpers/GroupBuilder.js.map +1 -0
- package/dist/src/helpers/Handlebars.d.ts +2 -0
- package/dist/src/helpers/Handlebars.d.ts.map +1 -0
- package/dist/src/helpers/Handlebars.js +192 -0
- package/dist/src/helpers/Handlebars.js.map +1 -0
- package/dist/src/helpers/InvoiceBuilder.d.ts +29 -0
- package/dist/src/helpers/InvoiceBuilder.d.ts.map +1 -0
- package/dist/src/helpers/InvoiceBuilder.js +406 -0
- package/dist/src/helpers/InvoiceBuilder.js.map +1 -0
- package/dist/src/helpers/InvoiceBuilder.test.d.ts +2 -0
- package/dist/src/helpers/InvoiceBuilder.test.d.ts.map +1 -0
- package/dist/src/helpers/InvoiceBuilder.test.js +52 -0
- package/dist/src/helpers/InvoiceBuilder.test.js.map +1 -0
- package/dist/src/helpers/RateLimiter.d.ts +27 -0
- package/dist/src/helpers/RateLimiter.d.ts.map +1 -0
- package/dist/src/helpers/RateLimiter.js +57 -0
- package/dist/src/helpers/RateLimiter.js.map +1 -0
- package/dist/src/helpers/WebshopCounter.d.ts +6 -0
- package/dist/src/helpers/WebshopCounter.d.ts.map +1 -0
- package/dist/src/helpers/WebshopCounter.js +36 -0
- package/dist/src/helpers/WebshopCounter.js.map +1 -0
- package/dist/src/helpers/WebshopCounter.test.d.ts +2 -0
- package/dist/src/helpers/WebshopCounter.test.d.ts.map +1 -0
- package/dist/src/helpers/WebshopCounter.test.js +17 -0
- package/dist/src/helpers/WebshopCounter.test.js.map +1 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +23 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/migrations/1593773929-create-initial-tables.sql +634 -0
- package/dist/src/migrations/1605261999-gemeenten-tmp.sql +2820 -0
- package/dist/src/migrations/1605262045-import-postcodes.d.ts +16 -0
- package/dist/src/migrations/1605262045-import-postcodes.d.ts.map +1 -0
- package/dist/src/migrations/1605262045-import-postcodes.js +116 -0
- package/dist/src/migrations/1605262045-import-postcodes.js.map +1 -0
- package/dist/src/migrations/1605262046-import-postcodes-nl.d.ts +4 -0
- package/dist/src/migrations/1605262046-import-postcodes-nl.d.ts.map +1 -0
- package/dist/src/migrations/1605262046-import-postcodes-nl.js +83 -0
- package/dist/src/migrations/1605262046-import-postcodes-nl.js.map +1 -0
- package/dist/src/migrations/1605279038-drop-gemeenten-tmp.sql +1 -0
- package/dist/src/migrations/1648392491-default-templates.sql +9 -0
- package/dist/src/migrations/1651245707-default-templates-reminders.sql +6 -0
- package/dist/src/migrations/1708607340-tickets-deleted-at.sql +1 -0
- package/dist/src/migrations/1710459176-register-code-invoices.sql +3 -0
- package/dist/src/migrations/1712158247-discount-codes.sql +17 -0
- package/dist/src/migrations/1713178665-drop-invites.sql +1 -0
- package/dist/src/migrations/1713178666-drop-keychain.sql +1 -0
- package/dist/src/migrations/1713178667-drop-challenges.sql +1 -0
- package/dist/src/migrations/1713178668-drop-user-keys.sql +7 -0
- package/dist/src/migrations/1713178669-drop-organization-key.sql +2 -0
- package/dist/src/migrations/data/postcodes/nl/Drenthe +291 -0
- package/dist/src/migrations/data/postcodes/nl/Flevoland +107 -0
- package/dist/src/migrations/data/postcodes/nl/Friesland +518 -0
- package/dist/src/migrations/data/postcodes/nl/Gelderland +601 -0
- package/dist/src/migrations/data/postcodes/nl/Groningen +279 -0
- package/dist/src/migrations/data/postcodes/nl/Limburg +324 -0
- package/dist/src/migrations/data/postcodes/nl/Noord-Brabant +620 -0
- package/dist/src/migrations/data/postcodes/nl/Noord-Holland +566 -0
- package/dist/src/migrations/data/postcodes/nl/Overrijsel +344 -0
- package/dist/src/migrations/data/postcodes/nl/Utrecht +278 -0
- package/dist/src/migrations/data/postcodes/nl/Zeeland +179 -0
- package/dist/src/migrations/data/postcodes/nl/Zuid-Holland +662 -0
- package/dist/src/models/BalanceItem.d.ts +57 -0
- package/dist/src/models/BalanceItem.d.ts.map +1 -0
- package/dist/src/models/BalanceItem.js +346 -0
- package/dist/src/models/BalanceItem.js.map +1 -0
- package/dist/src/models/BalanceItemPayment.d.ts +31 -0
- package/dist/src/models/BalanceItemPayment.d.ts.map +1 -0
- package/dist/src/models/BalanceItemPayment.js +101 -0
- package/dist/src/models/BalanceItemPayment.js.map +1 -0
- package/dist/src/models/BuckarooPayment.d.ts +8 -0
- package/dist/src/models/BuckarooPayment.d.ts.map +1 -0
- package/dist/src/models/BuckarooPayment.js +24 -0
- package/dist/src/models/BuckarooPayment.js.map +1 -0
- package/dist/src/models/Document.d.ts +44 -0
- package/dist/src/models/Document.d.ts.map +1 -0
- package/dist/src/models/Document.js +194 -0
- package/dist/src/models/Document.js.map +1 -0
- package/dist/src/models/DocumentTemplate.d.ts +45 -0
- package/dist/src/models/DocumentTemplate.d.ts.map +1 -0
- package/dist/src/models/DocumentTemplate.js +533 -0
- package/dist/src/models/DocumentTemplate.js.map +1 -0
- package/dist/src/models/EmailTemplate.d.ts +22 -0
- package/dist/src/models/EmailTemplate.d.ts.map +1 -0
- package/dist/src/models/EmailTemplate.js +70 -0
- package/dist/src/models/EmailTemplate.js.map +1 -0
- package/dist/src/models/EmailVerificationCode.d.ts +60 -0
- package/dist/src/models/EmailVerificationCode.d.ts.map +1 -0
- package/dist/src/models/EmailVerificationCode.js +307 -0
- package/dist/src/models/EmailVerificationCode.js.map +1 -0
- package/dist/src/models/Group.d.ts +36 -0
- package/dist/src/models/Group.d.ts.map +1 -0
- package/dist/src/models/Group.js +231 -0
- package/dist/src/models/Group.js.map +1 -0
- package/dist/src/models/Image.d.ts +12 -0
- package/dist/src/models/Image.d.ts.map +1 -0
- package/dist/src/models/Image.js +137 -0
- package/dist/src/models/Image.js.map +1 -0
- package/dist/src/models/Member.d.ts +66 -0
- package/dist/src/models/Member.d.ts.map +1 -0
- package/dist/src/models/Member.js +309 -0
- package/dist/src/models/Member.js.map +1 -0
- package/dist/src/models/MemberResponsibilityRecord.d.ts +11 -0
- package/dist/src/models/MemberResponsibilityRecord.d.ts.map +1 -0
- package/dist/src/models/MemberResponsibilityRecord.js +47 -0
- package/dist/src/models/MemberResponsibilityRecord.js.map +1 -0
- package/dist/src/models/MolliePayment.d.ts +8 -0
- package/dist/src/models/MolliePayment.d.ts.map +1 -0
- package/dist/src/models/MolliePayment.js +24 -0
- package/dist/src/models/MolliePayment.js.map +1 -0
- package/dist/src/models/MollieToken.d.ts +45 -0
- package/dist/src/models/MollieToken.d.ts.map +1 -0
- package/dist/src/models/MollieToken.js +333 -0
- package/dist/src/models/MollieToken.js.map +1 -0
- package/dist/src/models/OneTimeToken.d.ts +38 -0
- package/dist/src/models/OneTimeToken.d.ts.map +1 -0
- package/dist/src/models/OneTimeToken.js +126 -0
- package/dist/src/models/OneTimeToken.js.map +1 -0
- package/dist/src/models/Order.d.ts +99 -0
- package/dist/src/models/Order.d.ts.map +1 -0
- package/dist/src/models/Order.js +912 -0
- package/dist/src/models/Order.js.map +1 -0
- package/dist/src/models/Organization.d.ts +119 -0
- package/dist/src/models/Organization.d.ts.map +1 -0
- package/dist/src/models/Organization.js +900 -0
- package/dist/src/models/Organization.js.map +1 -0
- package/dist/src/models/OrganizationRegistrationPeriod.d.ts +14 -0
- package/dist/src/models/OrganizationRegistrationPeriod.d.ts.map +1 -0
- package/dist/src/models/OrganizationRegistrationPeriod.js +62 -0
- package/dist/src/models/OrganizationRegistrationPeriod.js.map +1 -0
- package/dist/src/models/PasswordToken.d.ts +29 -0
- package/dist/src/models/PasswordToken.d.ts.map +1 -0
- package/dist/src/models/PasswordToken.js +118 -0
- package/dist/src/models/PasswordToken.js.map +1 -0
- package/dist/src/models/PayconiqPayment.d.ts +18 -0
- package/dist/src/models/PayconiqPayment.d.ts.map +1 -0
- package/dist/src/models/PayconiqPayment.js +216 -0
- package/dist/src/models/PayconiqPayment.js.map +1 -0
- package/dist/src/models/Payment.d.ts +62 -0
- package/dist/src/models/Payment.d.ts.map +1 -0
- package/dist/src/models/Payment.js +199 -0
- package/dist/src/models/Payment.js.map +1 -0
- package/dist/src/models/Platform.d.ts +15 -0
- package/dist/src/models/Platform.d.ts.map +1 -0
- package/dist/src/models/Platform.js +77 -0
- package/dist/src/models/Platform.js.map +1 -0
- package/dist/src/models/RegisterCode.d.ts +27 -0
- package/dist/src/models/RegisterCode.d.ts.map +1 -0
- package/dist/src/models/RegisterCode.js +162 -0
- package/dist/src/models/RegisterCode.js.map +1 -0
- package/dist/src/models/Registration.d.ts +47 -0
- package/dist/src/models/Registration.d.ts.map +1 -0
- package/dist/src/models/Registration.js +369 -0
- package/dist/src/models/Registration.js.map +1 -0
- package/dist/src/models/RegistrationPeriod.d.ts +15 -0
- package/dist/src/models/RegistrationPeriod.d.ts.map +1 -0
- package/dist/src/models/RegistrationPeriod.js +64 -0
- package/dist/src/models/RegistrationPeriod.js.map +1 -0
- package/dist/src/models/STCredit.d.ts +20 -0
- package/dist/src/models/STCredit.d.ts.map +1 -0
- package/dist/src/models/STCredit.js +129 -0
- package/dist/src/models/STCredit.js.map +1 -0
- package/dist/src/models/STInvoice.d.ts +51 -0
- package/dist/src/models/STInvoice.d.ts.map +1 -0
- package/dist/src/models/STInvoice.js +453 -0
- package/dist/src/models/STInvoice.js.map +1 -0
- package/dist/src/models/STPackage.d.ts +36 -0
- package/dist/src/models/STPackage.d.ts.map +1 -0
- package/dist/src/models/STPackage.js +300 -0
- package/dist/src/models/STPackage.js.map +1 -0
- package/dist/src/models/STPendingInvoice.d.ts +45 -0
- package/dist/src/models/STPendingInvoice.d.ts.map +1 -0
- package/dist/src/models/STPendingInvoice.js +284 -0
- package/dist/src/models/STPendingInvoice.js.map +1 -0
- package/dist/src/models/StripeAccount.d.ts +17 -0
- package/dist/src/models/StripeAccount.d.ts.map +1 -0
- package/dist/src/models/StripeAccount.js +81 -0
- package/dist/src/models/StripeAccount.js.map +1 -0
- package/dist/src/models/StripeCheckoutSession.d.ts +9 -0
- package/dist/src/models/StripeCheckoutSession.d.ts.map +1 -0
- package/dist/src/models/StripeCheckoutSession.js +31 -0
- package/dist/src/models/StripeCheckoutSession.js.map +1 -0
- package/dist/src/models/StripePaymentIntent.d.ts +9 -0
- package/dist/src/models/StripePaymentIntent.d.ts.map +1 -0
- package/dist/src/models/StripePaymentIntent.js +31 -0
- package/dist/src/models/StripePaymentIntent.js.map +1 -0
- package/dist/src/models/Ticket.d.ts +61 -0
- package/dist/src/models/Ticket.d.ts.map +1 -0
- package/dist/src/models/Ticket.js +143 -0
- package/dist/src/models/Ticket.js.map +1 -0
- package/dist/src/models/Token.d.ts +49 -0
- package/dist/src/models/Token.d.ts.map +1 -0
- package/dist/src/models/Token.js +218 -0
- package/dist/src/models/Token.js.map +1 -0
- package/dist/src/models/Token.test.d.ts +2 -0
- package/dist/src/models/Token.test.d.ts.map +1 -0
- package/dist/src/models/Token.test.js +60 -0
- package/dist/src/models/Token.test.js.map +1 -0
- package/dist/src/models/UsedRegisterCode.d.ts +22 -0
- package/dist/src/models/UsedRegisterCode.d.ts.map +1 -0
- package/dist/src/models/UsedRegisterCode.js +158 -0
- package/dist/src/models/UsedRegisterCode.js.map +1 -0
- package/dist/src/models/User.d.ts +55 -0
- package/dist/src/models/User.d.ts.map +1 -0
- package/dist/src/models/User.js +314 -0
- package/dist/src/models/User.js.map +1 -0
- package/dist/src/models/UserPermissions.d.ts +15 -0
- package/dist/src/models/UserPermissions.d.ts.map +1 -0
- package/dist/src/models/UserPermissions.js +57 -0
- package/dist/src/models/UserPermissions.js.map +1 -0
- package/dist/src/models/Webshop.d.ts +44 -0
- package/dist/src/models/Webshop.d.ts.map +1 -0
- package/dist/src/models/Webshop.js +184 -0
- package/dist/src/models/Webshop.js.map +1 -0
- package/dist/src/models/WebshopDiscountCode.d.ts +18 -0
- package/dist/src/models/WebshopDiscountCode.d.ts.map +1 -0
- package/dist/src/models/WebshopDiscountCode.js +88 -0
- package/dist/src/models/WebshopDiscountCode.js.map +1 -0
- package/dist/src/models/addresses/City.d.ts +14 -0
- package/dist/src/models/addresses/City.d.ts.map +1 -0
- package/dist/src/models/addresses/City.js +37 -0
- package/dist/src/models/addresses/City.js.map +1 -0
- package/dist/src/models/addresses/PostalCode.d.ts +20 -0
- package/dist/src/models/addresses/PostalCode.d.ts.map +1 -0
- package/dist/src/models/addresses/PostalCode.js +138 -0
- package/dist/src/models/addresses/PostalCode.js.map +1 -0
- package/dist/src/models/addresses/PostalCode.test.d.ts +2 -0
- package/dist/src/models/addresses/PostalCode.test.d.ts.map +1 -0
- package/dist/src/models/addresses/PostalCode.test.js +98 -0
- package/dist/src/models/addresses/PostalCode.test.js.map +1 -0
- package/dist/src/models/addresses/Province.d.ts +9 -0
- package/dist/src/models/addresses/Province.d.ts.map +1 -0
- package/dist/src/models/addresses/Province.js +24 -0
- package/dist/src/models/addresses/Province.js.map +1 -0
- package/dist/src/models/addresses/Street.d.ts +10 -0
- package/dist/src/models/addresses/Street.d.ts.map +1 -0
- package/dist/src/models/addresses/Street.js +26 -0
- package/dist/src/models/addresses/Street.js.map +1 -0
- package/dist/src/models/index.d.ts +37 -0
- package/dist/src/models/index.d.ts.map +1 -0
- package/dist/src/models/index.js +53 -0
- package/dist/src/models/index.js.map +1 -0
- package/dist/src/structures/OrganizationServerMetaData.d.ts +43 -0
- package/dist/src/structures/OrganizationServerMetaData.d.ts.map +1 -0
- package/dist/src/structures/OrganizationServerMetaData.js +128 -0
- package/dist/src/structures/OrganizationServerMetaData.js.map +1 -0
- package/dist/tests/jest.global.setup.d.ts +3 -0
- package/dist/tests/jest.global.setup.d.ts.map +1 -0
- package/dist/tests/jest.global.setup.js +20 -0
- package/dist/tests/jest.global.setup.js.map +1 -0
- package/dist/tests/jest.setup.d.ts +2 -0
- package/dist/tests/jest.setup.d.ts.map +1 -0
- package/dist/tests/jest.setup.js +15 -0
- package/dist/tests/jest.setup.js.map +1 -0
- package/package.json +30 -0
- package/src/assets/Metropolis-Black.woff2 +0 -0
- package/src/assets/Metropolis-BlackItalic.woff2 +0 -0
- package/src/assets/Metropolis-Bold.woff2 +0 -0
- package/src/assets/Metropolis-BoldItalic.woff2 +0 -0
- package/src/assets/Metropolis-ExtraBold.woff2 +0 -0
- package/src/assets/Metropolis-ExtraBoldItalic.woff2 +0 -0
- package/src/assets/Metropolis-ExtraLight.woff2 +0 -0
- package/src/assets/Metropolis-ExtraLightItalic.woff2 +0 -0
- package/src/assets/Metropolis-Light.woff2 +0 -0
- package/src/assets/Metropolis-LightItalic.woff2 +0 -0
- package/src/assets/Metropolis-Medium.woff2 +0 -0
- package/src/assets/Metropolis-MediumItalic.woff2 +0 -0
- package/src/assets/Metropolis-Regular.woff2 +0 -0
- package/src/assets/Metropolis-RegularItalic.woff2 +0 -0
- package/src/assets/Metropolis-SemiBold.woff2 +0 -0
- package/src/assets/Metropolis-SemiBoldItalic.woff2 +0 -0
- package/src/assets/Metropolis-Thin.woff2 +0 -0
- package/src/assets/Metropolis-ThinItalic.woff2 +0 -0
- package/src/assets/logo.png +0 -0
- package/src/factories/AddressFactory.ts +42 -0
- package/src/factories/EmergencyContactFactory.ts +43 -0
- package/src/factories/GroupFactory.ts +66 -0
- package/src/factories/MemberFactory.ts +122 -0
- package/src/factories/OrganizationFactory.ts +45 -0
- package/src/factories/ParentFactory.ts +49 -0
- package/src/factories/RecordFactory.ts +12 -0
- package/src/factories/RegisterCodeFactory.ts +25 -0
- package/src/factories/RegistrationFactory.ts +32 -0
- package/src/factories/UserFactory.ts +66 -0
- package/src/factories/WebshopFactory.ts +43 -0
- package/src/helpers/DNSValidator.ts +153 -0
- package/src/helpers/EmailBuilder.ts +127 -0
- package/src/helpers/GroupBuilder.ts +438 -0
- package/src/helpers/Handlebars.ts +203 -0
- package/src/helpers/InvoiceBuilder.test.ts +57 -0
- package/src/helpers/InvoiceBuilder.ts +501 -0
- package/src/helpers/RateLimiter.ts +75 -0
- package/src/helpers/WebshopCounter.test.ts +16 -0
- package/src/helpers/WebshopCounter.ts +36 -0
- package/src/index.ts +21 -0
- package/src/migrations/1593773929-create-initial-tables.sql +634 -0
- package/src/migrations/1605261999-gemeenten-tmp.sql +2820 -0
- package/src/migrations/1605262045-import-postcodes.ts +132 -0
- package/src/migrations/1605262046-import-postcodes-nl.ts +97 -0
- package/src/migrations/1605279038-drop-gemeenten-tmp.sql +1 -0
- package/src/migrations/1648392491-default-templates.sql +9 -0
- package/src/migrations/1651245707-default-templates-reminders.sql +6 -0
- package/src/migrations/1708607340-tickets-deleted-at.sql +1 -0
- package/src/migrations/1710459176-register-code-invoices.sql +3 -0
- package/src/migrations/1712158247-discount-codes.sql +17 -0
- package/src/migrations/1713178665-drop-invites.sql +1 -0
- package/src/migrations/1713178666-drop-keychain.sql +1 -0
- package/src/migrations/1713178667-drop-challenges.sql +1 -0
- package/src/migrations/1713178668-drop-user-keys.sql +7 -0
- package/src/migrations/1713178669-drop-organization-key.sql +2 -0
- package/src/migrations/1714985451-user-nullable-organization-id.sql +2 -0
- package/src/migrations/1714985452-email-verification-code-nullable-organization-id.sql +2 -0
- package/src/migrations/1714985453-user-organization-permissions.sql +2 -0
- package/src/migrations/1714985454-user-organization-permissions.sql +2 -0
- package/src/migrations/1715079362-platform.sql +6 -0
- package/src/migrations/1715181649-registrations-organization-id.sql +2 -0
- package/src/migrations/1715181650-registrations-organization-id-fill.sql +1 -0
- package/src/migrations/1715181651-registrations-organization-id-drop-null.sql +2 -0
- package/src/migrations/1716117067-members-nullable-organization-id.sql +2 -0
- package/src/migrations/1719567581-registration-periods.sql +13 -0
- package/src/migrations/1719567582-organization-registration-periods.sql +13 -0
- package/src/migrations/1719567881-organization-periodId.sql +2 -0
- package/src/migrations/1719567882-groups-periodId.sql +2 -0
- package/src/migrations/1719567883-platform-periodId.sql +2 -0
- package/src/migrations/1719568079-default-period.sql +2 -0
- package/src/migrations/1719568080-set-default-period-platform.sql +1 -0
- package/src/migrations/1719568081-set-default-period-organizations.sql +1 -0
- package/src/migrations/1719568082-set-default-period-groups.sql +1 -0
- package/src/migrations/1719580828-registrations-periodId.sql +2 -0
- package/src/migrations/1719580829-set-default-period-registrations.sql +1 -0
- package/src/migrations/data/postcodes/nl/Drenthe +291 -0
- package/src/migrations/data/postcodes/nl/Flevoland +107 -0
- package/src/migrations/data/postcodes/nl/Friesland +518 -0
- package/src/migrations/data/postcodes/nl/Gelderland +601 -0
- package/src/migrations/data/postcodes/nl/Groningen +279 -0
- package/src/migrations/data/postcodes/nl/Limburg +324 -0
- package/src/migrations/data/postcodes/nl/Noord-Brabant +620 -0
- package/src/migrations/data/postcodes/nl/Noord-Holland +566 -0
- package/src/migrations/data/postcodes/nl/Overrijsel +344 -0
- package/src/migrations/data/postcodes/nl/Utrecht +278 -0
- package/src/migrations/data/postcodes/nl/Zeeland +179 -0
- package/src/migrations/data/postcodes/nl/Zuid-Holland +662 -0
- package/src/models/BalanceItem.ts +392 -0
- package/src/models/BalanceItemPayment.ts +106 -0
- package/src/models/BuckarooPayment.ts +19 -0
- package/src/models/Document.ts +203 -0
- package/src/models/DocumentTemplate.ts +583 -0
- package/src/models/EmailTemplate.ts +64 -0
- package/src/models/EmailVerificationCode.ts +352 -0
- package/src/models/Group.ts +293 -0
- package/src/models/Image.ts +147 -0
- package/src/models/Member.ts +386 -0
- package/src/models/MemberResponsibilityRecord.ts +39 -0
- package/src/models/MolliePayment.ts +19 -0
- package/src/models/MollieToken.ts +369 -0
- package/src/models/OneTimeToken.ts +131 -0
- package/src/models/Order.ts +1030 -0
- package/src/models/Organization.ts +1085 -0
- package/src/models/OrganizationRegistrationPeriod.ts +54 -0
- package/src/models/PasswordToken.ts +139 -0
- package/src/models/PayconiqPayment.ts +241 -0
- package/src/models/Payment.ts +216 -0
- package/src/models/Platform.ts +76 -0
- package/src/models/RegisterCode.ts +164 -0
- package/src/models/Registration.ts +405 -0
- package/src/models/RegistrationPeriod.ts +55 -0
- package/src/models/STCredit.ts +134 -0
- package/src/models/STInvoice.ts +507 -0
- package/src/models/STPackage.ts +324 -0
- package/src/models/STPendingInvoice.ts +308 -0
- package/src/models/StripeAccount.ts +71 -0
- package/src/models/StripeCheckoutSession.ts +22 -0
- package/src/models/StripePaymentIntent.ts +22 -0
- package/src/models/Ticket.ts +145 -0
- package/src/models/Token.test.ts +69 -0
- package/src/models/Token.ts +269 -0
- package/src/models/UsedRegisterCode.ts +166 -0
- package/src/models/User.ts +445 -0
- package/src/models/UserPermissions.ts +54 -0
- package/src/models/Webshop.ts +206 -0
- package/src/models/WebshopDiscountCode.ts +81 -0
- package/src/models/addresses/City.ts +31 -0
- package/src/models/addresses/PostalCode.test.ts +117 -0
- package/src/models/addresses/PostalCode.ts +164 -0
- package/src/models/addresses/Province.ts +20 -0
- package/src/models/addresses/Street.ts +25 -0
- package/src/models/index.ts +49 -0
- package/src/structures/OrganizationServerMetaData.ts +117 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STPackage = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const simple_database_1 = require("@simonbackx/simple-database");
|
|
6
|
+
const simple_errors_1 = require("@simonbackx/simple-errors");
|
|
7
|
+
const email_1 = require("@stamhoofd/email");
|
|
8
|
+
const structures_1 = require("@stamhoofd/structures");
|
|
9
|
+
const utility_1 = require("@stamhoofd/utility");
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
const EmailBuilder_1 = require("../helpers/EmailBuilder");
|
|
12
|
+
const GroupBuilder_1 = require("../helpers/GroupBuilder");
|
|
13
|
+
const _1 = require("./");
|
|
14
|
+
const _2 = require("./");
|
|
15
|
+
class STPackage extends simple_database_1.Model {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.validAt = null;
|
|
19
|
+
this.validUntil = null;
|
|
20
|
+
this.removeAt = null;
|
|
21
|
+
this.emailCount = 0;
|
|
22
|
+
this.lastEmailAt = null;
|
|
23
|
+
}
|
|
24
|
+
static async getForOrganization(organizationId) {
|
|
25
|
+
const pack1 = await STPackage.where({ organizationId, validAt: { sign: "!=", value: null }, removeAt: { sign: ">", value: new Date() } });
|
|
26
|
+
const pack2 = await STPackage.where({ organizationId, validAt: { sign: "!=", value: null }, removeAt: null });
|
|
27
|
+
return [...pack1, ...pack2];
|
|
28
|
+
}
|
|
29
|
+
static async getForOrganizationIncludingExpired(organizationId) {
|
|
30
|
+
return await STPackage.where({ organizationId, validAt: { sign: "!=", value: null } }, { sort: [{ column: 'validAt', direction: 'DESC' }] });
|
|
31
|
+
}
|
|
32
|
+
static async getOrganizationPackagesMap(organizationId) {
|
|
33
|
+
const packages = await this.getForOrganizationIncludingExpired(organizationId);
|
|
34
|
+
const map = new Map();
|
|
35
|
+
for (const pack of packages) {
|
|
36
|
+
const exist = map.get(pack.meta.type);
|
|
37
|
+
if (exist) {
|
|
38
|
+
exist.merge(pack.createStatus());
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
map.set(pack.meta.type, pack.createStatus());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return map;
|
|
45
|
+
}
|
|
46
|
+
static async updateOrganizationPackages(organizationId) {
|
|
47
|
+
console.log("Updating packages for organization " + organizationId);
|
|
48
|
+
const map = await this.getOrganizationPackagesMap(organizationId);
|
|
49
|
+
const organization = await _2.Organization.getByID(organizationId);
|
|
50
|
+
if (organization) {
|
|
51
|
+
const didUseMembers = organization.meta.packages.useMembers && organization.meta.packages.useActivities;
|
|
52
|
+
organization.meta.packages.packages = map;
|
|
53
|
+
await organization.save();
|
|
54
|
+
if (!didUseMembers && organization.meta.packages.useMembers && organization.meta.packages.useActivities) {
|
|
55
|
+
console.log("Building groups and categories for " + organization.id);
|
|
56
|
+
const builder = new GroupBuilder_1.GroupBuilder(organization);
|
|
57
|
+
await builder.build();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
console.error("Couldn't find organization when updating packages " + organizationId);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async activate() {
|
|
65
|
+
if (this.validAt !== null) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.validAt = new Date();
|
|
69
|
+
await this.save();
|
|
70
|
+
if (this.meta.didRenewId) {
|
|
71
|
+
const pack = await STPackage.getByID(this.meta.didRenewId);
|
|
72
|
+
if (pack && pack.organizationId === this.organizationId) {
|
|
73
|
+
await pack.didRenew(this);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async didRenew(renewed) {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
this.removeAt = (_b = (_a = renewed.meta.startDate) !== null && _a !== void 0 ? _a : renewed.validAt) !== null && _b !== void 0 ? _b : new Date();
|
|
80
|
+
this.meta.allowRenew = false;
|
|
81
|
+
await this.save();
|
|
82
|
+
}
|
|
83
|
+
async deactivate() {
|
|
84
|
+
if (this.removeAt !== null && this.removeAt <= new Date()) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.removeAt = new Date();
|
|
88
|
+
await this.save();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Create a renewed package, but not yet saved!
|
|
92
|
+
*/
|
|
93
|
+
createRenewed() {
|
|
94
|
+
var _a, _b;
|
|
95
|
+
if (!this.meta.allowRenew) {
|
|
96
|
+
throw new simple_errors_1.SimpleError({
|
|
97
|
+
code: "not_allowed",
|
|
98
|
+
message: "Not allowed",
|
|
99
|
+
human: "Je kan dit pakket niet verlengen"
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const pack = new STPackage();
|
|
103
|
+
pack.id = (0, uuid_1.v4)();
|
|
104
|
+
pack.meta = this.meta;
|
|
105
|
+
// Not yet valid / active (ignored until valid)
|
|
106
|
+
pack.validAt = null;
|
|
107
|
+
pack.organizationId = this.organizationId;
|
|
108
|
+
pack.meta.startDate = new Date(Math.max(new Date().getTime(), (_b = (_a = this.validUntil) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0));
|
|
109
|
+
pack.meta.paidAmount = 0;
|
|
110
|
+
pack.meta.paidPrice = 0;
|
|
111
|
+
pack.meta.firstFailedPayment = null;
|
|
112
|
+
pack.meta.didRenewId = this.id;
|
|
113
|
+
// Duration for renewals is always a year ATM
|
|
114
|
+
pack.validUntil = new Date(pack.meta.startDate);
|
|
115
|
+
pack.validUntil.setFullYear(pack.validUntil.getFullYear() + 1);
|
|
116
|
+
// Remove (= not renewable) if not renewed after 3 months
|
|
117
|
+
pack.removeAt = new Date(pack.validUntil);
|
|
118
|
+
pack.removeAt.setMonth(pack.removeAt.getMonth() + 3);
|
|
119
|
+
// Custom renewals for single webshop:
|
|
120
|
+
if (this.meta.type === structures_1.STPackageType.SingleWebshop) {
|
|
121
|
+
// Disable functions after two months
|
|
122
|
+
pack.validUntil = new Date(pack.meta.startDate);
|
|
123
|
+
pack.validUntil.setMonth(pack.validUntil.getMonth() + 2);
|
|
124
|
+
pack.removeAt = new Date(pack.validUntil);
|
|
125
|
+
}
|
|
126
|
+
return pack;
|
|
127
|
+
}
|
|
128
|
+
createStatus() {
|
|
129
|
+
// TODO: if payment failed: temporary set valid until to 2 weeks after last/first failed payment
|
|
130
|
+
return structures_1.STPackageStatus.create({
|
|
131
|
+
startDate: this.meta.startDate,
|
|
132
|
+
validUntil: this.validUntil,
|
|
133
|
+
removeAt: this.removeAt,
|
|
134
|
+
firstFailedPayment: this.meta.firstFailedPayment
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
async sendExpiryEmail() {
|
|
138
|
+
if (this.validAt === null) {
|
|
139
|
+
// never activated
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (this.removeAt && this.removeAt <= new Date()) {
|
|
143
|
+
this.emailCount += 1;
|
|
144
|
+
await this.save();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
let allowDays = 0;
|
|
148
|
+
let type = null;
|
|
149
|
+
if (this.meta.type === structures_1.STPackageType.Members) {
|
|
150
|
+
type = structures_1.EmailTemplateType.MembersExpirationReminder;
|
|
151
|
+
allowDays = 32;
|
|
152
|
+
}
|
|
153
|
+
else if (this.meta.type === structures_1.STPackageType.Webshops) {
|
|
154
|
+
type = structures_1.EmailTemplateType.WebshopsExpirationReminder;
|
|
155
|
+
allowDays = 32;
|
|
156
|
+
}
|
|
157
|
+
else if (this.meta.type === structures_1.STPackageType.SingleWebshop) {
|
|
158
|
+
type = structures_1.EmailTemplateType.SingleWebshopExpirationReminder;
|
|
159
|
+
allowDays = 7;
|
|
160
|
+
}
|
|
161
|
+
else if (this.meta.type === structures_1.STPackageType.TrialMembers) {
|
|
162
|
+
type = structures_1.EmailTemplateType.TrialMembersExpirationReminder;
|
|
163
|
+
allowDays = 3;
|
|
164
|
+
}
|
|
165
|
+
else if (this.meta.type === structures_1.STPackageType.TrialWebshops) {
|
|
166
|
+
type = structures_1.EmailTemplateType.TrialWebshopsExpirationReminder;
|
|
167
|
+
allowDays = 3;
|
|
168
|
+
}
|
|
169
|
+
const allowFrom = new Date(Date.now() + 1000 * 60 * 60 * 24 * allowDays);
|
|
170
|
+
if (type && (this.validUntil === null || this.validUntil < new Date() || this.validUntil > allowFrom)) {
|
|
171
|
+
console.log('Skip sending expiration email for ' + this.id);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (type) {
|
|
175
|
+
console.log('Sending expiration email for ' + this.id, type);
|
|
176
|
+
if (STAMHOOFD.environment === "production") {
|
|
177
|
+
await this.sendEmailTemplate({
|
|
178
|
+
type
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
this.lastEmailAt = new Date();
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
console.log('Skip sending expiration email for ' + this.id + ' (no type)');
|
|
185
|
+
}
|
|
186
|
+
this.emailCount += 1;
|
|
187
|
+
await this.save();
|
|
188
|
+
}
|
|
189
|
+
async sendEmailTemplate(data) {
|
|
190
|
+
// First fetch template
|
|
191
|
+
const templates = await _1.EmailTemplate.where({ type: data.type, organizationId: null });
|
|
192
|
+
if (!templates || templates.length == 0) {
|
|
193
|
+
console.error("Could not find email template for type " + data.type);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const organization = await _2.Organization.getByID(this.organizationId);
|
|
197
|
+
if (!organization) {
|
|
198
|
+
console.error("Could not find package organization " + this.id);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const template = templates[0];
|
|
202
|
+
const admins = await organization.getFullAdmins();
|
|
203
|
+
const recipients = admins.map(admin => {
|
|
204
|
+
var _a, _b, _c;
|
|
205
|
+
return structures_1.Recipient.create({
|
|
206
|
+
firstName: admin.firstName,
|
|
207
|
+
lastName: admin.lastName,
|
|
208
|
+
email: admin.email,
|
|
209
|
+
replacements: [
|
|
210
|
+
structures_1.Replacement.create({
|
|
211
|
+
token: "firstName",
|
|
212
|
+
value: (_a = admin.firstName) !== null && _a !== void 0 ? _a : ""
|
|
213
|
+
}),
|
|
214
|
+
structures_1.Replacement.create({
|
|
215
|
+
token: "organizationName",
|
|
216
|
+
value: organization.name
|
|
217
|
+
}),
|
|
218
|
+
structures_1.Replacement.create({
|
|
219
|
+
token: "packageName",
|
|
220
|
+
value: (_b = this.meta.name) !== null && _b !== void 0 ? _b : ""
|
|
221
|
+
}),
|
|
222
|
+
structures_1.Replacement.create({
|
|
223
|
+
token: "validUntil",
|
|
224
|
+
value: this.validUntil ? utility_1.Formatter.dateTime(this.validUntil) : "nooit"
|
|
225
|
+
}),
|
|
226
|
+
structures_1.Replacement.create({
|
|
227
|
+
token: "validUntilDate",
|
|
228
|
+
value: this.validUntil ? utility_1.Formatter.date(this.validUntil) : "nooit"
|
|
229
|
+
}),
|
|
230
|
+
structures_1.Replacement.create({
|
|
231
|
+
token: "renewUrl",
|
|
232
|
+
value: "https://" + ((_c = STAMHOOFD.domains.dashboard) !== null && _c !== void 0 ? _c : "stamhoofd.app") + "/" + organization.i18n.locale + "/settings/packages"
|
|
233
|
+
}),
|
|
234
|
+
]
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
// Create e-mail builder
|
|
238
|
+
const builder = await (0, EmailBuilder_1.getEmailBuilder)(organization, {
|
|
239
|
+
recipients,
|
|
240
|
+
subject: template.subject,
|
|
241
|
+
html: template.html,
|
|
242
|
+
from: email_1.Email.getInternalEmailFor(organization.i18n),
|
|
243
|
+
replyTo: data.replyTo
|
|
244
|
+
});
|
|
245
|
+
email_1.Email.schedule(builder);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
exports.STPackage = STPackage;
|
|
249
|
+
STPackage.table = "stamhoofd_packages";
|
|
250
|
+
tslib_1.__decorate([
|
|
251
|
+
(0, simple_database_1.column)({
|
|
252
|
+
primary: true, type: "string", beforeSave(value) {
|
|
253
|
+
return value !== null && value !== void 0 ? value : (0, uuid_1.v4)();
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
], STPackage.prototype, "id", void 0);
|
|
257
|
+
tslib_1.__decorate([
|
|
258
|
+
(0, simple_database_1.column)({ type: "string" })
|
|
259
|
+
], STPackage.prototype, "organizationId", void 0);
|
|
260
|
+
tslib_1.__decorate([
|
|
261
|
+
(0, simple_database_1.column)({ type: "json", decoder: structures_1.STPackageMeta })
|
|
262
|
+
], STPackage.prototype, "meta", void 0);
|
|
263
|
+
tslib_1.__decorate([
|
|
264
|
+
(0, simple_database_1.column)({
|
|
265
|
+
type: "datetime", beforeSave(old) {
|
|
266
|
+
if (old !== undefined) {
|
|
267
|
+
return old;
|
|
268
|
+
}
|
|
269
|
+
const date = new Date();
|
|
270
|
+
date.setMilliseconds(0);
|
|
271
|
+
return date;
|
|
272
|
+
}
|
|
273
|
+
})
|
|
274
|
+
], STPackage.prototype, "createdAt", void 0);
|
|
275
|
+
tslib_1.__decorate([
|
|
276
|
+
(0, simple_database_1.column)({
|
|
277
|
+
type: "datetime", beforeSave() {
|
|
278
|
+
const date = new Date();
|
|
279
|
+
date.setMilliseconds(0);
|
|
280
|
+
return date;
|
|
281
|
+
},
|
|
282
|
+
skipUpdate: true
|
|
283
|
+
})
|
|
284
|
+
], STPackage.prototype, "updatedAt", void 0);
|
|
285
|
+
tslib_1.__decorate([
|
|
286
|
+
(0, simple_database_1.column)({ type: "datetime", nullable: true })
|
|
287
|
+
], STPackage.prototype, "validAt", void 0);
|
|
288
|
+
tslib_1.__decorate([
|
|
289
|
+
(0, simple_database_1.column)({ type: "datetime", nullable: true })
|
|
290
|
+
], STPackage.prototype, "validUntil", void 0);
|
|
291
|
+
tslib_1.__decorate([
|
|
292
|
+
(0, simple_database_1.column)({ type: "datetime", nullable: true })
|
|
293
|
+
], STPackage.prototype, "removeAt", void 0);
|
|
294
|
+
tslib_1.__decorate([
|
|
295
|
+
(0, simple_database_1.column)({ type: "integer" })
|
|
296
|
+
], STPackage.prototype, "emailCount", void 0);
|
|
297
|
+
tslib_1.__decorate([
|
|
298
|
+
(0, simple_database_1.column)({ type: "datetime", nullable: true })
|
|
299
|
+
], STPackage.prototype, "lastEmailAt", void 0);
|
|
300
|
+
//# sourceMappingURL=STPackage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STPackage.js","sourceRoot":"","sources":["../../../src/models/STPackage.ts"],"names":[],"mappings":";;;;AAAA,iEAA4D;AAC5D,6DAAwD;AACxD,4CAAyC;AACzC,sDAAiI;AACjI,gDAA+C;AAC/C,+BAAoC;AAEpC,0DAA0D;AAC1D,0DAAuD;AACvD,yBAAmC;AACnC,yBAAkC;AAElC,MAAa,SAAU,SAAQ,uBAAK;IAApC;;QA2CI,YAAO,GAAgB,IAAI,CAAA;QAG3B,eAAU,GAAgB,IAAI,CAAA;QAG9B,aAAQ,GAAgB,IAAI,CAAA;QAG5B,eAAU,GAAG,CAAC,CAAA;QAGd,gBAAW,GAAgB,IAAI,CAAA;IAgQnC,CAAC;IA9PG,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,cAAsB;QAClD,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,KAAK,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,IAAI,EAAE,EAAE,EAAC,CAAC,CAAA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AAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8CACd"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ManyToOneRelation, Model } from "@simonbackx/simple-database";
|
|
2
|
+
import { STInvoiceItem, STInvoiceMeta } from '@stamhoofd/structures';
|
|
3
|
+
import { Organization } from './';
|
|
4
|
+
/**
|
|
5
|
+
* Things that should get paid, but are not yet invoiced yet because:
|
|
6
|
+
* - total price is too low
|
|
7
|
+
* - auto renewals waiting for payment
|
|
8
|
+
*
|
|
9
|
+
* When they are about to get paid, we create a new invoice model
|
|
10
|
+
* and if that model is marked as paid, it will remove the corresponding
|
|
11
|
+
* items in this pending invoice.
|
|
12
|
+
*
|
|
13
|
+
* So please make sure you don't edit existing items, unless you change the id
|
|
14
|
+
*/
|
|
15
|
+
export declare class STPendingInvoice extends Model {
|
|
16
|
+
static table: string;
|
|
17
|
+
id: string;
|
|
18
|
+
organizationId: string | null;
|
|
19
|
+
meta: STInvoiceMeta;
|
|
20
|
+
invoiceId: string | null;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
static organization: ManyToOneRelation<"organization", Organization>;
|
|
24
|
+
static getForOrganization(organizationId: string): Promise<STPendingInvoice | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Always run this in the queue!
|
|
27
|
+
*/
|
|
28
|
+
static addItems(organization: Organization, invoiceItems: STInvoiceItem[]): Promise<STPendingInvoice | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Always run this in the queue!
|
|
31
|
+
*/
|
|
32
|
+
static addItemsTo(pendingInvoice: STPendingInvoice | undefined, organization: Organization, invoiceItems: STInvoiceItem[]): Promise<STPendingInvoice | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Always run this in the queue!
|
|
35
|
+
*/
|
|
36
|
+
static addAutomaticItems(organization: Organization): Promise<STPendingInvoice | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* This method checks all the packages of the given organization and will return
|
|
39
|
+
* new invoice items that should get charged. You'll need to add them to
|
|
40
|
+
* the pending invoice yourself (always in a queue!)
|
|
41
|
+
*/
|
|
42
|
+
static createItems(organizationId: string, pendingInvoice?: STPendingInvoice): Promise<STInvoiceItem[]>;
|
|
43
|
+
static charge(organization: Organization): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=STPendingInvoice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STPendingInvoice.d.ts","sourceRoot":"","sources":["../../../src/models/STPendingInvoice.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,iBAAiB,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAG/E,OAAO,EAAyE,aAAa,EAAE,aAAa,EAAwD,MAAM,uBAAuB,CAAC;AAKlM,OAAO,EAAiB,YAAY,EAAyD,MAAM,IAAI,CAAC;AAExG;;;;;;;;;;GAUG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACvC,MAAM,CAAC,KAAK,SAAgC;IAQ5C,EAAE,EAAG,MAAM,CAAC;IAGZ,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAG9B,IAAI,EAAE,aAAa,CAAA;IAKnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAY/B,SAAS,EAAE,IAAI,CAAA;IAUf,SAAS,EAAE,IAAI,CAAA;IAEf,MAAM,CAAC,YAAY,kDAAuD;WAE7D,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAK9F;;OAEG;WACU,QAAQ,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAMvH;;OAEG;WACU,UAAU,CAAC,cAAc,EAAE,gBAAgB,GAAG,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IA0BvK;;OAEG;WACU,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IASjG;;;;OAIG;WACU,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,gBAAgB;WA+CrE,MAAM,CAAC,YAAY,EAAE,YAAY;CAoIjD"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STPendingInvoice = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const api_client_1 = require("@mollie/api-client");
|
|
6
|
+
const simple_database_1 = require("@simonbackx/simple-database");
|
|
7
|
+
const simple_errors_1 = require("@simonbackx/simple-errors");
|
|
8
|
+
const email_1 = require("@stamhoofd/email");
|
|
9
|
+
const structures_1 = require("@stamhoofd/structures");
|
|
10
|
+
const utility_1 = require("@stamhoofd/utility");
|
|
11
|
+
const uuid_1 = require("uuid");
|
|
12
|
+
const InvoiceBuilder_1 = require("../helpers/InvoiceBuilder");
|
|
13
|
+
const _1 = require("./");
|
|
14
|
+
/**
|
|
15
|
+
* Things that should get paid, but are not yet invoiced yet because:
|
|
16
|
+
* - total price is too low
|
|
17
|
+
* - auto renewals waiting for payment
|
|
18
|
+
*
|
|
19
|
+
* When they are about to get paid, we create a new invoice model
|
|
20
|
+
* and if that model is marked as paid, it will remove the corresponding
|
|
21
|
+
* items in this pending invoice.
|
|
22
|
+
*
|
|
23
|
+
* So please make sure you don't edit existing items, unless you change the id
|
|
24
|
+
*/
|
|
25
|
+
class STPendingInvoice extends simple_database_1.Model {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/// We can only have one invoice at a time for the pending invoice items
|
|
29
|
+
/// So until this invoice is marked as 'failed', we don't create new invoices for this pending invoice
|
|
30
|
+
this.invoiceId = null;
|
|
31
|
+
}
|
|
32
|
+
static async getForOrganization(organizationId) {
|
|
33
|
+
var _a;
|
|
34
|
+
const invoices = await STPendingInvoice.where({ organizationId });
|
|
35
|
+
return (_a = invoices[0]) !== null && _a !== void 0 ? _a : undefined;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Always run this in the queue!
|
|
39
|
+
*/
|
|
40
|
+
static async addItems(organization, invoiceItems) {
|
|
41
|
+
// Get the pending invoice if it exists
|
|
42
|
+
const pendingInvoice = await STPendingInvoice.getForOrganization(organization.id);
|
|
43
|
+
return await this.addItemsTo(pendingInvoice, organization, invoiceItems);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Always run this in the queue!
|
|
47
|
+
*/
|
|
48
|
+
static async addItemsTo(pendingInvoice, organization, invoiceItems) {
|
|
49
|
+
var _a, _b, _c, _d;
|
|
50
|
+
if (invoiceItems.length > 0) {
|
|
51
|
+
if (!pendingInvoice) {
|
|
52
|
+
// Create one
|
|
53
|
+
pendingInvoice = new STPendingInvoice();
|
|
54
|
+
pendingInvoice.organizationId = organization.id;
|
|
55
|
+
pendingInvoice.meta = structures_1.STInvoiceMeta.create({
|
|
56
|
+
companyName: (_a = organization.meta.companyName) !== null && _a !== void 0 ? _a : organization.name,
|
|
57
|
+
companyContact: (_b = organization.privateMeta.billingContact) !== null && _b !== void 0 ? _b : "",
|
|
58
|
+
companyAddress: (_c = organization.meta.companyAddress) !== null && _c !== void 0 ? _c : organization.address,
|
|
59
|
+
companyVATNumber: organization.meta.VATNumber,
|
|
60
|
+
VATPercentage: (0, structures_1.calculateVATPercentage)((_d = organization.meta.companyAddress) !== null && _d !== void 0 ? _d : organization.address, organization.meta.VATNumber)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
pendingInvoice.meta.items.push(...invoiceItems);
|
|
64
|
+
// Can we compress
|
|
65
|
+
if (pendingInvoice.invoiceId === null) {
|
|
66
|
+
console.log("Compressing pending invoice items " + pendingInvoice.id);
|
|
67
|
+
pendingInvoice.meta.items = structures_1.STInvoiceItem.compress(pendingInvoice.meta.items);
|
|
68
|
+
}
|
|
69
|
+
await pendingInvoice.save();
|
|
70
|
+
}
|
|
71
|
+
return pendingInvoice;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Always run this in the queue!
|
|
75
|
+
*/
|
|
76
|
+
static async addAutomaticItems(organization) {
|
|
77
|
+
// Get the pending invoice if it exists
|
|
78
|
+
const pendingInvoice = await STPendingInvoice.getForOrganization(organization.id);
|
|
79
|
+
// Generate temporary pending invoice items for the current state without adding them IRL
|
|
80
|
+
const notYetCreatedItems = await STPendingInvoice.createItems(organization.id, pendingInvoice);
|
|
81
|
+
return await this.addItemsTo(pendingInvoice, organization, notYetCreatedItems);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* This method checks all the packages of the given organization and will return
|
|
85
|
+
* new invoice items that should get charged. You'll need to add them to
|
|
86
|
+
* the pending invoice yourself (always in a queue!)
|
|
87
|
+
*/
|
|
88
|
+
static async createItems(organizationId, pendingInvoice) {
|
|
89
|
+
const packages = await _1.STPackage.getForOrganization(organizationId);
|
|
90
|
+
// Always use midnight as a reference time (because this method should always return the same values if it called multiple times on the same day)
|
|
91
|
+
const today = new Date();
|
|
92
|
+
today.setHours(0, 0, 0, 0);
|
|
93
|
+
// But use now as reference for activation detection
|
|
94
|
+
const now = new Date();
|
|
95
|
+
let membersCount = null;
|
|
96
|
+
const pendingItems = [];
|
|
97
|
+
for (const pack of packages) {
|
|
98
|
+
if (pack.meta.startDate > now) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (pack.meta.pricingType === structures_1.STPricingType.PerMember && (pack.validUntil === null || pack.validUntil >= today)) {
|
|
102
|
+
if (membersCount === null) {
|
|
103
|
+
membersCount = await _1.Registration.getActiveMembers(organizationId);
|
|
104
|
+
}
|
|
105
|
+
// Calculate the items that are already pending and remove them
|
|
106
|
+
const pendingCount = pendingInvoice ? pendingInvoice.meta.items.reduce((c, item) => c + ((item.package && item.package.id === pack.id) ? item.amount : 0), 0) : 0;
|
|
107
|
+
const item = structures_1.STInvoiceItem.fromPackage(structures_1.STPackage.create(pack), membersCount, pendingCount, today);
|
|
108
|
+
if (item.price > 0) {
|
|
109
|
+
console.log('Adding item to pending invoice', item);
|
|
110
|
+
pendingItems.push(item);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if ((pack.validUntil === null || pack.validUntil >= today) && pack.meta.paidAmount < pack.meta.minimumAmount) {
|
|
114
|
+
// Check if paid amount matches at least one
|
|
115
|
+
const pendingCount = pendingInvoice ? pendingInvoice.meta.items.reduce((c, item) => c + ((item.package && item.package.id === pack.id) ? item.amount : 0), 0) : 0;
|
|
116
|
+
const item = structures_1.STInvoiceItem.fromPackage(structures_1.STPackage.create(pack), 0, pendingCount, today);
|
|
117
|
+
if (item.price > 0) {
|
|
118
|
+
console.log('Adding item to pending invoice', item);
|
|
119
|
+
pendingItems.push(item);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Add all payments that are not yet charged
|
|
124
|
+
return pendingItems;
|
|
125
|
+
}
|
|
126
|
+
static async charge(organization) {
|
|
127
|
+
const pendingInvoice = await this.getForOrganization(organization.id);
|
|
128
|
+
if (!pendingInvoice || pendingInvoice.meta.priceWithVAT === 0) {
|
|
129
|
+
throw new simple_errors_1.SimpleError({
|
|
130
|
+
code: "no_pending_invoice",
|
|
131
|
+
message: "No pending invoice",
|
|
132
|
+
human: "Je kan op dit moment niet afrekenen omdat er geen openstaand bedrag is."
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
if (pendingInvoice.invoiceId !== null) {
|
|
136
|
+
throw new simple_errors_1.SimpleError({
|
|
137
|
+
code: "payment_pending",
|
|
138
|
+
message: "Payment pending",
|
|
139
|
+
human: "Er is momenteel al een afrekening in behandeling (dit kan 3 werkdagen duren), wacht enkele dagen voor je het opnieuw probeert."
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
if (organization.serverMeta.mollieCustomerId === undefined) {
|
|
143
|
+
throw new simple_errors_1.SimpleError({
|
|
144
|
+
code: "no_mollie_customer",
|
|
145
|
+
message: "No connected mollie customer",
|
|
146
|
+
human: "Er is nog geen domiciliëring of automatische afrekening ingesteld"
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
// Step 1: create the invoice
|
|
150
|
+
const invoice = _1.STInvoice.createFor(organization);
|
|
151
|
+
invoice.meta.items = pendingInvoice.meta.items.slice(); // make a copy (needed to prevent mutating pending invoice and invoice at the same time)
|
|
152
|
+
if (invoice.meta.priceWithVAT == 0) {
|
|
153
|
+
throw new simple_errors_1.SimpleError({
|
|
154
|
+
code: "no_pending_invoice",
|
|
155
|
+
message: "No pending invoice",
|
|
156
|
+
human: "Je kan op dit moment niet afrekenen omdat er geen openstaand bedrag is."
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
await _1.STCredit.applyCredits(organization.id, invoice, false);
|
|
160
|
+
const price = invoice.meta.priceWithVAT;
|
|
161
|
+
// Create payment
|
|
162
|
+
const payment = new _1.Payment();
|
|
163
|
+
payment.organizationId = null;
|
|
164
|
+
payment.method = structures_1.PaymentMethod.DirectDebit;
|
|
165
|
+
payment.status = structures_1.PaymentStatus.Created;
|
|
166
|
+
payment.price = price;
|
|
167
|
+
payment.paidAt = null;
|
|
168
|
+
payment.provider = structures_1.PaymentProvider.Mollie;
|
|
169
|
+
await payment.save();
|
|
170
|
+
invoice.paymentId = payment.id;
|
|
171
|
+
invoice.setRelation(_1.STInvoice.payment, payment);
|
|
172
|
+
await invoice.save();
|
|
173
|
+
const description = "Stamhoofd - " + invoice.id;
|
|
174
|
+
if (price <= 0) {
|
|
175
|
+
// Needs to happen before markPaid! (because the pending invoice will get modified)
|
|
176
|
+
pendingInvoice.invoiceId = invoice.id;
|
|
177
|
+
await pendingInvoice.save();
|
|
178
|
+
await invoice.markPaid();
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
// Mollie payment is required
|
|
182
|
+
const apiKey = STAMHOOFD.MOLLIE_API_KEY;
|
|
183
|
+
if (!apiKey) {
|
|
184
|
+
throw new simple_errors_1.SimpleError({
|
|
185
|
+
code: "",
|
|
186
|
+
message: "Betalingen zijn tijdelijk onbeschikbaar"
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
const mollieClient = (0, api_client_1.createMollieClient)({ apiKey });
|
|
190
|
+
const molliePayment = await mollieClient.payments.create({
|
|
191
|
+
amount: {
|
|
192
|
+
currency: 'EUR',
|
|
193
|
+
value: (price / 100).toFixed(2)
|
|
194
|
+
},
|
|
195
|
+
//method: molliePaymentMethod.directdebit,
|
|
196
|
+
description,
|
|
197
|
+
customerId: organization.serverMeta.mollieCustomerId,
|
|
198
|
+
sequenceType: api_client_1.SequenceType.recurring,
|
|
199
|
+
redirectUrl: "https://" + STAMHOOFD.domains.dashboard + '/settings/billing/payment?id=' + encodeURIComponent(payment.id),
|
|
200
|
+
webhookUrl: 'https://' + STAMHOOFD.domains.api + "/v" + structures_1.Version + "/billing/payments/" + encodeURIComponent(payment.id) + "?exchange=true",
|
|
201
|
+
metadata: {
|
|
202
|
+
invoiceId: invoice.id,
|
|
203
|
+
paymentId: payment.id,
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
console.log(molliePayment);
|
|
207
|
+
if (molliePayment.method === 'creditcard') {
|
|
208
|
+
console.log("Corrected payment method to creditcard");
|
|
209
|
+
payment.method = structures_1.PaymentMethod.CreditCard;
|
|
210
|
+
await payment.save();
|
|
211
|
+
}
|
|
212
|
+
// Save payment
|
|
213
|
+
const dbPayment = new _1.MolliePayment();
|
|
214
|
+
dbPayment.paymentId = payment.id;
|
|
215
|
+
dbPayment.mollieId = molliePayment.id;
|
|
216
|
+
await dbPayment.save();
|
|
217
|
+
// Only if all went okay
|
|
218
|
+
pendingInvoice.invoiceId = invoice.id;
|
|
219
|
+
await pendingInvoice.save();
|
|
220
|
+
const invoicingTo = await organization.getInvoicingToEmails();
|
|
221
|
+
if (invoicingTo && payment.method === structures_1.PaymentMethod.DirectDebit) {
|
|
222
|
+
// Generate a temporary PDF file
|
|
223
|
+
const builder = new InvoiceBuilder_1.InvoiceBuilder(invoice);
|
|
224
|
+
const pdf = await builder.build();
|
|
225
|
+
// Send the e-mail
|
|
226
|
+
email_1.Email.sendInternal({
|
|
227
|
+
to: invoicingTo,
|
|
228
|
+
bcc: "simon@stamhoofd.be",
|
|
229
|
+
subject: "Pro-forma factuur voor " + organization.name,
|
|
230
|
+
text: "Dag " + organization.name + ", \n\nBedankt voor jullie vertrouwen in Stamhoofd. Jullie hebben momenteel een openstaand bedrag van " + utility_1.Formatter.price(price) + " in Stamhoofd (zie bijlage). Zoals eerder aangegeven zal dit via domiciliëring worden aangerekend (op dezelfde bankrekening waarmee de vorige betaling is gedaan). Hiervoor hoeven jullie dus niets te doen. Kijk eventueel na of er voldoende geld op jullie rekening staat. De betaling zal één van de komende drie werkdagen plaatsvinden. Wil je het rekeningnummer voor de volgende betaling wijzigen? Dan kan je de stappen volgen op https://" + organization.marketingDomain + "/docs/bankrekening-domiciliering-wijzigen/.\n\nNa betaling ontvangen jullie een definitieve factuur. Je kan in Stamhoofd altijd het openstaande bedrag nakijken bij Instellingen > Facturen en betalingen. Neem gerust contact met ons op (via " + organization.i18n.$t("shared.emails.general") + ") als je denkt dat er iets fout is gegaan of als je nog bijkomende vragen zou hebben.\n\nMet vriendelijke groeten,\nStamhoofd\n\n",
|
|
231
|
+
attachments: [
|
|
232
|
+
{
|
|
233
|
+
filename: "pro-forma-factuur.pdf",
|
|
234
|
+
href: pdf.getPublicPath(),
|
|
235
|
+
contentType: "application/pdf"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}, organization.i18n);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.STPendingInvoice = STPendingInvoice;
|
|
244
|
+
STPendingInvoice.table = "stamhoofd_pending_invoices";
|
|
245
|
+
STPendingInvoice.organization = new simple_database_1.ManyToOneRelation(_1.Organization, "organization");
|
|
246
|
+
tslib_1.__decorate([
|
|
247
|
+
(0, simple_database_1.column)({
|
|
248
|
+
primary: true, type: "string", beforeSave(value) {
|
|
249
|
+
return value !== null && value !== void 0 ? value : (0, uuid_1.v4)();
|
|
250
|
+
}
|
|
251
|
+
})
|
|
252
|
+
], STPendingInvoice.prototype, "id", void 0);
|
|
253
|
+
tslib_1.__decorate([
|
|
254
|
+
(0, simple_database_1.column)({ foreignKey: STPendingInvoice.organization, type: "string", nullable: true })
|
|
255
|
+
], STPendingInvoice.prototype, "organizationId", void 0);
|
|
256
|
+
tslib_1.__decorate([
|
|
257
|
+
(0, simple_database_1.column)({ type: "json", decoder: structures_1.STInvoiceMeta })
|
|
258
|
+
], STPendingInvoice.prototype, "meta", void 0);
|
|
259
|
+
tslib_1.__decorate([
|
|
260
|
+
(0, simple_database_1.column)({ type: "string", nullable: true })
|
|
261
|
+
], STPendingInvoice.prototype, "invoiceId", void 0);
|
|
262
|
+
tslib_1.__decorate([
|
|
263
|
+
(0, simple_database_1.column)({
|
|
264
|
+
type: "datetime", beforeSave(old) {
|
|
265
|
+
if (old !== undefined) {
|
|
266
|
+
return old;
|
|
267
|
+
}
|
|
268
|
+
const date = new Date();
|
|
269
|
+
date.setMilliseconds(0);
|
|
270
|
+
return date;
|
|
271
|
+
}
|
|
272
|
+
})
|
|
273
|
+
], STPendingInvoice.prototype, "createdAt", void 0);
|
|
274
|
+
tslib_1.__decorate([
|
|
275
|
+
(0, simple_database_1.column)({
|
|
276
|
+
type: "datetime", beforeSave() {
|
|
277
|
+
const date = new Date();
|
|
278
|
+
date.setMilliseconds(0);
|
|
279
|
+
return date;
|
|
280
|
+
},
|
|
281
|
+
skipUpdate: true
|
|
282
|
+
})
|
|
283
|
+
], STPendingInvoice.prototype, "updatedAt", void 0);
|
|
284
|
+
//# sourceMappingURL=STPendingInvoice.js.map
|