@contember/engine-tenant-api 2.0.0-alpha.8 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1150) hide show
  1. package/dist/development/index.cjs +18 -6
  2. package/dist/development/index.cjs.map +1 -1
  3. package/dist/development/index.js +20 -8
  4. package/dist/development/index.js.map +1 -1
  5. package/dist/development/src/TenantContainer.cjs +7 -1
  6. package/dist/development/src/TenantContainer.cjs.map +1 -1
  7. package/dist/development/src/TenantContainer.js +7 -1
  8. package/dist/development/src/TenantContainer.js.map +1 -1
  9. package/dist/development/src/bridges/system/IdentityFetcher.cjs.map +1 -1
  10. package/dist/development/src/bridges/system/IdentityFetcher.js.map +1 -1
  11. package/dist/development/src/exceptions.cjs.map +1 -1
  12. package/dist/development/src/exceptions.js.map +1 -1
  13. package/dist/development/src/migrations/2024-08-26-120000-passwordless.cjs +31 -0
  14. package/dist/development/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -0
  15. package/dist/development/src/migrations/2024-08-26-120000-passwordless.js +32 -0
  16. package/dist/development/src/migrations/2024-08-26-120000-passwordless.js.map +1 -0
  17. package/dist/development/src/migrations/runner.cjs +3 -1
  18. package/dist/development/src/migrations/runner.cjs.map +1 -1
  19. package/dist/development/src/migrations/runner.js +3 -1
  20. package/dist/development/src/migrations/runner.js.map +1 -1
  21. package/dist/development/src/migrations/snapshot.cjs +33 -5
  22. package/dist/development/src/migrations/snapshot.cjs.map +1 -1
  23. package/dist/development/src/migrations/snapshot.js +33 -5
  24. package/dist/development/src/migrations/snapshot.js.map +1 -1
  25. package/dist/development/src/migrations/tenantCredentials.cjs.map +1 -1
  26. package/dist/development/src/migrations/tenantCredentials.js.map +1 -1
  27. package/dist/development/src/model/authorization/AclSchemaAccessNodeFactory.cjs.map +1 -1
  28. package/dist/development/src/model/authorization/AclSchemaAccessNodeFactory.js.map +1 -1
  29. package/dist/development/src/model/authorization/DirectPermissionsAccessNode.cjs.map +1 -1
  30. package/dist/development/src/model/authorization/DirectPermissionsAccessNode.js.map +1 -1
  31. package/dist/development/src/model/authorization/Identity.cjs.map +1 -1
  32. package/dist/development/src/model/authorization/Identity.js.map +1 -1
  33. package/dist/development/src/model/authorization/IdentityFactory.cjs.map +1 -1
  34. package/dist/development/src/model/authorization/IdentityFactory.js.map +1 -1
  35. package/dist/development/src/model/authorization/IdentityScope.cjs.map +1 -1
  36. package/dist/development/src/model/authorization/IdentityScope.js.map +1 -1
  37. package/dist/development/src/model/authorization/MembershipMatcher.cjs.map +1 -1
  38. package/dist/development/src/model/authorization/MembershipMatcher.js.map +1 -1
  39. package/dist/development/src/model/authorization/PermissionActions.cjs +5 -0
  40. package/dist/development/src/model/authorization/PermissionActions.cjs.map +1 -1
  41. package/dist/development/src/model/authorization/PermissionActions.js +5 -0
  42. package/dist/development/src/model/authorization/PermissionActions.js.map +1 -1
  43. package/dist/development/src/model/authorization/PermissionContext.cjs.map +1 -1
  44. package/dist/development/src/model/authorization/PermissionContext.js.map +1 -1
  45. package/dist/development/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
  46. package/dist/development/src/model/authorization/PermissionContextFactory.js.map +1 -1
  47. package/dist/development/src/model/authorization/PermissionsFactory.cjs +5 -0
  48. package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -1
  49. package/dist/development/src/model/authorization/PermissionsFactory.js +5 -0
  50. package/dist/development/src/model/authorization/PermissionsFactory.js.map +1 -1
  51. package/dist/development/src/model/authorization/ProjectScope.cjs.map +1 -1
  52. package/dist/development/src/model/authorization/ProjectScope.js.map +1 -1
  53. package/dist/development/src/model/authorization/ProjectScopeFactory.cjs.map +1 -1
  54. package/dist/development/src/model/authorization/ProjectScopeFactory.js.map +1 -1
  55. package/dist/development/src/model/commands/CommandBus.cjs.map +1 -1
  56. package/dist/development/src/model/commands/CommandBus.js.map +1 -1
  57. package/dist/development/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
  58. package/dist/development/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
  59. package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
  60. package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
  61. package/dist/development/src/model/commands/apiKey/DisableApiKeyCommand.cjs.map +1 -1
  62. package/dist/development/src/model/commands/apiKey/DisableApiKeyCommand.js.map +1 -1
  63. package/dist/development/src/model/commands/apiKey/DisableIdentityApiKeysCommand.cjs.map +1 -1
  64. package/dist/development/src/model/commands/apiKey/DisableIdentityApiKeysCommand.js.map +1 -1
  65. package/dist/development/src/model/commands/apiKey/DisableOneOffApiKeyCommand.cjs.map +1 -1
  66. package/dist/development/src/model/commands/apiKey/DisableOneOffApiKeyCommand.js.map +1 -1
  67. package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
  68. package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
  69. package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -0
  70. package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -0
  71. package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -0
  72. package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -0
  73. package/dist/development/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
  74. package/dist/development/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
  75. package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
  76. package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
  77. package/dist/development/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
  78. package/dist/development/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
  79. package/dist/development/src/model/commands/idp/DisableIdpCommand.cjs.map +1 -1
  80. package/dist/development/src/model/commands/idp/DisableIdpCommand.js.map +1 -1
  81. package/dist/development/src/model/commands/idp/EnableIdpCommand.cjs.map +1 -1
  82. package/dist/development/src/model/commands/idp/EnableIdpCommand.js.map +1 -1
  83. package/dist/development/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
  84. package/dist/development/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
  85. package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
  86. package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.js.map +1 -1
  87. package/dist/development/src/model/commands/mailTemplate/RemoveMailTemplateCommand.cjs.map +1 -1
  88. package/dist/development/src/model/commands/mailTemplate/RemoveMailTemplateCommand.js.map +1 -1
  89. package/dist/development/src/model/commands/membership/AddProjectMemberCommand.cjs.map +1 -1
  90. package/dist/development/src/model/commands/membership/AddProjectMemberCommand.js.map +1 -1
  91. package/dist/development/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.cjs.map +1 -1
  92. package/dist/development/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.js.map +1 -1
  93. package/dist/development/src/model/commands/membership/RemoveProjectMemberCommand.cjs.map +1 -1
  94. package/dist/development/src/model/commands/membership/RemoveProjectMemberCommand.js.map +1 -1
  95. package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +1 -1
  96. package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +1 -1
  97. package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
  98. package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
  99. package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
  100. package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js.map +1 -1
  101. package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.cjs.map +1 -1
  102. package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.js.map +1 -1
  103. package/dist/development/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.cjs.map +1 -1
  104. package/dist/development/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.js.map +1 -1
  105. package/dist/development/src/model/commands/otp/ConfirmOtpCommand.cjs.map +1 -1
  106. package/dist/development/src/model/commands/otp/ConfirmOtpCommand.js.map +1 -1
  107. package/dist/development/src/model/commands/otp/DisableOtpCommand.cjs.map +1 -1
  108. package/dist/development/src/model/commands/otp/DisableOtpCommand.js.map +1 -1
  109. package/dist/development/src/model/commands/otp/PrepareOtpCommand.cjs.map +1 -1
  110. package/dist/development/src/model/commands/otp/PrepareOtpCommand.js.map +1 -1
  111. package/dist/development/src/model/commands/person/ChangePasswordCommand.cjs.map +1 -1
  112. package/dist/development/src/model/commands/person/ChangePasswordCommand.js.map +1 -1
  113. package/dist/development/src/model/commands/person/ChangeProfileCommand.cjs.map +1 -1
  114. package/dist/development/src/model/commands/person/ChangeProfileCommand.js.map +1 -1
  115. package/dist/development/src/model/commands/person/CreatePersonCommand.cjs +2 -1
  116. package/dist/development/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
  117. package/dist/development/src/model/commands/person/CreatePersonCommand.js +2 -1
  118. package/dist/development/src/model/commands/person/CreatePersonCommand.js.map +1 -1
  119. package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
  120. package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
  121. package/dist/development/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
  122. package/dist/development/src/model/commands/person/DisablePersonCommand.js.map +1 -1
  123. package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.cjs +18 -0
  124. package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -0
  125. package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js +18 -0
  126. package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -0
  127. package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs +20 -0
  128. package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -0
  129. package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js +20 -0
  130. package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -0
  131. package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs +33 -0
  132. package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -0
  133. package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js +33 -0
  134. package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -0
  135. package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs +19 -0
  136. package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -0
  137. package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js +19 -0
  138. package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -0
  139. package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs +19 -0
  140. package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -0
  141. package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js +19 -0
  142. package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -0
  143. package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs +28 -0
  144. package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -0
  145. package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js +28 -0
  146. package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -0
  147. package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs +28 -0
  148. package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -0
  149. package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js +28 -0
  150. package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -0
  151. package/dist/development/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
  152. package/dist/development/src/model/commands/project/CreateProjectCommand.js.map +1 -1
  153. package/dist/development/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
  154. package/dist/development/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
  155. package/dist/development/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
  156. package/dist/development/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
  157. package/dist/development/src/model/consts/expirations.cjs +7 -0
  158. package/dist/development/src/model/consts/expirations.cjs.map +1 -0
  159. package/dist/development/src/model/consts/expirations.js +7 -0
  160. package/dist/development/src/model/consts/expirations.js.map +1 -0
  161. package/dist/development/src/model/dtos/Password.cjs.map +1 -1
  162. package/dist/development/src/model/dtos/Password.js.map +1 -1
  163. package/dist/development/src/model/mailing/UserMailer.cjs +10 -1
  164. package/dist/development/src/model/mailing/UserMailer.cjs.map +1 -1
  165. package/dist/development/src/model/mailing/UserMailer.js +10 -1
  166. package/dist/development/src/model/mailing/UserMailer.js.map +1 -1
  167. package/dist/development/src/model/mailing/templates/ExistingUserInvited.mustache.cjs.map +1 -1
  168. package/dist/development/src/model/mailing/templates/ExistingUserInvited.mustache.js.map +1 -1
  169. package/dist/development/src/model/mailing/templates/NewUserInvited.mustache.cjs.map +1 -1
  170. package/dist/development/src/model/mailing/templates/NewUserInvited.mustache.js.map +1 -1
  171. package/dist/development/src/model/mailing/templates/PasswordReset.mustache.cjs.map +1 -1
  172. package/dist/development/src/model/mailing/templates/PasswordReset.mustache.js.map +1 -1
  173. package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs +17 -0
  174. package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs.map +1 -0
  175. package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.js +18 -0
  176. package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -0
  177. package/dist/development/src/model/mailing/type.cjs +9 -3
  178. package/dist/development/src/model/mailing/type.cjs.map +1 -1
  179. package/dist/development/src/model/mailing/type.js +9 -3
  180. package/dist/development/src/model/mailing/type.js.map +1 -1
  181. package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
  182. package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
  183. package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs +21 -0
  184. package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -0
  185. package/dist/development/src/model/queries/configuration/ConfigurationQuery.js +21 -0
  186. package/dist/development/src/model/queries/configuration/ConfigurationQuery.js.map +1 -0
  187. package/dist/development/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
  188. package/dist/development/src/model/queries/identity/IdentityQuery.js.map +1 -1
  189. package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
  190. package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
  191. package/dist/development/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
  192. package/dist/development/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
  193. package/dist/development/src/model/queries/idp/helpers.cjs.map +1 -1
  194. package/dist/development/src/model/queries/idp/helpers.js.map +1 -1
  195. package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
  196. package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
  197. package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
  198. package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
  199. package/dist/development/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
  200. package/dist/development/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
  201. package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
  202. package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.js.map +1 -1
  203. package/dist/development/src/model/queries/membership/ProjectRolesByIdentityQuery.cjs.map +1 -1
  204. package/dist/development/src/model/queries/membership/ProjectRolesByIdentityQuery.js.map +1 -1
  205. package/dist/development/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
  206. package/dist/development/src/model/queries/membership/ProjectSlugSpecification.js.map +1 -1
  207. package/dist/development/src/model/queries/person/PersonByIdPQuery.cjs.map +1 -1
  208. package/dist/development/src/model/queries/person/PersonByIdPQuery.js.map +1 -1
  209. package/dist/development/src/model/queries/person/PersonByIdentityBatchQuery.cjs.map +1 -1
  210. package/dist/development/src/model/queries/person/PersonByIdentityBatchQuery.js.map +1 -1
  211. package/dist/development/src/model/queries/person/PersonQuery.cjs.map +1 -1
  212. package/dist/development/src/model/queries/person/PersonQuery.js.map +1 -1
  213. package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs +1 -1
  214. package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
  215. package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js +1 -1
  216. package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
  217. package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs +29 -0
  218. package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -0
  219. package/dist/development/src/model/queries/personToken/PersonTokenQuery.js +29 -0
  220. package/dist/development/src/model/queries/personToken/PersonTokenQuery.js.map +1 -0
  221. package/dist/development/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
  222. package/dist/development/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
  223. package/dist/development/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
  224. package/dist/development/src/model/queries/project/ProjectSecretsQuery.js.map +1 -1
  225. package/dist/development/src/model/queries/project/ProjectUpdateTimestampQuery.cjs.map +1 -1
  226. package/dist/development/src/model/queries/project/ProjectUpdateTimestampQuery.js.map +1 -1
  227. package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
  228. package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
  229. package/dist/development/src/model/queries/project/ProjectsQuery.cjs.map +1 -1
  230. package/dist/development/src/model/queries/project/ProjectsQuery.js.map +1 -1
  231. package/dist/development/src/model/service/ConfigurationManager.cjs +27 -0
  232. package/dist/development/src/model/service/ConfigurationManager.cjs.map +1 -0
  233. package/dist/development/src/model/service/ConfigurationManager.js +27 -0
  234. package/dist/development/src/model/service/ConfigurationManager.js.map +1 -0
  235. package/dist/development/src/model/service/EmailValidator.cjs.map +1 -1
  236. package/dist/development/src/model/service/EmailValidator.js.map +1 -1
  237. package/dist/development/src/model/service/IDPSignInManager.cjs +1 -1
  238. package/dist/development/src/model/service/IDPSignInManager.cjs.map +1 -1
  239. package/dist/development/src/model/service/IDPSignInManager.js +1 -1
  240. package/dist/development/src/model/service/IDPSignInManager.js.map +1 -1
  241. package/dist/development/src/model/service/InviteManager.cjs +7 -7
  242. package/dist/development/src/model/service/InviteManager.cjs.map +1 -1
  243. package/dist/development/src/model/service/InviteManager.js +6 -6
  244. package/dist/development/src/model/service/InviteManager.js.map +1 -1
  245. package/dist/development/src/model/service/MailTemplateManager.cjs.map +1 -1
  246. package/dist/development/src/model/service/MailTemplateManager.js.map +1 -1
  247. package/dist/development/src/model/service/MembershipValidator.cjs.map +1 -1
  248. package/dist/development/src/model/service/MembershipValidator.js.map +1 -1
  249. package/dist/development/src/model/service/OtpAuthenticator.cjs.map +1 -1
  250. package/dist/development/src/model/service/OtpAuthenticator.js.map +1 -1
  251. package/dist/development/src/model/service/OtpManager.cjs.map +1 -1
  252. package/dist/development/src/model/service/OtpManager.js.map +1 -1
  253. package/dist/development/src/model/service/PasswordChangeManager.cjs +1 -1
  254. package/dist/development/src/model/service/PasswordChangeManager.cjs.map +1 -1
  255. package/dist/development/src/model/service/PasswordChangeManager.js +1 -1
  256. package/dist/development/src/model/service/PasswordChangeManager.js.map +1 -1
  257. package/dist/development/src/model/service/PasswordResetManager.cjs +7 -15
  258. package/dist/development/src/model/service/PasswordResetManager.cjs.map +1 -1
  259. package/dist/development/src/model/service/PasswordResetManager.js +7 -15
  260. package/dist/development/src/model/service/PasswordResetManager.js.map +1 -1
  261. package/dist/development/src/model/service/PasswordlessSignInManager.cjs +135 -0
  262. package/dist/development/src/model/service/PasswordlessSignInManager.cjs.map +1 -0
  263. package/dist/development/src/model/service/PasswordlessSignInManager.js +135 -0
  264. package/dist/development/src/model/service/PasswordlessSignInManager.js.map +1 -0
  265. package/dist/development/src/model/service/PersonAccessManager.cjs.map +1 -1
  266. package/dist/development/src/model/service/PersonAccessManager.js.map +1 -1
  267. package/dist/development/src/model/service/PersonManager.cjs +7 -0
  268. package/dist/development/src/model/service/PersonManager.cjs.map +1 -1
  269. package/dist/development/src/model/service/PersonManager.js +7 -0
  270. package/dist/development/src/model/service/PersonManager.js.map +1 -1
  271. package/dist/development/src/model/service/ProjectManager.cjs +2 -2
  272. package/dist/development/src/model/service/ProjectManager.cjs.map +1 -1
  273. package/dist/development/src/model/service/ProjectManager.js +2 -2
  274. package/dist/development/src/model/service/ProjectManager.js.map +1 -1
  275. package/dist/development/src/model/service/ProjectMemberManager.cjs.map +1 -1
  276. package/dist/development/src/model/service/ProjectMemberManager.js.map +1 -1
  277. package/dist/development/src/model/service/RolesManager.cjs +1 -1
  278. package/dist/development/src/model/service/RolesManager.cjs.map +1 -1
  279. package/dist/development/src/model/service/RolesManager.js +1 -1
  280. package/dist/development/src/model/service/RolesManager.js.map +1 -1
  281. package/dist/development/src/model/service/SecretsManager.cjs.map +1 -1
  282. package/dist/development/src/model/service/SecretsManager.js.map +1 -1
  283. package/dist/development/src/model/service/SignInManager.cjs.map +1 -1
  284. package/dist/development/src/model/service/SignInManager.js.map +1 -1
  285. package/dist/development/src/model/service/SignUpManager.cjs +1 -1
  286. package/dist/development/src/model/service/SignUpManager.cjs.map +1 -1
  287. package/dist/development/src/model/service/SignUpManager.js +1 -1
  288. package/dist/development/src/model/service/SignUpManager.js.map +1 -1
  289. package/dist/development/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
  290. package/dist/development/src/model/service/apiKey/ApiKeyManager.js.map +1 -1
  291. package/dist/development/src/model/service/apiKey/ApiKeyService.cjs.map +1 -1
  292. package/dist/development/src/model/service/apiKey/ApiKeyService.js.map +1 -1
  293. package/dist/development/src/model/service/helpers/getPreferredProject.cjs +13 -0
  294. package/dist/development/src/model/service/helpers/getPreferredProject.cjs.map +1 -0
  295. package/dist/development/src/model/service/helpers/getPreferredProject.js +13 -0
  296. package/dist/development/src/model/service/helpers/getPreferredProject.js.map +1 -0
  297. package/dist/development/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
  298. package/dist/development/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
  299. package/dist/development/src/model/service/idp/IDPManager.cjs.map +1 -1
  300. package/dist/development/src/model/service/idp/IDPManager.js.map +1 -1
  301. package/dist/development/src/model/service/idp/IDPResponseError.cjs.map +1 -1
  302. package/dist/development/src/model/service/idp/IDPResponseError.js.map +1 -1
  303. package/dist/development/src/model/service/idp/IDPValidationError.cjs.map +1 -1
  304. package/dist/development/src/model/service/idp/IDPValidationError.js.map +1 -1
  305. package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
  306. package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
  307. package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
  308. package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.js.map +1 -1
  309. package/dist/development/src/model/service/idp/providers/AppleProvider.cjs +1 -1
  310. package/dist/development/src/model/service/idp/providers/AppleProvider.cjs.map +1 -1
  311. package/dist/development/src/model/service/idp/providers/AppleProvider.js +1 -1
  312. package/dist/development/src/model/service/idp/providers/AppleProvider.js.map +1 -1
  313. package/dist/development/src/model/service/idp/providers/FacebookProvider.cjs +1 -1
  314. package/dist/development/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
  315. package/dist/development/src/model/service/idp/providers/FacebookProvider.js +1 -1
  316. package/dist/development/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
  317. package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs +9 -5
  318. package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
  319. package/dist/development/src/model/service/idp/providers/OIDCHelpers.js +9 -5
  320. package/dist/development/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
  321. package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs +9 -3
  322. package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
  323. package/dist/development/src/model/service/idp/providers/OIDCProvider.js +9 -3
  324. package/dist/development/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
  325. package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs +6 -1
  326. package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
  327. package/dist/development/src/model/service/idp/providers/OIDCTypes.js +6 -1
  328. package/dist/development/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
  329. package/dist/development/src/model/service/idp/providers/helpers.cjs.map +1 -1
  330. package/dist/development/src/model/service/idp/providers/helpers.js.map +1 -1
  331. package/dist/development/src/model/service/membershipUtils.cjs.map +1 -1
  332. package/dist/development/src/model/service/membershipUtils.js.map +1 -1
  333. package/dist/development/src/model/type/ApiKey.cjs.map +1 -1
  334. package/dist/development/src/model/type/ApiKey.js.map +1 -1
  335. package/dist/development/src/model/utils/DatabaseContext.cjs.map +1 -1
  336. package/dist/development/src/model/utils/DatabaseContext.js.map +1 -1
  337. package/dist/development/src/model/utils/Response.cjs.map +1 -1
  338. package/dist/development/src/model/utils/Response.js.map +1 -1
  339. package/dist/development/src/model/utils/password.cjs.map +1 -1
  340. package/dist/development/src/model/utils/password.js.map +1 -1
  341. package/dist/development/src/model/utils/tokenUtils.cjs +39 -0
  342. package/dist/development/src/model/utils/tokenUtils.cjs.map +1 -1
  343. package/dist/development/src/model/utils/tokenUtils.js +40 -1
  344. package/dist/development/src/model/utils/tokenUtils.js.map +1 -1
  345. package/dist/development/src/resolvers/ResolverFactory.cjs +8 -1
  346. package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -1
  347. package/dist/development/src/resolvers/ResolverFactory.js +8 -1
  348. package/dist/development/src/resolvers/ResolverFactory.js.map +1 -1
  349. package/dist/development/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
  350. package/dist/development/src/resolvers/TenantResolverContextFactory.js.map +1 -1
  351. package/dist/development/src/resolvers/errorUtils.cjs.map +1 -1
  352. package/dist/development/src/resolvers/errorUtils.js.map +1 -1
  353. package/dist/development/src/resolvers/membershipUtils.cjs.map +1 -1
  354. package/dist/development/src/resolvers/membershipUtils.js.map +1 -1
  355. package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
  356. package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
  357. package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
  358. package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
  359. package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +41 -0
  360. package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -0
  361. package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +41 -0
  362. package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -0
  363. package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
  364. package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
  365. package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
  366. package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
  367. package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
  368. package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
  369. package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
  370. package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
  371. package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
  372. package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
  373. package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
  374. package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
  375. package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
  376. package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
  377. package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
  378. package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
  379. package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
  380. package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
  381. package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs +4 -1
  382. package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
  383. package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js +4 -1
  384. package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
  385. package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
  386. package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
  387. package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
  388. package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
  389. package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +83 -0
  390. package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -0
  391. package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js +83 -0
  392. package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -0
  393. package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
  394. package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
  395. package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
  396. package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
  397. package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
  398. package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
  399. package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
  400. package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
  401. package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +52 -0
  402. package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -0
  403. package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +52 -0
  404. package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -0
  405. package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
  406. package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
  407. package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
  408. package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
  409. package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
  410. package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
  411. package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
  412. package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
  413. package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
  414. package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
  415. package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
  416. package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
  417. package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs +34 -0
  418. package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -0
  419. package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js +34 -0
  420. package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -0
  421. package/dist/development/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
  422. package/dist/development/src/resolvers/query/IDPQueryResolver.js.map +1 -1
  423. package/dist/development/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
  424. package/dist/development/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
  425. package/dist/development/src/resolvers/query/MeQueryResolver.cjs.map +1 -1
  426. package/dist/development/src/resolvers/query/MeQueryResolver.js.map +1 -1
  427. package/dist/development/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
  428. package/dist/development/src/resolvers/query/PersonQueryResolver.js.map +1 -1
  429. package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
  430. package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
  431. package/dist/development/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
  432. package/dist/development/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
  433. package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs +1 -0
  434. package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
  435. package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js +1 -0
  436. package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
  437. package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
  438. package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
  439. package/dist/development/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
  440. package/dist/development/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
  441. package/dist/development/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
  442. package/dist/development/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
  443. package/dist/development/src/schema/tenant.graphql.cjs +162 -10
  444. package/dist/development/src/schema/tenant.graphql.cjs.map +1 -1
  445. package/dist/development/src/schema/tenant.graphql.js +162 -10
  446. package/dist/development/src/schema/tenant.graphql.js.map +1 -1
  447. package/dist/development/src/utils/Mailer.cjs.map +1 -1
  448. package/dist/development/src/utils/Mailer.js.map +1 -1
  449. package/dist/development/src/utils/TemplateRenderer.cjs.map +1 -1
  450. package/dist/development/src/utils/TemplateRenderer.js.map +1 -1
  451. package/dist/development/src/utils/array.cjs.map +1 -1
  452. package/dist/development/src/utils/array.js.map +1 -1
  453. package/dist/development/src/utils/batchQuery.cjs.map +1 -1
  454. package/dist/development/src/utils/batchQuery.js.map +1 -1
  455. package/dist/production/index.cjs +18 -6
  456. package/dist/production/index.cjs.map +1 -1
  457. package/dist/production/index.js +20 -8
  458. package/dist/production/index.js.map +1 -1
  459. package/dist/production/src/TenantContainer.cjs +7 -1
  460. package/dist/production/src/TenantContainer.cjs.map +1 -1
  461. package/dist/production/src/TenantContainer.js +7 -1
  462. package/dist/production/src/TenantContainer.js.map +1 -1
  463. package/dist/production/src/bridges/system/IdentityFetcher.cjs.map +1 -1
  464. package/dist/production/src/bridges/system/IdentityFetcher.js.map +1 -1
  465. package/dist/production/src/exceptions.cjs.map +1 -1
  466. package/dist/production/src/exceptions.js.map +1 -1
  467. package/dist/production/src/migrations/2024-08-26-120000-passwordless.cjs +31 -0
  468. package/dist/production/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -0
  469. package/dist/production/src/migrations/2024-08-26-120000-passwordless.js +32 -0
  470. package/dist/production/src/migrations/2024-08-26-120000-passwordless.js.map +1 -0
  471. package/dist/production/src/migrations/runner.cjs +3 -1
  472. package/dist/production/src/migrations/runner.cjs.map +1 -1
  473. package/dist/production/src/migrations/runner.js +3 -1
  474. package/dist/production/src/migrations/runner.js.map +1 -1
  475. package/dist/production/src/migrations/snapshot.cjs +33 -5
  476. package/dist/production/src/migrations/snapshot.cjs.map +1 -1
  477. package/dist/production/src/migrations/snapshot.js +33 -5
  478. package/dist/production/src/migrations/snapshot.js.map +1 -1
  479. package/dist/production/src/migrations/tenantCredentials.cjs.map +1 -1
  480. package/dist/production/src/migrations/tenantCredentials.js.map +1 -1
  481. package/dist/production/src/model/authorization/AclSchemaAccessNodeFactory.cjs.map +1 -1
  482. package/dist/production/src/model/authorization/AclSchemaAccessNodeFactory.js.map +1 -1
  483. package/dist/production/src/model/authorization/DirectPermissionsAccessNode.cjs.map +1 -1
  484. package/dist/production/src/model/authorization/DirectPermissionsAccessNode.js.map +1 -1
  485. package/dist/production/src/model/authorization/Identity.cjs.map +1 -1
  486. package/dist/production/src/model/authorization/Identity.js.map +1 -1
  487. package/dist/production/src/model/authorization/IdentityFactory.cjs.map +1 -1
  488. package/dist/production/src/model/authorization/IdentityFactory.js.map +1 -1
  489. package/dist/production/src/model/authorization/IdentityScope.cjs.map +1 -1
  490. package/dist/production/src/model/authorization/IdentityScope.js.map +1 -1
  491. package/dist/production/src/model/authorization/MembershipMatcher.cjs.map +1 -1
  492. package/dist/production/src/model/authorization/MembershipMatcher.js.map +1 -1
  493. package/dist/production/src/model/authorization/PermissionActions.cjs +5 -0
  494. package/dist/production/src/model/authorization/PermissionActions.cjs.map +1 -1
  495. package/dist/production/src/model/authorization/PermissionActions.js +5 -0
  496. package/dist/production/src/model/authorization/PermissionActions.js.map +1 -1
  497. package/dist/production/src/model/authorization/PermissionContext.cjs.map +1 -1
  498. package/dist/production/src/model/authorization/PermissionContext.js.map +1 -1
  499. package/dist/production/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
  500. package/dist/production/src/model/authorization/PermissionContextFactory.js.map +1 -1
  501. package/dist/production/src/model/authorization/PermissionsFactory.cjs +5 -0
  502. package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -1
  503. package/dist/production/src/model/authorization/PermissionsFactory.js +5 -0
  504. package/dist/production/src/model/authorization/PermissionsFactory.js.map +1 -1
  505. package/dist/production/src/model/authorization/ProjectScope.cjs.map +1 -1
  506. package/dist/production/src/model/authorization/ProjectScope.js.map +1 -1
  507. package/dist/production/src/model/authorization/ProjectScopeFactory.cjs.map +1 -1
  508. package/dist/production/src/model/authorization/ProjectScopeFactory.js.map +1 -1
  509. package/dist/production/src/model/commands/CommandBus.cjs.map +1 -1
  510. package/dist/production/src/model/commands/CommandBus.js.map +1 -1
  511. package/dist/production/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
  512. package/dist/production/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
  513. package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
  514. package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
  515. package/dist/production/src/model/commands/apiKey/DisableApiKeyCommand.cjs.map +1 -1
  516. package/dist/production/src/model/commands/apiKey/DisableApiKeyCommand.js.map +1 -1
  517. package/dist/production/src/model/commands/apiKey/DisableIdentityApiKeysCommand.cjs.map +1 -1
  518. package/dist/production/src/model/commands/apiKey/DisableIdentityApiKeysCommand.js.map +1 -1
  519. package/dist/production/src/model/commands/apiKey/DisableOneOffApiKeyCommand.cjs.map +1 -1
  520. package/dist/production/src/model/commands/apiKey/DisableOneOffApiKeyCommand.js.map +1 -1
  521. package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
  522. package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
  523. package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -0
  524. package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -0
  525. package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -0
  526. package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -0
  527. package/dist/production/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
  528. package/dist/production/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
  529. package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
  530. package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
  531. package/dist/production/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
  532. package/dist/production/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
  533. package/dist/production/src/model/commands/idp/DisableIdpCommand.cjs.map +1 -1
  534. package/dist/production/src/model/commands/idp/DisableIdpCommand.js.map +1 -1
  535. package/dist/production/src/model/commands/idp/EnableIdpCommand.cjs.map +1 -1
  536. package/dist/production/src/model/commands/idp/EnableIdpCommand.js.map +1 -1
  537. package/dist/production/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
  538. package/dist/production/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
  539. package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
  540. package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.js.map +1 -1
  541. package/dist/production/src/model/commands/mailTemplate/RemoveMailTemplateCommand.cjs.map +1 -1
  542. package/dist/production/src/model/commands/mailTemplate/RemoveMailTemplateCommand.js.map +1 -1
  543. package/dist/production/src/model/commands/membership/AddProjectMemberCommand.cjs.map +1 -1
  544. package/dist/production/src/model/commands/membership/AddProjectMemberCommand.js.map +1 -1
  545. package/dist/production/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.cjs.map +1 -1
  546. package/dist/production/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.js.map +1 -1
  547. package/dist/production/src/model/commands/membership/RemoveProjectMemberCommand.cjs.map +1 -1
  548. package/dist/production/src/model/commands/membership/RemoveProjectMemberCommand.js.map +1 -1
  549. package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +1 -1
  550. package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +1 -1
  551. package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
  552. package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
  553. package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
  554. package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js.map +1 -1
  555. package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.cjs.map +1 -1
  556. package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.js.map +1 -1
  557. package/dist/production/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.cjs.map +1 -1
  558. package/dist/production/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.js.map +1 -1
  559. package/dist/production/src/model/commands/otp/ConfirmOtpCommand.cjs.map +1 -1
  560. package/dist/production/src/model/commands/otp/ConfirmOtpCommand.js.map +1 -1
  561. package/dist/production/src/model/commands/otp/DisableOtpCommand.cjs.map +1 -1
  562. package/dist/production/src/model/commands/otp/DisableOtpCommand.js.map +1 -1
  563. package/dist/production/src/model/commands/otp/PrepareOtpCommand.cjs.map +1 -1
  564. package/dist/production/src/model/commands/otp/PrepareOtpCommand.js.map +1 -1
  565. package/dist/production/src/model/commands/person/ChangePasswordCommand.cjs.map +1 -1
  566. package/dist/production/src/model/commands/person/ChangePasswordCommand.js.map +1 -1
  567. package/dist/production/src/model/commands/person/ChangeProfileCommand.cjs.map +1 -1
  568. package/dist/production/src/model/commands/person/ChangeProfileCommand.js.map +1 -1
  569. package/dist/production/src/model/commands/person/CreatePersonCommand.cjs +2 -1
  570. package/dist/production/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
  571. package/dist/production/src/model/commands/person/CreatePersonCommand.js +2 -1
  572. package/dist/production/src/model/commands/person/CreatePersonCommand.js.map +1 -1
  573. package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
  574. package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
  575. package/dist/production/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
  576. package/dist/production/src/model/commands/person/DisablePersonCommand.js.map +1 -1
  577. package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.cjs +18 -0
  578. package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -0
  579. package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js +18 -0
  580. package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -0
  581. package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs +20 -0
  582. package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -0
  583. package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js +20 -0
  584. package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -0
  585. package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs +33 -0
  586. package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -0
  587. package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js +33 -0
  588. package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -0
  589. package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs +19 -0
  590. package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -0
  591. package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js +19 -0
  592. package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -0
  593. package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs +19 -0
  594. package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -0
  595. package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js +19 -0
  596. package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -0
  597. package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs +28 -0
  598. package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -0
  599. package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js +28 -0
  600. package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -0
  601. package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs +28 -0
  602. package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -0
  603. package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js +28 -0
  604. package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -0
  605. package/dist/production/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
  606. package/dist/production/src/model/commands/project/CreateProjectCommand.js.map +1 -1
  607. package/dist/production/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
  608. package/dist/production/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
  609. package/dist/production/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
  610. package/dist/production/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
  611. package/dist/production/src/model/consts/expirations.cjs +7 -0
  612. package/dist/production/src/model/consts/expirations.cjs.map +1 -0
  613. package/dist/production/src/model/consts/expirations.js +7 -0
  614. package/dist/production/src/model/consts/expirations.js.map +1 -0
  615. package/dist/production/src/model/dtos/Password.cjs.map +1 -1
  616. package/dist/production/src/model/dtos/Password.js.map +1 -1
  617. package/dist/production/src/model/mailing/UserMailer.cjs +10 -1
  618. package/dist/production/src/model/mailing/UserMailer.cjs.map +1 -1
  619. package/dist/production/src/model/mailing/UserMailer.js +10 -1
  620. package/dist/production/src/model/mailing/UserMailer.js.map +1 -1
  621. package/dist/production/src/model/mailing/templates/ExistingUserInvited.mustache.cjs.map +1 -1
  622. package/dist/production/src/model/mailing/templates/ExistingUserInvited.mustache.js.map +1 -1
  623. package/dist/production/src/model/mailing/templates/NewUserInvited.mustache.cjs.map +1 -1
  624. package/dist/production/src/model/mailing/templates/NewUserInvited.mustache.js.map +1 -1
  625. package/dist/production/src/model/mailing/templates/PasswordReset.mustache.cjs.map +1 -1
  626. package/dist/production/src/model/mailing/templates/PasswordReset.mustache.js.map +1 -1
  627. package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs +17 -0
  628. package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs.map +1 -0
  629. package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.js +18 -0
  630. package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -0
  631. package/dist/production/src/model/mailing/type.cjs +9 -3
  632. package/dist/production/src/model/mailing/type.cjs.map +1 -1
  633. package/dist/production/src/model/mailing/type.js +9 -3
  634. package/dist/production/src/model/mailing/type.js.map +1 -1
  635. package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
  636. package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
  637. package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs +21 -0
  638. package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -0
  639. package/dist/production/src/model/queries/configuration/ConfigurationQuery.js +21 -0
  640. package/dist/production/src/model/queries/configuration/ConfigurationQuery.js.map +1 -0
  641. package/dist/production/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
  642. package/dist/production/src/model/queries/identity/IdentityQuery.js.map +1 -1
  643. package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
  644. package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
  645. package/dist/production/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
  646. package/dist/production/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
  647. package/dist/production/src/model/queries/idp/helpers.cjs.map +1 -1
  648. package/dist/production/src/model/queries/idp/helpers.js.map +1 -1
  649. package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
  650. package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
  651. package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
  652. package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
  653. package/dist/production/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
  654. package/dist/production/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
  655. package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
  656. package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.js.map +1 -1
  657. package/dist/production/src/model/queries/membership/ProjectRolesByIdentityQuery.cjs.map +1 -1
  658. package/dist/production/src/model/queries/membership/ProjectRolesByIdentityQuery.js.map +1 -1
  659. package/dist/production/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
  660. package/dist/production/src/model/queries/membership/ProjectSlugSpecification.js.map +1 -1
  661. package/dist/production/src/model/queries/person/PersonByIdPQuery.cjs.map +1 -1
  662. package/dist/production/src/model/queries/person/PersonByIdPQuery.js.map +1 -1
  663. package/dist/production/src/model/queries/person/PersonByIdentityBatchQuery.cjs.map +1 -1
  664. package/dist/production/src/model/queries/person/PersonByIdentityBatchQuery.js.map +1 -1
  665. package/dist/production/src/model/queries/person/PersonQuery.cjs.map +1 -1
  666. package/dist/production/src/model/queries/person/PersonQuery.js.map +1 -1
  667. package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs +1 -1
  668. package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
  669. package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js +1 -1
  670. package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
  671. package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs +29 -0
  672. package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -0
  673. package/dist/production/src/model/queries/personToken/PersonTokenQuery.js +29 -0
  674. package/dist/production/src/model/queries/personToken/PersonTokenQuery.js.map +1 -0
  675. package/dist/production/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
  676. package/dist/production/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
  677. package/dist/production/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
  678. package/dist/production/src/model/queries/project/ProjectSecretsQuery.js.map +1 -1
  679. package/dist/production/src/model/queries/project/ProjectUpdateTimestampQuery.cjs.map +1 -1
  680. package/dist/production/src/model/queries/project/ProjectUpdateTimestampQuery.js.map +1 -1
  681. package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
  682. package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
  683. package/dist/production/src/model/queries/project/ProjectsQuery.cjs.map +1 -1
  684. package/dist/production/src/model/queries/project/ProjectsQuery.js.map +1 -1
  685. package/dist/production/src/model/service/ConfigurationManager.cjs +27 -0
  686. package/dist/production/src/model/service/ConfigurationManager.cjs.map +1 -0
  687. package/dist/production/src/model/service/ConfigurationManager.js +27 -0
  688. package/dist/production/src/model/service/ConfigurationManager.js.map +1 -0
  689. package/dist/production/src/model/service/EmailValidator.cjs.map +1 -1
  690. package/dist/production/src/model/service/EmailValidator.js.map +1 -1
  691. package/dist/production/src/model/service/IDPSignInManager.cjs +1 -1
  692. package/dist/production/src/model/service/IDPSignInManager.cjs.map +1 -1
  693. package/dist/production/src/model/service/IDPSignInManager.js +1 -1
  694. package/dist/production/src/model/service/IDPSignInManager.js.map +1 -1
  695. package/dist/production/src/model/service/InviteManager.cjs +7 -7
  696. package/dist/production/src/model/service/InviteManager.cjs.map +1 -1
  697. package/dist/production/src/model/service/InviteManager.js +6 -6
  698. package/dist/production/src/model/service/InviteManager.js.map +1 -1
  699. package/dist/production/src/model/service/MailTemplateManager.cjs.map +1 -1
  700. package/dist/production/src/model/service/MailTemplateManager.js.map +1 -1
  701. package/dist/production/src/model/service/MembershipValidator.cjs.map +1 -1
  702. package/dist/production/src/model/service/MembershipValidator.js.map +1 -1
  703. package/dist/production/src/model/service/OtpAuthenticator.cjs.map +1 -1
  704. package/dist/production/src/model/service/OtpAuthenticator.js.map +1 -1
  705. package/dist/production/src/model/service/OtpManager.cjs.map +1 -1
  706. package/dist/production/src/model/service/OtpManager.js.map +1 -1
  707. package/dist/production/src/model/service/PasswordChangeManager.cjs +1 -1
  708. package/dist/production/src/model/service/PasswordChangeManager.cjs.map +1 -1
  709. package/dist/production/src/model/service/PasswordChangeManager.js +1 -1
  710. package/dist/production/src/model/service/PasswordChangeManager.js.map +1 -1
  711. package/dist/production/src/model/service/PasswordResetManager.cjs +7 -15
  712. package/dist/production/src/model/service/PasswordResetManager.cjs.map +1 -1
  713. package/dist/production/src/model/service/PasswordResetManager.js +7 -15
  714. package/dist/production/src/model/service/PasswordResetManager.js.map +1 -1
  715. package/dist/production/src/model/service/PasswordlessSignInManager.cjs +135 -0
  716. package/dist/production/src/model/service/PasswordlessSignInManager.cjs.map +1 -0
  717. package/dist/production/src/model/service/PasswordlessSignInManager.js +135 -0
  718. package/dist/production/src/model/service/PasswordlessSignInManager.js.map +1 -0
  719. package/dist/production/src/model/service/PersonAccessManager.cjs.map +1 -1
  720. package/dist/production/src/model/service/PersonAccessManager.js.map +1 -1
  721. package/dist/production/src/model/service/PersonManager.cjs +7 -0
  722. package/dist/production/src/model/service/PersonManager.cjs.map +1 -1
  723. package/dist/production/src/model/service/PersonManager.js +7 -0
  724. package/dist/production/src/model/service/PersonManager.js.map +1 -1
  725. package/dist/production/src/model/service/ProjectManager.cjs +2 -2
  726. package/dist/production/src/model/service/ProjectManager.cjs.map +1 -1
  727. package/dist/production/src/model/service/ProjectManager.js +2 -2
  728. package/dist/production/src/model/service/ProjectManager.js.map +1 -1
  729. package/dist/production/src/model/service/ProjectMemberManager.cjs.map +1 -1
  730. package/dist/production/src/model/service/ProjectMemberManager.js.map +1 -1
  731. package/dist/production/src/model/service/RolesManager.cjs +1 -1
  732. package/dist/production/src/model/service/RolesManager.cjs.map +1 -1
  733. package/dist/production/src/model/service/RolesManager.js +1 -1
  734. package/dist/production/src/model/service/RolesManager.js.map +1 -1
  735. package/dist/production/src/model/service/SecretsManager.cjs.map +1 -1
  736. package/dist/production/src/model/service/SecretsManager.js.map +1 -1
  737. package/dist/production/src/model/service/SignInManager.cjs.map +1 -1
  738. package/dist/production/src/model/service/SignInManager.js.map +1 -1
  739. package/dist/production/src/model/service/SignUpManager.cjs +1 -1
  740. package/dist/production/src/model/service/SignUpManager.cjs.map +1 -1
  741. package/dist/production/src/model/service/SignUpManager.js +1 -1
  742. package/dist/production/src/model/service/SignUpManager.js.map +1 -1
  743. package/dist/production/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
  744. package/dist/production/src/model/service/apiKey/ApiKeyManager.js.map +1 -1
  745. package/dist/production/src/model/service/apiKey/ApiKeyService.cjs.map +1 -1
  746. package/dist/production/src/model/service/apiKey/ApiKeyService.js.map +1 -1
  747. package/dist/production/src/model/service/helpers/getPreferredProject.cjs +13 -0
  748. package/dist/production/src/model/service/helpers/getPreferredProject.cjs.map +1 -0
  749. package/dist/production/src/model/service/helpers/getPreferredProject.js +13 -0
  750. package/dist/production/src/model/service/helpers/getPreferredProject.js.map +1 -0
  751. package/dist/production/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
  752. package/dist/production/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
  753. package/dist/production/src/model/service/idp/IDPManager.cjs.map +1 -1
  754. package/dist/production/src/model/service/idp/IDPManager.js.map +1 -1
  755. package/dist/production/src/model/service/idp/IDPResponseError.cjs.map +1 -1
  756. package/dist/production/src/model/service/idp/IDPResponseError.js.map +1 -1
  757. package/dist/production/src/model/service/idp/IDPValidationError.cjs.map +1 -1
  758. package/dist/production/src/model/service/idp/IDPValidationError.js.map +1 -1
  759. package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
  760. package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
  761. package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
  762. package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.js.map +1 -1
  763. package/dist/production/src/model/service/idp/providers/AppleProvider.cjs +1 -1
  764. package/dist/production/src/model/service/idp/providers/AppleProvider.cjs.map +1 -1
  765. package/dist/production/src/model/service/idp/providers/AppleProvider.js +1 -1
  766. package/dist/production/src/model/service/idp/providers/AppleProvider.js.map +1 -1
  767. package/dist/production/src/model/service/idp/providers/FacebookProvider.cjs +1 -1
  768. package/dist/production/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
  769. package/dist/production/src/model/service/idp/providers/FacebookProvider.js +1 -1
  770. package/dist/production/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
  771. package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs +9 -5
  772. package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
  773. package/dist/production/src/model/service/idp/providers/OIDCHelpers.js +9 -5
  774. package/dist/production/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
  775. package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs +9 -3
  776. package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
  777. package/dist/production/src/model/service/idp/providers/OIDCProvider.js +9 -3
  778. package/dist/production/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
  779. package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs +6 -1
  780. package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
  781. package/dist/production/src/model/service/idp/providers/OIDCTypes.js +6 -1
  782. package/dist/production/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
  783. package/dist/production/src/model/service/idp/providers/helpers.cjs.map +1 -1
  784. package/dist/production/src/model/service/idp/providers/helpers.js.map +1 -1
  785. package/dist/production/src/model/service/membershipUtils.cjs.map +1 -1
  786. package/dist/production/src/model/service/membershipUtils.js.map +1 -1
  787. package/dist/production/src/model/type/ApiKey.cjs.map +1 -1
  788. package/dist/production/src/model/type/ApiKey.js.map +1 -1
  789. package/dist/production/src/model/utils/DatabaseContext.cjs.map +1 -1
  790. package/dist/production/src/model/utils/DatabaseContext.js.map +1 -1
  791. package/dist/production/src/model/utils/Response.cjs.map +1 -1
  792. package/dist/production/src/model/utils/Response.js.map +1 -1
  793. package/dist/production/src/model/utils/password.cjs.map +1 -1
  794. package/dist/production/src/model/utils/password.js.map +1 -1
  795. package/dist/production/src/model/utils/tokenUtils.cjs +39 -0
  796. package/dist/production/src/model/utils/tokenUtils.cjs.map +1 -1
  797. package/dist/production/src/model/utils/tokenUtils.js +40 -1
  798. package/dist/production/src/model/utils/tokenUtils.js.map +1 -1
  799. package/dist/production/src/resolvers/ResolverFactory.cjs +8 -1
  800. package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -1
  801. package/dist/production/src/resolvers/ResolverFactory.js +8 -1
  802. package/dist/production/src/resolvers/ResolverFactory.js.map +1 -1
  803. package/dist/production/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
  804. package/dist/production/src/resolvers/TenantResolverContextFactory.js.map +1 -1
  805. package/dist/production/src/resolvers/errorUtils.cjs.map +1 -1
  806. package/dist/production/src/resolvers/errorUtils.js.map +1 -1
  807. package/dist/production/src/resolvers/membershipUtils.cjs.map +1 -1
  808. package/dist/production/src/resolvers/membershipUtils.js.map +1 -1
  809. package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
  810. package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
  811. package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
  812. package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
  813. package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +41 -0
  814. package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -0
  815. package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +41 -0
  816. package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -0
  817. package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
  818. package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
  819. package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
  820. package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
  821. package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
  822. package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
  823. package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
  824. package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
  825. package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
  826. package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
  827. package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
  828. package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
  829. package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
  830. package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
  831. package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
  832. package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
  833. package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
  834. package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
  835. package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs +4 -1
  836. package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
  837. package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js +4 -1
  838. package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
  839. package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
  840. package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
  841. package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
  842. package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
  843. package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +83 -0
  844. package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -0
  845. package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js +83 -0
  846. package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -0
  847. package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
  848. package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
  849. package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
  850. package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
  851. package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
  852. package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
  853. package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
  854. package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
  855. package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +52 -0
  856. package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -0
  857. package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +52 -0
  858. package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -0
  859. package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
  860. package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
  861. package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
  862. package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
  863. package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
  864. package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
  865. package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
  866. package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
  867. package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
  868. package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
  869. package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
  870. package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
  871. package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs +34 -0
  872. package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -0
  873. package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js +34 -0
  874. package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -0
  875. package/dist/production/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
  876. package/dist/production/src/resolvers/query/IDPQueryResolver.js.map +1 -1
  877. package/dist/production/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
  878. package/dist/production/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
  879. package/dist/production/src/resolvers/query/MeQueryResolver.cjs.map +1 -1
  880. package/dist/production/src/resolvers/query/MeQueryResolver.js.map +1 -1
  881. package/dist/production/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
  882. package/dist/production/src/resolvers/query/PersonQueryResolver.js.map +1 -1
  883. package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
  884. package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
  885. package/dist/production/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
  886. package/dist/production/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
  887. package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs +1 -0
  888. package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
  889. package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js +1 -0
  890. package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
  891. package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
  892. package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
  893. package/dist/production/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
  894. package/dist/production/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
  895. package/dist/production/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
  896. package/dist/production/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
  897. package/dist/production/src/schema/tenant.graphql.cjs +162 -10
  898. package/dist/production/src/schema/tenant.graphql.cjs.map +1 -1
  899. package/dist/production/src/schema/tenant.graphql.js +162 -10
  900. package/dist/production/src/schema/tenant.graphql.js.map +1 -1
  901. package/dist/production/src/utils/Mailer.cjs.map +1 -1
  902. package/dist/production/src/utils/Mailer.js.map +1 -1
  903. package/dist/production/src/utils/TemplateRenderer.cjs.map +1 -1
  904. package/dist/production/src/utils/TemplateRenderer.js.map +1 -1
  905. package/dist/production/src/utils/array.cjs.map +1 -1
  906. package/dist/production/src/utils/array.js.map +1 -1
  907. package/dist/production/src/utils/batchQuery.cjs.map +1 -1
  908. package/dist/production/src/utils/batchQuery.js.map +1 -1
  909. package/dist/tests/cases/integration/mocked/sql/{createPasswordResetSql.d.ts → createPersonTokenSql.d.ts} +3 -2
  910. package/dist/tests/cases/integration/mocked/sql/createPersonTokenSql.d.ts.map +1 -0
  911. package/dist/tests/cases/integration/mocked/sql/getPersonByEmailSql.d.ts.map +1 -1
  912. package/dist/tests/src/IdPMock.d.ts +2 -2
  913. package/dist/tests/src/IdPMock.d.ts.map +1 -1
  914. package/dist/tests/src/mailer.d.ts.map +1 -1
  915. package/dist/tests/tsconfig.tsbuildinfo +1 -1
  916. package/dist/types/TenantContainer.d.ts +18 -0
  917. package/dist/types/TenantContainer.d.ts.map +1 -1
  918. package/dist/types/migrations/2024-08-26-120000-passwordless.d.ts +3 -0
  919. package/dist/types/migrations/2024-08-26-120000-passwordless.d.ts.map +1 -0
  920. package/dist/types/migrations/runner.d.ts.map +1 -1
  921. package/dist/types/migrations/snapshot.d.ts.map +1 -1
  922. package/dist/types/model/authorization/PermissionActions.d.ts +25 -0
  923. package/dist/types/model/authorization/PermissionActions.d.ts.map +1 -1
  924. package/dist/types/model/authorization/PermissionsFactory.d.ts.map +1 -1
  925. package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts +8 -0
  926. package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts.map +1 -0
  927. package/dist/types/model/commands/configuration/index.d.ts +2 -0
  928. package/dist/types/model/commands/configuration/index.d.ts.map +1 -0
  929. package/dist/types/model/commands/index.d.ts +2 -2
  930. package/dist/types/model/commands/index.d.ts.map +1 -1
  931. package/dist/types/model/commands/person/CreatePersonCommand.d.ts.map +1 -1
  932. package/dist/types/model/commands/person/TogglePersonPasswordlessCommand.d.ts +8 -0
  933. package/dist/types/model/commands/person/TogglePersonPasswordlessCommand.d.ts.map +1 -0
  934. package/dist/types/model/commands/person/index.d.ts +1 -0
  935. package/dist/types/model/commands/person/index.d.ts.map +1 -1
  936. package/dist/types/model/commands/personToken/ActivateOtpCommand.d.ts +8 -0
  937. package/dist/types/model/commands/personToken/ActivateOtpCommand.d.ts.map +1 -0
  938. package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts +19 -0
  939. package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts.map +1 -0
  940. package/dist/types/model/commands/personToken/IncreaseOtpAttemptCommand.d.ts +7 -0
  941. package/dist/types/model/commands/personToken/IncreaseOtpAttemptCommand.d.ts.map +1 -0
  942. package/dist/types/model/commands/personToken/InvalidateTokenCommand.d.ts +7 -0
  943. package/dist/types/model/commands/personToken/InvalidateTokenCommand.d.ts.map +1 -0
  944. package/dist/types/model/commands/{passwordReset → personToken}/ResetPasswordCommand.d.ts +3 -2
  945. package/dist/types/model/commands/personToken/ResetPasswordCommand.d.ts.map +1 -0
  946. package/dist/types/model/commands/personToken/SavePersonTokenCommand.d.ts +19 -0
  947. package/dist/types/model/commands/personToken/SavePersonTokenCommand.d.ts.map +1 -0
  948. package/dist/types/model/commands/personToken/index.d.ts +7 -0
  949. package/dist/types/model/commands/personToken/index.d.ts.map +1 -0
  950. package/dist/types/model/consts/expirations.d.ts +3 -0
  951. package/dist/types/model/consts/expirations.d.ts.map +1 -0
  952. package/dist/types/model/mailing/UserMailer.d.ts +10 -0
  953. package/dist/types/model/mailing/UserMailer.d.ts.map +1 -1
  954. package/dist/types/model/mailing/templates/PasswordlessSignIn.mustache.d.ts +3 -0
  955. package/dist/types/model/mailing/templates/PasswordlessSignIn.mustache.d.ts.map +1 -0
  956. package/dist/types/model/mailing/type.d.ts +2 -1
  957. package/dist/types/model/mailing/type.d.ts.map +1 -1
  958. package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts +6 -0
  959. package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts.map +1 -0
  960. package/dist/types/model/queries/configuration/index.d.ts +2 -0
  961. package/dist/types/model/queries/configuration/index.d.ts.map +1 -0
  962. package/dist/types/model/queries/index.d.ts +1 -0
  963. package/dist/types/model/queries/index.d.ts.map +1 -1
  964. package/dist/types/model/queries/person/PersonQueryBuilderFactory.d.ts.map +1 -1
  965. package/dist/types/model/queries/person/types.d.ts +1 -0
  966. package/dist/types/model/queries/person/types.d.ts.map +1 -1
  967. package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts +12 -0
  968. package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts.map +1 -0
  969. package/dist/types/model/service/ConfigurationManager.d.ts +9 -0
  970. package/dist/types/model/service/ConfigurationManager.d.ts.map +1 -0
  971. package/dist/types/model/service/IDPSignInManager.d.ts +1 -0
  972. package/dist/types/model/service/IDPSignInManager.d.ts.map +1 -1
  973. package/dist/types/model/service/InviteManager.d.ts.map +1 -1
  974. package/dist/types/model/service/PasswordResetManager.d.ts +1 -1
  975. package/dist/types/model/service/PasswordResetManager.d.ts.map +1 -1
  976. package/dist/types/model/service/PasswordlessSignInManager.d.ts +54 -0
  977. package/dist/types/model/service/PasswordlessSignInManager.d.ts.map +1 -0
  978. package/dist/types/model/service/PersonManager.d.ts +1 -0
  979. package/dist/types/model/service/PersonManager.d.ts.map +1 -1
  980. package/dist/types/model/service/PersonTokenManager.d.ts +3 -0
  981. package/dist/types/model/service/PersonTokenManager.d.ts.map +1 -0
  982. package/dist/types/model/service/helpers/getPreferredProject.d.ts +3 -0
  983. package/dist/types/model/service/helpers/getPreferredProject.d.ts.map +1 -0
  984. package/dist/types/model/service/idp/IdentityProviderHandler.d.ts +3 -3
  985. package/dist/types/model/service/idp/IdentityProviderHandler.d.ts.map +1 -1
  986. package/dist/types/model/service/idp/providers/AppleProvider.d.ts +10 -2
  987. package/dist/types/model/service/idp/providers/AppleProvider.d.ts.map +1 -1
  988. package/dist/types/model/service/idp/providers/FacebookProvider.d.ts +10 -2
  989. package/dist/types/model/service/idp/providers/FacebookProvider.d.ts.map +1 -1
  990. package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts +4 -4
  991. package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts.map +1 -1
  992. package/dist/types/model/service/idp/providers/OIDCProvider.d.ts +6 -2
  993. package/dist/types/model/service/idp/providers/OIDCProvider.d.ts.map +1 -1
  994. package/dist/types/model/service/idp/providers/OIDCTypes.d.ts +21 -5
  995. package/dist/types/model/service/idp/providers/OIDCTypes.d.ts.map +1 -1
  996. package/dist/types/model/type/PersonToken.d.ts +16 -0
  997. package/dist/types/model/type/PersonToken.d.ts.map +1 -0
  998. package/dist/types/model/type/index.d.ts +1 -0
  999. package/dist/types/model/type/index.d.ts.map +1 -1
  1000. package/dist/types/model/utils/tokenUtils.d.ts +8 -0
  1001. package/dist/types/model/utils/tokenUtils.d.ts.map +1 -1
  1002. package/dist/types/resolvers/ResolverFactory.d.ts +8 -0
  1003. package/dist/types/resolvers/ResolverFactory.d.ts.map +1 -1
  1004. package/dist/types/resolvers/mutation/configuration/ConfigurationMutationResolver.d.ts +9 -0
  1005. package/dist/types/resolvers/mutation/configuration/ConfigurationMutationResolver.d.ts.map +1 -0
  1006. package/dist/types/resolvers/mutation/person/IDPMutationResolver.d.ts.map +1 -1
  1007. package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts +13 -0
  1008. package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts.map +1 -0
  1009. package/dist/types/resolvers/mutation/person/ResetPasswordMutationResolver.d.ts.map +1 -1
  1010. package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts +13 -0
  1011. package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts.map +1 -0
  1012. package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts +9 -0
  1013. package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts.map +1 -0
  1014. package/dist/types/resolvers/responseHelpers/PersonResponseFactory.d.ts.map +1 -1
  1015. package/dist/types/resolvers/types/ProjectTypeResolver.d.ts +3 -3
  1016. package/dist/types/schema/index.d.ts +362 -38
  1017. package/dist/types/schema/index.d.ts.map +1 -1
  1018. package/dist/types/schema/tenant.graphql.d.ts.map +1 -1
  1019. package/dist/types/tsconfig.tsbuildinfo +1 -1
  1020. package/dist/types/utils/batchQuery.d.ts.map +1 -1
  1021. package/{graphql-tenant.codegen.yml → graphql.codegen.yml} +1 -1
  1022. package/package.json +23 -27
  1023. package/src/TenantContainer.ts +18 -0
  1024. package/src/migrations/2024-08-26-120000-passwordless.ts +31 -0
  1025. package/src/migrations/runner.ts +2 -0
  1026. package/src/migrations/snapshot-template-end.txt +3 -0
  1027. package/src/migrations/snapshot.ts +33 -5
  1028. package/src/model/authorization/PermissionActions.ts +7 -0
  1029. package/src/model/authorization/PermissionsFactory.ts +5 -0
  1030. package/src/model/commands/configuration/UpdateConfigurationCommand.ts +26 -0
  1031. package/src/model/commands/configuration/index.ts +1 -0
  1032. package/src/model/commands/index.ts +2 -2
  1033. package/src/model/commands/person/CreatePersonCommand.ts +1 -0
  1034. package/src/model/commands/person/TogglePersonPasswordlessCommand.ts +18 -0
  1035. package/src/model/commands/person/index.ts +1 -0
  1036. package/src/model/commands/personToken/ActivateOtpCommand.ts +24 -0
  1037. package/src/model/commands/personToken/CreatePersonTokenCommand.ts +42 -0
  1038. package/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts +23 -0
  1039. package/src/model/commands/personToken/InvalidateTokenCommand.ts +22 -0
  1040. package/src/model/commands/personToken/ResetPasswordCommand.ts +28 -0
  1041. package/src/model/commands/personToken/SavePersonTokenCommand.ts +42 -0
  1042. package/src/model/commands/personToken/index.ts +6 -0
  1043. package/src/model/consts/expirations.ts +2 -0
  1044. package/src/model/mailing/UserMailer.ts +14 -0
  1045. package/src/model/mailing/templates/PasswordlessSignIn.mustache.ts +15 -0
  1046. package/src/model/mailing/type.ts +3 -0
  1047. package/src/model/queries/configuration/ConfigurationQuery.ts +30 -0
  1048. package/src/model/queries/configuration/index.ts +1 -0
  1049. package/src/model/queries/index.ts +1 -0
  1050. package/src/model/queries/person/PersonQueryBuilderFactory.ts +1 -0
  1051. package/src/model/queries/person/types.ts +1 -0
  1052. package/src/model/queries/personToken/PersonTokenQuery.ts +35 -0
  1053. package/src/model/service/ConfigurationManager.ts +22 -0
  1054. package/src/model/service/IDPSignInManager.ts +7 -6
  1055. package/src/model/service/InviteManager.ts +5 -6
  1056. package/src/model/service/OtpAuthenticator.ts +1 -1
  1057. package/src/model/service/PasswordResetManager.ts +4 -10
  1058. package/src/model/service/PasswordlessSignInManager.ts +190 -0
  1059. package/src/model/service/PersonManager.ts +6 -0
  1060. package/src/model/service/PersonTokenManager.ts +2 -0
  1061. package/src/model/service/helpers/getPreferredProject.ts +11 -0
  1062. package/src/model/service/idp/IdentityProviderHandler.ts +3 -3
  1063. package/src/model/service/idp/providers/AppleProvider.ts +3 -3
  1064. package/src/model/service/idp/providers/FacebookProvider.ts +3 -3
  1065. package/src/model/service/idp/providers/OIDCHelpers.ts +11 -6
  1066. package/src/model/service/idp/providers/OIDCProvider.ts +10 -4
  1067. package/src/model/service/idp/providers/OIDCTypes.ts +5 -1
  1068. package/src/model/type/PersonToken.ts +21 -0
  1069. package/src/model/type/index.ts +1 -0
  1070. package/src/model/utils/tokenUtils.ts +47 -0
  1071. package/src/resolvers/ResolverFactory.ts +19 -0
  1072. package/src/resolvers/mutation/configuration/ConfigurationMutationResolver.ts +29 -0
  1073. package/src/resolvers/mutation/person/IDPMutationResolver.ts +4 -1
  1074. package/src/resolvers/mutation/person/PasswordlessMutationResolver.ts +81 -0
  1075. package/src/resolvers/mutation/person/ResetPasswordMutationResolver.ts +1 -10
  1076. package/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.ts +44 -0
  1077. package/src/resolvers/query/ConfigurationQueryResolver.ts +21 -0
  1078. package/src/resolvers/responseHelpers/PersonResponseFactory.ts +1 -0
  1079. package/src/resolvers/types/ProjectTypeResolver.ts +3 -3
  1080. package/src/schema/index.ts +362 -35
  1081. package/src/schema/tenant.graphql.ts +162 -10
  1082. package/tests/cases/integration/mocked/addProjectMemberMutation.test.ts +1 -1
  1083. package/tests/cases/integration/mocked/changeMyPasswordMutation.test.ts +2 -2
  1084. package/tests/cases/integration/mocked/changeMyProfileMutation.test.ts +2 -2
  1085. package/tests/cases/integration/mocked/changePasswordMutation.test.ts +1 -1
  1086. package/tests/cases/integration/mocked/changeProfileMutation.test.ts +2 -2
  1087. package/tests/cases/integration/mocked/confirmOtpMutation.test.ts +1 -1
  1088. package/tests/cases/integration/mocked/createApiKeyMutation.test.ts +1 -1
  1089. package/tests/cases/integration/mocked/createSessionKeyMutation.test.ts +1 -1
  1090. package/tests/cases/integration/mocked/disableApiKeyMutation.ts +1 -1
  1091. package/tests/cases/integration/mocked/inviteMutations.test.ts +3 -3
  1092. package/tests/cases/integration/mocked/listProjectMembersQuery.test.ts +1 -1
  1093. package/tests/cases/integration/mocked/personByIdQuery.test.ts +1 -1
  1094. package/tests/cases/integration/mocked/prepareOtpMutation.test.ts +3 -3
  1095. package/tests/cases/integration/mocked/removeProjectMemberMutation.test.ts +1 -1
  1096. package/tests/cases/integration/mocked/signInIdpMutation.test.ts +1 -1
  1097. package/tests/cases/integration/mocked/signInMutation.test.ts +1 -1
  1098. package/tests/cases/integration/mocked/signOutMutation.test.ts +1 -1
  1099. package/tests/cases/integration/mocked/signUpMutation.test.ts +1 -1
  1100. package/tests/cases/integration/mocked/sql/{createPasswordResetSql.ts → createPersonTokenSql.ts} +5 -3
  1101. package/tests/cases/integration/mocked/sql/getPersonByEmailSql.ts +2 -1
  1102. package/tests/cases/integration/mocked/sql/getPersonByIdSql.ts +1 -1
  1103. package/tests/cases/integration/mocked/sql/getPersonByIdentity.ts +1 -1
  1104. package/tests/cases/integration/mocked/sql/getPersonByIdpSql.ts +1 -1
  1105. package/tests/cases/integration/mocked/updateProjectMemberMutation.test.ts +1 -1
  1106. package/tests/cases/migrations/2020-06-08-134000-tenant-credentials.test.ts +5 -3
  1107. package/tests/cases/unit/authorization/membershipAwareAccessNode.test.ts +9 -9
  1108. package/tests/cases/unit/authorization/membershipMatcher.test.ts +10 -10
  1109. package/tests/src/IdPMock.ts +2 -2
  1110. package/tests/src/mailer.ts +3 -4
  1111. package/tests/src/testGraphql.ts +2 -2
  1112. package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs +0 -30
  1113. package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs.map +0 -1
  1114. package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js +0 -30
  1115. package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js.map +0 -1
  1116. package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.cjs +0 -38
  1117. package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.cjs.map +0 -1
  1118. package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.js +0 -38
  1119. package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.js.map +0 -1
  1120. package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs +0 -24
  1121. package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs.map +0 -1
  1122. package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js +0 -24
  1123. package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js.map +0 -1
  1124. package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs +0 -30
  1125. package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs.map +0 -1
  1126. package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js +0 -30
  1127. package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js.map +0 -1
  1128. package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.cjs +0 -38
  1129. package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.cjs.map +0 -1
  1130. package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.js +0 -38
  1131. package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.js.map +0 -1
  1132. package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs +0 -24
  1133. package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs.map +0 -1
  1134. package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js +0 -24
  1135. package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js.map +0 -1
  1136. package/dist/tests/cases/integration/mocked/sql/createPasswordResetSql.d.ts.map +0 -1
  1137. package/dist/tests/src/testTenantDb.d.ts +0 -31
  1138. package/dist/tests/src/testTenantDb.d.ts.map +0 -1
  1139. package/dist/types/model/commands/passwordReset/CreatePasswordResetRequestCommand.d.ts +0 -12
  1140. package/dist/types/model/commands/passwordReset/CreatePasswordResetRequestCommand.d.ts.map +0 -1
  1141. package/dist/types/model/commands/passwordReset/ResetPasswordCommand.d.ts.map +0 -1
  1142. package/dist/types/model/commands/passwordReset/SavePasswordResetRequestCommand.d.ts +0 -10
  1143. package/dist/types/model/commands/passwordReset/SavePasswordResetRequestCommand.d.ts.map +0 -1
  1144. package/dist/types/model/commands/passwordReset/index.d.ts +0 -4
  1145. package/dist/types/model/commands/passwordReset/index.d.ts.map +0 -1
  1146. package/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.ts +0 -25
  1147. package/src/model/commands/passwordReset/ResetPasswordCommand.ts +0 -57
  1148. package/src/model/commands/passwordReset/SavePasswordResetRequestCommand.ts +0 -28
  1149. package/src/model/commands/passwordReset/index.ts +0 -3
  1150. package/tests/src/testTenantDb.ts +0 -202
@@ -1,4 +1,4 @@
1
- import { assert, test } from 'vitest'
1
+ import { expect, test } from 'bun:test'
2
2
  import { testUuid } from '../../../src/testUuid'
3
3
  import { MembershipMatcher } from '../../../../src'
4
4
 
@@ -21,7 +21,7 @@ test('admin can assign editor role with matching variable', async () => {
21
21
  },
22
22
  ])
23
23
 
24
- assert.ok(matcher.matches(createMembership('editor', siteIdA)))
24
+ expect(matcher.matches(createMembership('editor', siteIdA))).toBeTrue()
25
25
  })
26
26
 
27
27
  test('admin cannot assign editor role with matching variable, but in a different role', async () => {
@@ -40,7 +40,7 @@ test('admin cannot assign editor role with matching variable, but in a different
40
40
  },
41
41
  ])
42
42
 
43
- assert.notOk(matcher.matches(createMembership('editor', siteIdB)))
43
+ expect(matcher.matches(createMembership('editor', siteIdB))).toBeFalse()
44
44
  })
45
45
 
46
46
  test('admin cannot assign editor role with different variable', async () => {
@@ -54,7 +54,7 @@ test('admin cannot assign editor role with different variable', async () => {
54
54
  },
55
55
  },
56
56
  ])
57
- assert.notOk(matcher.matches(createMembership('editor', siteIdB)))
57
+ expect(matcher.matches(createMembership('editor', siteIdB))).toBeFalse()
58
58
  })
59
59
 
60
60
  test('editor cannot assign editor role', async () => {
@@ -64,7 +64,7 @@ test('editor cannot assign editor role', async () => {
64
64
  matchRule: {},
65
65
  },
66
66
  ])
67
- assert.notOk(matcher.matches(createMembership('editor', siteIdB)))
67
+ expect(matcher.matches(createMembership('editor', siteIdB))).toBeFalse()
68
68
  })
69
69
 
70
70
  test('admin can assign editor role with any variable', async () => {
@@ -78,7 +78,7 @@ test('admin can assign editor role with any variable', async () => {
78
78
  },
79
79
  },
80
80
  ])
81
- assert.ok(matcher.matches(createMembership('editor', siteIdB)))
81
+ expect(matcher.matches(createMembership('editor', siteIdB))).toBeTrue()
82
82
  })
83
83
 
84
84
  test('admin cannot assign editor role with any variable', async () => {
@@ -90,7 +90,7 @@ test('admin cannot assign editor role with any variable', async () => {
90
90
  },
91
91
  },
92
92
  ])
93
- assert.notOk(matcher.matches(createMembership('editor', siteIdA)))
93
+ expect(matcher.matches(createMembership('editor', siteIdA))).toBeFalse()
94
94
  })
95
95
 
96
96
  test('admin can assign editor role without variable', async () => {
@@ -102,7 +102,7 @@ test('admin can assign editor role without variable', async () => {
102
102
  },
103
103
  },
104
104
  ])
105
- assert.ok(matcher.matches(createMembership('editor')))
105
+ expect(matcher.matches(createMembership('editor'))).toBeTrue()
106
106
  })
107
107
 
108
108
  test('admin can assign editor role with any variable', async () => {
@@ -116,7 +116,7 @@ test('admin can assign editor role with any variable', async () => {
116
116
  },
117
117
  },
118
118
  ])
119
- assert.ok(matcher.matches(createMembership('editor', siteIdB)))
119
+ expect(matcher.matches(createMembership('editor', siteIdB))).toBeTrue()
120
120
  })
121
121
 
122
122
  test('admin cannot assign editor role if only one variable matches', async () => {
@@ -132,5 +132,5 @@ test('admin cannot assign editor role if only one variable matches', async () =>
132
132
  },
133
133
  },
134
134
  ])
135
- assert.notOk(matcher.matches({ role: 'editor', variables: [{ name: 'site', values: [siteIdA] }, { name: 'locale', values: ['XXX'] }] }))
135
+ expect(matcher.matches({ role: 'editor', variables: [{ name: 'site', values: [siteIdA] }, { name: 'locale', values: ['XXX'] }] })).toBeFalse()
136
136
  })
@@ -1,4 +1,4 @@
1
- import { IdentityProviderHandler, IDPClaim, InitIDPAuthResult } from '../../src'
1
+ import { IdentityProviderHandler, IDPResponse, InitIDPAuthResult } from '../../src'
2
2
 
3
3
  export class IdPMock implements IdentityProviderHandler<any> {
4
4
  initAuth(configuration: any, data: unknown): Promise<InitIDPAuthResult> {
@@ -8,7 +8,7 @@ export class IdPMock implements IdentityProviderHandler<any> {
8
8
  })
9
9
  }
10
10
 
11
- processResponse(configuration: any, responseData: any): Promise<IDPClaim> {
11
+ processResponse(configuration: any, responseData: any): Promise<IDPResponse> {
12
12
  return Promise.resolve({
13
13
  externalIdentifier: configuration.externalIdentifier,
14
14
  email: configuration.email,
@@ -1,5 +1,5 @@
1
1
  import { Mailer, MailMessage, SentInfo } from '../../src/utils'
2
- import { assert } from 'vitest'
2
+ import { expect } from 'bun:test'
3
3
 
4
4
  export type ExpectedMessage = { subject: string }
5
5
 
@@ -17,16 +17,15 @@ export const createMockedMailer = (): MockedMailer => {
17
17
 
18
18
  expectMessage(expected: ExpectedMessage) {
19
19
  const actual = mails.shift()
20
- assert.ok(actual)
21
20
  if (!actual) {
22
21
  throw new Error('No email to consume')
23
22
  }
24
- assert.equal(actual.subject, expected.subject)
23
+ expect(actual.subject).toEqual(expected.subject)
25
24
  return actual
26
25
  }
27
26
 
28
27
  expectEmpty() {
29
- assert.equal(mails.length, 0)
28
+ expect(mails.length).toEqual(0)
30
29
  }
31
30
  })()
32
31
  }
@@ -1,5 +1,5 @@
1
1
  import { graphql, GraphQLSchema } from 'graphql'
2
- import { assert } from 'vitest'
2
+ import { expect } from 'bun:test'
3
3
 
4
4
  export interface Test {
5
5
  schema: GraphQLSchema
@@ -24,6 +24,6 @@ export const executeGraphQlTest = async (test: Test) => {
24
24
  if (typeof test.return === 'function') {
25
25
  test.return(responseNormalized)
26
26
  } else {
27
- assert.deepStrictEqual(responseNormalized, test.return)
27
+ expect(responseNormalized).toStrictEqual(test.return)
28
28
  }
29
29
  }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("@contember/database");
4
- require("../../type/ApiKey.cjs");
5
- const SavePasswordResetRequestCommand = require("./SavePasswordResetRequestCommand.cjs");
6
- const tokenUtils = require("../../utils/tokenUtils.cjs");
7
- class CreatePasswordResetRequestCommand {
8
- constructor(personId, expirationMinutes) {
9
- this.personId = personId;
10
- this.expirationMinutes = expirationMinutes;
11
- }
12
- async execute({ db, providers, bus }) {
13
- const token = await tokenUtils.generateToken(providers);
14
- const tokenHash = tokenUtils.computeTokenHash(token);
15
- await bus.execute(new SavePasswordResetRequestCommand.SavePasswordResetRequestCommand(
16
- this.personId,
17
- tokenHash,
18
- this.expirationMinutes
19
- ));
20
- return new CreatePasswordResetRequestResult(token);
21
- }
22
- }
23
- class CreatePasswordResetRequestResult {
24
- constructor(token) {
25
- this.token = token;
26
- }
27
- }
28
- exports.CreatePasswordResetRequestCommand = CreatePasswordResetRequestCommand;
29
- exports.CreatePasswordResetRequestResult = CreatePasswordResetRequestResult;
30
- //# sourceMappingURL=CreatePasswordResetRequestCommand.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatePasswordResetRequestCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePasswordResetRequestCommand } from './SavePasswordResetRequestCommand'\n\nexport class CreatePasswordResetRequestCommand implements Command<CreatePasswordResetRequestResult> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly expirationMinutes?: number,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePasswordResetRequestResult> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tawait bus.execute(new SavePasswordResetRequestCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn new CreatePasswordResetRequestResult(token)\n\t}\n}\nexport class CreatePasswordResetRequestResult {\n\tconstructor(public readonly token: string) {}\n}\n"],"names":["generateToken","computeTokenHash","SavePasswordResetRequestCommand"],"mappings":";;;;;;AAIO,MAAM,kCAAuF;AAAA,EACnG,YACkB,UACA,mBAChB;AAFgB,SAAA,WAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAgE;AACxF,UAAA,QAAQ,MAAMA,yBAAc,SAAS;AACrC,UAAA,YAAYC,4BAAiB,KAAK;AAClC,UAAA,IAAI,QAAQ,IAAIC,gCAAA;AAAA,MACrB,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,IAAA,CACL;AAEM,WAAA,IAAI,iCAAiC,KAAK;AAAA,EAClD;AACD;AACO,MAAM,iCAAiC;AAAA,EAC7C,YAA4B,OAAe;AAAf,SAAA,QAAA;AAAA,EAAgB;AAC7C;;;"}
@@ -1,30 +0,0 @@
1
- import "@contember/database";
2
- import "../../type/ApiKey.js";
3
- import { SavePasswordResetRequestCommand } from "./SavePasswordResetRequestCommand.js";
4
- import { generateToken, computeTokenHash } from "../../utils/tokenUtils.js";
5
- class CreatePasswordResetRequestCommand {
6
- constructor(personId, expirationMinutes) {
7
- this.personId = personId;
8
- this.expirationMinutes = expirationMinutes;
9
- }
10
- async execute({ db, providers, bus }) {
11
- const token = await generateToken(providers);
12
- const tokenHash = computeTokenHash(token);
13
- await bus.execute(new SavePasswordResetRequestCommand(
14
- this.personId,
15
- tokenHash,
16
- this.expirationMinutes
17
- ));
18
- return new CreatePasswordResetRequestResult(token);
19
- }
20
- }
21
- class CreatePasswordResetRequestResult {
22
- constructor(token) {
23
- this.token = token;
24
- }
25
- }
26
- export {
27
- CreatePasswordResetRequestCommand,
28
- CreatePasswordResetRequestResult
29
- };
30
- //# sourceMappingURL=CreatePasswordResetRequestCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatePasswordResetRequestCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePasswordResetRequestCommand } from './SavePasswordResetRequestCommand'\n\nexport class CreatePasswordResetRequestCommand implements Command<CreatePasswordResetRequestResult> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly expirationMinutes?: number,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePasswordResetRequestResult> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tawait bus.execute(new SavePasswordResetRequestCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn new CreatePasswordResetRequestResult(token)\n\t}\n}\nexport class CreatePasswordResetRequestResult {\n\tconstructor(public readonly token: string) {}\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,kCAAuF;AAAA,EACnG,YACkB,UACA,mBAChB;AAFgB,SAAA,WAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAgE;AACxF,UAAA,QAAQ,MAAM,cAAc,SAAS;AACrC,UAAA,YAAY,iBAAiB,KAAK;AAClC,UAAA,IAAI,QAAQ,IAAI;AAAA,MACrB,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,IAAA,CACL;AAEM,WAAA,IAAI,iCAAiC,KAAK;AAAA,EAClD;AACD;AACO,MAAM,iCAAiC;AAAA,EAC7C,YAA4B,OAAe;AAAf,SAAA,QAAA;AAAA,EAAgB;AAC7C;"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Database = require("@contember/database");
4
- require("../../type/ApiKey.cjs");
5
- const ChangePasswordCommand = require("../person/ChangePasswordCommand.cjs");
6
- const exceptions = require("../../../exceptions.cjs");
7
- const Response = require("../../utils/Response.cjs");
8
- const tokenUtils = require("../../utils/tokenUtils.cjs");
9
- class ResetPasswordCommand {
10
- constructor(token, password) {
11
- this.token = token;
12
- this.password = password;
13
- }
14
- async execute({ db, providers, bus }) {
15
- const tokenHash = tokenUtils.computeTokenHash(this.token);
16
- const result = (await Database.SelectBuilder.create().from("person_password_reset").select("id").select("person_id").select("used_at").select("expires_at").where({ token_hash: tokenHash }).getResult(db))[0] || null;
17
- if (!result) {
18
- return new Response.ResponseError("TOKEN_NOT_FOUND", "Token was not found");
19
- }
20
- if (result.used_at) {
21
- return new Response.ResponseError("TOKEN_USED", `Token was used at ${result.used_at.toISOString()}`);
22
- }
23
- const now = providers.now();
24
- if (result.expires_at < now) {
25
- return new Response.ResponseError("TOKEN_EXPIRED", `Token expired at ${result.expires_at.toISOString()}`);
26
- }
27
- const count = await Database.UpdateBuilder.create().table("person_password_reset").where({ id: result.id }).where((expr) => expr.isNull("used_at")).values({
28
- used_at: now
29
- }).execute(db);
30
- if (count === 0) {
31
- throw new exceptions.ImplementationException();
32
- }
33
- await bus.execute(new ChangePasswordCommand.ChangePasswordCommand(result.person_id, this.password));
34
- return new Response.ResponseOk(null);
35
- }
36
- }
37
- exports.ResetPasswordCommand = ResetPasswordCommand;
38
- //# sourceMappingURL=ResetPasswordCommand.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResetPasswordCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { SelectBuilder, UpdateBuilder } from '@contember/database'\nimport { computeTokenHash } from '../../utils'\nimport { ImplementationException } from '../../../exceptions'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\n\t\tconst result =\n\t\t\t(\n\t\t\t\tawait SelectBuilder.create<{ used_at: null | Date; expires_at: Date; id: string; person_id: string }>()\n\t\t\t\t\t.from('person_password_reset')\n\t\t\t\t\t.select('id')\n\t\t\t\t\t.select('person_id')\n\t\t\t\t\t.select('used_at')\n\t\t\t\t\t.select('expires_at')\n\t\t\t\t\t.where({ token_hash: tokenHash })\n\t\t\t\t\t.getResult(db)\n\t\t\t)[0] || null\n\t\tif (!result) {\n\t\t\treturn new ResponseError('TOKEN_NOT_FOUND', 'Token was not found')\n\t\t}\n\t\tif (result.used_at) {\n\t\t\treturn new ResponseError('TOKEN_USED', `Token was used at ${result.used_at.toISOString()}`)\n\t\t}\n\t\tconst now = providers.now()\n\t\tif (result.expires_at < now) {\n\t\t\treturn new ResponseError('TOKEN_EXPIRED', `Token expired at ${result.expires_at.toISOString()}`)\n\t\t}\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_password_reset')\n\t\t\t.where({ id: result.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: now,\n\t\t\t})\n\t\t\t.execute(db)\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\n\t\tawait bus.execute(new ChangePasswordCommand(result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| 'TOKEN_NOT_FOUND'\n\t| 'TOKEN_USED'\n\t| 'TOKEN_EXPIRED'\n\nexport type ResetPasswordCommandResponse = Response<null, ResetPasswordCommandErrorCode>\n"],"names":["computeTokenHash","SelectBuilder","ResponseError","UpdateBuilder","ImplementationException","ChangePasswordCommand","ResponseOk"],"mappings":";;;;;;;;AAOO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAmB;AAAA,EAEhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,YAAYA,WAAAA,iBAAiB,KAAK,KAAK;AAE7C,UAAM,UAEJ,MAAMC,uBAAc,OAClB,EAAA,KAAK,uBAAuB,EAC5B,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,SAAS,EAChB,OAAO,YAAY,EACnB,MAAM,EAAE,YAAY,UAAW,CAAA,EAC/B,UAAU,EAAE,GACb,CAAC,KAAK;AACT,QAAI,CAAC,QAAQ;AACL,aAAA,IAAIC,SAAc,cAAA,mBAAmB,qBAAqB;AAAA,IAClE;AACA,QAAI,OAAO,SAAS;AACZ,aAAA,IAAIA,SAAAA,cAAc,cAAc,qBAAqB,OAAO,QAAQ,aAAa,EAAE;AAAA,IAC3F;AACM,UAAA,MAAM,UAAU;AAClB,QAAA,OAAO,aAAa,KAAK;AACrB,aAAA,IAAIA,SAAAA,cAAc,iBAAiB,oBAAoB,OAAO,WAAW,aAAa,EAAE;AAAA,IAChG;AACM,UAAA,QAAQ,MAAMC,SAAAA,cAAc,OAAA,EAChC,MAAM,uBAAuB,EAC7B,MAAM,EAAE,IAAI,OAAO,GAAI,CAAA,EACvB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AACZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAIC,WAAwB,wBAAA;AAAA,IACnC;AAEM,UAAA,IAAI,QAAQ,IAAIC,sBAAA,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAErE,WAAA,IAAIC,SAAAA,WAAW,IAAI;AAAA,EAC3B;AACD;;"}
@@ -1,38 +0,0 @@
1
- import { SelectBuilder, UpdateBuilder as UpdateBuilder$1 } from "@contember/database";
2
- import "../../type/ApiKey.js";
3
- import { ChangePasswordCommand } from "../person/ChangePasswordCommand.js";
4
- import { ImplementationException } from "../../../exceptions.js";
5
- import { ResponseError, ResponseOk } from "../../utils/Response.js";
6
- import { computeTokenHash } from "../../utils/tokenUtils.js";
7
- class ResetPasswordCommand {
8
- constructor(token, password) {
9
- this.token = token;
10
- this.password = password;
11
- }
12
- async execute({ db, providers, bus }) {
13
- const tokenHash = computeTokenHash(this.token);
14
- const result = (await SelectBuilder.create().from("person_password_reset").select("id").select("person_id").select("used_at").select("expires_at").where({ token_hash: tokenHash }).getResult(db))[0] || null;
15
- if (!result) {
16
- return new ResponseError("TOKEN_NOT_FOUND", "Token was not found");
17
- }
18
- if (result.used_at) {
19
- return new ResponseError("TOKEN_USED", `Token was used at ${result.used_at.toISOString()}`);
20
- }
21
- const now = providers.now();
22
- if (result.expires_at < now) {
23
- return new ResponseError("TOKEN_EXPIRED", `Token expired at ${result.expires_at.toISOString()}`);
24
- }
25
- const count = await UpdateBuilder$1.create().table("person_password_reset").where({ id: result.id }).where((expr) => expr.isNull("used_at")).values({
26
- used_at: now
27
- }).execute(db);
28
- if (count === 0) {
29
- throw new ImplementationException();
30
- }
31
- await bus.execute(new ChangePasswordCommand(result.person_id, this.password));
32
- return new ResponseOk(null);
33
- }
34
- }
35
- export {
36
- ResetPasswordCommand
37
- };
38
- //# sourceMappingURL=ResetPasswordCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResetPasswordCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { SelectBuilder, UpdateBuilder } from '@contember/database'\nimport { computeTokenHash } from '../../utils'\nimport { ImplementationException } from '../../../exceptions'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\n\t\tconst result =\n\t\t\t(\n\t\t\t\tawait SelectBuilder.create<{ used_at: null | Date; expires_at: Date; id: string; person_id: string }>()\n\t\t\t\t\t.from('person_password_reset')\n\t\t\t\t\t.select('id')\n\t\t\t\t\t.select('person_id')\n\t\t\t\t\t.select('used_at')\n\t\t\t\t\t.select('expires_at')\n\t\t\t\t\t.where({ token_hash: tokenHash })\n\t\t\t\t\t.getResult(db)\n\t\t\t)[0] || null\n\t\tif (!result) {\n\t\t\treturn new ResponseError('TOKEN_NOT_FOUND', 'Token was not found')\n\t\t}\n\t\tif (result.used_at) {\n\t\t\treturn new ResponseError('TOKEN_USED', `Token was used at ${result.used_at.toISOString()}`)\n\t\t}\n\t\tconst now = providers.now()\n\t\tif (result.expires_at < now) {\n\t\t\treturn new ResponseError('TOKEN_EXPIRED', `Token expired at ${result.expires_at.toISOString()}`)\n\t\t}\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_password_reset')\n\t\t\t.where({ id: result.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: now,\n\t\t\t})\n\t\t\t.execute(db)\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\n\t\tawait bus.execute(new ChangePasswordCommand(result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| 'TOKEN_NOT_FOUND'\n\t| 'TOKEN_USED'\n\t| 'TOKEN_EXPIRED'\n\nexport type ResetPasswordCommandResponse = Response<null, ResetPasswordCommandErrorCode>\n"],"names":["UpdateBuilder"],"mappings":";;;;;;AAOO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAmB;AAAA,EAEhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,YAAY,iBAAiB,KAAK,KAAK;AAE7C,UAAM,UAEJ,MAAM,cAAc,OAClB,EAAA,KAAK,uBAAuB,EAC5B,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,SAAS,EAChB,OAAO,YAAY,EACnB,MAAM,EAAE,YAAY,UAAW,CAAA,EAC/B,UAAU,EAAE,GACb,CAAC,KAAK;AACT,QAAI,CAAC,QAAQ;AACL,aAAA,IAAI,cAAc,mBAAmB,qBAAqB;AAAA,IAClE;AACA,QAAI,OAAO,SAAS;AACZ,aAAA,IAAI,cAAc,cAAc,qBAAqB,OAAO,QAAQ,aAAa,EAAE;AAAA,IAC3F;AACM,UAAA,MAAM,UAAU;AAClB,QAAA,OAAO,aAAa,KAAK;AACrB,aAAA,IAAI,cAAc,iBAAiB,oBAAoB,OAAO,WAAW,aAAa,EAAE;AAAA,IAChG;AACM,UAAA,QAAQ,MAAMA,gBAAc,OAAA,EAChC,MAAM,uBAAuB,EAC7B,MAAM,EAAE,IAAI,OAAO,GAAI,CAAA,EACvB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AACZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAI,wBAAwB;AAAA,IACnC;AAEM,UAAA,IAAI,QAAQ,IAAI,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAErE,WAAA,IAAI,WAAW,IAAI;AAAA,EAC3B;AACD;"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Database = require("@contember/database");
4
- const time = require("../../utils/time.cjs");
5
- const PASSWORD_RESET_EXPIRATION = 60;
6
- class SavePasswordResetRequestCommand {
7
- constructor(personId, tokenHash, expirationMinutes = PASSWORD_RESET_EXPIRATION) {
8
- this.personId = personId;
9
- this.tokenHash = tokenHash;
10
- this.expirationMinutes = expirationMinutes;
11
- }
12
- async execute({ db, providers }) {
13
- await Database.InsertBuilder.create().into("person_password_reset").values({
14
- id: providers.uuid(),
15
- token_hash: this.tokenHash,
16
- person_id: this.personId,
17
- expires_at: time.plusMinutes(providers.now(), this.expirationMinutes),
18
- created_at: providers.now(),
19
- used_at: null
20
- }).execute(db);
21
- }
22
- }
23
- exports.SavePasswordResetRequestCommand = SavePasswordResetRequestCommand;
24
- //# sourceMappingURL=SavePasswordResetRequestCommand.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SavePasswordResetRequestCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/SavePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\n\nconst PASSWORD_RESET_EXPIRATION = 60\n\nexport class SavePasswordResetRequestCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly expirationMinutes: number = PASSWORD_RESET_EXPIRATION,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_password_reset')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: plusMinutes(providers.now(), this.expirationMinutes),\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","plusMinutes"],"mappings":";;;;AAKA,MAAM,4BAA4B;AAE3B,MAAM,gCAAyD;AAAA,EACrE,YACkB,UACA,WACA,oBAA4B,2BAC5C;AAHgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAO,EACzB,KAAK,uBAAuB,EAC5B,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAYC,KAAY,YAAA,UAAU,IAAI,GAAG,KAAK,iBAAiB;AAAA,MAC/D,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EACb;AACD;;"}
@@ -1,24 +0,0 @@
1
- import { InsertBuilder as InsertBuilder$1 } from "@contember/database";
2
- import { plusMinutes } from "../../utils/time.js";
3
- const PASSWORD_RESET_EXPIRATION = 60;
4
- class SavePasswordResetRequestCommand {
5
- constructor(personId, tokenHash, expirationMinutes = PASSWORD_RESET_EXPIRATION) {
6
- this.personId = personId;
7
- this.tokenHash = tokenHash;
8
- this.expirationMinutes = expirationMinutes;
9
- }
10
- async execute({ db, providers }) {
11
- await InsertBuilder$1.create().into("person_password_reset").values({
12
- id: providers.uuid(),
13
- token_hash: this.tokenHash,
14
- person_id: this.personId,
15
- expires_at: plusMinutes(providers.now(), this.expirationMinutes),
16
- created_at: providers.now(),
17
- used_at: null
18
- }).execute(db);
19
- }
20
- }
21
- export {
22
- SavePasswordResetRequestCommand
23
- };
24
- //# sourceMappingURL=SavePasswordResetRequestCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SavePasswordResetRequestCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/SavePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\n\nconst PASSWORD_RESET_EXPIRATION = 60\n\nexport class SavePasswordResetRequestCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly expirationMinutes: number = PASSWORD_RESET_EXPIRATION,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_password_reset')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: plusMinutes(providers.now(), this.expirationMinutes),\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;AAKA,MAAM,4BAA4B;AAE3B,MAAM,gCAAyD;AAAA,EACrE,YACkB,UACA,WACA,oBAA4B,2BAC5C;AAHgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAO,EACzB,KAAK,uBAAuB,EAC5B,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY,YAAY,UAAU,IAAI,GAAG,KAAK,iBAAiB;AAAA,MAC/D,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EACb;AACD;"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("@contember/database");
4
- require("../../type/ApiKey.cjs");
5
- const SavePasswordResetRequestCommand = require("./SavePasswordResetRequestCommand.cjs");
6
- const tokenUtils = require("../../utils/tokenUtils.cjs");
7
- class CreatePasswordResetRequestCommand {
8
- constructor(personId, expirationMinutes) {
9
- this.personId = personId;
10
- this.expirationMinutes = expirationMinutes;
11
- }
12
- async execute({ db, providers, bus }) {
13
- const token = await tokenUtils.generateToken(providers);
14
- const tokenHash = tokenUtils.computeTokenHash(token);
15
- await bus.execute(new SavePasswordResetRequestCommand.SavePasswordResetRequestCommand(
16
- this.personId,
17
- tokenHash,
18
- this.expirationMinutes
19
- ));
20
- return new CreatePasswordResetRequestResult(token);
21
- }
22
- }
23
- class CreatePasswordResetRequestResult {
24
- constructor(token) {
25
- this.token = token;
26
- }
27
- }
28
- exports.CreatePasswordResetRequestCommand = CreatePasswordResetRequestCommand;
29
- exports.CreatePasswordResetRequestResult = CreatePasswordResetRequestResult;
30
- //# sourceMappingURL=CreatePasswordResetRequestCommand.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatePasswordResetRequestCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePasswordResetRequestCommand } from './SavePasswordResetRequestCommand'\n\nexport class CreatePasswordResetRequestCommand implements Command<CreatePasswordResetRequestResult> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly expirationMinutes?: number,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePasswordResetRequestResult> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tawait bus.execute(new SavePasswordResetRequestCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn new CreatePasswordResetRequestResult(token)\n\t}\n}\nexport class CreatePasswordResetRequestResult {\n\tconstructor(public readonly token: string) {}\n}\n"],"names":["generateToken","computeTokenHash","SavePasswordResetRequestCommand"],"mappings":";;;;;;AAIO,MAAM,kCAAuF;AAAA,EACnG,YACkB,UACA,mBAChB;AAFgB,SAAA,WAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAgE;AACxF,UAAA,QAAQ,MAAMA,yBAAc,SAAS;AACrC,UAAA,YAAYC,4BAAiB,KAAK;AAClC,UAAA,IAAI,QAAQ,IAAIC,gCAAA;AAAA,MACrB,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,IAAA,CACL;AAEM,WAAA,IAAI,iCAAiC,KAAK;AAAA,EAClD;AACD;AACO,MAAM,iCAAiC;AAAA,EAC7C,YAA4B,OAAe;AAAf,SAAA,QAAA;AAAA,EAAgB;AAC7C;;;"}
@@ -1,30 +0,0 @@
1
- import "@contember/database";
2
- import "../../type/ApiKey.js";
3
- import { SavePasswordResetRequestCommand } from "./SavePasswordResetRequestCommand.js";
4
- import { generateToken, computeTokenHash } from "../../utils/tokenUtils.js";
5
- class CreatePasswordResetRequestCommand {
6
- constructor(personId, expirationMinutes) {
7
- this.personId = personId;
8
- this.expirationMinutes = expirationMinutes;
9
- }
10
- async execute({ db, providers, bus }) {
11
- const token = await generateToken(providers);
12
- const tokenHash = computeTokenHash(token);
13
- await bus.execute(new SavePasswordResetRequestCommand(
14
- this.personId,
15
- tokenHash,
16
- this.expirationMinutes
17
- ));
18
- return new CreatePasswordResetRequestResult(token);
19
- }
20
- }
21
- class CreatePasswordResetRequestResult {
22
- constructor(token) {
23
- this.token = token;
24
- }
25
- }
26
- export {
27
- CreatePasswordResetRequestCommand,
28
- CreatePasswordResetRequestResult
29
- };
30
- //# sourceMappingURL=CreatePasswordResetRequestCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatePasswordResetRequestCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePasswordResetRequestCommand } from './SavePasswordResetRequestCommand'\n\nexport class CreatePasswordResetRequestCommand implements Command<CreatePasswordResetRequestResult> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly expirationMinutes?: number,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePasswordResetRequestResult> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tawait bus.execute(new SavePasswordResetRequestCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn new CreatePasswordResetRequestResult(token)\n\t}\n}\nexport class CreatePasswordResetRequestResult {\n\tconstructor(public readonly token: string) {}\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,kCAAuF;AAAA,EACnG,YACkB,UACA,mBAChB;AAFgB,SAAA,WAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAgE;AACxF,UAAA,QAAQ,MAAM,cAAc,SAAS;AACrC,UAAA,YAAY,iBAAiB,KAAK;AAClC,UAAA,IAAI,QAAQ,IAAI;AAAA,MACrB,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,IAAA,CACL;AAEM,WAAA,IAAI,iCAAiC,KAAK;AAAA,EAClD;AACD;AACO,MAAM,iCAAiC;AAAA,EAC7C,YAA4B,OAAe;AAAf,SAAA,QAAA;AAAA,EAAgB;AAC7C;"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Database = require("@contember/database");
4
- require("../../type/ApiKey.cjs");
5
- const ChangePasswordCommand = require("../person/ChangePasswordCommand.cjs");
6
- const exceptions = require("../../../exceptions.cjs");
7
- const Response = require("../../utils/Response.cjs");
8
- const tokenUtils = require("../../utils/tokenUtils.cjs");
9
- class ResetPasswordCommand {
10
- constructor(token, password) {
11
- this.token = token;
12
- this.password = password;
13
- }
14
- async execute({ db, providers, bus }) {
15
- const tokenHash = tokenUtils.computeTokenHash(this.token);
16
- const result = (await Database.SelectBuilder.create().from("person_password_reset").select("id").select("person_id").select("used_at").select("expires_at").where({ token_hash: tokenHash }).getResult(db))[0] || null;
17
- if (!result) {
18
- return new Response.ResponseError("TOKEN_NOT_FOUND", "Token was not found");
19
- }
20
- if (result.used_at) {
21
- return new Response.ResponseError("TOKEN_USED", `Token was used at ${result.used_at.toISOString()}`);
22
- }
23
- const now = providers.now();
24
- if (result.expires_at < now) {
25
- return new Response.ResponseError("TOKEN_EXPIRED", `Token expired at ${result.expires_at.toISOString()}`);
26
- }
27
- const count = await Database.UpdateBuilder.create().table("person_password_reset").where({ id: result.id }).where((expr) => expr.isNull("used_at")).values({
28
- used_at: now
29
- }).execute(db);
30
- if (count === 0) {
31
- throw new exceptions.ImplementationException();
32
- }
33
- await bus.execute(new ChangePasswordCommand.ChangePasswordCommand(result.person_id, this.password));
34
- return new Response.ResponseOk(null);
35
- }
36
- }
37
- exports.ResetPasswordCommand = ResetPasswordCommand;
38
- //# sourceMappingURL=ResetPasswordCommand.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResetPasswordCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { SelectBuilder, UpdateBuilder } from '@contember/database'\nimport { computeTokenHash } from '../../utils'\nimport { ImplementationException } from '../../../exceptions'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\n\t\tconst result =\n\t\t\t(\n\t\t\t\tawait SelectBuilder.create<{ used_at: null | Date; expires_at: Date; id: string; person_id: string }>()\n\t\t\t\t\t.from('person_password_reset')\n\t\t\t\t\t.select('id')\n\t\t\t\t\t.select('person_id')\n\t\t\t\t\t.select('used_at')\n\t\t\t\t\t.select('expires_at')\n\t\t\t\t\t.where({ token_hash: tokenHash })\n\t\t\t\t\t.getResult(db)\n\t\t\t)[0] || null\n\t\tif (!result) {\n\t\t\treturn new ResponseError('TOKEN_NOT_FOUND', 'Token was not found')\n\t\t}\n\t\tif (result.used_at) {\n\t\t\treturn new ResponseError('TOKEN_USED', `Token was used at ${result.used_at.toISOString()}`)\n\t\t}\n\t\tconst now = providers.now()\n\t\tif (result.expires_at < now) {\n\t\t\treturn new ResponseError('TOKEN_EXPIRED', `Token expired at ${result.expires_at.toISOString()}`)\n\t\t}\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_password_reset')\n\t\t\t.where({ id: result.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: now,\n\t\t\t})\n\t\t\t.execute(db)\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\n\t\tawait bus.execute(new ChangePasswordCommand(result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| 'TOKEN_NOT_FOUND'\n\t| 'TOKEN_USED'\n\t| 'TOKEN_EXPIRED'\n\nexport type ResetPasswordCommandResponse = Response<null, ResetPasswordCommandErrorCode>\n"],"names":["computeTokenHash","SelectBuilder","ResponseError","UpdateBuilder","ImplementationException","ChangePasswordCommand","ResponseOk"],"mappings":";;;;;;;;AAOO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAmB;AAAA,EAEhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,YAAYA,WAAAA,iBAAiB,KAAK,KAAK;AAE7C,UAAM,UAEJ,MAAMC,uBAAc,OAClB,EAAA,KAAK,uBAAuB,EAC5B,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,SAAS,EAChB,OAAO,YAAY,EACnB,MAAM,EAAE,YAAY,UAAW,CAAA,EAC/B,UAAU,EAAE,GACb,CAAC,KAAK;AACT,QAAI,CAAC,QAAQ;AACL,aAAA,IAAIC,SAAc,cAAA,mBAAmB,qBAAqB;AAAA,IAClE;AACA,QAAI,OAAO,SAAS;AACZ,aAAA,IAAIA,SAAAA,cAAc,cAAc,qBAAqB,OAAO,QAAQ,aAAa,EAAE;AAAA,IAC3F;AACM,UAAA,MAAM,UAAU;AAClB,QAAA,OAAO,aAAa,KAAK;AACrB,aAAA,IAAIA,SAAAA,cAAc,iBAAiB,oBAAoB,OAAO,WAAW,aAAa,EAAE;AAAA,IAChG;AACM,UAAA,QAAQ,MAAMC,SAAAA,cAAc,OAAA,EAChC,MAAM,uBAAuB,EAC7B,MAAM,EAAE,IAAI,OAAO,GAAI,CAAA,EACvB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AACZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAIC,WAAwB,wBAAA;AAAA,IACnC;AAEM,UAAA,IAAI,QAAQ,IAAIC,sBAAA,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAErE,WAAA,IAAIC,SAAAA,WAAW,IAAI;AAAA,EAC3B;AACD;;"}
@@ -1,38 +0,0 @@
1
- import { SelectBuilder, UpdateBuilder as UpdateBuilder$1 } from "@contember/database";
2
- import "../../type/ApiKey.js";
3
- import { ChangePasswordCommand } from "../person/ChangePasswordCommand.js";
4
- import { ImplementationException } from "../../../exceptions.js";
5
- import { ResponseError, ResponseOk } from "../../utils/Response.js";
6
- import { computeTokenHash } from "../../utils/tokenUtils.js";
7
- class ResetPasswordCommand {
8
- constructor(token, password) {
9
- this.token = token;
10
- this.password = password;
11
- }
12
- async execute({ db, providers, bus }) {
13
- const tokenHash = computeTokenHash(this.token);
14
- const result = (await SelectBuilder.create().from("person_password_reset").select("id").select("person_id").select("used_at").select("expires_at").where({ token_hash: tokenHash }).getResult(db))[0] || null;
15
- if (!result) {
16
- return new ResponseError("TOKEN_NOT_FOUND", "Token was not found");
17
- }
18
- if (result.used_at) {
19
- return new ResponseError("TOKEN_USED", `Token was used at ${result.used_at.toISOString()}`);
20
- }
21
- const now = providers.now();
22
- if (result.expires_at < now) {
23
- return new ResponseError("TOKEN_EXPIRED", `Token expired at ${result.expires_at.toISOString()}`);
24
- }
25
- const count = await UpdateBuilder$1.create().table("person_password_reset").where({ id: result.id }).where((expr) => expr.isNull("used_at")).values({
26
- used_at: now
27
- }).execute(db);
28
- if (count === 0) {
29
- throw new ImplementationException();
30
- }
31
- await bus.execute(new ChangePasswordCommand(result.person_id, this.password));
32
- return new ResponseOk(null);
33
- }
34
- }
35
- export {
36
- ResetPasswordCommand
37
- };
38
- //# sourceMappingURL=ResetPasswordCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResetPasswordCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { SelectBuilder, UpdateBuilder } from '@contember/database'\nimport { computeTokenHash } from '../../utils'\nimport { ImplementationException } from '../../../exceptions'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\n\t\tconst result =\n\t\t\t(\n\t\t\t\tawait SelectBuilder.create<{ used_at: null | Date; expires_at: Date; id: string; person_id: string }>()\n\t\t\t\t\t.from('person_password_reset')\n\t\t\t\t\t.select('id')\n\t\t\t\t\t.select('person_id')\n\t\t\t\t\t.select('used_at')\n\t\t\t\t\t.select('expires_at')\n\t\t\t\t\t.where({ token_hash: tokenHash })\n\t\t\t\t\t.getResult(db)\n\t\t\t)[0] || null\n\t\tif (!result) {\n\t\t\treturn new ResponseError('TOKEN_NOT_FOUND', 'Token was not found')\n\t\t}\n\t\tif (result.used_at) {\n\t\t\treturn new ResponseError('TOKEN_USED', `Token was used at ${result.used_at.toISOString()}`)\n\t\t}\n\t\tconst now = providers.now()\n\t\tif (result.expires_at < now) {\n\t\t\treturn new ResponseError('TOKEN_EXPIRED', `Token expired at ${result.expires_at.toISOString()}`)\n\t\t}\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_password_reset')\n\t\t\t.where({ id: result.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: now,\n\t\t\t})\n\t\t\t.execute(db)\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\n\t\tawait bus.execute(new ChangePasswordCommand(result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| 'TOKEN_NOT_FOUND'\n\t| 'TOKEN_USED'\n\t| 'TOKEN_EXPIRED'\n\nexport type ResetPasswordCommandResponse = Response<null, ResetPasswordCommandErrorCode>\n"],"names":["UpdateBuilder"],"mappings":";;;;;;AAOO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAmB;AAAA,EAEhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,YAAY,iBAAiB,KAAK,KAAK;AAE7C,UAAM,UAEJ,MAAM,cAAc,OAClB,EAAA,KAAK,uBAAuB,EAC5B,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,SAAS,EAChB,OAAO,YAAY,EACnB,MAAM,EAAE,YAAY,UAAW,CAAA,EAC/B,UAAU,EAAE,GACb,CAAC,KAAK;AACT,QAAI,CAAC,QAAQ;AACL,aAAA,IAAI,cAAc,mBAAmB,qBAAqB;AAAA,IAClE;AACA,QAAI,OAAO,SAAS;AACZ,aAAA,IAAI,cAAc,cAAc,qBAAqB,OAAO,QAAQ,aAAa,EAAE;AAAA,IAC3F;AACM,UAAA,MAAM,UAAU;AAClB,QAAA,OAAO,aAAa,KAAK;AACrB,aAAA,IAAI,cAAc,iBAAiB,oBAAoB,OAAO,WAAW,aAAa,EAAE;AAAA,IAChG;AACM,UAAA,QAAQ,MAAMA,gBAAc,OAAA,EAChC,MAAM,uBAAuB,EAC7B,MAAM,EAAE,IAAI,OAAO,GAAI,CAAA,EACvB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AACZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAI,wBAAwB;AAAA,IACnC;AAEM,UAAA,IAAI,QAAQ,IAAI,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAErE,WAAA,IAAI,WAAW,IAAI;AAAA,EAC3B;AACD;"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Database = require("@contember/database");
4
- const time = require("../../utils/time.cjs");
5
- const PASSWORD_RESET_EXPIRATION = 60;
6
- class SavePasswordResetRequestCommand {
7
- constructor(personId, tokenHash, expirationMinutes = PASSWORD_RESET_EXPIRATION) {
8
- this.personId = personId;
9
- this.tokenHash = tokenHash;
10
- this.expirationMinutes = expirationMinutes;
11
- }
12
- async execute({ db, providers }) {
13
- await Database.InsertBuilder.create().into("person_password_reset").values({
14
- id: providers.uuid(),
15
- token_hash: this.tokenHash,
16
- person_id: this.personId,
17
- expires_at: time.plusMinutes(providers.now(), this.expirationMinutes),
18
- created_at: providers.now(),
19
- used_at: null
20
- }).execute(db);
21
- }
22
- }
23
- exports.SavePasswordResetRequestCommand = SavePasswordResetRequestCommand;
24
- //# sourceMappingURL=SavePasswordResetRequestCommand.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SavePasswordResetRequestCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/SavePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\n\nconst PASSWORD_RESET_EXPIRATION = 60\n\nexport class SavePasswordResetRequestCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly expirationMinutes: number = PASSWORD_RESET_EXPIRATION,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_password_reset')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: plusMinutes(providers.now(), this.expirationMinutes),\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","plusMinutes"],"mappings":";;;;AAKA,MAAM,4BAA4B;AAE3B,MAAM,gCAAyD;AAAA,EACrE,YACkB,UACA,WACA,oBAA4B,2BAC5C;AAHgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAO,EACzB,KAAK,uBAAuB,EAC5B,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAYC,KAAY,YAAA,UAAU,IAAI,GAAG,KAAK,iBAAiB;AAAA,MAC/D,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EACb;AACD;;"}
@@ -1,24 +0,0 @@
1
- import { InsertBuilder as InsertBuilder$1 } from "@contember/database";
2
- import { plusMinutes } from "../../utils/time.js";
3
- const PASSWORD_RESET_EXPIRATION = 60;
4
- class SavePasswordResetRequestCommand {
5
- constructor(personId, tokenHash, expirationMinutes = PASSWORD_RESET_EXPIRATION) {
6
- this.personId = personId;
7
- this.tokenHash = tokenHash;
8
- this.expirationMinutes = expirationMinutes;
9
- }
10
- async execute({ db, providers }) {
11
- await InsertBuilder$1.create().into("person_password_reset").values({
12
- id: providers.uuid(),
13
- token_hash: this.tokenHash,
14
- person_id: this.personId,
15
- expires_at: plusMinutes(providers.now(), this.expirationMinutes),
16
- created_at: providers.now(),
17
- used_at: null
18
- }).execute(db);
19
- }
20
- }
21
- export {
22
- SavePasswordResetRequestCommand
23
- };
24
- //# sourceMappingURL=SavePasswordResetRequestCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SavePasswordResetRequestCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/passwordReset/SavePasswordResetRequestCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\n\nconst PASSWORD_RESET_EXPIRATION = 60\n\nexport class SavePasswordResetRequestCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly expirationMinutes: number = PASSWORD_RESET_EXPIRATION,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_password_reset')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: plusMinutes(providers.now(), this.expirationMinutes),\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;AAKA,MAAM,4BAA4B;AAE3B,MAAM,gCAAyD;AAAA,EACrE,YACkB,UACA,WACA,oBAA4B,2BAC5C;AAHgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,oBAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAO,EACzB,KAAK,uBAAuB,EAC5B,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY,YAAY,UAAU,IAAI,GAAG,KAAK,iBAAiB;AAAA,MAC/D,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EACb;AACD;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createPasswordResetSql.d.ts","sourceRoot":"","sources":["../../../../../../tests/cases/integration/mocked/sql/createPasswordResetSql.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,eAAO,MAAM,sBAAsB,SAAU;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CAChB,KAAG,aAYF,CAAA"}