@stamhoofd/models 2.107.1 → 2.107.2

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 (314) hide show
  1. package/dist/src/factories/BalanceItemFactory.d.ts +1 -1
  2. package/dist/src/factories/BalanceItemFactory.d.ts.map +1 -1
  3. package/dist/src/factories/BalanceItemFactory.js +2 -2
  4. package/dist/src/factories/BalanceItemFactory.js.map +1 -1
  5. package/dist/src/factories/DocumentTemplateFactory.d.ts +1 -1
  6. package/dist/src/factories/DocumentTemplateFactory.d.ts.map +1 -1
  7. package/dist/src/factories/DocumentTemplateFactory.js +2 -2
  8. package/dist/src/factories/DocumentTemplateFactory.js.map +1 -1
  9. package/dist/src/factories/EmailTemplateFactory.d.ts +2 -2
  10. package/dist/src/factories/EmailTemplateFactory.d.ts.map +1 -1
  11. package/dist/src/factories/EmailTemplateFactory.js +2 -2
  12. package/dist/src/factories/EmailTemplateFactory.js.map +1 -1
  13. package/dist/src/factories/EmergencyContactFactory.js.map +1 -1
  14. package/dist/src/factories/EventFactory.d.ts +3 -3
  15. package/dist/src/factories/EventFactory.d.ts.map +1 -1
  16. package/dist/src/factories/EventFactory.js +4 -4
  17. package/dist/src/factories/EventFactory.js.map +1 -1
  18. package/dist/src/factories/EventNotificationFactory.d.ts +3 -3
  19. package/dist/src/factories/EventNotificationFactory.d.ts.map +1 -1
  20. package/dist/src/factories/EventNotificationFactory.js +7 -7
  21. package/dist/src/factories/EventNotificationFactory.js.map +1 -1
  22. package/dist/src/factories/EventNotificationTypeFactory.js +2 -2
  23. package/dist/src/factories/EventNotificationTypeFactory.js.map +1 -1
  24. package/dist/src/factories/GroupFactory.d.ts +3 -3
  25. package/dist/src/factories/GroupFactory.d.ts.map +1 -1
  26. package/dist/src/factories/GroupFactory.js +4 -4
  27. package/dist/src/factories/GroupFactory.js.map +1 -1
  28. package/dist/src/factories/MemberFactory.d.ts +3 -3
  29. package/dist/src/factories/MemberFactory.d.ts.map +1 -1
  30. package/dist/src/factories/MemberFactory.js +12 -12
  31. package/dist/src/factories/MemberFactory.js.map +1 -1
  32. package/dist/src/factories/MemberResponsibilityRecordFactory.d.ts +1 -1
  33. package/dist/src/factories/MemberResponsibilityRecordFactory.d.ts.map +1 -1
  34. package/dist/src/factories/MemberResponsibilityRecordFactory.js +4 -4
  35. package/dist/src/factories/MemberResponsibilityRecordFactory.js.map +1 -1
  36. package/dist/src/factories/OrganizationFactory.d.ts +2 -2
  37. package/dist/src/factories/OrganizationFactory.d.ts.map +1 -1
  38. package/dist/src/factories/OrganizationFactory.js +4 -4
  39. package/dist/src/factories/OrganizationFactory.js.map +1 -1
  40. package/dist/src/factories/OrganizationRegistrationPeriodFactory.d.ts +3 -3
  41. package/dist/src/factories/OrganizationRegistrationPeriodFactory.d.ts.map +1 -1
  42. package/dist/src/factories/OrganizationRegistrationPeriodFactory.js +2 -2
  43. package/dist/src/factories/OrganizationRegistrationPeriodFactory.js.map +1 -1
  44. package/dist/src/factories/OrganizationTagFactory.js +2 -2
  45. package/dist/src/factories/OrganizationTagFactory.js.map +1 -1
  46. package/dist/src/factories/ParentFactory.js +2 -2
  47. package/dist/src/factories/ParentFactory.js.map +1 -1
  48. package/dist/src/factories/PlatformEventTypeFactory.js +2 -2
  49. package/dist/src/factories/PlatformEventTypeFactory.js.map +1 -1
  50. package/dist/src/factories/PlatformResponsibilityFactory.js +2 -2
  51. package/dist/src/factories/PlatformResponsibilityFactory.js.map +1 -1
  52. package/dist/src/factories/RecordAnswerFactory.js +2 -2
  53. package/dist/src/factories/RecordAnswerFactory.js.map +1 -1
  54. package/dist/src/factories/RecordCategoryFactory.d.ts +1 -1
  55. package/dist/src/factories/RecordCategoryFactory.d.ts.map +1 -1
  56. package/dist/src/factories/RecordCategoryFactory.js +2 -2
  57. package/dist/src/factories/RecordCategoryFactory.js.map +1 -1
  58. package/dist/src/factories/RegisterCodeFactory.d.ts +1 -1
  59. package/dist/src/factories/RegisterCodeFactory.d.ts.map +1 -1
  60. package/dist/src/factories/RegisterCodeFactory.js +2 -2
  61. package/dist/src/factories/RegisterCodeFactory.js.map +1 -1
  62. package/dist/src/factories/RegistrationFactory.d.ts +4 -4
  63. package/dist/src/factories/RegistrationFactory.d.ts.map +1 -1
  64. package/dist/src/factories/RegistrationFactory.js +4 -4
  65. package/dist/src/factories/RegistrationFactory.js.map +1 -1
  66. package/dist/src/factories/RegistrationPeriodFactory.d.ts +1 -1
  67. package/dist/src/factories/RegistrationPeriodFactory.d.ts.map +1 -1
  68. package/dist/src/factories/RegistrationPeriodFactory.js +2 -2
  69. package/dist/src/factories/RegistrationPeriodFactory.js.map +1 -1
  70. package/dist/src/factories/STPackageFactory.d.ts +2 -2
  71. package/dist/src/factories/STPackageFactory.d.ts.map +1 -1
  72. package/dist/src/factories/STPackageFactory.js +2 -2
  73. package/dist/src/factories/STPackageFactory.js.map +1 -1
  74. package/dist/src/factories/UserFactory.d.ts +2 -2
  75. package/dist/src/factories/UserFactory.d.ts.map +1 -1
  76. package/dist/src/factories/UserFactory.js +4 -4
  77. package/dist/src/factories/UserFactory.js.map +1 -1
  78. package/dist/src/factories/WebshopFactory.d.ts +1 -1
  79. package/dist/src/factories/WebshopFactory.d.ts.map +1 -1
  80. package/dist/src/factories/WebshopFactory.js +4 -4
  81. package/dist/src/factories/WebshopFactory.js.map +1 -1
  82. package/dist/src/factories/index.d.ts +26 -26
  83. package/dist/src/factories/index.d.ts.map +1 -1
  84. package/dist/src/factories/index.js +26 -26
  85. package/dist/src/factories/index.js.map +1 -1
  86. package/dist/src/helpers/EmailBuilder.d.ts +1 -1
  87. package/dist/src/helpers/EmailBuilder.d.ts.map +1 -1
  88. package/dist/src/helpers/EmailBuilder.js +12 -12
  89. package/dist/src/helpers/EmailBuilder.js.map +1 -1
  90. package/dist/src/helpers/GroupBuilder.d.ts +1 -1
  91. package/dist/src/helpers/GroupBuilder.d.ts.map +1 -1
  92. package/dist/src/helpers/GroupBuilder.js +26 -26
  93. package/dist/src/helpers/GroupBuilder.js.map +1 -1
  94. package/dist/src/helpers/MemberMerger.d.ts +1 -1
  95. package/dist/src/helpers/MemberMerger.d.ts.map +1 -1
  96. package/dist/src/helpers/MemberMerger.js +10 -10
  97. package/dist/src/helpers/MemberMerger.js.map +1 -1
  98. package/dist/src/helpers/MemberMerger.test.js +18 -18
  99. package/dist/src/helpers/MemberMerger.test.js.map +1 -1
  100. package/dist/src/helpers/WebshopCounter.d.ts +1 -1
  101. package/dist/src/helpers/WebshopCounter.d.ts.map +1 -1
  102. package/dist/src/index.d.ts +8 -8
  103. package/dist/src/index.d.ts.map +1 -1
  104. package/dist/src/index.js +8 -8
  105. package/dist/src/index.js.map +1 -1
  106. package/dist/src/migrations/1605262045-import-postcodes.d.ts +1 -1
  107. package/dist/src/migrations/1605262045-import-postcodes.js +9 -9
  108. package/dist/src/migrations/1605262046-import-postcodes-nl.js +7 -7
  109. package/dist/src/models/BalanceItem.d.ts +3 -3
  110. package/dist/src/models/BalanceItem.d.ts.map +1 -1
  111. package/dist/src/models/BalanceItem.js +3 -3
  112. package/dist/src/models/BalanceItem.js.map +1 -1
  113. package/dist/src/models/BalanceItemPayment.d.ts +1 -1
  114. package/dist/src/models/BalanceItemPayment.d.ts.map +1 -1
  115. package/dist/src/models/BalanceItemPayment.js +3 -3
  116. package/dist/src/models/BalanceItemPayment.js.map +1 -1
  117. package/dist/src/models/CachedBalance.d.ts +1 -1
  118. package/dist/src/models/CachedBalance.d.ts.map +1 -1
  119. package/dist/src/models/CachedBalance.js +13 -13
  120. package/dist/src/models/CachedBalance.js.map +1 -1
  121. package/dist/src/models/Document.d.ts +3 -3
  122. package/dist/src/models/Document.d.ts.map +1 -1
  123. package/dist/src/models/Document.js +11 -11
  124. package/dist/src/models/Document.js.map +1 -1
  125. package/dist/src/models/DocumentTemplate.d.ts +4 -4
  126. package/dist/src/models/DocumentTemplate.d.ts.map +1 -1
  127. package/dist/src/models/DocumentTemplate.js +17 -17
  128. package/dist/src/models/DocumentTemplate.js.map +1 -1
  129. package/dist/src/models/Email.d.ts +2 -2
  130. package/dist/src/models/Email.d.ts.map +1 -1
  131. package/dist/src/models/Email.js +33 -33
  132. package/dist/src/models/Email.js.map +1 -1
  133. package/dist/src/models/Email.test.js +38 -38
  134. package/dist/src/models/Email.test.js.map +1 -1
  135. package/dist/src/models/EmailRecipient.js +2 -2
  136. package/dist/src/models/EmailRecipient.js.map +1 -1
  137. package/dist/src/models/EmailVerificationCode.js +6 -6
  138. package/dist/src/models/EmailVerificationCode.js.map +1 -1
  139. package/dist/src/models/Event.d.ts +1 -1
  140. package/dist/src/models/Event.d.ts.map +1 -1
  141. package/dist/src/models/Event.js +2 -2
  142. package/dist/src/models/Event.js.map +1 -1
  143. package/dist/src/models/EventNotification.d.ts +1 -1
  144. package/dist/src/models/EventNotification.d.ts.map +1 -1
  145. package/dist/src/models/EventNotification.js +2 -2
  146. package/dist/src/models/EventNotification.js.map +1 -1
  147. package/dist/src/models/Group.d.ts +1 -1
  148. package/dist/src/models/Group.d.ts.map +1 -1
  149. package/dist/src/models/Group.js +19 -19
  150. package/dist/src/models/Group.js.map +1 -1
  151. package/dist/src/models/Member.d.ts +1 -1
  152. package/dist/src/models/Member.d.ts.map +1 -1
  153. package/dist/src/models/Member.js +28 -28
  154. package/dist/src/models/Member.js.map +1 -1
  155. package/dist/src/models/MemberPlatformMembership.d.ts +2 -2
  156. package/dist/src/models/MemberPlatformMembership.d.ts.map +1 -1
  157. package/dist/src/models/MemberPlatformMembership.js +14 -14
  158. package/dist/src/models/MemberPlatformMembership.js.map +1 -1
  159. package/dist/src/models/MergedMember.d.ts +1 -1
  160. package/dist/src/models/MergedMember.d.ts.map +1 -1
  161. package/dist/src/models/MollieToken.d.ts +1 -1
  162. package/dist/src/models/MollieToken.d.ts.map +1 -1
  163. package/dist/src/models/OneTimeToken.d.ts +1 -1
  164. package/dist/src/models/OneTimeToken.d.ts.map +1 -1
  165. package/dist/src/models/Order.d.ts +1 -1
  166. package/dist/src/models/Order.d.ts.map +1 -1
  167. package/dist/src/models/Order.js +28 -27
  168. package/dist/src/models/Order.js.map +1 -1
  169. package/dist/src/models/Organization.d.ts +4 -4
  170. package/dist/src/models/Organization.d.ts.map +1 -1
  171. package/dist/src/models/Organization.js +14 -14
  172. package/dist/src/models/Organization.js.map +1 -1
  173. package/dist/src/models/OrganizationRegistrationPeriod.d.ts +2 -1
  174. package/dist/src/models/OrganizationRegistrationPeriod.d.ts.map +1 -1
  175. package/dist/src/models/PasswordToken.d.ts +1 -1
  176. package/dist/src/models/PasswordToken.d.ts.map +1 -1
  177. package/dist/src/models/PasswordToken.js +4 -4
  178. package/dist/src/models/PasswordToken.js.map +1 -1
  179. package/dist/src/models/PayconiqPayment.d.ts +1 -1
  180. package/dist/src/models/PayconiqPayment.d.ts.map +1 -1
  181. package/dist/src/models/Payment.d.ts +3 -3
  182. package/dist/src/models/Payment.d.ts.map +1 -1
  183. package/dist/src/models/Payment.js +6 -6
  184. package/dist/src/models/Payment.js.map +1 -1
  185. package/dist/src/models/Platform.js +5 -5
  186. package/dist/src/models/Platform.js.map +1 -1
  187. package/dist/src/models/Platform.test.js +23 -23
  188. package/dist/src/models/Platform.test.js.map +1 -1
  189. package/dist/src/models/Registration.d.ts +1 -1
  190. package/dist/src/models/Registration.d.ts.map +1 -1
  191. package/dist/src/models/Registration.js +8 -8
  192. package/dist/src/models/Registration.js.map +1 -1
  193. package/dist/src/models/STInvoice.d.ts +1 -1
  194. package/dist/src/models/STInvoice.d.ts.map +1 -1
  195. package/dist/src/models/STPackage.js +7 -7
  196. package/dist/src/models/STPackage.js.map +1 -1
  197. package/dist/src/models/STPendingInvoice.d.ts +1 -1
  198. package/dist/src/models/STPendingInvoice.d.ts.map +1 -1
  199. package/dist/src/models/STPendingInvoice.js +2 -2
  200. package/dist/src/models/STPendingInvoice.js.map +1 -1
  201. package/dist/src/models/Ticket.d.ts +1 -1
  202. package/dist/src/models/Ticket.d.ts.map +1 -1
  203. package/dist/src/models/Ticket.js +4 -4
  204. package/dist/src/models/Ticket.js.map +1 -1
  205. package/dist/src/models/Token.d.ts +1 -1
  206. package/dist/src/models/Token.d.ts.map +1 -1
  207. package/dist/src/models/Token.js +5 -5
  208. package/dist/src/models/Token.js.map +1 -1
  209. package/dist/src/models/Token.test.js +11 -11
  210. package/dist/src/models/Token.test.js.map +1 -1
  211. package/dist/src/models/User.d.ts +1 -1
  212. package/dist/src/models/User.d.ts.map +1 -1
  213. package/dist/src/models/User.js +3 -3
  214. package/dist/src/models/User.js.map +1 -1
  215. package/dist/src/models/UserPermissions.d.ts +1 -1
  216. package/dist/src/models/UserPermissions.d.ts.map +1 -1
  217. package/dist/src/models/UserPermissions.js +3 -3
  218. package/dist/src/models/UserPermissions.js.map +1 -1
  219. package/dist/src/models/Webshop.d.ts +1 -1
  220. package/dist/src/models/Webshop.d.ts.map +1 -1
  221. package/dist/src/models/Webshop.js +4 -4
  222. package/dist/src/models/Webshop.js.map +1 -1
  223. package/dist/src/models/addresses/City.d.ts +1 -1
  224. package/dist/src/models/addresses/City.d.ts.map +1 -1
  225. package/dist/src/models/addresses/City.js +2 -2
  226. package/dist/src/models/addresses/City.js.map +1 -1
  227. package/dist/src/models/addresses/PostalCode.d.ts +1 -1
  228. package/dist/src/models/addresses/PostalCode.d.ts.map +1 -1
  229. package/dist/src/models/addresses/PostalCode.js +10 -10
  230. package/dist/src/models/addresses/PostalCode.js.map +1 -1
  231. package/dist/src/models/addresses/PostalCode.test.js +19 -19
  232. package/dist/src/models/addresses/PostalCode.test.js.map +1 -1
  233. package/dist/src/models/addresses/Street.d.ts +1 -1
  234. package/dist/src/models/addresses/Street.d.ts.map +1 -1
  235. package/dist/src/models/addresses/Street.js +2 -2
  236. package/dist/src/models/addresses/Street.js.map +1 -1
  237. package/dist/src/models/index.d.ts +51 -51
  238. package/dist/src/models/index.d.ts.map +1 -1
  239. package/dist/src/models/index.js +62 -62
  240. package/dist/src/models/index.js.map +1 -1
  241. package/package.json +2 -2
  242. package/src/factories/BalanceItemFactory.ts +1 -1
  243. package/src/factories/DocumentTemplateFactory.ts +1 -1
  244. package/src/factories/EmailTemplateFactory.ts +2 -2
  245. package/src/factories/EmergencyContactFactory.ts +10 -10
  246. package/src/factories/EventFactory.ts +4 -4
  247. package/src/factories/EventNotificationFactory.ts +5 -5
  248. package/src/factories/EventNotificationTypeFactory.ts +1 -1
  249. package/src/factories/GroupFactory.ts +4 -4
  250. package/src/factories/MemberFactory.ts +16 -16
  251. package/src/factories/MemberResponsibilityRecordFactory.ts +2 -2
  252. package/src/factories/OrganizationFactory.ts +3 -3
  253. package/src/factories/OrganizationRegistrationPeriodFactory.ts +3 -3
  254. package/src/factories/OrganizationTagFactory.ts +1 -1
  255. package/src/factories/ParentFactory.ts +11 -11
  256. package/src/factories/PlatformEventTypeFactory.ts +1 -1
  257. package/src/factories/PlatformResponsibilityFactory.ts +1 -1
  258. package/src/factories/RecordAnswerFactory.ts +1 -1
  259. package/src/factories/RecordCategoryFactory.ts +1 -1
  260. package/src/factories/RegisterCodeFactory.ts +1 -1
  261. package/src/factories/RegistrationFactory.ts +5 -5
  262. package/src/factories/RegistrationPeriodFactory.ts +1 -1
  263. package/src/factories/STPackageFactory.ts +2 -2
  264. package/src/factories/UserFactory.ts +3 -3
  265. package/src/factories/WebshopFactory.ts +2 -2
  266. package/src/factories/index.ts +26 -26
  267. package/src/helpers/EmailBuilder.ts +2 -2
  268. package/src/helpers/GroupBuilder.ts +1 -1
  269. package/src/helpers/MemberMerger.test.ts +2 -2
  270. package/src/helpers/MemberMerger.ts +1 -1
  271. package/src/helpers/WebshopCounter.ts +1 -1
  272. package/src/index.ts +8 -8
  273. package/src/migrations/1605262045-import-postcodes.ts +3 -3
  274. package/src/migrations/1605262046-import-postcodes-nl.ts +3 -3
  275. package/src/models/BalanceItem.ts +4 -4
  276. package/src/models/BalanceItemPayment.ts +1 -1
  277. package/src/models/CachedBalance.ts +2 -2
  278. package/src/models/Document.ts +13 -13
  279. package/src/models/DocumentTemplate.ts +8 -8
  280. package/src/models/Email.test.ts +6 -6
  281. package/src/models/Email.ts +6 -6
  282. package/src/models/EmailRecipient.ts +1 -1
  283. package/src/models/EmailVerificationCode.ts +3 -3
  284. package/src/models/Event.ts +1 -1
  285. package/src/models/EventNotification.ts +1 -1
  286. package/src/models/Group.ts +1 -1
  287. package/src/models/Member.ts +2 -2
  288. package/src/models/MemberPlatformMembership.ts +6 -6
  289. package/src/models/MergedMember.ts +1 -1
  290. package/src/models/MollieToken.ts +1 -1
  291. package/src/models/OneTimeToken.ts +1 -1
  292. package/src/models/Order.ts +4 -3
  293. package/src/models/Organization.ts +5 -5
  294. package/src/models/OrganizationRegistrationPeriod.ts +2 -2
  295. package/src/models/PasswordToken.ts +1 -1
  296. package/src/models/PayconiqPayment.ts +1 -1
  297. package/src/models/Payment.ts +5 -5
  298. package/src/models/Platform.test.ts +1 -1
  299. package/src/models/Platform.ts +1 -1
  300. package/src/models/Registration.ts +5 -5
  301. package/src/models/STInvoice.ts +1 -1
  302. package/src/models/STPackage.ts +3 -3
  303. package/src/models/STPendingInvoice.ts +1 -1
  304. package/src/models/Ticket.ts +1 -1
  305. package/src/models/Token.test.ts +5 -5
  306. package/src/models/Token.ts +2 -2
  307. package/src/models/User.ts +2 -2
  308. package/src/models/UserPermissions.ts +1 -1
  309. package/src/models/Webshop.ts +2 -2
  310. package/src/models/addresses/City.ts +1 -1
  311. package/src/models/addresses/PostalCode.test.ts +3 -3
  312. package/src/models/addresses/PostalCode.ts +1 -1
  313. package/src/models/addresses/Street.ts +1 -1
  314. package/src/models/index.ts +60 -60
@@ -4,10 +4,10 @@ import { Formatter } from '@stamhoofd/utility';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
 
6
6
  import { QueryableModel } from '@stamhoofd/sql';
7
- import { render } from '../helpers/Handlebars';
8
- import { RegistrationWithMember } from './Member';
9
- import { Organization } from './Organization';
10
- import { Registration } from './Registration';
7
+ import { render } from '../helpers/Handlebars.js';
8
+ import { RegistrationWithMember } from './Member.js';
9
+ import { Organization } from './Organization.js';
10
+ import { Registration } from './Registration.js';
11
11
 
12
12
  export class Document extends QueryableModel {
13
13
  static table = 'documents';
@@ -121,7 +121,7 @@ export class Document extends QueryableModel {
121
121
  }
122
122
 
123
123
  async updateData(): Promise<void> {
124
- const DocumentTemplate = (await import('./DocumentTemplate')).DocumentTemplate;
124
+ const DocumentTemplate = (await import('./DocumentTemplate.js')).DocumentTemplate;
125
125
  const template = await DocumentTemplate.getByID(this.templateId);
126
126
  if (!template) {
127
127
  console.log('No template, skipping update');
@@ -141,7 +141,7 @@ export class Document extends QueryableModel {
141
141
  return;
142
142
  }
143
143
 
144
- const Member = (await import('./Member')).Member;
144
+ const Member = (await import('./Member.js')).Member;
145
145
  const [registration] = await Member.getRegistrationWithMembersByIDs([this.registrationId]);
146
146
  if (!registration) {
147
147
  console.log('No registration when updating document', this.id);
@@ -155,7 +155,7 @@ export class Document extends QueryableModel {
155
155
  static async updateForMember(memberId: string) {
156
156
  try {
157
157
  console.log('Updating documents for member', memberId);
158
- const Member = (await import('./Member')).Member;
158
+ const Member = (await import('./Member.js')).Member;
159
159
  const member = await Member.getWithRegistrations(memberId);
160
160
  if (member) {
161
161
  const organizationIds = Formatter.uniqueArray(member.registrations.map(r => r.organizationId));
@@ -173,7 +173,7 @@ export class Document extends QueryableModel {
173
173
  try {
174
174
  console.log('Updating documents for registration', registration.id);
175
175
 
176
- const DocumentTemplate = (await import('./DocumentTemplate')).DocumentTemplate;
176
+ const DocumentTemplate = (await import('./DocumentTemplate.js')).DocumentTemplate;
177
177
  const templates = await DocumentTemplate.where({ updatesEnabled: 1, organizationId: registration.organizationId });
178
178
 
179
179
  for (const template of templates) {
@@ -205,11 +205,11 @@ export class Document extends QueryableModel {
205
205
  try {
206
206
  console.log('Updating documents for updateForRegistrations', registrationIds, organizationId);
207
207
 
208
- const DocumentTemplate = (await import('./DocumentTemplate')).DocumentTemplate;
208
+ const DocumentTemplate = (await import('./DocumentTemplate.js')).DocumentTemplate;
209
209
  const templates = await DocumentTemplate.where({ updatesEnabled: 1, organizationId });
210
210
 
211
211
  if (templates.length) {
212
- const Member = (await import('./Member')).Member;
212
+ const Member = (await import('./Member.js')).Member;
213
213
  const registrations = await Member.getRegistrationWithMembersByIDs(registrationIds);
214
214
 
215
215
  for (const template of templates) {
@@ -226,11 +226,11 @@ export class Document extends QueryableModel {
226
226
  try {
227
227
  console.log('Updating documents for group', groupId);
228
228
 
229
- const DocumentTemplate = (await import('./DocumentTemplate')).DocumentTemplate;
229
+ const DocumentTemplate = (await import('./DocumentTemplate.js')).DocumentTemplate;
230
230
  const templates = await DocumentTemplate.where({ updatesEnabled: 1, organizationId });
231
231
 
232
232
  if (templates.length) {
233
- const Member = (await import('./Member')).Member;
233
+ const Member = (await import('./Member.js')).Member;
234
234
  const registrations = await Member.getRegistrationWithMembersForGroup(groupId);
235
235
 
236
236
  for (const template of templates) {
@@ -245,7 +245,7 @@ export class Document extends QueryableModel {
245
245
 
246
246
  // Rander handlebars template
247
247
  async getRenderedHtml(organization: Organization): Promise<string | null> {
248
- const DocumentTemplate = (await import('./DocumentTemplate')).DocumentTemplate;
248
+ const DocumentTemplate = (await import('./DocumentTemplate.js')).DocumentTemplate;
249
249
  const template = await DocumentTemplate.getByID(this.templateId);
250
250
  if (!template) {
251
251
  return null;
@@ -6,14 +6,14 @@ import { Sorter } from '@stamhoofd/utility';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
7
 
8
8
  import { QueryableModel } from '@stamhoofd/sql';
9
- import { render } from '../helpers/Handlebars';
10
- import { BalanceItem } from './BalanceItem';
11
- import { Document } from './Document';
12
- import { Group } from './Group';
13
- import { Member, RegistrationWithMember } from './Member';
14
- import { Organization } from './Organization';
15
- import { Registration } from './Registration';
16
- import { User } from './User';
9
+ import { render } from '../helpers/Handlebars.js';
10
+ import { BalanceItem } from './BalanceItem.js';
11
+ import { Document } from './Document.js';
12
+ import { Group } from './Group.js';
13
+ import { Member, RegistrationWithMember } from './Member.js';
14
+ import { Organization } from './Organization.js';
15
+ import { Registration } from './Registration.js';
16
+ import { User } from './User.js';
17
17
 
18
18
  export class DocumentTemplate extends QueryableModel {
19
19
  static table = 'document_templates';
@@ -1,12 +1,12 @@
1
1
  import { BalanceItemType, EmailRecipientFilter, EmailRecipientFilterType, EmailRecipientsStatus, EmailRecipient as EmailRecipientStruct, EmailRecipientSubfilter, EmailStatus, LimitedFilteredRequest, OrganizationMetaData, PaginatedResponse } from '@stamhoofd/structures';
2
- import { Email } from './Email';
3
- import { EmailRecipient } from './EmailRecipient';
2
+ import { Email } from './Email.js';
3
+ import { EmailRecipient } from './EmailRecipient.js';
4
4
  import { EmailMocker } from '@stamhoofd/email';
5
5
  import { STExpect, TestUtils } from '@stamhoofd/test-utils';
6
- import { OrganizationFactory } from '../factories/OrganizationFactory';
7
- import { Platform } from './Platform';
8
- import { BalanceItemFactory, MemberFactory, UserFactory } from '../factories';
9
- import { CachedBalance } from './CachedBalance';
6
+ import { OrganizationFactory } from '../factories/OrganizationFactory.js';
7
+ import { Platform } from './Platform.js';
8
+ import { BalanceItemFactory, MemberFactory, UserFactory } from '../factories/index.js';
9
+ import { CachedBalance } from './CachedBalance.js';
10
10
  import { Formatter } from '@stamhoofd/utility';
11
11
 
12
12
  async function buildEmail(data: {
@@ -8,12 +8,12 @@ import { I18n } from '@stamhoofd/backend-i18n';
8
8
  import { Email as EmailClass, EmailInterfaceRecipient } from '@stamhoofd/email';
9
9
  import { isAbortedError, QueueHandler, QueueHandlerOptions } from '@stamhoofd/queues';
10
10
  import { QueryableModel, readDynamicSQLExpression, SQL, SQLAlias, SQLCalculation, SQLCount, SQLPlusSign, SQLSelectAs, SQLWhereSign } from '@stamhoofd/sql';
11
- import { canSendFromEmail, fillRecipientReplacements, getEmailBuilder, mergeReplacementsIfEqual, removeUnusedReplacements, stripRecipientReplacementsForWebDisplay, stripSensitiveRecipientReplacements } from '../helpers/EmailBuilder';
12
- import { EmailRecipient } from './EmailRecipient';
13
- import { EmailTemplate } from './EmailTemplate';
14
- import { Organization } from './Organization';
15
- import { User } from './User';
16
- import { Platform } from './Platform';
11
+ import { canSendFromEmail, fillRecipientReplacements, getEmailBuilder, mergeReplacementsIfEqual, removeUnusedReplacements, stripRecipientReplacementsForWebDisplay, stripSensitiveRecipientReplacements } from '../helpers/EmailBuilder.js';
12
+ import { EmailRecipient } from './EmailRecipient.js';
13
+ import { EmailTemplate } from './EmailTemplate.js';
14
+ import { Organization } from './Organization.js';
15
+ import { User } from './User.js';
16
+ import { Platform } from './Platform.js';
17
17
 
18
18
  type Attachment = { filename: string; path?: string; href?: string; content?: string | Buffer; contentType?: string; encoding?: string };
19
19
 
@@ -6,7 +6,7 @@ import { ArrayDecoder } from '@simonbackx/simple-encoding';
6
6
  import { QueryableModel } from '@stamhoofd/sql';
7
7
  import { SimpleErrors } from '@simonbackx/simple-errors';
8
8
  import { Formatter } from '@stamhoofd/utility';
9
- import { Member } from './Member';
9
+ import { Member } from './Member.js';
10
10
 
11
11
  export class EmailRecipient extends QueryableModel {
12
12
  static table = 'email_recipients';
@@ -6,8 +6,8 @@ import { EmailTemplateType, Recipient, Replacement } from '@stamhoofd/structures
6
6
  import basex from 'base-x';
7
7
  import crypto from 'crypto';
8
8
  import { v4 as uuidv4 } from 'uuid';
9
- import { sendEmailTemplate } from '../helpers/EmailBuilder';
10
- import { Platform } from './Platform';
9
+ import { sendEmailTemplate } from '../helpers/EmailBuilder.js';
10
+ import { Platform } from './Platform.js';
11
11
 
12
12
  const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
13
13
  const bs58 = basex(ALPHABET);
@@ -323,7 +323,7 @@ export class EmailVerificationCode extends QueryableModel {
323
323
  return;
324
324
  }
325
325
 
326
- const { User } = await import('./User');
326
+ const { User } = await import('./User.js');
327
327
  const user = await User.getByID(verificationCode.userId);
328
328
  if (!user) {
329
329
  return;
@@ -2,7 +2,7 @@ import { column } from '@simonbackx/simple-database';
2
2
  import { QueryableModel } from '@stamhoofd/sql';
3
3
  import { EventMeta, Event as EventStruct, GroupType, TranslatedString } from '@stamhoofd/structures';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
- import { Group } from './Group';
5
+ import { Group } from './Group.js';
6
6
 
7
7
  export class Event extends QueryableModel {
8
8
  static table = 'events';
@@ -3,7 +3,7 @@ import { MapDecoder, StringDecoder } from '@simonbackx/simple-encoding';
3
3
  import { QueryableModel } from '@stamhoofd/sql';
4
4
  import { EventNotificationStatus, RecordAnswer, RecordAnswerDecoder } from '@stamhoofd/structures';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
- import { Event } from './Event';
6
+ import { Event } from './Event.js';
7
7
 
8
8
  export class EventNotification extends QueryableModel {
9
9
  static table = 'event_notifications';
@@ -6,7 +6,7 @@ import { ArrayDecoder } from '@simonbackx/simple-encoding';
6
6
  import { QueueHandler } from '@stamhoofd/queues';
7
7
  import { QueryableModel } from '@stamhoofd/sql';
8
8
  import { Formatter } from '@stamhoofd/utility';
9
- import { Member, MemberWithRegistrations, OrganizationRegistrationPeriod, Payment, Registration, User } from './';
9
+ import { Member, MemberWithRegistrations, OrganizationRegistrationPeriod, Payment, Registration, User } from './index.js';
10
10
 
11
11
  if (Member === undefined) {
12
12
  throw new Error('Import Member is undefined');
@@ -4,7 +4,7 @@ import { MemberDetails, NationalRegisterNumberOptOut, RegistrationWithTinyMember
4
4
  import { Formatter } from '@stamhoofd/utility';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
 
7
- import { Group, MemberResponsibilityRecord, Payment, Registration, User } from './';
7
+ import { Group, MemberResponsibilityRecord, Payment, Registration, User } from './index.js';
8
8
  export type MemberWithUsers = Member & {
9
9
  users: User[];
10
10
  };
@@ -185,7 +185,7 @@ export class Member extends QueryableModel {
185
185
  * Fetch all registrations with members with their corresponding (valid) registrations and payment
186
186
  */
187
187
  static async getRegistrationWithMembersForPayment(paymentId: string): Promise<RegistrationWithMember[]> {
188
- const { BalanceItem, BalanceItemPayment } = await import('./');
188
+ const { BalanceItem, BalanceItemPayment } = await import('./index.js');
189
189
 
190
190
  let query = `SELECT ${Member.getDefaultSelect()}, ${Registration.getDefaultSelect()} from \`${Member.table}\`\n`;
191
191
 
@@ -4,12 +4,12 @@ import { QueryableModel, SQL, SQLWhereSign } from '@stamhoofd/sql';
4
4
  import { PlatformMembershipTypeBehaviour } from '@stamhoofd/structures';
5
5
  import { Formatter } from '@stamhoofd/utility';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
- import { BalanceItem } from './BalanceItem';
8
- import { Member } from './Member';
9
- import { Organization } from './Organization';
10
- import { Platform } from './Platform';
11
- import { Registration } from './Registration';
12
- import { RegistrationPeriod } from './RegistrationPeriod';
7
+ import { BalanceItem } from './BalanceItem.js';
8
+ import { Member } from './Member.js';
9
+ import { Organization } from './Organization.js';
10
+ import { Platform } from './Platform.js';
11
+ import { Registration } from './Registration.js';
12
+ import { RegistrationPeriod } from './RegistrationPeriod.js';
13
13
 
14
14
  export class MemberPlatformMembership extends QueryableModel {
15
15
  static table = 'member_platform_memberships';
@@ -1,7 +1,7 @@
1
1
  import { column } from '@simonbackx/simple-database';
2
2
  import { QueryableModel } from '@stamhoofd/sql';
3
3
  import { MemberDetails } from '@stamhoofd/structures';
4
- import { Member } from './';
4
+ import { Member } from './index.js';
5
5
 
6
6
  export class MergedMember extends QueryableModel {
7
7
  static override table = 'merged_members';
@@ -6,7 +6,7 @@ import { MollieOnboarding, MollieProfile, MollieStatus } from '@stamhoofd/struct
6
6
  import { IncomingMessage } from 'http';
7
7
  import https from 'https';
8
8
 
9
- import { Organization } from './Organization';
9
+ import { Organization } from './Organization.js';
10
10
 
11
11
  function sleep(ms: number) {
12
12
  return new Promise(resolve => setTimeout(resolve, ms));
@@ -4,7 +4,7 @@ import { QueryableModel } from '@stamhoofd/sql';
4
4
  import basex from 'base-x';
5
5
  import crypto from 'crypto';
6
6
 
7
- import { Organization } from './Organization';
7
+ import { Organization } from './Organization.js';
8
8
 
9
9
  const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
10
10
  const bs58 = basex(ALPHABET);
@@ -6,9 +6,9 @@ import { BalanceItemPaymentWithPayment, BalanceItemPaymentWithPrivatePayment, Ba
6
6
  import { Formatter } from '@stamhoofd/utility';
7
7
  import { v4 as uuidv4 } from 'uuid';
8
8
 
9
- import { sendEmailTemplate } from '../helpers/EmailBuilder';
10
- import { WebshopCounter } from '../helpers/WebshopCounter';
11
- import { BalanceItem, BalanceItemPayment, Organization, Payment, Ticket, Webshop, WebshopDiscountCode } from './';
9
+ import { sendEmailTemplate } from '../helpers/EmailBuilder.js';
10
+ import { WebshopCounter } from '../helpers/WebshopCounter.js';
11
+ import { BalanceItem, BalanceItemPayment, Organization, Payment, Ticket, Webshop, WebshopDiscountCode } from './index.js';
12
12
 
13
13
  export class Order extends QueryableModel {
14
14
  static table = 'webshop_orders';
@@ -111,6 +111,7 @@ export class Order extends QueryableModel {
111
111
  getUrl(this: Order & { webshop: Webshop & { organization: Organization } }) {
112
112
  // Country locales are disabled on webshops (always the same country). But we need to add the language if it isn't the same as the organization default language
113
113
  let locale = '';
114
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
114
115
  if (this.data.consumerLanguage !== this.webshop.organization.i18n.language) {
115
116
  locale = '/' + this.data.consumerLanguage;
116
117
  }
@@ -11,10 +11,10 @@ import { v4 as uuidv4 } from 'uuid';
11
11
 
12
12
  import { QueueHandler } from '@stamhoofd/queues';
13
13
  import { Formatter } from '@stamhoofd/utility';
14
- import { validateDNSRecords } from '../helpers/DNSValidator';
15
- import { sendEmailTemplate } from '../helpers/EmailBuilder';
16
- import { OrganizationServerMetaData } from '../structures/OrganizationServerMetaData';
17
- import { OrganizationRegistrationPeriod, StripeAccount } from './';
14
+ import { validateDNSRecords } from '../helpers/DNSValidator.js';
15
+ import { sendEmailTemplate } from '../helpers/EmailBuilder.js';
16
+ import { OrganizationServerMetaData } from '../structures/OrganizationServerMetaData.js';
17
+ import { OrganizationRegistrationPeriod, StripeAccount } from './index.js';
18
18
 
19
19
  export class Organization extends QueryableModel {
20
20
  static table = 'organizations';
@@ -815,7 +815,7 @@ export class Organization extends QueryableModel {
815
815
 
816
816
  async getAdmins() {
817
817
  // Circular reference fix
818
- const User = (await import('./User')).User;
818
+ const User = (await import('./User.js')).User;
819
819
  return await User.getAdmins(this.id, { verified: true });
820
820
  }
821
821
 
@@ -3,8 +3,8 @@ import { QueryableModel } from '@stamhoofd/sql';
3
3
  import { Group as GroupStruct, OrganizationRegistrationPeriodSettings, OrganizationRegistrationPeriod as OrganizationRegistrationPeriodStruct, SetupSteps } from '@stamhoofd/structures';
4
4
  import { Formatter } from '@stamhoofd/utility';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
- import { Group, RegistrationPeriod } from '.';
7
-
6
+ import { Group } from './Group.js';
7
+ import { RegistrationPeriod } from './RegistrationPeriod.js';
8
8
  export class OrganizationRegistrationPeriod extends QueryableModel {
9
9
  static table = 'organization_registration_periods';
10
10
 
@@ -4,7 +4,7 @@ import { QueryableModel } from '@stamhoofd/sql';
4
4
  import basex from 'base-x';
5
5
  import crypto from 'crypto';
6
6
 
7
- import { Organization, User } from './';
7
+ import { Organization, User } from './index.js';
8
8
  import { SimpleError } from '@simonbackx/simple-errors';
9
9
  const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
10
10
  const bs58 = basex(ALPHABET);
@@ -6,7 +6,7 @@ import { IncomingMessage } from 'http';
6
6
  import https from 'https';
7
7
  import { v4 as uuidv4 } from 'uuid';
8
8
 
9
- import { Organization, Payment } from './';
9
+ import { Organization, Payment } from './index.js';
10
10
  import { Formatter } from '@stamhoofd/utility';
11
11
 
12
12
  export class PayconiqPayment extends QueryableModel {
@@ -3,7 +3,7 @@ import { BalanceItemDetailed, BalanceItemPaymentDetailed, PaymentCustomer, Payme
3
3
  import { Formatter } from '@stamhoofd/utility';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
 
6
- import { BalanceItem, Organization } from './';
6
+ import { BalanceItem, Organization } from './index.js';
7
7
  import { QueryableModel } from '@stamhoofd/sql';
8
8
 
9
9
  export class Payment extends QueryableModel {
@@ -233,8 +233,8 @@ export class Payment extends QueryableModel {
233
233
  if (payments.length === 0) {
234
234
  return { balanceItemPayments: [], balanceItems: [] };
235
235
  }
236
- const { BalanceItemPayment } = await import('./BalanceItemPayment');
237
- const { BalanceItem } = await import('./BalanceItem');
236
+ const { BalanceItemPayment } = await import('./BalanceItemPayment.js');
237
+ const { BalanceItem } = await import('./BalanceItem.js');
238
238
 
239
239
  // Load all the related models from the database so we can build the structures
240
240
  const balanceItemPayments = await BalanceItemPayment.where({
@@ -261,8 +261,8 @@ export class Payment extends QueryableModel {
261
261
  }
262
262
 
263
263
  static async loadBalanceItemRelations(balanceItems: import('./BalanceItem').BalanceItem[]) {
264
- const { Order } = await import('./Order');
265
- const { Member } = await import('./Member');
264
+ const { Order } = await import('./Order.js');
265
+ const { Member } = await import('./Member.js');
266
266
 
267
267
  // Load members and orders
268
268
  const registrationIds = Formatter.uniqueArray(balanceItems.flatMap(b => b.registrationId ? [b.registrationId] : []));
@@ -1,5 +1,5 @@
1
1
  import { PlatformConfig, PlatformMembershipType } from '@stamhoofd/structures';
2
- import { Platform } from './Platform';
2
+ import { Platform } from './Platform.js';
3
3
  import { Database } from '@simonbackx/simple-database';
4
4
 
5
5
  describe('Model.Platform', () => {
@@ -5,7 +5,7 @@ import { QueryableModel } from '@stamhoofd/sql';
5
5
  import { PlatformConfig, PlatformPrivateConfig, PlatformServerConfig, Platform as PlatformStruct } from '@stamhoofd/structures';
6
6
  import { deepFreeze } from '@stamhoofd/utility';
7
7
  import { v4 as uuidv4 } from 'uuid';
8
- import { RegistrationPeriod } from './RegistrationPeriod';
8
+ import { RegistrationPeriod } from './RegistrationPeriod.js';
9
9
 
10
10
  export class Platform extends QueryableModel {
11
11
  static table = 'platform';
@@ -5,8 +5,8 @@ import { v4 as uuidv4 } from 'uuid';
5
5
 
6
6
  import { ArrayDecoder, MapDecoder, StringDecoder } from '@simonbackx/simple-encoding';
7
7
  import { QueryableModel } from '@stamhoofd/sql';
8
- import { sendEmailTemplate } from '../helpers/EmailBuilder';
9
- import { Group, Organization, OrganizationRegistrationPeriod, User } from './';
8
+ import { sendEmailTemplate } from '../helpers/EmailBuilder.js';
9
+ import { Group, Organization, OrganizationRegistrationPeriod, User } from './index.js';
10
10
 
11
11
  export class Registration extends QueryableModel {
12
12
  static table = 'registrations';
@@ -181,7 +181,7 @@ export class Registration extends QueryableModel {
181
181
  }
182
182
 
183
183
  async getRecipients(organization: Organization, group: import('./').Group) {
184
- const { Member } = await import('./Member');
184
+ const { Member } = await import('./Member.js');
185
185
 
186
186
  const member = await Member.getWithRegistrations(this.memberId);
187
187
 
@@ -220,7 +220,7 @@ export class Registration extends QueryableModel {
220
220
  async sendEmailTemplate(data: {
221
221
  type: EmailTemplateType;
222
222
  }) {
223
- const Group = (await import('./')).Group;
223
+ const Group = (await import('./index.js')).Group;
224
224
  const group = await Group.getByID(this.groupId);
225
225
 
226
226
  if (!group) {
@@ -309,7 +309,7 @@ export class Registration extends QueryableModel {
309
309
  let group: Group | undefined | null = null;
310
310
 
311
311
  if (groupIds.length == 1) {
312
- const Group = (await import('./')).Group;
312
+ const Group = (await import('./index.js')).Group;
313
313
  group = await Group.getByID(groupIds[0]);
314
314
  }
315
315
 
@@ -4,7 +4,7 @@ import { SimpleError } from '@simonbackx/simple-errors';
4
4
  import { QueryableModel } from '@stamhoofd/sql';
5
5
  import { OrganizationPaymentMandate, OrganizationPaymentMandateDetails, STInvoiceMeta } from '@stamhoofd/structures';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
- import { Organization } from './';
7
+ import { Organization } from './index.js';
8
8
 
9
9
  export class STInvoice extends QueryableModel {
10
10
  static table = 'stamhoofd_invoices';
@@ -5,9 +5,9 @@ import { Formatter } from '@stamhoofd/utility';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
 
7
7
  import { QueryableModel } from '@stamhoofd/sql';
8
- import { sendEmailTemplate } from '../helpers/EmailBuilder';
9
- import { GroupBuilder } from '../helpers/GroupBuilder';
10
- import { Organization } from './';
8
+ import { sendEmailTemplate } from '../helpers/EmailBuilder.js';
9
+ import { GroupBuilder } from '../helpers/GroupBuilder.js';
10
+ import { Organization } from './index.js';
11
11
 
12
12
  export class STPackage extends QueryableModel {
13
13
  static table = 'stamhoofd_packages';
@@ -3,7 +3,7 @@ import { QueryableModel } from '@stamhoofd/sql';
3
3
  import { STInvoiceMeta } from '@stamhoofd/structures';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
 
6
- import { Organization } from './';
6
+ import { Organization } from './index.js';
7
7
 
8
8
  /**
9
9
  * Things that should get paid, but are not yet invoiced yet because:
@@ -5,7 +5,7 @@ import basex from 'base-x';
5
5
  import crypto from 'crypto';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
7
 
8
- import { Order, Organization, Webshop } from './';
8
+ import { Order, Organization, Webshop } from './index.js';
9
9
 
10
10
  // Note: 0 and O is removed to prevent typing it in wrong
11
11
  const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZ';
@@ -1,10 +1,10 @@
1
1
  import { Database } from '@simonbackx/simple-database';
2
2
 
3
- import { OrganizationFactory } from '../factories/OrganizationFactory';
4
- import { UserFactory } from '../factories/UserFactory';
5
- import { Organization } from './Organization';
6
- import { Token } from './Token';
7
- import { User } from './User';
3
+ import { OrganizationFactory } from '../factories/OrganizationFactory.js';
4
+ import { UserFactory } from '../factories/UserFactory.js';
5
+ import { Organization } from './Organization.js';
6
+ import { Token } from './Token.js';
7
+ import { User } from './User.js';
8
8
 
9
9
  describe('Model.Token', () => {
10
10
  const existingToken = 'ABCDEFG';
@@ -3,8 +3,8 @@ import { QueryableModel } from '@stamhoofd/sql';
3
3
  import { ApiUser, ApiUserRateLimits } from '@stamhoofd/structures';
4
4
  import crypto from 'crypto';
5
5
 
6
- import { RateLimiter } from '../helpers/RateLimiter';
7
- import { User } from './';
6
+ import { RateLimiter } from '../helpers/RateLimiter.js';
7
+ import { User } from './index.js';
8
8
  import { SimpleError } from '@simonbackx/simple-errors';
9
9
 
10
10
  export type TokenWithUser = Token & { user: User };
@@ -7,7 +7,7 @@ import { v4 as uuidv4 } from 'uuid';
7
7
 
8
8
  import { SimpleError } from '@simonbackx/simple-errors';
9
9
  import { QueueHandler } from '@stamhoofd/queues';
10
- import { Organization } from './';
10
+ import { Organization } from './index.js';
11
11
 
12
12
  export class User extends QueryableModel {
13
13
  static table = 'users';
@@ -213,7 +213,7 @@ export class User extends QueryableModel {
213
213
  }
214
214
  }
215
215
 
216
- const Member = (await import('./Member')).Member;
216
+ const Member = (await import('./Member.js')).Member;
217
217
 
218
218
  // Delete placeholder account, but migrate members first
219
219
  const members = await Member.getMembersWithRegistrationForUser(other);
@@ -3,7 +3,7 @@ import { QueryableModel } from '@stamhoofd/sql';
3
3
  import { Permissions } from '@stamhoofd/structures';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
 
6
- import { Organization, User } from './';
6
+ import { Organization, User } from './index.js';
7
7
 
8
8
  export class UserPermissions extends QueryableModel {
9
9
  static table = 'user_permissions';
@@ -3,9 +3,9 @@ import { ArrayDecoder } from '@simonbackx/simple-encoding';
3
3
  import { QueryableModel } from '@stamhoofd/sql';
4
4
  import { Category, DNSRecordStatus, Product, WebshopMetaData, WebshopPrivateMetaData, WebshopServerMetaData } from '@stamhoofd/structures';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
- import { validateDNSRecords } from '../helpers/DNSValidator';
6
+ import { validateDNSRecords } from '../helpers/DNSValidator.js';
7
7
 
8
- import { Organization } from './';
8
+ import { Organization } from './index.js';
9
9
 
10
10
  export class Webshop extends QueryableModel {
11
11
  static table = 'webshops';
@@ -3,7 +3,7 @@ import { Country } from '@stamhoofd/structures';
3
3
  import { v4 as uuidv4 } from 'uuid';
4
4
 
5
5
  import { QueryableModel } from '@stamhoofd/sql';
6
- import { Province } from './Province';
6
+ import { Province } from './Province.js';
7
7
 
8
8
  export class City extends QueryableModel {
9
9
  static table = 'cities';
@@ -1,8 +1,8 @@
1
1
  import { Country } from '@stamhoofd/structures';
2
2
 
3
- import { City } from './City';
4
- import { PostalCode } from './PostalCode';
5
- import { Province } from './Province';
3
+ import { City } from './City.js';
4
+ import { PostalCode } from './PostalCode.js';
5
+ import { Province } from './Province.js';
6
6
 
7
7
  describe('Model.PostalCode', () => {
8
8
  let oostVlaanderen!: Province;
@@ -5,7 +5,7 @@ import { Country } from '@stamhoofd/structures';
5
5
  import { Formatter, StringCompare } from '@stamhoofd/utility';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
7
 
8
- import { City } from './City';
8
+ import { City } from './City.js';
9
9
 
10
10
  export class PostalCode extends QueryableModel {
11
11
  static table = 'postal_codes';
@@ -2,7 +2,7 @@ import { column, ManyToOneRelation } from '@simonbackx/simple-database';
2
2
  import { QueryableModel } from '@stamhoofd/sql';
3
3
  import { v4 as uuidv4 } from 'uuid';
4
4
 
5
- import { City } from './City';
5
+ import { City } from './City.js';
6
6
 
7
7
  export class Street extends QueryableModel {
8
8
  static table = 'streets';