@darraghor/nest-backend-libs 2.23.1 → 2.24.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 (369) hide show
  1. package/dist/authorization/authz.module.js +40 -0
  2. package/dist/authorization/authz.module.js.map +1 -0
  3. package/dist/{authz → authorization/config}/AuthConfigurationService.d.ts +1 -1
  4. package/dist/{authz → authorization/config}/AuthConfigurationService.js +12 -15
  5. package/dist/authorization/config/AuthConfigurationService.js.map +1 -0
  6. package/dist/authorization/config/AuthConfigurationVariables.js +6 -0
  7. package/dist/authorization/config/AuthConfigurationVariables.js.map +1 -0
  8. package/dist/{authz → authorization/guards}/ApiKeyAuthGuard.js +5 -8
  9. package/dist/authorization/guards/ApiKeyAuthGuard.js.map +1 -0
  10. package/dist/{authz → authorization/guards}/ClaimsAuthorisationGuard.js +6 -9
  11. package/dist/authorization/guards/ClaimsAuthorisationGuard.js.map +1 -0
  12. package/dist/{authz → authorization/guards}/DefaultAuthGuard.js +5 -8
  13. package/dist/authorization/guards/DefaultAuthGuard.js.map +1 -0
  14. package/dist/authorization/guards/MandatoryUserClaims.decorator.js +4 -0
  15. package/dist/authorization/guards/MandatoryUserClaims.decorator.js.map +1 -0
  16. package/dist/{authz → authorization}/isOwnerOrThrow.js +3 -7
  17. package/dist/authorization/isOwnerOrThrow.js.map +1 -0
  18. package/dist/authorization/models/AccessToken.js +2 -0
  19. package/dist/authorization/models/AccessToken.js.map +1 -0
  20. package/dist/{authz → authorization/models}/RequestWithUser.d.ts +1 -1
  21. package/dist/authorization/models/RequestWithUser.js +2 -0
  22. package/dist/authorization/models/RequestWithUser.js.map +1 -0
  23. package/dist/authorization/models/SuperUserClaims.js +6 -0
  24. package/dist/authorization/models/SuperUserClaims.js.map +1 -0
  25. package/dist/{authz → authorization/services}/UserValidation.service.d.ts +6 -8
  26. package/dist/{authz → authorization/services}/UserValidation.service.js +67 -52
  27. package/dist/authorization/services/UserValidation.service.js.map +1 -0
  28. package/dist/{authz → authorization/strategies}/apikeystrategy.d.ts +2 -2
  29. package/dist/{authz → authorization/strategies}/apikeystrategy.js +8 -11
  30. package/dist/authorization/strategies/apikeystrategy.js.map +1 -0
  31. package/dist/{authz → authorization/strategies}/authzstrategy.d.ts +4 -4
  32. package/dist/{authz → authorization/strategies}/authzstrategy.js +15 -18
  33. package/dist/authorization/strategies/authzstrategy.js.map +1 -0
  34. package/dist/authzclient/AuthClientConfigurationService.d.ts +1 -1
  35. package/dist/authzclient/AuthClientConfigurationService.js +10 -13
  36. package/dist/authzclient/AuthClientConfigurationService.js.map +1 -1
  37. package/dist/authzclient/AuthClientConfigurationVariables.js +2 -4
  38. package/dist/authzclient/AuthClientConfigurationVariables.js.map +1 -1
  39. package/dist/authzclient/AuthzClientProvider.d.ts +3 -3
  40. package/dist/authzclient/AuthzClientProvider.js +6 -8
  41. package/dist/authzclient/AuthzClientProvider.js.map +1 -1
  42. package/dist/authzclient/UserProfile.dto.js +1 -5
  43. package/dist/authzclient/UserProfile.dto.js.map +1 -1
  44. package/dist/authzclient/authz-client.module.js +13 -19
  45. package/dist/authzclient/authz-client.module.js.map +1 -1
  46. package/dist/authzclient/authz.service.d.ts +2 -2
  47. package/dist/authzclient/authz.service.js +6 -10
  48. package/dist/authzclient/authz.service.js.map +1 -1
  49. package/dist/cli/cli.js +4 -29
  50. package/dist/cli/cli.js.map +1 -1
  51. package/dist/cli/commands/WriteApiClientCommand.js +6 -13
  52. package/dist/cli/commands/WriteApiClientCommand.js.map +1 -1
  53. package/dist/configuration/ValidatedConfigurationService.js +5 -8
  54. package/dist/configuration/ValidatedConfigurationService.js.map +1 -1
  55. package/dist/core-config/CoreConfig.module.js +9 -15
  56. package/dist/core-config/CoreConfig.module.js.map +1 -1
  57. package/dist/core-config/CoreConfigurationService.d.ts +2 -1
  58. package/dist/core-config/CoreConfigurationService.js +33 -27
  59. package/dist/core-config/CoreConfigurationService.js.map +1 -1
  60. package/dist/core-config/CoreConfigurationVariables.d.ts +2 -0
  61. package/dist/core-config/CoreConfigurationVariables.js +3 -4
  62. package/dist/core-config/CoreConfigurationVariables.js.map +1 -1
  63. package/dist/database-postgres/PostgresDatabase.module.js +11 -14
  64. package/dist/database-postgres/PostgresDatabase.module.js.map +1 -1
  65. package/dist/database-postgres/PostgresDatabaseConfigurationService.js +5 -8
  66. package/dist/database-postgres/PostgresDatabaseConfigurationService.js.map +1 -1
  67. package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js +7 -13
  68. package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js.map +1 -1
  69. package/dist/database-postgres/PostrgresMigrationsHelper.js +6 -11
  70. package/dist/database-postgres/PostrgresMigrationsHelper.js.map +1 -1
  71. package/dist/database-sqlite/SqliteDatabase.module.js +11 -14
  72. package/dist/database-sqlite/SqliteDatabase.module.js.map +1 -1
  73. package/dist/database-sqlite/SqliteDatabaseConfigurationService.js +5 -8
  74. package/dist/database-sqlite/SqliteDatabaseConfigurationService.js.map +1 -1
  75. package/dist/database-sqlite/SqliteMigrationsHelper.js +6 -11
  76. package/dist/database-sqlite/SqliteMigrationsHelper.js.map +1 -1
  77. package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js +8 -14
  78. package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js.map +1 -1
  79. package/dist/health/Health.controller.js +15 -18
  80. package/dist/health/Health.controller.js.map +1 -1
  81. package/dist/health/Health.module.js +8 -11
  82. package/dist/health/Health.module.js.map +1 -1
  83. package/dist/index.d.ts +48 -24
  84. package/dist/index.js +54 -58
  85. package/dist/index.js.map +1 -1
  86. package/dist/invitations/InvitationConfigurationService.d.ts +1 -1
  87. package/dist/invitations/InvitationConfigurationService.js +10 -13
  88. package/dist/invitations/InvitationConfigurationService.js.map +1 -1
  89. package/dist/invitations/InvitationConfigurationVariables.js +2 -4
  90. package/dist/invitations/InvitationConfigurationVariables.js.map +1 -1
  91. package/dist/invitations/dto/create-invitation.dto.js +5 -9
  92. package/dist/invitations/dto/create-invitation.dto.js.map +1 -1
  93. package/dist/invitations/entities/invitation.entity.d.ts +3 -2
  94. package/dist/invitations/entities/invitation.entity.js +33 -36
  95. package/dist/invitations/entities/invitation.entity.js.map +1 -1
  96. package/dist/invitations/invitation.controller.d.ts +4 -4
  97. package/dist/invitations/invitation.controller.js +21 -24
  98. package/dist/invitations/invitation.controller.js.map +1 -1
  99. package/dist/invitations/invitation.module.js +21 -27
  100. package/dist/invitations/invitation.module.js.map +1 -1
  101. package/dist/invitations/invitation.service.d.ts +7 -7
  102. package/dist/invitations/invitation.service.js +34 -37
  103. package/dist/invitations/invitation.service.js.map +1 -1
  104. package/dist/logger/LoggingConfigurationService.d.ts +1 -1
  105. package/dist/logger/LoggingConfigurationService.js +16 -19
  106. package/dist/logger/LoggingConfigurationService.js.map +1 -1
  107. package/dist/logger/LoggingConfigurationVariables.js +2 -4
  108. package/dist/logger/LoggingConfigurationVariables.js.map +1 -1
  109. package/dist/logger/logger.module.js +10 -16
  110. package/dist/logger/logger.module.js.map +1 -1
  111. package/dist/organisation/dto/RolesEnum.js +2 -5
  112. package/dist/organisation/dto/RolesEnum.js.map +1 -1
  113. package/dist/organisation/dto/create-organisation.dto.d.ts +1 -1
  114. package/dist/organisation/dto/create-organisation.dto.js +7 -11
  115. package/dist/organisation/dto/create-organisation.dto.js.map +1 -1
  116. package/dist/organisation/dto/update-organisation.dto.d.ts +1 -1
  117. package/dist/organisation/dto/update-organisation.dto.js +3 -7
  118. package/dist/organisation/dto/update-organisation.dto.js.map +1 -1
  119. package/dist/organisation/entities/member-role.entity.d.ts +3 -2
  120. package/dist/organisation/entities/member-role.entity.js +20 -23
  121. package/dist/organisation/entities/member-role.entity.js.map +1 -1
  122. package/dist/organisation/entities/organisation.entity.d.ts +2 -2
  123. package/dist/organisation/entities/organisation.entity.js +28 -31
  124. package/dist/organisation/entities/organisation.entity.js.map +1 -1
  125. package/dist/organisation/organisation.controller.d.ts +5 -5
  126. package/dist/organisation/organisation.controller.js +30 -33
  127. package/dist/organisation/organisation.controller.js.map +1 -1
  128. package/dist/organisation/organisation.module.js +18 -21
  129. package/dist/organisation/organisation.module.js.map +1 -1
  130. package/dist/organisation/organisation.service.d.ts +3 -3
  131. package/dist/organisation/organisation.service.js +21 -24
  132. package/dist/organisation/organisation.service.js.map +1 -1
  133. package/dist/organisation-memberships/dtos/create-membership-dto.js +4 -8
  134. package/dist/organisation-memberships/dtos/create-membership-dto.js.map +1 -1
  135. package/dist/organisation-memberships/entities/organisation-membership.entity.d.ts +4 -4
  136. package/dist/organisation-memberships/entities/organisation-membership.entity.js +40 -43
  137. package/dist/organisation-memberships/entities/organisation-membership.entity.js.map +1 -1
  138. package/dist/organisation-memberships/organisation-memberships.controller.d.ts +6 -6
  139. package/dist/organisation-memberships/organisation-memberships.controller.js +29 -32
  140. package/dist/organisation-memberships/organisation-memberships.controller.js.map +1 -1
  141. package/dist/organisation-memberships/organisation-memberships.module.js +16 -19
  142. package/dist/organisation-memberships/organisation-memberships.module.js.map +1 -1
  143. package/dist/organisation-memberships/organisation-memberships.service.d.ts +3 -3
  144. package/dist/organisation-memberships/organisation-memberships.service.js +20 -23
  145. package/dist/organisation-memberships/organisation-memberships.service.js.map +1 -1
  146. package/dist/organisation-subscriptions/all-subscriptions.controller.d.ts +2 -2
  147. package/dist/organisation-subscriptions/all-subscriptions.controller.js +16 -17
  148. package/dist/organisation-subscriptions/all-subscriptions.controller.js.map +1 -1
  149. package/dist/organisation-subscriptions/entities/organisation-subscription.entity.d.ts +3 -2
  150. package/dist/organisation-subscriptions/entities/organisation-subscription.entity.js +40 -43
  151. package/dist/organisation-subscriptions/entities/organisation-subscription.entity.js.map +1 -1
  152. package/dist/organisation-subscriptions/models/fulfillSubscriptionDto.js +25 -29
  153. package/dist/organisation-subscriptions/models/fulfillSubscriptionDto.js.map +1 -1
  154. package/dist/organisation-subscriptions/organisation-subscriptions.controller.d.ts +5 -5
  155. package/dist/organisation-subscriptions/organisation-subscriptions.controller.js +27 -31
  156. package/dist/organisation-subscriptions/organisation-subscriptions.controller.js.map +1 -1
  157. package/dist/organisation-subscriptions/organisation-subscriptions.module.js +18 -21
  158. package/dist/organisation-subscriptions/organisation-subscriptions.module.js.map +1 -1
  159. package/dist/organisation-subscriptions/organisation-subscriptions.service.d.ts +4 -4
  160. package/dist/organisation-subscriptions/organisation-subscriptions.service.js +21 -24
  161. package/dist/organisation-subscriptions/organisation-subscriptions.service.js.map +1 -1
  162. package/dist/payment-sessions/payment-session.controller.d.ts +3 -3
  163. package/dist/payment-sessions/payment-session.controller.js +17 -18
  164. package/dist/payment-sessions/payment-session.controller.js.map +1 -1
  165. package/dist/payment-sessions/payment-session.entity.js +14 -17
  166. package/dist/payment-sessions/payment-session.entity.js.map +1 -1
  167. package/dist/payment-sessions/payment-session.module.js +11 -14
  168. package/dist/payment-sessions/payment-session.module.js.map +1 -1
  169. package/dist/payment-sessions/payment-session.service.d.ts +1 -1
  170. package/dist/payment-sessions/payment-session.service.js +8 -11
  171. package/dist/payment-sessions/payment-session.service.js.map +1 -1
  172. package/dist/root-app/SwaggerGen.d.ts +1 -1
  173. package/dist/root-app/SwaggerGen.js +14 -20
  174. package/dist/root-app/SwaggerGen.js.map +1 -1
  175. package/dist/root-app/app.controller.d.ts +2 -2
  176. package/dist/root-app/app.controller.js +16 -19
  177. package/dist/root-app/app.controller.js.map +1 -1
  178. package/dist/root-app/app.service.js +3 -6
  179. package/dist/root-app/app.service.js.map +1 -1
  180. package/dist/root-app/core-app.module.js +51 -45
  181. package/dist/root-app/core-app.module.js.map +1 -1
  182. package/dist/root-app/models/QueueItemDto.js +7 -11
  183. package/dist/root-app/models/QueueItemDto.js.map +1 -1
  184. package/dist/root-app/models/boolean-result.js +3 -7
  185. package/dist/root-app/models/boolean-result.js.map +1 -1
  186. package/dist/root-app/notfound.interceptor.js +6 -9
  187. package/dist/root-app/notfound.interceptor.js.map +1 -1
  188. package/dist/runningCommandLine/CliCommandService.js +7 -13
  189. package/dist/runningCommandLine/CliCommandService.js.map +1 -1
  190. package/dist/runningCommandLine/RunningCommandLine.module.js +7 -10
  191. package/dist/runningCommandLine/RunningCommandLine.module.js.map +1 -1
  192. package/dist/smtp-email-client/EmailConfigurationService.d.ts +1 -1
  193. package/dist/smtp-email-client/EmailConfigurationService.js +24 -27
  194. package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
  195. package/dist/smtp-email-client/EmailConfigurationVariables.js +2 -4
  196. package/dist/smtp-email-client/EmailConfigurationVariables.js.map +1 -1
  197. package/dist/smtp-email-client/EmailTransporterProvider.d.ts +1 -1
  198. package/dist/smtp-email-client/EmailTransporterProvider.js +5 -8
  199. package/dist/smtp-email-client/EmailTransporterProvider.js.map +1 -1
  200. package/dist/smtp-email-client/email-client.service.d.ts +2 -2
  201. package/dist/smtp-email-client/email-client.service.js +13 -16
  202. package/dist/smtp-email-client/email-client.service.js.map +1 -1
  203. package/dist/smtp-email-client/email.controller.d.ts +3 -3
  204. package/dist/smtp-email-client/email.controller.js +24 -25
  205. package/dist/smtp-email-client/email.controller.js.map +1 -1
  206. package/dist/smtp-email-client/email.entity.js +32 -35
  207. package/dist/smtp-email-client/email.entity.js.map +1 -1
  208. package/dist/smtp-email-client/smtp-email-client.module.js +22 -28
  209. package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
  210. package/dist/smtp-email-client/smtp-email-handler.d.ts +2 -2
  211. package/dist/smtp-email-client/smtp-email-handler.js +18 -21
  212. package/dist/smtp-email-client/smtp-email-handler.js.map +1 -1
  213. package/dist/stripe-client/StripeClientConfigurationService.d.ts +1 -1
  214. package/dist/stripe-client/StripeClientConfigurationService.js +14 -17
  215. package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
  216. package/dist/stripe-client/StripeClientProvider.d.ts +1 -1
  217. package/dist/stripe-client/StripeClientProvider.js +5 -11
  218. package/dist/stripe-client/StripeClientProvider.js.map +1 -1
  219. package/dist/stripe-client/StripeConfigurationVariables.js +2 -4
  220. package/dist/stripe-client/StripeConfigurationVariables.js.map +1 -1
  221. package/dist/stripe-client/controllers/stripe-checkout-controller.d.ts +4 -4
  222. package/dist/stripe-client/controllers/stripe-checkout-controller.js +17 -20
  223. package/dist/stripe-client/controllers/stripe-checkout-controller.js.map +1 -1
  224. package/dist/stripe-client/controllers/stripe-customer-portal-controller.d.ts +4 -4
  225. package/dist/stripe-client/controllers/stripe-customer-portal-controller.js +18 -21
  226. package/dist/stripe-client/controllers/stripe-customer-portal-controller.js.map +1 -1
  227. package/dist/stripe-client/controllers/stripe-events-controller.d.ts +3 -3
  228. package/dist/stripe-client/controllers/stripe-events-controller.js +20 -21
  229. package/dist/stripe-client/controllers/stripe-events-controller.js.map +1 -1
  230. package/dist/stripe-client/controllers/stripe-unauthenticated-checkout-controller.d.ts +3 -3
  231. package/dist/stripe-client/controllers/stripe-unauthenticated-checkout-controller.js +13 -16
  232. package/dist/stripe-client/controllers/stripe-unauthenticated-checkout-controller.js.map +1 -1
  233. package/dist/stripe-client/controllers/stripe-webhook-controller.d.ts +2 -2
  234. package/dist/stripe-client/controllers/stripe-webhook-controller.js +27 -28
  235. package/dist/stripe-client/controllers/stripe-webhook-controller.js.map +1 -1
  236. package/dist/stripe-client/entities/stripe-checkout-event.entity.js +19 -22
  237. package/dist/stripe-client/entities/stripe-checkout-event.entity.js.map +1 -1
  238. package/dist/stripe-client/models/StripeCheckoutLineItem.js +7 -11
  239. package/dist/stripe-client/models/StripeCheckoutLineItem.js.map +1 -1
  240. package/dist/stripe-client/models/StripeCheckoutSessionRequestDto.d.ts +1 -1
  241. package/dist/stripe-client/models/StripeCheckoutSessionRequestDto.js +17 -21
  242. package/dist/stripe-client/models/StripeCheckoutSessionRequestDto.js.map +1 -1
  243. package/dist/stripe-client/models/StripeCheckoutSessionResponseDto.js +4 -8
  244. package/dist/stripe-client/models/StripeCheckoutSessionResponseDto.js.map +1 -1
  245. package/dist/stripe-client/models/StripeCustomerPortalRequestDto.js +9 -13
  246. package/dist/stripe-client/models/StripeCustomerPortalRequestDto.js.map +1 -1
  247. package/dist/stripe-client/models/StripeCustomerPortalResponseDto.js +3 -7
  248. package/dist/stripe-client/models/StripeCustomerPortalResponseDto.js.map +1 -1
  249. package/dist/stripe-client/models/UrlResponseDto.js +1 -5
  250. package/dist/stripe-client/models/UrlResponseDto.js.map +1 -1
  251. package/dist/stripe-client/services/queued-payment-event.handler.d.ts +3 -3
  252. package/dist/stripe-client/services/queued-payment-event.handler.js +22 -28
  253. package/dist/stripe-client/services/queued-payment-event.handler.js.map +1 -1
  254. package/dist/stripe-client/services/stripe-checkout.service.d.ts +9 -9
  255. package/dist/stripe-client/services/stripe-checkout.service.js +20 -26
  256. package/dist/stripe-client/services/stripe-checkout.service.js.map +1 -1
  257. package/dist/stripe-client/services/stripe-webhook-handler.service.d.ts +1 -1
  258. package/dist/stripe-client/services/stripe-webhook-handler.service.js +12 -18
  259. package/dist/stripe-client/services/stripe-webhook-handler.service.js.map +1 -1
  260. package/dist/stripe-client/stripe-account.module.js +37 -43
  261. package/dist/stripe-client/stripe-account.module.js.map +1 -1
  262. package/dist/testing/preRun.js +1 -3
  263. package/dist/testing/preRun.js.map +1 -1
  264. package/dist/twitter-client/TwitterClientConfigurationService.d.ts +1 -1
  265. package/dist/twitter-client/TwitterClientConfigurationService.js +16 -19
  266. package/dist/twitter-client/TwitterClientConfigurationService.js.map +1 -1
  267. package/dist/twitter-client/TwitterClientProvider.d.ts +2 -2
  268. package/dist/twitter-client/TwitterClientProvider.js +5 -8
  269. package/dist/twitter-client/TwitterClientProvider.js.map +1 -1
  270. package/dist/twitter-client/TwitterConfigurationVariables.js +2 -4
  271. package/dist/twitter-client/TwitterConfigurationVariables.js.map +1 -1
  272. package/dist/twitter-client/services/twitter-client.service.d.ts +1 -1
  273. package/dist/twitter-client/services/twitter-client.service.js +6 -10
  274. package/dist/twitter-client/services/twitter-client.service.js.map +1 -1
  275. package/dist/twitter-client/twitter-account.module.js +14 -20
  276. package/dist/twitter-client/twitter-account.module.js.map +1 -1
  277. package/dist/user-api-key/CreateApiKeyDto.js +6 -9
  278. package/dist/user-api-key/CreateApiKeyDto.js.map +1 -1
  279. package/dist/user-api-key/user-apikey.controller.d.ts +5 -5
  280. package/dist/user-api-key/user-apikey.controller.js +30 -35
  281. package/dist/user-api-key/user-apikey.controller.js.map +1 -1
  282. package/dist/user-api-key/user-apikey.module.js +11 -14
  283. package/dist/user-api-key/user-apikey.module.js.map +1 -1
  284. package/dist/user-api-key/user-apikey.service.d.ts +1 -1
  285. package/dist/user-api-key/user-apikey.service.js +14 -17
  286. package/dist/user-api-key/user-apikey.service.js.map +1 -1
  287. package/dist/user-api-key/userApiKey.entity.d.ts +3 -2
  288. package/dist/user-api-key/userApiKey.entity.js +22 -25
  289. package/dist/user-api-key/userApiKey.entity.js.map +1 -1
  290. package/dist/user-internal/dto/create-user.dto.js +1 -5
  291. package/dist/user-internal/dto/create-user.dto.js.map +1 -1
  292. package/dist/user-internal/dto/update-user.dto.d.ts +1 -1
  293. package/dist/user-internal/dto/update-user.dto.js +3 -7
  294. package/dist/user-internal/dto/update-user.dto.js.map +1 -1
  295. package/dist/user-internal/dto/userResponseDto.d.ts +1 -1
  296. package/dist/user-internal/dto/userResponseDto.js +21 -25
  297. package/dist/user-internal/dto/userResponseDto.js.map +1 -1
  298. package/dist/user-internal/entities/user.entity.d.ts +2 -2
  299. package/dist/user-internal/entities/user.entity.js +47 -50
  300. package/dist/user-internal/entities/user.entity.js.map +1 -1
  301. package/dist/user-internal/user-internal.module.js +11 -12
  302. package/dist/user-internal/user-internal.module.js.map +1 -1
  303. package/dist/{user-external → user-internal}/user.controller.d.ts +6 -6
  304. package/dist/{user-external → user-internal}/user.controller.js +38 -38
  305. package/dist/user-internal/user.controller.js.map +1 -0
  306. package/dist/user-internal/user.service.d.ts +3 -3
  307. package/dist/user-internal/user.service.js +12 -15
  308. package/dist/user-internal/user.service.js.map +1 -1
  309. package/package.json +8 -2
  310. package/dist/authz/AccessToken.js +0 -3
  311. package/dist/authz/AccessToken.js.map +0 -1
  312. package/dist/authz/ApiKeyAuthGuard.js.map +0 -1
  313. package/dist/authz/AuthConfigurationService.js.map +0 -1
  314. package/dist/authz/AuthConfigurationVariables.js +0 -8
  315. package/dist/authz/AuthConfigurationVariables.js.map +0 -1
  316. package/dist/authz/ClaimsAuthorisationGuard.js.map +0 -1
  317. package/dist/authz/DefaultAuthGuard.js.map +0 -1
  318. package/dist/authz/MandatoryUserClaims.decorator.js +0 -8
  319. package/dist/authz/MandatoryUserClaims.decorator.js.map +0 -1
  320. package/dist/authz/RequestWithUser.js +0 -3
  321. package/dist/authz/RequestWithUser.js.map +0 -1
  322. package/dist/authz/SuperUserClaims.js +0 -9
  323. package/dist/authz/SuperUserClaims.js.map +0 -1
  324. package/dist/authz/UserValidation.service.js.map +0 -1
  325. package/dist/authz/apikeystrategy.js.map +0 -1
  326. package/dist/authz/authz.module.js +0 -48
  327. package/dist/authz/authz.module.js.map +0 -1
  328. package/dist/authz/authzstrategy.js.map +0 -1
  329. package/dist/authz/index.d.ts +0 -10
  330. package/dist/authz/index.js +0 -22
  331. package/dist/authz/index.js.map +0 -1
  332. package/dist/authz/isOwnerOrThrow.js.map +0 -1
  333. package/dist/invitations/index.d.ts +0 -4
  334. package/dist/invitations/index.js +0 -12
  335. package/dist/invitations/index.js.map +0 -1
  336. package/dist/organisation/index.d.ts +0 -1
  337. package/dist/organisation/index.js +0 -6
  338. package/dist/organisation/index.js.map +0 -1
  339. package/dist/organisation-memberships/index.d.ts +0 -2
  340. package/dist/organisation-memberships/index.js +0 -8
  341. package/dist/organisation-memberships/index.js.map +0 -1
  342. package/dist/organisation-subscriptions/index.d.ts +0 -3
  343. package/dist/organisation-subscriptions/index.js +0 -10
  344. package/dist/organisation-subscriptions/index.js.map +0 -1
  345. package/dist/stripe-client/index.d.ts +0 -7
  346. package/dist/stripe-client/index.js +0 -18
  347. package/dist/stripe-client/index.js.map +0 -1
  348. package/dist/user-api-key/index.d.ts +0 -3
  349. package/dist/user-api-key/index.js +0 -10
  350. package/dist/user-api-key/index.js.map +0 -1
  351. package/dist/user-external/index.d.ts +0 -1
  352. package/dist/user-external/index.js +0 -6
  353. package/dist/user-external/index.js.map +0 -1
  354. package/dist/user-external/user-external.module.d.ts +0 -2
  355. package/dist/user-external/user-external.module.js +0 -22
  356. package/dist/user-external/user-external.module.js.map +0 -1
  357. package/dist/user-external/user.controller.js.map +0 -1
  358. package/dist/user-internal/index.d.ts +0 -2
  359. package/dist/user-internal/index.js +0 -8
  360. package/dist/user-internal/index.js.map +0 -1
  361. /package/dist/{authz → authorization}/authz.module.d.ts +0 -0
  362. /package/dist/{authz → authorization/config}/AuthConfigurationVariables.d.ts +0 -0
  363. /package/dist/{authz → authorization/guards}/ApiKeyAuthGuard.d.ts +0 -0
  364. /package/dist/{authz → authorization/guards}/ClaimsAuthorisationGuard.d.ts +0 -0
  365. /package/dist/{authz → authorization/guards}/DefaultAuthGuard.d.ts +0 -0
  366. /package/dist/{authz → authorization/guards}/MandatoryUserClaims.decorator.d.ts +0 -0
  367. /package/dist/{authz → authorization}/isOwnerOrThrow.d.ts +0 -0
  368. /package/dist/{authz → authorization/models}/AccessToken.d.ts +0 -0
  369. /package/dist/{authz → authorization/models}/SuperUserClaims.d.ts +0 -0
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,11 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.MembershipRole = void 0;
13
- const swagger_1 = require("@nestjs/swagger");
14
- const typeorm_1 = require("typeorm");
15
- const organisation_membership_entity_1 = require("../../organisation-memberships/entities/organisation-membership.entity");
10
+ import { ApiProperty } from "@nestjs/swagger";
11
+ import { Column, CreateDateColumn, DeleteDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn, } from "typeorm";
12
+ import { OrganisationMembership } from "../../organisation-memberships/entities/organisation-membership.entity.js";
16
13
  let MembershipRole = class MembershipRole {
17
14
  id;
18
15
  // we don't expose this because the roles are exposed on the membership
@@ -24,42 +21,42 @@ let MembershipRole = class MembershipRole {
24
21
  deletedDate;
25
22
  };
26
23
  __decorate([
27
- (0, typeorm_1.PrimaryGeneratedColumn)(),
28
- (0, swagger_1.ApiProperty)(),
24
+ PrimaryGeneratedColumn(),
25
+ ApiProperty(),
29
26
  __metadata("design:type", Number)
30
27
  ], MembershipRole.prototype, "id", void 0);
31
28
  __decorate([
32
- (0, typeorm_1.ManyToOne)(() => organisation_membership_entity_1.OrganisationMembership, (membership) => membership.roles),
33
- __metadata("design:type", organisation_membership_entity_1.OrganisationMembership)
29
+ ManyToOne(() => OrganisationMembership, (membership) => membership.roles),
30
+ __metadata("design:type", Object)
34
31
  ], MembershipRole.prototype, "membership", void 0);
35
32
  __decorate([
36
- (0, swagger_1.ApiProperty)(),
37
- (0, typeorm_1.Column)(),
38
- (0, typeorm_1.RelationId)((mr) => mr.membership),
33
+ ApiProperty(),
34
+ Column(),
35
+ RelationId((mr) => mr.membership),
39
36
  __metadata("design:type", Number)
40
37
  ], MembershipRole.prototype, "membershipId", void 0);
41
38
  __decorate([
42
- (0, swagger_1.ApiProperty)(),
43
- (0, typeorm_1.Column)(),
39
+ ApiProperty(),
40
+ Column(),
44
41
  __metadata("design:type", String)
45
42
  ], MembershipRole.prototype, "name", void 0);
46
43
  __decorate([
47
- (0, typeorm_1.CreateDateColumn)(),
48
- (0, swagger_1.ApiProperty)(),
44
+ CreateDateColumn(),
45
+ ApiProperty(),
49
46
  __metadata("design:type", Date)
50
47
  ], MembershipRole.prototype, "createdDate", void 0);
51
48
  __decorate([
52
- (0, typeorm_1.UpdateDateColumn)(),
53
- (0, swagger_1.ApiProperty)(),
49
+ UpdateDateColumn(),
50
+ ApiProperty(),
54
51
  __metadata("design:type", Date)
55
52
  ], MembershipRole.prototype, "updateDate", void 0);
56
53
  __decorate([
57
- (0, typeorm_1.DeleteDateColumn)(),
58
- (0, swagger_1.ApiProperty)(),
54
+ DeleteDateColumn(),
55
+ ApiProperty(),
59
56
  __metadata("design:type", Date)
60
57
  ], MembershipRole.prototype, "deletedDate", void 0);
61
58
  MembershipRole = __decorate([
62
- (0, typeorm_1.Entity)()
59
+ Entity()
63
60
  ], MembershipRole);
64
- exports.MembershipRole = MembershipRole;
61
+ export { MembershipRole };
65
62
  //# sourceMappingURL=member-role.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"member-role.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/member-role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCASiB;AACjB,2HAA8G;AAGvG,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,EAAE,CAAU;IAEZ,uEAAuE;IAEvE,UAAU,CAA0B;IAK7B,YAAY,CAAU;IAI7B,IAAI,CAAU;IAId,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;CACtB,CAAA;AA5BG;IAAC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,GAAE;;0CACF;AAGZ;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uDAAsB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;8BAC7D,uDAAsB;kDAAC;AAEpC;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAU,EAAC,CAAC,EAAkB,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC;;oDACrB;AAE7B;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gBAAM,GAAE;;4CACK;AAEd;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;mDAAC;AAEnB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACD,IAAI;kDAAC;AAElB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;mDAAC;AA5BV,cAAc;IAD1B,IAAA,gBAAM,GAAE;GACI,cAAc,CA6B1B;AA7BY,wCAAc"}
1
+ {"version":3,"file":"member-role.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/member-role.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EACH,MAAM,EACN,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,sBAAsB,EAEtB,UAAU,EACV,gBAAgB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,sBAAsB,EAAC,MAAM,2EAA2E,CAAC;AAG1G,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,EAAE,CAAU;IAEZ,uEAAuE;IAEvE,UAAU,CAAoC;IAKvC,YAAY,CAAU;IAI7B,IAAI,CAAU;IAId,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;CACtB,CAAA;AA5BG;IAAC,sBAAsB,EAAE;IACxB,WAAW,EAAE;;0CACF;AAGZ;IAAC,SAAS,CAAC,GAAG,EAAE,CAAC,sBAAsB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;;kDAC5B;AAE9C;IAAC,WAAW,EAAE;IACb,MAAM,EAAE;IACR,UAAU,CAAC,CAAC,EAAkB,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC;;oDACrB;AAE7B;IAAC,WAAW,EAAE;IACb,MAAM,EAAE;;4CACK;AAEd;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACA,IAAI;mDAAC;AAEnB;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACD,IAAI;kDAAC;AAElB;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACA,IAAI;mDAAC;AA5BV,cAAc;IAD1B,MAAM,EAAE;GACI,cAAc,CA6B1B;SA7BY,cAAc"}
@@ -1,5 +1,5 @@
1
- import { OrganisationMembership } from "../../organisation-memberships/entities/organisation-membership.entity";
2
- import { OrganisationSubscriptionRecord } from "../../organisation-subscriptions/entities/organisation-subscription.entity";
1
+ import { OrganisationMembership } from "../../organisation-memberships/entities/organisation-membership.entity.js";
2
+ import { OrganisationSubscriptionRecord } from "../../organisation-subscriptions/entities/organisation-subscription.entity.js";
3
3
  export declare class Organisation {
4
4
  id: number;
5
5
  uuid: string;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,13 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Organisation = void 0;
13
- const swagger_1 = require("@nestjs/swagger");
14
- const class_transformer_1 = require("class-transformer");
15
- const typeorm_1 = require("typeorm");
16
- const organisation_membership_entity_1 = require("../../organisation-memberships/entities/organisation-membership.entity");
17
- const organisation_subscription_entity_1 = require("../../organisation-subscriptions/entities/organisation-subscription.entity");
10
+ import { ApiProperty } from "@nestjs/swagger";
11
+ import { Type } from "class-transformer";
12
+ import { AfterInsert, AfterLoad, AfterUpdate, Column, CreateDateColumn, DeleteDateColumn, Entity, Generated, Index, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
13
+ import { OrganisationMembership } from "../../organisation-memberships/entities/organisation-membership.entity.js";
14
+ import { OrganisationSubscriptionRecord } from "../../organisation-subscriptions/entities/organisation-subscription.entity.js";
18
15
  let Organisation = class Organisation {
19
16
  id;
20
17
  uuid;
@@ -32,64 +29,64 @@ let Organisation = class Organisation {
32
29
  }
33
30
  };
34
31
  __decorate([
35
- (0, typeorm_1.PrimaryGeneratedColumn)(),
36
- (0, swagger_1.ApiProperty)(),
32
+ PrimaryGeneratedColumn(),
33
+ ApiProperty(),
37
34
  __metadata("design:type", Number)
38
35
  ], Organisation.prototype, "id", void 0);
39
36
  __decorate([
40
- (0, typeorm_1.Column)("uuid", {
37
+ Column("uuid", {
41
38
  name: "uuid",
42
39
  default: () => "uuid_generate_v4()",
43
40
  }),
44
- (0, typeorm_1.Generated)("uuid"),
45
- (0, swagger_1.ApiProperty)(),
46
- (0, typeorm_1.Index)(),
41
+ Generated("uuid"),
42
+ ApiProperty(),
43
+ Index(),
47
44
  __metadata("design:type", String)
48
45
  ], Organisation.prototype, "uuid", void 0);
49
46
  __decorate([
50
- (0, typeorm_1.OneToMany)(() => organisation_membership_entity_1.OrganisationMembership, (om) => om.organisation, {
47
+ OneToMany(() => OrganisationMembership, (om) => om.organisation, {
51
48
  cascade: ["insert", "update"],
52
49
  }),
53
- (0, class_transformer_1.Type)(() => organisation_membership_entity_1.OrganisationMembership),
50
+ Type(() => OrganisationMembership),
54
51
  __metadata("design:type", Array)
55
52
  ], Organisation.prototype, "memberships", void 0);
56
53
  __decorate([
57
- (0, typeorm_1.OneToMany)(() => organisation_subscription_entity_1.OrganisationSubscriptionRecord, (osr) => osr.organisation, {
54
+ OneToMany(() => OrganisationSubscriptionRecord, (osr) => osr.organisation, {
58
55
  cascade: ["insert", "update"],
59
56
  }),
60
- (0, class_transformer_1.Type)(() => organisation_subscription_entity_1.OrganisationSubscriptionRecord),
57
+ Type(() => OrganisationSubscriptionRecord),
61
58
  __metadata("design:type", Array)
62
59
  ], Organisation.prototype, "subscriptionRecords", void 0);
63
60
  __decorate([
64
- (0, typeorm_1.Column)(),
65
- (0, swagger_1.ApiProperty)(),
61
+ Column(),
62
+ ApiProperty(),
66
63
  __metadata("design:type", String)
67
64
  ], Organisation.prototype, "name", void 0);
68
65
  __decorate([
69
- (0, typeorm_1.CreateDateColumn)(),
70
- (0, swagger_1.ApiProperty)(),
66
+ CreateDateColumn(),
67
+ ApiProperty(),
71
68
  __metadata("design:type", Date)
72
69
  ], Organisation.prototype, "createdDate", void 0);
73
70
  __decorate([
74
- (0, typeorm_1.UpdateDateColumn)(),
75
- (0, swagger_1.ApiProperty)(),
71
+ UpdateDateColumn(),
72
+ ApiProperty(),
76
73
  __metadata("design:type", Date)
77
74
  ], Organisation.prototype, "updateDate", void 0);
78
75
  __decorate([
79
- (0, typeorm_1.DeleteDateColumn)(),
80
- (0, swagger_1.ApiProperty)(),
76
+ DeleteDateColumn(),
77
+ ApiProperty(),
81
78
  __metadata("design:type", Date)
82
79
  ], Organisation.prototype, "deletedDate", void 0);
83
80
  __decorate([
84
- (0, typeorm_1.AfterLoad)(),
85
- (0, typeorm_1.AfterInsert)(),
86
- (0, typeorm_1.AfterUpdate)(),
81
+ AfterLoad(),
82
+ AfterInsert(),
83
+ AfterUpdate(),
87
84
  __metadata("design:type", Function),
88
85
  __metadata("design:paramtypes", []),
89
86
  __metadata("design:returntype", Promise)
90
87
  ], Organisation.prototype, "nullChecks", null);
91
88
  Organisation = __decorate([
92
- (0, typeorm_1.Entity)()
89
+ Entity()
93
90
  ], Organisation);
94
- exports.Organisation = Organisation;
91
+ export { Organisation };
95
92
  //# sourceMappingURL=organisation.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"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vD;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;0CACA;AAEd;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;iDAAC;AAEnB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACD,IAAI;gDAAC;AAElB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,GAAE;8BACA,IAAI;iDAAC;AAMb;IAHL,IAAA,mBAAS,GAAE;IACX,IAAA,qBAAW,GAAE;IACb,IAAA,qBAAW,GAAE;;;;8CAKb;AAtDQ,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAuDxB;AAvDY,oCAAY"}
1
+ {"version":3,"file":"organisation.entity.js","sourceRoot":"","sources":["../../../src/organisation/entities/organisation.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACH,WAAW,EACX,SAAS,EACT,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,KAAK,EACL,SAAS,EACT,sBAAsB,EACtB,gBAAgB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,sBAAsB,EAAC,MAAM,2EAA2E,CAAC;AACjH,OAAO,EAAC,8BAA8B,EAAC,MAAM,+EAA+E,CAAC;AAGtH,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGrB,EAAE,CAAU;IASL,IAAI,CAAU;IAMrB,WAAW,CAA4B;IAUvC,mBAAmB,CAAoC;IAIvD,IAAI,CAAU;IAId,WAAW,CAAQ;IAInB,UAAU,CAAQ;IAIlB,WAAW,CAAQ;IAEnB,4DAA4D;IAItD,AAAN,KAAK,CAAC,UAAU;QACZ,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACnB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;SACzB;IACL,CAAC;CACJ,CAAA;AAtDG;IAAC,sBAAsB,EAAE;IACxB,WAAW,EAAE;;wCACF;AAEZ;IAAC,MAAM,CAAC,MAAM,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB;KACtC,CAAC;IACD,SAAS,CAAC,MAAM,CAAC;IACjB,WAAW,EAAE;IACb,KAAK,EAAE;;0CACa;AAErB;IAAC,SAAS,CAAC,GAAG,EAAE,CAAC,sBAAsB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,EAAE;QAC9D,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CAAC;IACD,IAAI,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;;iDACI;AAEvC;IAAC,SAAS,CACN,GAAG,EAAE,CAAC,8BAA8B,EACpC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,EACzB;QACI,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAChC,CACJ;IACA,IAAI,CAAC,GAAG,EAAE,CAAC,8BAA8B,CAAC;;yDACY;AAEvD;IAAC,MAAM,EAAE;IACR,WAAW,EAAE;;0CACA;AAEd;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACA,IAAI;iDAAC;AAEnB;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACD,IAAI;gDAAC;AAElB;IAAC,gBAAgB,EAAE;IAClB,WAAW,EAAE;8BACA,IAAI;iDAAC;AAMb;IAHL,SAAS,EAAE;IACX,WAAW,EAAE;IACb,WAAW,EAAE;;;;8CAKb;AAtDQ,YAAY;IADxB,MAAM,EAAE;GACI,YAAY,CAuDxB;SAvDY,YAAY"}
@@ -1,8 +1,8 @@
1
- import { OrganisationService } from "./organisation.service";
2
- import { UpdateOrganisationDto } from "./dto/update-organisation.dto";
3
- import { Organisation } from "./entities/organisation.entity";
4
- import { RequestWithUser } from "../authz/RequestWithUser";
5
- import { BooleanResult } from "../root-app/models/boolean-result";
1
+ import { OrganisationService } from "./organisation.service.js";
2
+ import { UpdateOrganisationDto } from "./dto/update-organisation.dto.js";
3
+ import { Organisation } from "./entities/organisation.entity.js";
4
+ import { RequestWithUser } from "../authorization/models/RequestWithUser.js";
5
+ import { BooleanResult } from "../root-app/models/boolean-result.js";
6
6
  export declare class OrganisationController {
7
7
  private readonly organisationService;
8
8
  constructor(organisationService: OrganisationService);
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -11,15 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
11
  return function (target, key) { decorator(target, key, paramIndex); }
13
12
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.OrganisationController = void 0;
16
- const common_1 = require("@nestjs/common");
17
- const organisation_service_1 = require("./organisation.service");
18
- const update_organisation_dto_1 = require("./dto/update-organisation.dto");
19
- const swagger_1 = require("@nestjs/swagger");
20
- const organisation_entity_1 = require("./entities/organisation.entity");
21
- const passport_1 = require("@nestjs/passport");
22
- const boolean_result_1 = require("../root-app/models/boolean-result");
13
+ import { Controller, Get, Request, Body, Patch, Param, Delete, UseGuards, } from "@nestjs/common";
14
+ import { OrganisationService } from "./organisation.service.js";
15
+ import { UpdateOrganisationDto } from "./dto/update-organisation.dto.js";
16
+ import { ApiBearerAuth, ApiOkResponse, ApiTags } from "@nestjs/swagger";
17
+ import { Organisation } from "./entities/organisation.entity.js";
18
+ import { AuthGuard } from "@nestjs/passport";
19
+ import { BooleanResult } from "../root-app/models/boolean-result.js";
23
20
  let OrganisationController = class OrganisationController {
24
21
  organisationService;
25
22
  constructor(organisationService) {
@@ -46,47 +43,47 @@ let OrganisationController = class OrganisationController {
46
43
  }
47
44
  };
48
45
  __decorate([
49
- (0, common_1.Get)(":uuid"),
50
- (0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation }),
51
- __param(0, (0, common_1.Param)("uuid")),
52
- __param(1, (0, common_1.Request)()),
46
+ Get(":uuid"),
47
+ ApiOkResponse({ type: Organisation }),
48
+ __param(0, Param("uuid")),
49
+ __param(1, Request()),
53
50
  __metadata("design:type", Function),
54
51
  __metadata("design:paramtypes", [String, Object]),
55
52
  __metadata("design:returntype", Promise)
56
53
  ], OrganisationController.prototype, "findOne", null);
57
54
  __decorate([
58
- (0, common_1.Get)(),
59
- (0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation, isArray: true }),
60
- __param(0, (0, common_1.Request)()),
55
+ Get(),
56
+ ApiOkResponse({ type: Organisation, isArray: true }),
57
+ __param(0, Request()),
61
58
  __metadata("design:type", Function),
62
59
  __metadata("design:paramtypes", [Object]),
63
60
  __metadata("design:returntype", Promise)
64
61
  ], OrganisationController.prototype, "findAllForUser", null);
65
62
  __decorate([
66
- (0, common_1.Patch)(":uuid"),
67
- (0, swagger_1.ApiOkResponse)({ type: organisation_entity_1.Organisation }),
68
- __param(0, (0, common_1.Param)("uuid")),
69
- __param(1, (0, common_1.Body)()),
70
- __param(2, (0, common_1.Request)()),
63
+ Patch(":uuid"),
64
+ ApiOkResponse({ type: Organisation }),
65
+ __param(0, Param("uuid")),
66
+ __param(1, Body()),
67
+ __param(2, Request()),
71
68
  __metadata("design:type", Function),
72
- __metadata("design:paramtypes", [String, update_organisation_dto_1.UpdateOrganisationDto, Object]),
69
+ __metadata("design:paramtypes", [String, UpdateOrganisationDto, Object]),
73
70
  __metadata("design:returntype", Promise)
74
71
  ], OrganisationController.prototype, "update", null);
75
72
  __decorate([
76
- (0, common_1.Delete)(":uuid"),
77
- (0, swagger_1.ApiOkResponse)({ type: boolean_result_1.BooleanResult }),
78
- __param(0, (0, common_1.Param)("uuid")),
79
- __param(1, (0, common_1.Request)()),
73
+ Delete(":uuid"),
74
+ ApiOkResponse({ type: BooleanResult }),
75
+ __param(0, Param("uuid")),
76
+ __param(1, Request()),
80
77
  __metadata("design:type", Function),
81
78
  __metadata("design:paramtypes", [String, Object]),
82
79
  __metadata("design:returntype", Promise)
83
80
  ], OrganisationController.prototype, "remove", null);
84
81
  OrganisationController = __decorate([
85
- (0, common_1.UseGuards)((0, passport_1.AuthGuard)("jwt")),
86
- (0, swagger_1.ApiBearerAuth)(),
87
- (0, common_1.Controller)("organisation"),
88
- (0, swagger_1.ApiTags)("Organisations"),
89
- __metadata("design:paramtypes", [organisation_service_1.OrganisationService])
82
+ UseGuards(AuthGuard("jwt")),
83
+ ApiBearerAuth(),
84
+ Controller("organisation"),
85
+ ApiTags("Organisations"),
86
+ __metadata("design:paramtypes", [OrganisationService])
90
87
  ], OrganisationController);
91
- exports.OrganisationController = OrganisationController;
88
+ export { OrganisationController };
92
89
  //# sourceMappingURL=organisation.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organisation.controller.js","sourceRoot":"","sources":["../../src/organisation/organisation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,iEAA2D;AAC3D,2EAAoE;AACpE,6CAAsE;AACtE,wEAA4D;AAC5D,+CAA2C;AAE3C,sEAAgE;AAMzD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACF;IAA7B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAInE,AAAN,KAAK,CAAC,OAAO,CACM,IAAY,EAChB,OAAwB;QAEnC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,4DAA4D;IAGtD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CAAA;IACb,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,gBAAO,GAAE,CAAA;;6CADqB,+CAAqB;;oDAQvD;AAIK;IAFL,IAAA,eAAM,EAAC,OAAO,CAAC;IACf,IAAA,uBAAa,EAAC,EAAC,IAAI,EAAE,8BAAa,EAAC,CAAC;IAEhC,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,gBAAO,GAAE,CAAA;;;;oDAab;AApDQ,sBAAsB;IAJlC,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAC3B,IAAA,uBAAa,GAAE;IACf,IAAA,mBAAU,EAAC,cAAc,CAAC;IAC1B,IAAA,iBAAO,EAAC,eAAe,CAAC;qCAE6B,0CAAmB;GAD5D,sBAAsB,CAqDlC;AArDY,wDAAsB"}
1
+ {"version":3,"file":"organisation.controller.js","sourceRoot":"","sources":["../../src/organisation/organisation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,UAAU,EACV,GAAG,EACH,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,SAAS,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAC,qBAAqB,EAAC,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAC,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAC,aAAa,EAAC,MAAM,sCAAsC,CAAC;AAM5D,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACF;IAA7B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAInE,AAAN,KAA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AC,OAAO,CAAC;IACd,aAAa,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;IAE/B,WAAA,KAAK,CAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAI,EAAE,CAAA;IACN,WAAA,OAAO,EAAE,CAAA;;6CADqB,qBAAqB;;oDAQvD;AAIK;IAFL,MAAM,CAAC,OAAO,CAAC;IACf,aAAa,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC;IAEhC,WAAA,KAAK,CAAC,MAAM,CAAC,CAAA;IACb,WAAA,OAAO,EAAE,CAAA;;;;oDAab;AApDQ,sBAAsB;IAJlC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3B,aAAa,EAAE;IACf,UAAU,CAAC,cAAc,CAAC;IAC1B,OAAO,CAAC,eAAe,CAAC;qCAE6B,mBAAmB;GAD5D,sBAAsB,CAqDlC;SArDY,sBAAsB"}
@@ -1,36 +1,33 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.OrganisationModule = void 0;
10
- const common_1 = require("@nestjs/common");
11
- const organisation_service_1 = require("./organisation.service");
12
- const organisation_controller_1 = require("./organisation.controller");
13
- const typeorm_1 = require("@nestjs/typeorm");
14
- const organisation_entity_1 = require("./entities/organisation.entity");
15
- const member_role_entity_1 = require("./entities/member-role.entity");
16
- const organisation_membership_entity_1 = require("../organisation-memberships/entities/organisation-membership.entity");
17
- const organisation_memberships_module_1 = require("../organisation-memberships/organisation-memberships.module");
7
+ import { Module } from "@nestjs/common";
8
+ import { OrganisationService } from "./organisation.service.js";
9
+ import { OrganisationController } from "./organisation.controller.js";
10
+ import { TypeOrmModule } from "@nestjs/typeorm";
11
+ import { Organisation } from "./entities/organisation.entity.js";
12
+ import { MembershipRole } from "./entities/member-role.entity.js";
13
+ import { OrganisationMembership } from "../organisation-memberships/entities/organisation-membership.entity.js";
14
+ import { OrganisationMembershipsModule } from "../organisation-memberships/organisation-memberships.module.js";
18
15
  let OrganisationModule = class OrganisationModule {
19
16
  };
20
17
  OrganisationModule = __decorate([
21
- (0, common_1.Module)({
18
+ Module({
22
19
  imports: [
23
- organisation_memberships_module_1.OrganisationMembershipsModule,
24
- typeorm_1.TypeOrmModule.forFeature([
25
- organisation_entity_1.Organisation,
26
- organisation_membership_entity_1.OrganisationMembership,
27
- member_role_entity_1.MembershipRole,
20
+ OrganisationMembershipsModule,
21
+ TypeOrmModule.forFeature([
22
+ Organisation,
23
+ OrganisationMembership,
24
+ MembershipRole,
28
25
  ]),
29
26
  ],
30
- controllers: [organisation_controller_1.OrganisationController],
31
- providers: [organisation_service_1.OrganisationService],
32
- exports: [organisation_service_1.OrganisationService],
27
+ controllers: [OrganisationController],
28
+ providers: [OrganisationService],
29
+ exports: [OrganisationService],
33
30
  })
34
31
  ], OrganisationModule);
35
- exports.OrganisationModule = OrganisationModule;
32
+ export { OrganisationModule };
36
33
  //# sourceMappingURL=organisation.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organisation.module.js","sourceRoot":"","sources":["../../src/organisation/organisation.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsC;AACtC,iEAA2D;AAC3D,uEAAiE;AACjE,6CAA8C;AAC9C,wEAA4D;AAC5D,sEAA6D;AAC7D,wHAA2G;AAC3G,iHAA0G;AAenG,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IAb9B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,+DAA6B;YAC7B,uBAAa,CAAC,UAAU,CAAC;gBACrB,kCAAY;gBACZ,uDAAsB;gBACtB,mCAAc;aACjB,CAAC;SACL;QACD,WAAW,EAAE,CAAC,gDAAsB,CAAC;QACrC,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,0CAAmB,CAAC;KACjC,CAAC;GACW,kBAAkB,CAAG;AAArB,gDAAkB"}
1
+ {"version":3,"file":"organisation.module.js","sourceRoot":"","sources":["../../src/organisation/organisation.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAC,sBAAsB,EAAC,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,wEAAwE,CAAC;AAC9G,OAAO,EAAC,6BAA6B,EAAC,MAAM,gEAAgE,CAAC;AAetG,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IAb9B,MAAM,CAAC;QACJ,OAAO,EAAE;YACL,6BAA6B;YAC7B,aAAa,CAAC,UAAU,CAAC;gBACrB,YAAY;gBACZ,sBAAsB;gBACtB,cAAc;aACjB,CAAC;SACL;QACD,WAAW,EAAE,CAAC,sBAAsB,CAAC;QACrC,SAAS,EAAE,CAAC,mBAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,mBAAmB,CAAC;KACjC,CAAC;GACW,kBAAkB,CAAG;SAArB,kBAAkB"}
@@ -1,7 +1,7 @@
1
1
  import { DeleteResult, Repository, UpdateResult } from "typeorm";
2
- import { CreateOrganisationDto } from "./dto/create-organisation.dto";
3
- import { UpdateOrganisationDto } from "./dto/update-organisation.dto";
4
- import { Organisation } from "./entities/organisation.entity";
2
+ import { CreateOrganisationDto } from "./dto/create-organisation.dto.js";
3
+ import { UpdateOrganisationDto } from "./dto/update-organisation.dto.js";
4
+ import { Organisation } from "./entities/organisation.entity.js";
5
5
  export declare class OrganisationService {
6
6
  private repository;
7
7
  constructor(repository: Repository<Organisation>);
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -11,15 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
11
  return function (target, key) { decorator(target, key, paramIndex); }
13
12
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.OrganisationService = void 0;
16
- const common_1 = require("@nestjs/common");
17
- const typeorm_1 = require("@nestjs/typeorm");
18
- const typeorm_2 = require("typeorm");
19
- const organisation_membership_entity_1 = require("../organisation-memberships/entities/organisation-membership.entity");
20
- const RolesEnum_1 = require("./dto/RolesEnum");
21
- const member_role_entity_1 = require("./entities/member-role.entity");
22
- const organisation_entity_1 = require("./entities/organisation.entity");
13
+ import { Injectable, NotFoundException } from "@nestjs/common";
14
+ import { InjectRepository } from "@nestjs/typeorm";
15
+ import { Repository } from "typeorm";
16
+ import { OrganisationMembership } from "../organisation-memberships/entities/organisation-membership.entity.js";
17
+ import { Roles } from "./dto/RolesEnum.js";
18
+ import { MembershipRole } from "./entities/member-role.entity.js";
19
+ import { Organisation } from "./entities/organisation.entity.js";
23
20
  let OrganisationService = class OrganisationService {
24
21
  repository;
25
22
  constructor(repository) {
@@ -28,22 +25,22 @@ let OrganisationService = class OrganisationService {
28
25
  notFoundMessage = "Organisation not found or you are not owner of it";
29
26
  async create(createOrganisationDto) {
30
27
  // create a new organisation
31
- const unsavedOrganisation = new organisation_entity_1.Organisation();
28
+ const unsavedOrganisation = new Organisation();
32
29
  unsavedOrganisation.name = createOrganisationDto.name;
33
30
  unsavedOrganisation.memberships = [];
34
31
  // add the owner
35
- const ownerMembership = new organisation_membership_entity_1.OrganisationMembership();
32
+ const ownerMembership = new OrganisationMembership();
36
33
  ownerMembership.user = createOrganisationDto.owner;
37
- const ownerRole = new member_role_entity_1.MembershipRole();
38
- ownerRole.name = RolesEnum_1.Roles.owner;
34
+ const ownerRole = new MembershipRole();
35
+ ownerRole.name = Roles.owner;
39
36
  ownerMembership.roles.push(ownerRole);
40
37
  unsavedOrganisation.memberships.push(ownerMembership);
41
38
  // add all the others
42
39
  const normalMemberships = createOrganisationDto.members.map((member) => {
43
- const membership = new organisation_membership_entity_1.OrganisationMembership();
40
+ const membership = new OrganisationMembership();
44
41
  membership.user = member;
45
- const memberRole = new member_role_entity_1.MembershipRole();
46
- memberRole.name = RolesEnum_1.Roles.member;
42
+ const memberRole = new MembershipRole();
43
+ memberRole.name = Roles.member;
47
44
  membership.roles.push(memberRole);
48
45
  return membership;
49
46
  });
@@ -73,7 +70,7 @@ let OrganisationService = class OrganisationService {
73
70
  },
74
71
  });
75
72
  if (!org) {
76
- throw new common_1.NotFoundException(this.notFoundMessage);
73
+ throw new NotFoundException(this.notFoundMessage);
77
74
  }
78
75
  return org;
79
76
  }
@@ -86,7 +83,7 @@ let OrganisationService = class OrganisationService {
86
83
  id: currentUserId,
87
84
  },
88
85
  roles: {
89
- name: RolesEnum_1.Roles.owner,
86
+ name: Roles.owner,
90
87
  },
91
88
  },
92
89
  },
@@ -103,7 +100,7 @@ let OrganisationService = class OrganisationService {
103
100
  id: currentUserId,
104
101
  },
105
102
  roles: {
106
- name: RolesEnum_1.Roles.owner,
103
+ name: Roles.owner,
107
104
  },
108
105
  },
109
106
  },
@@ -114,9 +111,9 @@ let OrganisationService = class OrganisationService {
114
111
  }
115
112
  };
116
113
  OrganisationService = __decorate([
117
- (0, common_1.Injectable)(),
118
- __param(0, (0, typeorm_1.InjectRepository)(organisation_entity_1.Organisation)),
119
- __metadata("design:paramtypes", [typeorm_2.Repository])
114
+ Injectable(),
115
+ __param(0, InjectRepository(Organisation)),
116
+ __metadata("design:paramtypes", [Repository])
120
117
  ], OrganisationService);
121
- exports.OrganisationService = OrganisationService;
118
+ export { OrganisationService };
122
119
  //# sourceMappingURL=organisation.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organisation.service.js","sourceRoot":"","sources":["../../src/organisation/organisation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6D;AAC7D,6CAAiD;AACjD,qCAA+D;AAC/D,wHAA2G;AAE3G,+CAAsC;AAEtC,sEAA6D;AAC7D,wEAA4D;AAGrD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGhB;IAFZ,YAEY,UAAoC;QAApC,eAAU,GAAV,UAAU,CAA0B;IAC7C,CAAC;IACI,eAAe,GACnB,mDAAmD,CAAC;IACxD,KAAK,CAAC,MAAM,CACR,qBAA4C;QAE5C,4BAA4B;QAC5B,MAAM,mBAAmB,GAAG,IAAI,kCAAY,EAAE,CAAC;QAC/C,mBAAmB,CAAC,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC;QACtD,mBAAmB,CAAC,WAAW,GAAG,EAAE,CAAC;QAErC,gBAAgB;QAChB,MAAM,eAAe,GAAG,IAAI,uDAAsB,EAAE,CAAC;QACrD,eAAe,CAAC,IAAI,GAAG,qBAAqB,CAAC,KAAK,CAAC;QACnD,MAAM,SAAS,GAAG,IAAI,mCAAc,EAAE,CAAC;QACvC,SAAS,CAAC,IAAI,GAAG,iBAAK,CAAC,KAAK,CAAC;QAC7B,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEtC,mBAAmB,CAAC,WAA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A4C,EAC5C,aAAqB;QAErB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;YACnD,KAAK,EAAE;gBACH,IAAI;gBACJ,WAAW,EAAE;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,aAAa;qBACpB;oBACD,KAAK,EAAE;wBACH,IAAI,EAAE,iBAAK,CAAC,KAAK;qBACpB;iBACJ;aACJ;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;QAEzD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,aAAqB;QAC5C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;YACnD,KAAK,EAAE;gBACH,IAAI;gBACJ,WAAW,EAAE;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,aAAa;qBACpB;oBACD,KAAK,EAAE;wBACH,IAAI,EAAE,iBAAK,CAAC,KAAK;qBACpB;iBACJ;aACJ;SACJ,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC1B,EAAE,EAAE,UAAU,CAAC,EAAE;SACpB,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAjHY,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGJ,WAAA,IAAA,0BAAgB,EAAC,kCAAY,CAAC,CAAA;qCACX,oBAAU;GAHzB,mBAAmB,CAiH/B;AAjHY,kDAAmB"}
1
+ {"version":3,"file":"organisation.service.js","sourceRoot":"","sources":["../../src/organisation/organisation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,gBAAgB,EAAC,MA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UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;QAEzD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,aAAqB;QAC5C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;YACnD,KAAK,EAAE;gBACH,IAAI;gBACJ,WAAW,EAAE;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,aAAa;qBACpB;oBACD,KAAK,EAAE;wBACH,IAAI,EAAE,KAAK,CAAC,KAAK;qBACpB;iBACJ;aACJ;SACJ,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC1B,EAAE,EAAE,UAAU,CAAC,EAAE;SACpB,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAjHY,mBAAmB;IAD/B,UAAU,EAAE;IAGJ,WAAA,gBAAgB,CAAC,YAAY,CAAC,CAAA;qCACX,UAAU;GAHzB,mBAAmB,CAiH/B;SAjHY,mBAAmB"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,20 +7,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CreateUpdateMembershipDto = void 0;
13
- const swagger_1 = require("@nestjs/swagger");
14
- class CreateUpdateMembershipDto {
10
+ import { ApiProperty } from "@nestjs/swagger";
11
+ export class CreateUpdateMembershipDto {
15
12
  userId;
16
13
  roles;
17
14
  }
18
15
  __decorate([
19
- (0, swagger_1.ApiProperty)(),
16
+ ApiProperty(),
20
17
  __metadata("design:type", Number)
21
18
  ], CreateUpdateMembershipDto.prototype, "userId", void 0);
22
19
  __decorate([
23
- (0, swagger_1.ApiProperty)({ type: String, isArray: true }),
20
+ ApiProperty({ type: String, isArray: true }),
24
21
  __metadata("design:type", Array)
25
22
  ], CreateUpdateMembershipDto.prototype, "roles", void 0);
26
- exports.CreateUpdateMembershipDto = CreateUpdateMembershipDto;
27
23
  //# sourceMappingURL=create-membership-dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-membership-dto.js","sourceRoot":"","sources":["../../../src/organisation-memberships/dtos/create-membership-dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,MAAa,yBAAyB;IAElC,MAAM,CAAU;IAGhB,KAAK,CAAY;CACpB;AALG;IAAC,IAAA,qBAAW,GAAE;;yDACE;AAEhB;IAAC,IAAA,qBAAW,EAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;wDAC1B;AALrB,8DAMC"}
1
+ {"version":3,"file":"create-membership-dto.js","sourceRoot":"","sources":["../../../src/organisation-memberships/dtos/create-membership-dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,yBAAyB;IAElC,MAAM,CAAU;IAGhB,KAAK,CAAY;CACpB;AALG;IAAC,WAAW,EAAE;;yDACE;AAEhB;IAAC,WAAW,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;wDAC1B"}
@@ -1,7 +1,7 @@
1
- import { Invitation } from "../../invitations";
2
- import { MembershipRole } from "../../organisation/entities/member-role.entity";
3
- import { Organisation } from "../../organisation/entities/organisation.entity";
4
- import { User } from "../../user-internal/entities/user.entity";
1
+ import { Invitation } from "../../invitations/entities/invitation.entity.js";
2
+ import { MembershipRole } from "../../organisation/entities/member-role.entity.js";
3
+ import { Organisation } from "../../organisation/entities/organisation.entity.js";
4
+ import { User } from "../../user-internal/entities/user.entity.js";
5
5
  export declare class OrganisationMembership {
6
6
  id: number;
7
7
  uuid: string;