@stamhoofd/models 2.39.0 → 2.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/dist/src/factories/AddressFactory.d.ts +3 -4
  2. package/dist/src/factories/AddressFactory.d.ts.map +1 -1
  3. package/dist/src/factories/AddressFactory.js +13 -13
  4. package/dist/src/factories/EmergencyContactFactory.d.ts +3 -4
  5. package/dist/src/factories/EmergencyContactFactory.d.ts.map +1 -1
  6. package/dist/src/factories/EmergencyContactFactory.js +27 -27
  7. package/dist/src/factories/EmergencyContactFactory.js.map +1 -1
  8. package/dist/src/factories/GroupFactory.d.ts +4 -4
  9. package/dist/src/factories/GroupFactory.d.ts.map +1 -1
  10. package/dist/src/factories/GroupFactory.js +8 -8
  11. package/dist/src/factories/GroupFactory.js.map +1 -1
  12. package/dist/src/factories/MemberFactory.d.ts +4 -4
  13. package/dist/src/factories/MemberFactory.d.ts.map +1 -1
  14. package/dist/src/factories/MemberFactory.js +17 -17
  15. package/dist/src/factories/MemberFactory.js.map +1 -1
  16. package/dist/src/factories/OrganizationFactory.d.ts +4 -4
  17. package/dist/src/factories/OrganizationFactory.js +8 -8
  18. package/dist/src/factories/OrganizationFactory.js.map +1 -1
  19. package/dist/src/factories/ParentFactory.d.ts +1 -1
  20. package/dist/src/factories/ParentFactory.js +19 -19
  21. package/dist/src/factories/ParentFactory.js.map +1 -1
  22. package/dist/src/factories/RecordFactory.d.ts +2 -3
  23. package/dist/src/factories/RecordFactory.d.ts.map +1 -1
  24. package/dist/src/factories/RecordFactory.js +1 -1
  25. package/dist/src/factories/RecordFactory.js.map +1 -1
  26. package/dist/src/factories/RegisterCodeFactory.d.ts +2 -2
  27. package/dist/src/factories/RegisterCodeFactory.d.ts.map +1 -1
  28. package/dist/src/factories/RegisterCodeFactory.js +2 -2
  29. package/dist/src/factories/RegistrationFactory.d.ts +3 -3
  30. package/dist/src/factories/RegistrationFactory.d.ts.map +1 -1
  31. package/dist/src/factories/RegistrationFactory.js.map +1 -1
  32. package/dist/src/factories/RegistrationPeriodFactory.d.ts +2 -2
  33. package/dist/src/factories/RegistrationPeriodFactory.js.map +1 -1
  34. package/dist/src/factories/UserFactory.d.ts +3 -3
  35. package/dist/src/factories/UserFactory.d.ts.map +1 -1
  36. package/dist/src/factories/UserFactory.js +3 -3
  37. package/dist/src/factories/UserFactory.js.map +1 -1
  38. package/dist/src/factories/WebshopFactory.d.ts +4 -4
  39. package/dist/src/factories/WebshopFactory.d.ts.map +1 -1
  40. package/dist/src/factories/WebshopFactory.js +1 -1
  41. package/dist/src/factories/WebshopFactory.js.map +1 -1
  42. package/dist/src/helpers/DNSValidator.d.ts +1 -1
  43. package/dist/src/helpers/DNSValidator.d.ts.map +1 -1
  44. package/dist/src/helpers/DNSValidator.js +33 -33
  45. package/dist/src/helpers/DNSValidator.js.map +1 -1
  46. package/dist/src/helpers/EmailBuilder.d.ts +10 -10
  47. package/dist/src/helpers/EmailBuilder.d.ts.map +1 -1
  48. package/dist/src/helpers/EmailBuilder.js +34 -34
  49. package/dist/src/helpers/EmailBuilder.js.map +1 -1
  50. package/dist/src/helpers/GroupBuilder.d.ts.map +1 -1
  51. package/dist/src/helpers/GroupBuilder.js +57 -57
  52. package/dist/src/helpers/GroupBuilder.js.map +1 -1
  53. package/dist/src/helpers/Handlebars.d.ts.map +1 -1
  54. package/dist/src/helpers/Handlebars.js +29 -29
  55. package/dist/src/helpers/Handlebars.js.map +1 -1
  56. package/dist/src/helpers/MemberMerger.d.ts +1 -1
  57. package/dist/src/helpers/MemberMerger.d.ts.map +1 -1
  58. package/dist/src/helpers/MemberMerger.js +33 -33
  59. package/dist/src/helpers/MemberMerger.js.map +1 -1
  60. package/dist/src/helpers/MemberMerger.test.js +194 -194
  61. package/dist/src/helpers/MemberMerger.test.js.map +1 -1
  62. package/dist/src/helpers/RateLimiter.d.ts.map +1 -1
  63. package/dist/src/helpers/RateLimiter.js +2 -2
  64. package/dist/src/helpers/RateLimiter.js.map +1 -1
  65. package/dist/src/helpers/SetupStepsUpdater.d.ts +22 -0
  66. package/dist/src/helpers/SetupStepsUpdater.d.ts.map +1 -0
  67. package/dist/src/helpers/SetupStepsUpdater.js +255 -0
  68. package/dist/src/helpers/SetupStepsUpdater.js.map +1 -0
  69. package/dist/src/helpers/WebshopCounter.d.ts +1 -1
  70. package/dist/src/helpers/WebshopCounter.d.ts.map +1 -1
  71. package/dist/src/helpers/WebshopCounter.js +1 -1
  72. package/dist/src/helpers/WebshopCounter.js.map +1 -1
  73. package/dist/src/helpers/WebshopCounter.test.js +6 -6
  74. package/dist/src/helpers/WebshopCounter.test.js.map +1 -1
  75. package/dist/src/index.d.ts +20 -19
  76. package/dist/src/index.d.ts.map +1 -1
  77. package/dist/src/index.js +1 -0
  78. package/dist/src/index.js.map +1 -1
  79. package/dist/src/migrations/1605262045-import-postcodes.js +12 -12
  80. package/dist/src/migrations/1605262046-import-postcodes-nl.js +10 -10
  81. package/dist/src/models/BalanceItem.d.ts.map +1 -1
  82. package/dist/src/models/BalanceItem.js +37 -37
  83. package/dist/src/models/BalanceItem.js.map +1 -1
  84. package/dist/src/models/BalanceItemPayment.d.ts.map +1 -1
  85. package/dist/src/models/BalanceItemPayment.js +13 -13
  86. package/dist/src/models/BalanceItemPayment.js.map +1 -1
  87. package/dist/src/models/BuckarooPayment.d.ts +1 -1
  88. package/dist/src/models/BuckarooPayment.d.ts.map +1 -1
  89. package/dist/src/models/BuckarooPayment.js +5 -5
  90. package/dist/src/models/BuckarooPayment.js.map +1 -1
  91. package/dist/src/models/CachedOutstandingBalance.d.ts.map +1 -1
  92. package/dist/src/models/CachedOutstandingBalance.js +37 -37
  93. package/dist/src/models/CachedOutstandingBalance.js.map +1 -1
  94. package/dist/src/models/Document.d.ts +4 -4
  95. package/dist/src/models/Document.d.ts.map +1 -1
  96. package/dist/src/models/Document.js +27 -27
  97. package/dist/src/models/Document.js.map +1 -1
  98. package/dist/src/models/DocumentTemplate.d.ts +4 -4
  99. package/dist/src/models/DocumentTemplate.d.ts.map +1 -1
  100. package/dist/src/models/DocumentTemplate.js +72 -72
  101. package/dist/src/models/DocumentTemplate.js.map +1 -1
  102. package/dist/src/models/Email.d.ts.map +1 -1
  103. package/dist/src/models/Email.js +63 -64
  104. package/dist/src/models/Email.js.map +1 -1
  105. package/dist/src/models/EmailRecipient.d.ts.map +1 -1
  106. package/dist/src/models/EmailRecipient.js +20 -20
  107. package/dist/src/models/EmailRecipient.js.map +1 -1
  108. package/dist/src/models/EmailTemplate.d.ts +3 -3
  109. package/dist/src/models/EmailTemplate.d.ts.map +1 -1
  110. package/dist/src/models/EmailTemplate.js +16 -16
  111. package/dist/src/models/EmailTemplate.js.map +1 -1
  112. package/dist/src/models/EmailVerificationCode.d.ts +2 -2
  113. package/dist/src/models/EmailVerificationCode.d.ts.map +1 -1
  114. package/dist/src/models/EmailVerificationCode.js +57 -55
  115. package/dist/src/models/EmailVerificationCode.js.map +1 -1
  116. package/dist/src/models/Event.d.ts +2 -2
  117. package/dist/src/models/Event.d.ts.map +1 -1
  118. package/dist/src/models/Event.js +15 -15
  119. package/dist/src/models/Event.js.map +1 -1
  120. package/dist/src/models/Group.d.ts +3 -1
  121. package/dist/src/models/Group.d.ts.map +1 -1
  122. package/dist/src/models/Group.js +46 -35
  123. package/dist/src/models/Group.js.map +1 -1
  124. package/dist/src/models/Image.d.ts +1 -1
  125. package/dist/src/models/Image.d.ts.map +1 -1
  126. package/dist/src/models/Image.js +26 -26
  127. package/dist/src/models/Image.js.map +1 -1
  128. package/dist/src/models/Member.d.ts +8 -8
  129. package/dist/src/models/Member.d.ts.map +1 -1
  130. package/dist/src/models/Member.js +60 -60
  131. package/dist/src/models/Member.js.map +1 -1
  132. package/dist/src/models/MemberPlatformMembership.d.ts +3 -3
  133. package/dist/src/models/MemberPlatformMembership.d.ts.map +1 -1
  134. package/dist/src/models/MemberPlatformMembership.js +26 -26
  135. package/dist/src/models/MemberPlatformMembership.js.map +1 -1
  136. package/dist/src/models/MemberResponsibilityRecord.d.ts.map +1 -1
  137. package/dist/src/models/MemberResponsibilityRecord.js +13 -13
  138. package/dist/src/models/MemberResponsibilityRecord.js.map +1 -1
  139. package/dist/src/models/MergedMember.d.ts +3 -3
  140. package/dist/src/models/MergedMember.d.ts.map +1 -1
  141. package/dist/src/models/MergedMember.js +19 -19
  142. package/dist/src/models/MergedMember.js.map +1 -1
  143. package/dist/src/models/MolliePayment.d.ts +1 -1
  144. package/dist/src/models/MolliePayment.d.ts.map +1 -1
  145. package/dist/src/models/MolliePayment.js +5 -5
  146. package/dist/src/models/MolliePayment.js.map +1 -1
  147. package/dist/src/models/MollieToken.d.ts.map +1 -1
  148. package/dist/src/models/MollieToken.js +60 -60
  149. package/dist/src/models/MollieToken.js.map +1 -1
  150. package/dist/src/models/OneTimeToken.d.ts +2 -2
  151. package/dist/src/models/OneTimeToken.d.ts.map +1 -1
  152. package/dist/src/models/OneTimeToken.js +13 -13
  153. package/dist/src/models/OneTimeToken.js.map +1 -1
  154. package/dist/src/models/Order.d.ts +1 -1
  155. package/dist/src/models/Order.d.ts.map +1 -1
  156. package/dist/src/models/Order.js +70 -70
  157. package/dist/src/models/Order.js.map +1 -1
  158. package/dist/src/models/Organization.d.ts +5 -5
  159. package/dist/src/models/Organization.d.ts.map +1 -1
  160. package/dist/src/models/Organization.js +127 -127
  161. package/dist/src/models/Organization.js.map +1 -1
  162. package/dist/src/models/OrganizationRegistrationPeriod.d.ts.map +1 -1
  163. package/dist/src/models/OrganizationRegistrationPeriod.js +15 -15
  164. package/dist/src/models/OrganizationRegistrationPeriod.js.map +1 -1
  165. package/dist/src/models/PasswordToken.d.ts +3 -3
  166. package/dist/src/models/PasswordToken.d.ts.map +1 -1
  167. package/dist/src/models/PasswordToken.js +17 -17
  168. package/dist/src/models/PasswordToken.js.map +1 -1
  169. package/dist/src/models/PayconiqPayment.d.ts +1 -1
  170. package/dist/src/models/PayconiqPayment.d.ts.map +1 -1
  171. package/dist/src/models/PayconiqPayment.js +49 -49
  172. package/dist/src/models/PayconiqPayment.js.map +1 -1
  173. package/dist/src/models/Payment.d.ts +3 -3
  174. package/dist/src/models/Payment.d.ts.map +1 -1
  175. package/dist/src/models/Payment.js +36 -36
  176. package/dist/src/models/Payment.js.map +1 -1
  177. package/dist/src/models/Platform.d.ts +2 -2
  178. package/dist/src/models/Platform.d.ts.map +1 -1
  179. package/dist/src/models/Platform.js +8 -8
  180. package/dist/src/models/Platform.js.map +1 -1
  181. package/dist/src/models/RegisterCode.d.ts +1 -1
  182. package/dist/src/models/RegisterCode.d.ts.map +1 -1
  183. package/dist/src/models/RegisterCode.js +11 -11
  184. package/dist/src/models/RegisterCode.js.map +1 -1
  185. package/dist/src/models/Registration.d.ts +1 -1
  186. package/dist/src/models/Registration.d.ts.map +1 -1
  187. package/dist/src/models/Registration.js +88 -88
  188. package/dist/src/models/Registration.js.map +1 -1
  189. package/dist/src/models/RegistrationPeriod.d.ts.map +1 -1
  190. package/dist/src/models/RegistrationPeriod.js +12 -12
  191. package/dist/src/models/RegistrationPeriod.js.map +1 -1
  192. package/dist/src/models/STCredit.d.ts +1 -1
  193. package/dist/src/models/STCredit.d.ts.map +1 -1
  194. package/dist/src/models/STCredit.js +12 -12
  195. package/dist/src/models/STCredit.js.map +1 -1
  196. package/dist/src/models/STInvoice.d.ts +1 -1
  197. package/dist/src/models/STInvoice.d.ts.map +1 -1
  198. package/dist/src/models/STInvoice.js +16 -16
  199. package/dist/src/models/STInvoice.js.map +1 -1
  200. package/dist/src/models/STPackage.d.ts +1 -1
  201. package/dist/src/models/STPackage.d.ts.map +1 -1
  202. package/dist/src/models/STPackage.js +39 -39
  203. package/dist/src/models/STPackage.js.map +1 -1
  204. package/dist/src/models/STPendingInvoice.d.ts +1 -1
  205. package/dist/src/models/STPendingInvoice.d.ts.map +1 -1
  206. package/dist/src/models/STPendingInvoice.js +11 -11
  207. package/dist/src/models/STPendingInvoice.js.map +1 -1
  208. package/dist/src/models/StripeAccount.d.ts.map +1 -1
  209. package/dist/src/models/StripeAccount.js +13 -13
  210. package/dist/src/models/StripeAccount.js.map +1 -1
  211. package/dist/src/models/StripeCheckoutSession.d.ts +1 -1
  212. package/dist/src/models/StripeCheckoutSession.d.ts.map +1 -1
  213. package/dist/src/models/StripeCheckoutSession.js +7 -7
  214. package/dist/src/models/StripeCheckoutSession.js.map +1 -1
  215. package/dist/src/models/StripePaymentIntent.d.ts +1 -1
  216. package/dist/src/models/StripePaymentIntent.d.ts.map +1 -1
  217. package/dist/src/models/StripePaymentIntent.js +7 -7
  218. package/dist/src/models/StripePaymentIntent.js.map +1 -1
  219. package/dist/src/models/Ticket.d.ts +2 -2
  220. package/dist/src/models/Ticket.d.ts.map +1 -1
  221. package/dist/src/models/Ticket.js +23 -23
  222. package/dist/src/models/Ticket.js.map +1 -1
  223. package/dist/src/models/Token.d.ts +3 -3
  224. package/dist/src/models/Token.d.ts.map +1 -1
  225. package/dist/src/models/Token.js +27 -27
  226. package/dist/src/models/Token.js.map +1 -1
  227. package/dist/src/models/Token.test.js +11 -11
  228. package/dist/src/models/UsedRegisterCode.d.ts +1 -1
  229. package/dist/src/models/UsedRegisterCode.d.ts.map +1 -1
  230. package/dist/src/models/UsedRegisterCode.js +10 -10
  231. package/dist/src/models/UsedRegisterCode.js.map +1 -1
  232. package/dist/src/models/User.d.ts +4 -4
  233. package/dist/src/models/User.d.ts.map +1 -1
  234. package/dist/src/models/User.js +53 -51
  235. package/dist/src/models/User.js.map +1 -1
  236. package/dist/src/models/UserPermissions.d.ts +3 -3
  237. package/dist/src/models/UserPermissions.d.ts.map +1 -1
  238. package/dist/src/models/UserPermissions.js +12 -12
  239. package/dist/src/models/UserPermissions.js.map +1 -1
  240. package/dist/src/models/Webshop.d.ts +1 -1
  241. package/dist/src/models/Webshop.d.ts.map +1 -1
  242. package/dist/src/models/Webshop.js +23 -23
  243. package/dist/src/models/Webshop.js.map +1 -1
  244. package/dist/src/models/WebshopDiscountCode.d.ts +1 -1
  245. package/dist/src/models/WebshopDiscountCode.d.ts.map +1 -1
  246. package/dist/src/models/WebshopDiscountCode.js +16 -16
  247. package/dist/src/models/WebshopDiscountCode.js.map +1 -1
  248. package/dist/src/models/addresses/City.d.ts.map +1 -1
  249. package/dist/src/models/addresses/City.js +9 -9
  250. package/dist/src/models/addresses/City.js.map +1 -1
  251. package/dist/src/models/addresses/PostalCode.d.ts.map +1 -1
  252. package/dist/src/models/addresses/PostalCode.js +11 -11
  253. package/dist/src/models/addresses/PostalCode.js.map +1 -1
  254. package/dist/src/models/addresses/PostalCode.test.js +22 -22
  255. package/dist/src/models/addresses/PostalCode.test.js.map +1 -1
  256. package/dist/src/models/addresses/Province.d.ts.map +1 -1
  257. package/dist/src/models/addresses/Province.js +5 -5
  258. package/dist/src/models/addresses/Province.js.map +1 -1
  259. package/dist/src/models/addresses/Street.d.ts.map +1 -1
  260. package/dist/src/models/addresses/Street.js +6 -6
  261. package/dist/src/models/addresses/Street.js.map +1 -1
  262. package/dist/src/models/index.d.ts +46 -46
  263. package/dist/src/models/index.d.ts.map +1 -1
  264. package/dist/src/models/index.js +0 -1
  265. package/dist/src/models/index.js.map +1 -1
  266. package/dist/src/structures/OrganizationServerMetaData.d.ts.map +1 -1
  267. package/dist/src/structures/OrganizationServerMetaData.js +4 -4
  268. package/dist/src/structures/OrganizationServerMetaData.js.map +1 -1
  269. package/dist/tests/jest.global.setup.d.ts.map +1 -1
  270. package/dist/tests/jest.global.setup.js +15 -13
  271. package/dist/tests/jest.global.setup.js.map +1 -1
  272. package/dist/tests/jest.setup.js +3 -1
  273. package/dist/tests/jest.setup.js.map +1 -1
  274. package/dist/tsconfig.tsbuildinfo +1 -0
  275. package/package.json +3 -3
  276. package/src/factories/AddressFactory.ts +17 -17
  277. package/src/factories/EmergencyContactFactory.ts +30 -31
  278. package/src/factories/GroupFactory.ts +30 -30
  279. package/src/factories/MemberFactory.ts +41 -38
  280. package/src/factories/OrganizationFactory.ts +15 -15
  281. package/src/factories/ParentFactory.ts +24 -24
  282. package/src/factories/RecordFactory.ts +5 -4
  283. package/src/factories/RegisterCodeFactory.ts +7 -7
  284. package/src/factories/RegistrationFactory.ts +16 -16
  285. package/src/factories/RegistrationPeriodFactory.ts +5 -5
  286. package/src/factories/UserFactory.ts +20 -19
  287. package/src/factories/WebshopFactory.ts +14 -14
  288. package/src/helpers/DNSValidator.ts +89 -84
  289. package/src/helpers/EmailBuilder.ts +141 -135
  290. package/src/helpers/GroupBuilder.ts +181 -181
  291. package/src/helpers/Handlebars.ts +57 -54
  292. package/src/helpers/MemberMerger.test.ts +702 -702
  293. package/src/helpers/MemberMerger.ts +83 -77
  294. package/src/helpers/RateLimiter.ts +25 -27
  295. package/src/helpers/SetupStepsUpdater.ts +402 -0
  296. package/src/helpers/WebshopCounter.test.ts +12 -12
  297. package/src/helpers/WebshopCounter.ts +20 -19
  298. package/src/index.ts +20 -19
  299. package/src/migrations/1605262045-import-postcodes.ts +59 -63
  300. package/src/migrations/1605262046-import-postcodes-nl.ts +41 -43
  301. package/src/models/BalanceItem.ts +173 -172
  302. package/src/models/BalanceItemPayment.ts +32 -33
  303. package/src/models/BuckarooPayment.ts +7 -7
  304. package/src/models/CachedOutstandingBalance.ts +98 -99
  305. package/src/models/Document.ts +90 -87
  306. package/src/models/DocumentTemplate.ts +207 -198
  307. package/src/models/Email.ts +198 -200
  308. package/src/models/EmailRecipient.ts +38 -39
  309. package/src/models/EmailTemplate.ts +36 -37
  310. package/src/models/EmailVerificationCode.ts +146 -142
  311. package/src/models/Event.ts +53 -53
  312. package/src/models/Group.ts +136 -123
  313. package/src/models/Image.ts +48 -48
  314. package/src/models/Member.ts +277 -275
  315. package/src/models/MemberPlatformMembership.ts +71 -71
  316. package/src/models/MemberResponsibilityRecord.ts +32 -32
  317. package/src/models/MergedMember.ts +77 -77
  318. package/src/models/MolliePayment.ts +7 -7
  319. package/src/models/MollieToken.ts +131 -126
  320. package/src/models/OneTimeToken.ts +40 -39
  321. package/src/models/Order.ts +379 -372
  322. package/src/models/Organization.ts +332 -325
  323. package/src/models/OrganizationRegistrationPeriod.ts +50 -50
  324. package/src/models/PasswordToken.ts +42 -42
  325. package/src/models/PayconiqPayment.ts +80 -76
  326. package/src/models/Payment.ts +86 -86
  327. package/src/models/Platform.ts +21 -22
  328. package/src/models/RegisterCode.ts +26 -26
  329. package/src/models/Registration.ts +167 -168
  330. package/src/models/RegistrationPeriod.ts +29 -29
  331. package/src/models/STCredit.ts +24 -25
  332. package/src/models/STInvoice.ts +34 -34
  333. package/src/models/STPackage.ts +143 -136
  334. package/src/models/STPendingInvoice.ts +26 -26
  335. package/src/models/StripeAccount.ts +27 -27
  336. package/src/models/StripeCheckoutSession.ts +10 -10
  337. package/src/models/StripePaymentIntent.ts +10 -10
  338. package/src/models/Ticket.ts +51 -52
  339. package/src/models/Token.test.ts +13 -13
  340. package/src/models/Token.ts +64 -63
  341. package/src/models/UsedRegisterCode.ts +20 -21
  342. package/src/models/User.ts +148 -144
  343. package/src/models/UserPermissions.ts +25 -28
  344. package/src/models/Webshop.ts +53 -53
  345. package/src/models/WebshopDiscountCode.ts +33 -33
  346. package/src/models/addresses/City.ts +12 -12
  347. package/src/models/addresses/PostalCode.test.ts +68 -69
  348. package/src/models/addresses/PostalCode.ts +57 -57
  349. package/src/models/addresses/Province.ts +8 -8
  350. package/src/models/addresses/Street.ts +10 -12
  351. package/src/models/index.ts +54 -55
  352. package/src/structures/OrganizationServerMetaData.ts +36 -36
@@ -1,15 +1,15 @@
1
- import { column, Model } from "@simonbackx/simple-database";
2
- import { SimpleError } from "@simonbackx/simple-errors";
3
- import { I18n } from "@stamhoofd/backend-i18n";
4
- import { EmailTemplateType, Recipient, Replacement } from "@stamhoofd/structures";
5
- import basex from "base-x";
6
- import crypto from "crypto";
7
- import { v4 as uuidv4 } from "uuid";
8
- import { sendEmailTemplate } from "../helpers/EmailBuilder";
9
- import { Platform } from "./Platform";
10
-
11
- const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
12
- const bs58 = basex(ALPHABET)
1
+ import { column, Model } from '@simonbackx/simple-database';
2
+ import { SimpleError } from '@simonbackx/simple-errors';
3
+ import { I18n } from '@stamhoofd/backend-i18n';
4
+ import { EmailTemplateType, Recipient, Replacement } from '@stamhoofd/structures';
5
+ import basex from 'base-x';
6
+ import crypto from 'crypto';
7
+ import { v4 as uuidv4 } from 'uuid';
8
+ import { sendEmailTemplate } from '../helpers/EmailBuilder';
9
+ import { Platform } from './Platform';
10
+
11
+ const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
12
+ const bs58 = basex(ALPHABET);
13
13
 
14
14
  async function randomBytes(size: number): Promise<Buffer> {
15
15
  return new Promise((resolve, reject) => {
@@ -30,79 +30,78 @@ async function randomInt(max: number): Promise<number> {
30
30
  reject(err);
31
31
  return;
32
32
  }
33
- resolve(n)
34
- })
35
- })
33
+ resolve(n);
34
+ });
35
+ });
36
36
  }
37
37
 
38
-
39
38
  /**
40
39
  * Holds the verificationCodes for a given email (not a user, since a user can switch email addresses and might avoid verification that way)
41
40
  */
42
41
  export class EmailVerificationCode extends Model {
43
- static table = "email_verification_codes";
42
+ static table = 'email_verification_codes';
44
43
 
45
- @column({
46
- primary: true, type: "string", beforeSave(value) {
44
+ @column({
45
+ primary: true, type: 'string', beforeSave(value) {
47
46
  return value ?? uuidv4();
48
- }
47
+ },
49
48
  })
50
49
  id!: string;
51
50
 
52
- @column({ type: "string", nullable: true })
53
- organizationId: string|null = null;
51
+ @column({ type: 'string', nullable: true })
52
+ organizationId: string | null = null;
54
53
 
55
- @column({ type: "string" })
54
+ @column({ type: 'string' })
56
55
  userId: string;
57
56
 
58
57
  /**
59
58
  * The e-mail that will get verified. If on verification, the user e-mail differs from this one,
60
59
  * we'll set the user email to this email address
61
60
  */
62
- @column({ type: "string" })
61
+ @column({ type: 'string' })
63
62
  email: string;
64
63
 
65
64
  /**
66
65
  * This one is send to the sender. Allows for polling + extra length + sender authentication
67
66
  */
68
- @column({ type: "string" })
69
- token = "";
67
+ @column({ type: 'string' })
68
+ token = '';
70
69
 
71
- @column({ type: "string" })
72
- code = "";
70
+ @column({ type: 'string' })
71
+ code = '';
73
72
 
74
73
  /**
75
74
  * The amount of times this code has been generated for the same e-mail address
76
75
  */
77
- @column({ type: "integer" })
76
+ @column({ type: 'integer' })
78
77
  generatedCount = 0;
79
78
 
80
79
  /**
81
80
  * The amount of times this unique code has been tried.
82
81
  */
83
- @column({ type: "integer" })
82
+ @column({ type: 'integer' })
84
83
  tries = 0;
85
84
 
86
- @column({ type: "datetime" })
85
+ @column({ type: 'datetime' })
87
86
  expiresAt: Date;
88
87
 
89
88
  /**
90
89
  * createdAt behaves more like createdAt for verificationCode. Since every save is considered to have a new verificationCode
91
90
  */
92
91
  @column({
93
- type: "datetime", beforeSave() {
94
- const date = new Date()
95
- date.setMilliseconds(0)
96
- return date
97
- }
92
+ type: 'datetime', beforeSave() {
93
+ const date = new Date();
94
+ date.setMilliseconds(0);
95
+ return date;
96
+ },
98
97
  })
99
- createdAt: Date
98
+ createdAt: Date;
100
99
 
101
- static CODE_LENGTH = 6
102
- static MAX_TRIES = 9 // minus 0..MAX_TRIES_VARY
100
+ static CODE_LENGTH = 6;
101
+ static MAX_TRIES = 9; // minus 0..MAX_TRIES_VARY
103
102
 
104
103
  async generateCode() {
105
- this.code = ((await randomInt(Math.pow(10, EmailVerificationCode.CODE_LENGTH)))+"").padStart(EmailVerificationCode.CODE_LENGTH, "0")
104
+ this.code = ((await randomInt(Math.pow(10, EmailVerificationCode.CODE_LENGTH))) + '').padStart(EmailVerificationCode.CODE_LENGTH, '0');
106
105
  this.token = bs58.encode(await randomBytes(100)).toLowerCase();
107
106
 
108
107
  // Increase generatedCount if we changed the code
@@ -112,64 +111,65 @@ export class EmailVerificationCode extends Model {
112
111
  }
113
112
 
114
113
  // Reset the real tries
115
- this.tries = 0
114
+ this.tries = 0;
116
115
 
117
116
  // Expire in 12 hours
118
- this.expiresAt = new Date(new Date().getTime() + 1000 * 60 * 60 * 12)
117
+ this.expiresAt = new Date(new Date().getTime() + 1000 * 60 * 60 * 12);
119
118
  }
120
119
 
121
- getEmailVerificationUrl(user: import('./User').User, organization: import('./Organization').Organization|null, i18n: I18n) {
120
+ getEmailVerificationUrl(user: import('./User').User, organization: import('./Organization').Organization | null, i18n: I18n) {
122
121
  let host: string;
123
122
  if (user.permissions || !organization || STAMHOOFD.userMode === 'platform') {
124
- host = "https://"+(STAMHOOFD.domains.dashboard ?? "stamhoofd.app")+"/"+i18n.locale
125
- } else {
123
+ host = 'https://' + (STAMHOOFD.domains.dashboard ?? 'stamhoofd.app') + '/' + i18n.locale;
124
+ }
125
+ else {
126
126
  // Add language if different than default
127
- host = "https://"+organization.getHost()
127
+ host = 'https://' + organization.getHost();
128
128
 
129
- if (i18n.language != organization.i18n.language) {
130
- host += "/"+i18n.language
129
+ if (i18n.language !== organization.i18n.language) {
130
+ host += '/' + i18n.language;
131
131
  }
132
132
  }
133
133
 
134
- return host+"/verify-email"+(user.organizationPermissions && this.organizationId ? "/"+encodeURIComponent(this.organizationId) : "")+"?code="+encodeURIComponent(this.code)+"&token="+encodeURIComponent(this.token);
134
+ return host + '/verify-email' + (user.organizationPermissions && this.organizationId ? '/' + encodeURIComponent(this.organizationId) : '') + '?code=' + encodeURIComponent(this.code) + '&token=' + encodeURIComponent(this.token);
135
135
  }
136
136
 
137
137
  /**
138
138
  * Return true if this token is still valid (used for automatic polling in code view)
139
139
  */
140
- static async poll(organizationId: string|null, token: string): Promise<boolean> {
141
- const verificationCodes = await this.where({
142
- token,
140
+ static async poll(organizationId: string | null, token: string): Promise<boolean> {
141
+ const verificationCodes = await this.where({
142
+ token,
143
143
  organizationId: {
144
144
  sign: 'IN',
145
- value: [organizationId, null]
146
- }
147
- }, { limit: 1 })
145
+ value: [organizationId, null],
146
+ },
147
+ }, { limit: 1 });
148
148
 
149
149
  if (verificationCodes.length == 0) {
150
- return false // = expired or invalid
150
+ return false; // = expired or invalid
151
151
  }
152
152
 
153
- const verificationCode = verificationCodes[0]
153
+ const verificationCode = verificationCodes[0];
154
154
 
155
155
  if (verificationCode.token !== token) {
156
156
  // Safety check, is not possible
157
- console.error("Security check failed for verify: check MySQL optimization")
157
+ console.error('Security check failed for verify: check MySQL optimization');
158
158
  return false;
159
159
  }
160
160
 
161
161
  if (verificationCode.expiresAt < new Date()) {
162
- // Expired.
162
+ // Expired.
163
163
  // Can't expose this because that would expose a user enumeration attack
164
164
  // -> we'll include this expiry date in e-mails
165
- return false
165
+ return false;
166
166
  }
167
167
 
168
168
  if (verificationCode.tries >= EmailVerificationCode.MAX_TRIES) {
169
- return false
169
+ return false;
170
170
  }
171
171
 
172
- return true
172
+ return true;
173
173
  }
174
174
 
175
175
  /**
@@ -177,73 +177,73 @@ export class EmailVerificationCode extends Model {
177
177
  * We just expose if it is valid or not, nothing else
178
178
  * False = expired or invalid
179
179
  * Error => token okay, but too many attempts checking the code
180
- *
180
+ *
181
181
  */
182
- static async verify(organizationId: string|null, token: string, code: string): Promise<EmailVerificationCode | undefined> {
183
- if (code.length != EmailVerificationCode.CODE_LENGTH) {
184
- return
182
+ static async verify(organizationId: string | null, token: string, code: string): Promise<EmailVerificationCode | undefined> {
183
+ if (code.length !== EmailVerificationCode.CODE_LENGTH) {
184
+ return;
185
185
  }
186
-
187
- const verificationCodes = await this.where({
188
- token,
186
+
187
+ const verificationCodes = await this.where({
188
+ token,
189
189
  organizationId: {
190
190
  sign: 'IN',
191
- value: [organizationId, null]
192
- }
193
- }, { limit: 1 })
191
+ value: [organizationId, null],
192
+ },
193
+ }, { limit: 1 });
194
194
 
195
195
  if (verificationCodes.length == 0) {
196
- return // = expired or invalid
196
+ return; // = expired or invalid
197
197
  }
198
198
 
199
- const verificationCode = verificationCodes[0]
199
+ const verificationCode = verificationCodes[0];
200
200
 
201
201
  if (verificationCode.token !== token) {
202
202
  // Safety check, is not possible
203
- console.error("Security check failed for verify: check MySQL optimization")
203
+ console.error('Security check failed for verify: check MySQL optimization');
204
204
  return;
205
205
  }
206
206
 
207
207
  if (verificationCode.expiresAt < new Date()) {
208
- // Expired.
208
+ // Expired.
209
209
  // Can't expose this because that would expose a user enumeration attack
210
210
  // -> we'll include this expiry date in e-mails
211
- return
211
+ return;
212
212
  }
213
213
 
214
214
  if (verificationCode.tries >= EmailVerificationCode.MAX_TRIES) {
215
215
  // We can saferly inform the user, because he is authenticated with the token
216
216
  throw new SimpleError({
217
- code: "too_many_attempts",
218
- message: "Too many attempts",
219
- human: "Je hebt de code te veel foutief ingegeven. Verstuur eerst een nieuwe code voor je opnieuw probeert.",
220
- statusCode: 429
221
- })
217
+ code: 'too_many_attempts',
218
+ message: 'Too many attempts',
219
+ human: 'Je hebt de code te veel foutief ingegeven. Verstuur eerst een nieuwe code voor je opnieuw probeert.',
220
+ statusCode: 429,
221
+ });
222
222
  }
223
223
 
224
- if (verificationCode.code === code || (code === "111111" && STAMHOOFD.environment === "development")) {
224
+ if (verificationCode.code === code || (code === '111111' && STAMHOOFD.environment === 'development')) {
225
225
  // Delete all remaining information!
226
226
  // To avoid leaving information about the existince of this user (tries)
227
- await verificationCode.delete()
227
+ await verificationCode.delete();
228
228
 
229
- return verificationCode
229
+ return verificationCode;
230
230
  }
231
231
 
232
- verificationCode.tries++
233
- await verificationCode.save()
232
+ verificationCode.tries++;
233
+ await verificationCode.save();
234
234
 
235
235
  if (verificationCode.tries >= EmailVerificationCode.MAX_TRIES) {
236
236
  // We can saferly inform the user, because he is authenticated with the token
237
237
  throw new SimpleError({
238
- code: "too_many_attempts",
239
- message: "Too many attempts",
240
- human: "Je hebt de code te veel foutief ingegeven. Verstuur eerst een nieuwe code voor je opnieuw probeert.",
241
- statusCode: 429
242
- })
238
+ code: 'too_many_attempts',
239
+ message: 'Too many attempts',
240
+ human: 'Je hebt de code te veel foutief ingegeven. Verstuur eerst een nieuwe code voor je opnieuw probeert.',
241
+ statusCode: 429,
242
+ });
243
243
  }
244
244
  }
245
245
 
246
- async send(user: import('./User').User, organization: import('./Organization').Organization|null, i18n: I18n, withCode = true) {
246
+ async send(user: import('./User').User, organization: import('./Organization').Organization | null, i18n: I18n, withCode = true) {
247
247
  const url = this.getEmailVerificationUrl(user, organization, i18n);
248
248
 
249
249
  const name = organization?.name ?? (await Platform.getSharedPrivateStruct()).config.name;
@@ -251,16 +251,16 @@ export class EmailVerificationCode extends Model {
251
251
  const replacements: Replacement[] = [
252
252
  Replacement.create({
253
253
  token: 'organizationName',
254
- value: name
254
+ value: name,
255
255
  }),
256
256
  Replacement.create({
257
257
  token: 'confirmEmailUrl',
258
- value: url
259
- })
260
- ]
258
+ value: url,
259
+ }),
260
+ ];
261
261
 
262
262
  if (withCode) {
263
- const formattedCode = this.code.substr(0, 3)+" "+this.code.substr(3)
263
+ const formattedCode = this.code.substr(0, 3) + ' ' + this.code.substr(3);
264
264
 
265
265
  await sendEmailTemplate(organization, {
266
266
  recipients: [
@@ -270,66 +270,69 @@ export class EmailVerificationCode extends Model {
270
270
  ...replacements,
271
271
  Replacement.create({
272
272
  token: 'confirmEmailCode',
273
- value: formattedCode
274
- })
275
- ]
276
- })
273
+ value: formattedCode,
274
+ }),
275
+ ],
276
+ }),
277
277
  ],
278
278
  template: {
279
279
  type: EmailTemplateType.VerifyEmail,
280
280
  },
281
- type: 'transactional'
282
- })
283
- } else {
281
+ type: 'transactional',
282
+ });
283
+ }
284
+ else {
284
285
  await sendEmailTemplate(organization, {
285
286
  recipients: [
286
287
  Recipient.create({
287
288
  email: this.email,
288
- replacements
289
- })
289
+ replacements,
290
+ }),
290
291
  ],
291
292
  template: {
292
293
  type: EmailTemplateType.VerifyEmailWithoutCode,
293
294
  },
294
- type: 'transactional'
295
- })
295
+ type: 'transactional',
296
+ });
296
297
  }
297
298
  }
298
299
 
299
- static async resend(organization: import('./Organization').Organization|null, token: string, i18n: I18n) {
300
- const verificationCodes = await this.where({
301
- token,
302
- organizationId: organization ? {
303
- sign: 'IN',
304
- value: [organization.id, null]
305
- } : null
306
- }, { limit: 1 })
300
+ static async resend(organization: import('./Organization').Organization | null, token: string, i18n: I18n) {
301
+ const verificationCodes = await this.where({
302
+ token,
303
+ organizationId: organization
304
+ ? {
305
+ sign: 'IN',
306
+ value: [organization.id, null],
307
+ }
308
+ : null,
309
+ }, { limit: 1 });
307
310
 
308
311
  if (verificationCodes.length == 0) {
309
- console.log("Can't resend code, no coded found for token", token)
312
+ console.log("Can't resend code, no coded found for token", token);
310
313
  // TODO: maybe send a note via email
311
- return
314
+ return;
312
315
  }
313
316
 
314
- const verificationCode = verificationCodes[0]
317
+ const verificationCode = verificationCodes[0];
315
318
 
316
319
  if (verificationCode.expiresAt < new Date()) {
317
320
  // Don't report error, could be brute forced
318
- console.log("Can't resend code, token is expired", token)
319
- return
321
+ console.log("Can't resend code, token is expired", token);
322
+ return;
320
323
  }
321
324
 
322
- const {User} = await import('./User')
323
- const user = await User.getByID(verificationCode.userId)
325
+ const { User } = await import('./User');
326
+ const user = await User.getByID(verificationCode.userId);
324
327
  if (!user) {
325
- return
328
+ return;
326
329
  }
327
- await verificationCode.send(user, organization, i18n)
330
+ await verificationCode.send(user, organization, i18n);
328
331
  }
329
332
 
330
333
  /**
331
334
  * Create or reuse a verification code for a given email address
332
- * If needed, it will update the code.
335
+ * If needed, it will update the code.
333
336
  * Use this method for sending only, not for verification!
334
337
  */
335
338
  static async createFor(user: import('./User').User, email: string): Promise<EmailVerificationCode> {
@@ -340,32 +343,33 @@ export class EmailVerificationCode extends Model {
340
343
  // Since, when changing email, we don't throw an error if it is use (user enumeration)
341
344
  // So multiple users should be able to request changing to a password, but only on validation should they fail
342
345
  // (or this should be noted in the verification email and accounts could be merged)
343
- const verificationCodes = await this.where({ userId: user.id }, { limit: 1 })
346
+ const verificationCodes = await this.where({ userId: user.id }, { limit: 1 });
344
347
 
345
- let verificationCode: EmailVerificationCode
348
+ let verificationCode: EmailVerificationCode;
346
349
  if (verificationCodes.length == 0) {
347
- verificationCode = new EmailVerificationCode()
348
- verificationCode.organizationId = user.organizationId
349
- await verificationCode.generateCode()
350
+ verificationCode = new EmailVerificationCode();
351
+ verificationCode.organizationId = user.organizationId;
352
+ await verificationCode.generateCode();
350
353
 
351
354
  // Reset the real tries
352
- verificationCode.tries = 0
355
+ verificationCode.tries = 0;
353
356
 
354
357
  // Expire in 3 hours
355
- verificationCode.expiresAt = new Date(new Date().getTime() + 1000 * 60 * 60 * 3)
356
- } else {
357
- verificationCode = verificationCodes[0]
358
+ verificationCode.expiresAt = new Date(new Date().getTime() + 1000 * 60 * 60 * 3);
359
+ }
360
+ else {
361
+ verificationCode = verificationCodes[0];
358
362
 
359
363
  if (verificationCode.expiresAt < new Date(new Date().getTime() - 15 * 60 * 1000) || verificationCode.tries >= EmailVerificationCode.MAX_TRIES) {
360
364
  // Expired: also update the token
361
- await verificationCode.generateCode()
365
+ await verificationCode.generateCode();
362
366
  }
363
367
  }
364
-
365
- verificationCode.email = email
366
- verificationCode.userId = user.id
367
368
 
368
- await verificationCode.save()
369
- return verificationCode
369
+ verificationCode.email = email;
370
+ verificationCode.userId = user.id;
371
+
372
+ await verificationCode.save();
373
+ return verificationCode;
370
374
  }
371
375
  }
@@ -1,116 +1,116 @@
1
-
2
- import { column, Model } from "@simonbackx/simple-database";
1
+ import { column, Model } from '@simonbackx/simple-database';
3
2
  import { EventMeta, Event as EventStruct, GroupType } from '@stamhoofd/structures';
4
- import { v4 as uuidv4 } from "uuid";
5
- import { Group } from "./Group";
3
+ import { v4 as uuidv4 } from 'uuid';
4
+ import { Group } from './Group';
6
5
 
7
6
  export class Event extends Model {
8
- static table = "events";
7
+ static table = 'events';
9
8
 
10
- @column({ primary: true, type: "string", beforeSave(value) {
9
+ @column({ primary: true, type: 'string', beforeSave(value) {
11
10
  return value ?? uuidv4();
12
11
  } })
13
12
  id!: string;
14
13
 
15
- @column({ type: "string" })
16
- name: string
14
+ @column({ type: 'string' })
15
+ name: string;
17
16
 
18
- @column({ type: "string" })
19
- typeId: string
17
+ @column({ type: 'string' })
18
+ typeId: string;
20
19
 
21
- @column({ type: "string", nullable: true })
22
- organizationId: string|null = null
20
+ @column({ type: 'string', nullable: true })
21
+ organizationId: string | null = null;
23
22
 
24
- @column({ type: "string", nullable: true })
25
- groupId: string|null = null
23
+ @column({ type: 'string', nullable: true })
24
+ groupId: string | null = null;
26
25
 
27
- @column({ type: "datetime" })
28
- startDate: Date
26
+ @column({ type: 'datetime' })
27
+ startDate: Date;
29
28
 
30
- @column({ type: "datetime" })
31
- endDate: Date
29
+ @column({ type: 'datetime' })
30
+ endDate: Date;
32
31
 
33
- @column({ type: "json", decoder: EventMeta })
34
- meta = EventMeta.create({})
32
+ @column({ type: 'json', decoder: EventMeta })
33
+ meta = EventMeta.create({});
35
34
 
36
35
  @column({
37
- type: "datetime", beforeSave(old?: any) {
36
+ type: 'datetime', beforeSave(old?: any) {
38
37
  if (old !== undefined) {
39
38
  return old;
40
39
  }
41
- const date = new Date()
42
- date.setMilliseconds(0)
43
- return date
44
- }
40
+ const date = new Date();
41
+ date.setMilliseconds(0);
42
+ return date;
43
+ },
45
44
  })
46
- createdAt: Date
45
+ createdAt: Date;
47
46
 
48
47
  @column({
49
- type: "datetime", beforeSave() {
50
- const date = new Date()
51
- date.setMilliseconds(0)
52
- return date
48
+ type: 'datetime', beforeSave() {
49
+ const date = new Date();
50
+ date.setMilliseconds(0);
51
+ return date;
53
52
  },
54
- skipUpdate: true
53
+ skipUpdate: true,
55
54
  })
56
- updatedAt: Date
55
+ updatedAt: Date;
57
56
 
58
57
  /**
59
58
  * @deprecated
60
59
  */
61
- getStructure(group?: Group|null) {
60
+ getStructure(group?: Group | null) {
62
61
  return EventStruct.create({
63
62
  ...this,
64
- group: group ? group.getStructure() : null
65
- })
63
+ group: group ? group.getStructure() : null,
64
+ });
66
65
  }
67
66
 
68
67
  /**
69
68
  * @deprecated
70
69
  */
71
- getPrivateStructure(group?: Group|null) {
70
+ getPrivateStructure(group?: Group | null) {
72
71
  return EventStruct.create({
73
72
  ...this,
74
- group: group ? group.getPrivateStructure() : null
75
- })
73
+ group: group ? group.getPrivateStructure() : null,
74
+ });
76
75
  }
77
76
 
78
- async syncGroupRequirements(group: Group|null) {
77
+ async syncGroupRequirements(group: Group | null) {
79
78
  if (!group) {
80
79
  return;
81
80
  }
82
81
 
83
- group.settings.requireDefaultAgeGroupIds = this.meta.defaultAgeGroupIds ?? []
84
- group.settings.requireGroupIds = this.meta.groups?.map(g => g.id) ?? []
82
+ group.settings.requireDefaultAgeGroupIds = this.meta.defaultAgeGroupIds ?? [];
83
+ group.settings.requireGroupIds = this.meta.groups?.map(g => g.id) ?? [];
85
84
 
86
85
  if (group.type === GroupType.EventRegistration) {
87
86
  // Don't change the name of the waiting list
88
- group.settings.name = this.name
87
+ group.settings.name = this.name;
89
88
  }
90
89
 
91
90
  if (this.organizationId) {
92
91
  // This is a not-national event, so require the organization
93
- group.settings.requireOrganizationIds = [this.organizationId]
94
- group.settings.requireOrganizationTags = []
95
- group.settings.requirePlatformMembershipOn = null
96
- } else {
97
- group.settings.requireOrganizationTags = this.meta.organizationTagIds ?? []
92
+ group.settings.requireOrganizationIds = [this.organizationId];
93
+ group.settings.requireOrganizationTags = [];
94
+ group.settings.requirePlatformMembershipOn = null;
95
+ }
96
+ else {
97
+ group.settings.requireOrganizationTags = this.meta.organizationTagIds ?? [];
98
98
 
99
99
  // Everyone can register
100
- group.settings.requireOrganizationIds = []
100
+ group.settings.requireOrganizationIds = [];
101
101
 
102
102
  // But they need a valid platform membership
103
- group.settings.requirePlatformMembershipOn = this.endDate
103
+ group.settings.requirePlatformMembershipOn = this.endDate;
104
104
  }
105
- await group.save()
105
+ await group.save();
106
106
 
107
107
  if (group.waitingListId) {
108
- const waitingList = await Group.getByID(group.waitingListId)
108
+ const waitingList = await Group.getByID(group.waitingListId);
109
109
  if (waitingList) {
110
110
  if (group.settings.allowRegistrationsByOrganization) {
111
- waitingList.settings.allowRegistrationsByOrganization = true
111
+ waitingList.settings.allowRegistrationsByOrganization = true;
112
112
  }
113
- await this.syncGroupRequirements(waitingList)
113
+ await this.syncGroupRequirements(waitingList);
114
114
  }
115
115
  }
116
116
  }