@contember/engine-tenant-api 2.0.0-alpha.9 → 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.
- package/dist/development/index.cjs +18 -6
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +20 -8
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/TenantContainer.cjs +7 -1
- package/dist/development/src/TenantContainer.cjs.map +1 -1
- package/dist/development/src/TenantContainer.js +7 -1
- package/dist/development/src/TenantContainer.js.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.js.map +1 -1
- package/dist/development/src/exceptions.cjs.map +1 -1
- package/dist/development/src/exceptions.js.map +1 -1
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.cjs +31 -0
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -0
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.js +32 -0
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.js.map +1 -0
- package/dist/development/src/migrations/runner.cjs +3 -1
- package/dist/development/src/migrations/runner.cjs.map +1 -1
- package/dist/development/src/migrations/runner.js +3 -1
- package/dist/development/src/migrations/runner.js.map +1 -1
- package/dist/development/src/migrations/snapshot.cjs +33 -5
- package/dist/development/src/migrations/snapshot.cjs.map +1 -1
- package/dist/development/src/migrations/snapshot.js +33 -5
- package/dist/development/src/migrations/snapshot.js.map +1 -1
- package/dist/development/src/migrations/tenantCredentials.cjs.map +1 -1
- package/dist/development/src/migrations/tenantCredentials.js.map +1 -1
- package/dist/development/src/model/authorization/AclSchemaAccessNodeFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/AclSchemaAccessNodeFactory.js.map +1 -1
- package/dist/development/src/model/authorization/DirectPermissionsAccessNode.cjs.map +1 -1
- package/dist/development/src/model/authorization/DirectPermissionsAccessNode.js.map +1 -1
- package/dist/development/src/model/authorization/Identity.cjs.map +1 -1
- package/dist/development/src/model/authorization/Identity.js.map +1 -1
- package/dist/development/src/model/authorization/IdentityFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/IdentityFactory.js.map +1 -1
- package/dist/development/src/model/authorization/IdentityScope.cjs.map +1 -1
- package/dist/development/src/model/authorization/IdentityScope.js.map +1 -1
- package/dist/development/src/model/authorization/MembershipMatcher.cjs.map +1 -1
- package/dist/development/src/model/authorization/MembershipMatcher.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionActions.cjs +5 -0
- package/dist/development/src/model/authorization/PermissionActions.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionActions.js +5 -0
- package/dist/development/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionContext.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionContext.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.cjs +5 -0
- package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.js +5 -0
- package/dist/development/src/model/authorization/PermissionsFactory.js.map +1 -1
- package/dist/development/src/model/authorization/ProjectScope.cjs.map +1 -1
- package/dist/development/src/model/authorization/ProjectScope.js.map +1 -1
- package/dist/development/src/model/authorization/ProjectScopeFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/ProjectScopeFactory.js.map +1 -1
- package/dist/development/src/model/commands/CommandBus.cjs.map +1 -1
- package/dist/development/src/model/commands/CommandBus.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableIdentityApiKeysCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableIdentityApiKeysCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableOneOffApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableOneOffApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -0
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -0
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -0
- package/dist/development/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/DisableIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/DisableIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/EnableIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/EnableIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.js.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/RemoveMailTemplateCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/RemoveMailTemplateCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/AddProjectMemberCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/AddProjectMemberCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMemberCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMemberCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/development/src/model/commands/otp/ConfirmOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/otp/ConfirmOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/otp/DisableOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/otp/DisableOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/otp/PrepareOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/otp/PrepareOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/ChangePasswordCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/ChangePasswordCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/ChangeProfileCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/ChangeProfileCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.cjs +2 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.js +2 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/DisablePersonCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.cjs +18 -0
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js +18 -0
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs +20 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js +20 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs +33 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js +33 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs +19 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js +19 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs +19 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js +19 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs +28 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js +28 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs +28 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js +28 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -0
- package/dist/development/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/CreateProjectCommand.js.map +1 -1
- package/dist/development/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
- package/dist/development/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
- package/dist/development/src/model/consts/expirations.cjs +7 -0
- package/dist/development/src/model/consts/expirations.cjs.map +1 -0
- package/dist/development/src/model/consts/expirations.js +7 -0
- package/dist/development/src/model/consts/expirations.js.map +1 -0
- package/dist/development/src/model/dtos/Password.cjs.map +1 -1
- package/dist/development/src/model/dtos/Password.js.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.cjs +10 -1
- package/dist/development/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.js +10 -1
- package/dist/development/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/development/src/model/mailing/templates/ExistingUserInvited.mustache.cjs.map +1 -1
- package/dist/development/src/model/mailing/templates/ExistingUserInvited.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/templates/NewUserInvited.mustache.cjs.map +1 -1
- package/dist/development/src/model/mailing/templates/NewUserInvited.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/templates/PasswordReset.mustache.cjs.map +1 -1
- package/dist/development/src/model/mailing/templates/PasswordReset.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs +17 -0
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs.map +1 -0
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.js +18 -0
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -0
- package/dist/development/src/model/mailing/type.cjs +9 -3
- package/dist/development/src/model/mailing/type.cjs.map +1 -1
- package/dist/development/src/model/mailing/type.js +9 -3
- package/dist/development/src/model/mailing/type.js.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs +21 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js +21 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js.map +1 -0
- package/dist/development/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectRolesByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectRolesByIdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectSlugSpecification.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdPQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdPQuery.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdentityBatchQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdentityBatchQuery.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonQuery.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs +29 -0
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js +29 -0
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js.map +1 -0
- package/dist/development/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectSecretsQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectUpdateTimestampQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectUpdateTimestampQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsQuery.js.map +1 -1
- package/dist/development/src/model/service/ConfigurationManager.cjs +27 -0
- package/dist/development/src/model/service/ConfigurationManager.cjs.map +1 -0
- package/dist/development/src/model/service/ConfigurationManager.js +27 -0
- package/dist/development/src/model/service/ConfigurationManager.js.map +1 -0
- package/dist/development/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/development/src/model/service/EmailValidator.js.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.cjs +1 -1
- package/dist/development/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.js +1 -1
- package/dist/development/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/development/src/model/service/InviteManager.cjs +7 -7
- package/dist/development/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/development/src/model/service/InviteManager.js +6 -6
- package/dist/development/src/model/service/InviteManager.js.map +1 -1
- package/dist/development/src/model/service/MailTemplateManager.cjs.map +1 -1
- package/dist/development/src/model/service/MailTemplateManager.js.map +1 -1
- package/dist/development/src/model/service/MembershipValidator.cjs.map +1 -1
- package/dist/development/src/model/service/MembershipValidator.js.map +1 -1
- package/dist/development/src/model/service/OtpAuthenticator.cjs.map +1 -1
- package/dist/development/src/model/service/OtpAuthenticator.js.map +1 -1
- package/dist/development/src/model/service/OtpManager.cjs.map +1 -1
- package/dist/development/src/model/service/OtpManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.cjs +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.js +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.cjs +7 -15
- package/dist/development/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.js +7 -15
- package/dist/development/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs +135 -0
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs.map +1 -0
- package/dist/development/src/model/service/PasswordlessSignInManager.js +135 -0
- package/dist/development/src/model/service/PasswordlessSignInManager.js.map +1 -0
- package/dist/development/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/development/src/model/service/PersonManager.cjs +7 -0
- package/dist/development/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonManager.js +7 -0
- package/dist/development/src/model/service/PersonManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectManager.cjs +2 -2
- package/dist/development/src/model/service/ProjectManager.cjs.map +1 -1
- package/dist/development/src/model/service/ProjectManager.js +2 -2
- package/dist/development/src/model/service/ProjectManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/development/src/model/service/RolesManager.cjs +1 -1
- package/dist/development/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/development/src/model/service/RolesManager.js +1 -1
- package/dist/development/src/model/service/RolesManager.js.map +1 -1
- package/dist/development/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/development/src/model/service/SecretsManager.js.map +1 -1
- package/dist/development/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignInManager.js.map +1 -1
- package/dist/development/src/model/service/SignUpManager.cjs +1 -1
- package/dist/development/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignUpManager.js +1 -1
- package/dist/development/src/model/service/SignUpManager.js.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.js.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyService.cjs.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyService.js.map +1 -1
- package/dist/development/src/model/service/helpers/getPreferredProject.cjs +13 -0
- package/dist/development/src/model/service/helpers/getPreferredProject.cjs.map +1 -0
- package/dist/development/src/model/service/helpers/getPreferredProject.js +13 -0
- package/dist/development/src/model/service/helpers/getPreferredProject.js.map +1 -0
- package/dist/development/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPResponseError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPResponseError.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPValidationError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPValidationError.js.map +1 -1
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.cjs +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.js +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.cjs +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.js +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs +9 -5
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js +9 -5
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs +9 -3
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js +9 -3
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs +6 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.js +6 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/helpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/helpers.js.map +1 -1
- package/dist/development/src/model/service/membershipUtils.cjs.map +1 -1
- package/dist/development/src/model/service/membershipUtils.js.map +1 -1
- package/dist/development/src/model/type/ApiKey.cjs.map +1 -1
- package/dist/development/src/model/type/ApiKey.js.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/development/src/model/utils/Response.cjs.map +1 -1
- package/dist/development/src/model/utils/Response.js.map +1 -1
- package/dist/development/src/model/utils/password.cjs.map +1 -1
- package/dist/development/src/model/utils/password.js.map +1 -1
- package/dist/development/src/model/utils/tokenUtils.cjs +39 -0
- package/dist/development/src/model/utils/tokenUtils.cjs.map +1 -1
- package/dist/development/src/model/utils/tokenUtils.js +40 -1
- package/dist/development/src/model/utils/tokenUtils.js.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.cjs +8 -1
- package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.js +8 -1
- package/dist/development/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/development/src/resolvers/errorUtils.cjs.map +1 -1
- package/dist/development/src/resolvers/errorUtils.js.map +1 -1
- package/dist/development/src/resolvers/membershipUtils.cjs.map +1 -1
- package/dist/development/src/resolvers/membershipUtils.js.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +41 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +41 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs +4 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js +4 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +83 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js +83 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +52 -0
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +52 -0
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs +34 -0
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js +34 -0
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -0
- package/dist/development/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/MeQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/MeQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs +1 -0
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js +1 -0
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/development/src/schema/tenant.graphql.cjs +162 -10
- package/dist/development/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/development/src/schema/tenant.graphql.js +162 -10
- package/dist/development/src/schema/tenant.graphql.js.map +1 -1
- package/dist/development/src/utils/Mailer.cjs.map +1 -1
- package/dist/development/src/utils/Mailer.js.map +1 -1
- package/dist/development/src/utils/TemplateRenderer.cjs.map +1 -1
- package/dist/development/src/utils/TemplateRenderer.js.map +1 -1
- package/dist/development/src/utils/array.cjs.map +1 -1
- package/dist/development/src/utils/array.js.map +1 -1
- package/dist/development/src/utils/batchQuery.cjs.map +1 -1
- package/dist/development/src/utils/batchQuery.js.map +1 -1
- package/dist/production/index.cjs +18 -6
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +20 -8
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/TenantContainer.cjs +7 -1
- package/dist/production/src/TenantContainer.cjs.map +1 -1
- package/dist/production/src/TenantContainer.js +7 -1
- package/dist/production/src/TenantContainer.js.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.js.map +1 -1
- package/dist/production/src/exceptions.cjs.map +1 -1
- package/dist/production/src/exceptions.js.map +1 -1
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.cjs +31 -0
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -0
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.js +32 -0
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.js.map +1 -0
- package/dist/production/src/migrations/runner.cjs +3 -1
- package/dist/production/src/migrations/runner.cjs.map +1 -1
- package/dist/production/src/migrations/runner.js +3 -1
- package/dist/production/src/migrations/runner.js.map +1 -1
- package/dist/production/src/migrations/snapshot.cjs +33 -5
- package/dist/production/src/migrations/snapshot.cjs.map +1 -1
- package/dist/production/src/migrations/snapshot.js +33 -5
- package/dist/production/src/migrations/snapshot.js.map +1 -1
- package/dist/production/src/migrations/tenantCredentials.cjs.map +1 -1
- package/dist/production/src/migrations/tenantCredentials.js.map +1 -1
- package/dist/production/src/model/authorization/AclSchemaAccessNodeFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/AclSchemaAccessNodeFactory.js.map +1 -1
- package/dist/production/src/model/authorization/DirectPermissionsAccessNode.cjs.map +1 -1
- package/dist/production/src/model/authorization/DirectPermissionsAccessNode.js.map +1 -1
- package/dist/production/src/model/authorization/Identity.cjs.map +1 -1
- package/dist/production/src/model/authorization/Identity.js.map +1 -1
- package/dist/production/src/model/authorization/IdentityFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/IdentityFactory.js.map +1 -1
- package/dist/production/src/model/authorization/IdentityScope.cjs.map +1 -1
- package/dist/production/src/model/authorization/IdentityScope.js.map +1 -1
- package/dist/production/src/model/authorization/MembershipMatcher.cjs.map +1 -1
- package/dist/production/src/model/authorization/MembershipMatcher.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionActions.cjs +5 -0
- package/dist/production/src/model/authorization/PermissionActions.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionActions.js +5 -0
- package/dist/production/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionContext.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionContext.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.cjs +5 -0
- package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.js +5 -0
- package/dist/production/src/model/authorization/PermissionsFactory.js.map +1 -1
- package/dist/production/src/model/authorization/ProjectScope.cjs.map +1 -1
- package/dist/production/src/model/authorization/ProjectScope.js.map +1 -1
- package/dist/production/src/model/authorization/ProjectScopeFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/ProjectScopeFactory.js.map +1 -1
- package/dist/production/src/model/commands/CommandBus.cjs.map +1 -1
- package/dist/production/src/model/commands/CommandBus.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableIdentityApiKeysCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableIdentityApiKeysCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableOneOffApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableOneOffApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -0
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -0
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -0
- package/dist/production/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/DisableIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/DisableIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/EnableIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/EnableIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.js.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/RemoveMailTemplateCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/RemoveMailTemplateCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/AddProjectMemberCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/AddProjectMemberCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMemberCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMemberCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/production/src/model/commands/otp/ConfirmOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/otp/ConfirmOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/otp/DisableOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/otp/DisableOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/otp/PrepareOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/otp/PrepareOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/ChangePasswordCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/ChangePasswordCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/ChangeProfileCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/ChangeProfileCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.cjs +2 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.js +2 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/DisablePersonCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.cjs +18 -0
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js +18 -0
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs +20 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js +20 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs +33 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js +33 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs +19 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js +19 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs +19 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js +19 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs +28 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js +28 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs +28 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js +28 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -0
- package/dist/production/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/CreateProjectCommand.js.map +1 -1
- package/dist/production/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
- package/dist/production/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
- package/dist/production/src/model/consts/expirations.cjs +7 -0
- package/dist/production/src/model/consts/expirations.cjs.map +1 -0
- package/dist/production/src/model/consts/expirations.js +7 -0
- package/dist/production/src/model/consts/expirations.js.map +1 -0
- package/dist/production/src/model/dtos/Password.cjs.map +1 -1
- package/dist/production/src/model/dtos/Password.js.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.cjs +10 -1
- package/dist/production/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.js +10 -1
- package/dist/production/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/production/src/model/mailing/templates/ExistingUserInvited.mustache.cjs.map +1 -1
- package/dist/production/src/model/mailing/templates/ExistingUserInvited.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/templates/NewUserInvited.mustache.cjs.map +1 -1
- package/dist/production/src/model/mailing/templates/NewUserInvited.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/templates/PasswordReset.mustache.cjs.map +1 -1
- package/dist/production/src/model/mailing/templates/PasswordReset.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs +17 -0
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs.map +1 -0
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.js +18 -0
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -0
- package/dist/production/src/model/mailing/type.cjs +9 -3
- package/dist/production/src/model/mailing/type.cjs.map +1 -1
- package/dist/production/src/model/mailing/type.js +9 -3
- package/dist/production/src/model/mailing/type.js.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs +21 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js +21 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js.map +1 -0
- package/dist/production/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectRolesByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectRolesByIdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectSlugSpecification.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdPQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdPQuery.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdentityBatchQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdentityBatchQuery.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonQuery.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs +29 -0
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js +29 -0
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js.map +1 -0
- package/dist/production/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectSecretsQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectUpdateTimestampQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectUpdateTimestampQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsQuery.js.map +1 -1
- package/dist/production/src/model/service/ConfigurationManager.cjs +27 -0
- package/dist/production/src/model/service/ConfigurationManager.cjs.map +1 -0
- package/dist/production/src/model/service/ConfigurationManager.js +27 -0
- package/dist/production/src/model/service/ConfigurationManager.js.map +1 -0
- package/dist/production/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/production/src/model/service/EmailValidator.js.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.cjs +1 -1
- package/dist/production/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.js +1 -1
- package/dist/production/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/production/src/model/service/InviteManager.cjs +7 -7
- package/dist/production/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/production/src/model/service/InviteManager.js +6 -6
- package/dist/production/src/model/service/InviteManager.js.map +1 -1
- package/dist/production/src/model/service/MailTemplateManager.cjs.map +1 -1
- package/dist/production/src/model/service/MailTemplateManager.js.map +1 -1
- package/dist/production/src/model/service/MembershipValidator.cjs.map +1 -1
- package/dist/production/src/model/service/MembershipValidator.js.map +1 -1
- package/dist/production/src/model/service/OtpAuthenticator.cjs.map +1 -1
- package/dist/production/src/model/service/OtpAuthenticator.js.map +1 -1
- package/dist/production/src/model/service/OtpManager.cjs.map +1 -1
- package/dist/production/src/model/service/OtpManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.cjs +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.js +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.cjs +7 -15
- package/dist/production/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.js +7 -15
- package/dist/production/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs +135 -0
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs.map +1 -0
- package/dist/production/src/model/service/PasswordlessSignInManager.js +135 -0
- package/dist/production/src/model/service/PasswordlessSignInManager.js.map +1 -0
- package/dist/production/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/production/src/model/service/PersonManager.cjs +7 -0
- package/dist/production/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonManager.js +7 -0
- package/dist/production/src/model/service/PersonManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectManager.cjs +2 -2
- package/dist/production/src/model/service/ProjectManager.cjs.map +1 -1
- package/dist/production/src/model/service/ProjectManager.js +2 -2
- package/dist/production/src/model/service/ProjectManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/production/src/model/service/RolesManager.cjs +1 -1
- package/dist/production/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/production/src/model/service/RolesManager.js +1 -1
- package/dist/production/src/model/service/RolesManager.js.map +1 -1
- package/dist/production/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/production/src/model/service/SecretsManager.js.map +1 -1
- package/dist/production/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignInManager.js.map +1 -1
- package/dist/production/src/model/service/SignUpManager.cjs +1 -1
- package/dist/production/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignUpManager.js +1 -1
- package/dist/production/src/model/service/SignUpManager.js.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.js.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyService.cjs.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyService.js.map +1 -1
- package/dist/production/src/model/service/helpers/getPreferredProject.cjs +13 -0
- package/dist/production/src/model/service/helpers/getPreferredProject.cjs.map +1 -0
- package/dist/production/src/model/service/helpers/getPreferredProject.js +13 -0
- package/dist/production/src/model/service/helpers/getPreferredProject.js.map +1 -0
- package/dist/production/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPResponseError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPResponseError.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPValidationError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPValidationError.js.map +1 -1
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.cjs +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.js +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.cjs +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.js +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs +9 -5
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js +9 -5
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs +9 -3
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js +9 -3
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs +6 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.js +6 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/helpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/helpers.js.map +1 -1
- package/dist/production/src/model/service/membershipUtils.cjs.map +1 -1
- package/dist/production/src/model/service/membershipUtils.js.map +1 -1
- package/dist/production/src/model/type/ApiKey.cjs.map +1 -1
- package/dist/production/src/model/type/ApiKey.js.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/production/src/model/utils/Response.cjs.map +1 -1
- package/dist/production/src/model/utils/Response.js.map +1 -1
- package/dist/production/src/model/utils/password.cjs.map +1 -1
- package/dist/production/src/model/utils/password.js.map +1 -1
- package/dist/production/src/model/utils/tokenUtils.cjs +39 -0
- package/dist/production/src/model/utils/tokenUtils.cjs.map +1 -1
- package/dist/production/src/model/utils/tokenUtils.js +40 -1
- package/dist/production/src/model/utils/tokenUtils.js.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.cjs +8 -1
- package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.js +8 -1
- package/dist/production/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/production/src/resolvers/errorUtils.cjs.map +1 -1
- package/dist/production/src/resolvers/errorUtils.js.map +1 -1
- package/dist/production/src/resolvers/membershipUtils.cjs.map +1 -1
- package/dist/production/src/resolvers/membershipUtils.js.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +41 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +41 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs +4 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js +4 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +83 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js +83 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +52 -0
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +52 -0
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs +34 -0
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js +34 -0
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -0
- package/dist/production/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/MeQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/MeQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs +1 -0
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js +1 -0
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/production/src/schema/tenant.graphql.cjs +162 -10
- package/dist/production/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/production/src/schema/tenant.graphql.js +162 -10
- package/dist/production/src/schema/tenant.graphql.js.map +1 -1
- package/dist/production/src/utils/Mailer.cjs.map +1 -1
- package/dist/production/src/utils/Mailer.js.map +1 -1
- package/dist/production/src/utils/TemplateRenderer.cjs.map +1 -1
- package/dist/production/src/utils/TemplateRenderer.js.map +1 -1
- package/dist/production/src/utils/array.cjs.map +1 -1
- package/dist/production/src/utils/array.js.map +1 -1
- package/dist/production/src/utils/batchQuery.cjs.map +1 -1
- package/dist/production/src/utils/batchQuery.js.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/{createPasswordResetSql.d.ts → createPersonTokenSql.d.ts} +3 -2
- package/dist/tests/cases/integration/mocked/sql/createPersonTokenSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/getPersonByEmailSql.d.ts.map +1 -1
- package/dist/tests/src/IdPMock.d.ts +2 -2
- package/dist/tests/src/IdPMock.d.ts.map +1 -1
- package/dist/tests/src/mailer.d.ts.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/TenantContainer.d.ts +18 -0
- package/dist/types/TenantContainer.d.ts.map +1 -1
- package/dist/types/migrations/2024-08-26-120000-passwordless.d.ts +3 -0
- package/dist/types/migrations/2024-08-26-120000-passwordless.d.ts.map +1 -0
- package/dist/types/migrations/runner.d.ts.map +1 -1
- package/dist/types/migrations/snapshot.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionActions.d.ts +25 -0
- package/dist/types/model/authorization/PermissionActions.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionsFactory.d.ts.map +1 -1
- package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts +8 -0
- package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts.map +1 -0
- package/dist/types/model/commands/configuration/index.d.ts +2 -0
- package/dist/types/model/commands/configuration/index.d.ts.map +1 -0
- package/dist/types/model/commands/index.d.ts +2 -2
- package/dist/types/model/commands/index.d.ts.map +1 -1
- package/dist/types/model/commands/person/CreatePersonCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/TogglePersonPasswordlessCommand.d.ts +8 -0
- package/dist/types/model/commands/person/TogglePersonPasswordlessCommand.d.ts.map +1 -0
- package/dist/types/model/commands/person/index.d.ts +1 -0
- package/dist/types/model/commands/person/index.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/ActivateOtpCommand.d.ts +8 -0
- package/dist/types/model/commands/personToken/ActivateOtpCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts +19 -0
- package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/IncreaseOtpAttemptCommand.d.ts +7 -0
- package/dist/types/model/commands/personToken/IncreaseOtpAttemptCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/InvalidateTokenCommand.d.ts +7 -0
- package/dist/types/model/commands/personToken/InvalidateTokenCommand.d.ts.map +1 -0
- package/dist/types/model/commands/{passwordReset → personToken}/ResetPasswordCommand.d.ts +3 -2
- package/dist/types/model/commands/personToken/ResetPasswordCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/SavePersonTokenCommand.d.ts +19 -0
- package/dist/types/model/commands/personToken/SavePersonTokenCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/index.d.ts +7 -0
- package/dist/types/model/commands/personToken/index.d.ts.map +1 -0
- package/dist/types/model/consts/expirations.d.ts +3 -0
- package/dist/types/model/consts/expirations.d.ts.map +1 -0
- package/dist/types/model/mailing/UserMailer.d.ts +10 -0
- package/dist/types/model/mailing/UserMailer.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/PasswordlessSignIn.mustache.d.ts +3 -0
- package/dist/types/model/mailing/templates/PasswordlessSignIn.mustache.d.ts.map +1 -0
- package/dist/types/model/mailing/type.d.ts +2 -1
- package/dist/types/model/mailing/type.d.ts.map +1 -1
- package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts +6 -0
- package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts.map +1 -0
- package/dist/types/model/queries/configuration/index.d.ts +2 -0
- package/dist/types/model/queries/configuration/index.d.ts.map +1 -0
- package/dist/types/model/queries/index.d.ts +1 -0
- package/dist/types/model/queries/index.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonQueryBuilderFactory.d.ts.map +1 -1
- package/dist/types/model/queries/person/types.d.ts +1 -0
- package/dist/types/model/queries/person/types.d.ts.map +1 -1
- package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts +12 -0
- package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts.map +1 -0
- package/dist/types/model/service/ConfigurationManager.d.ts +9 -0
- package/dist/types/model/service/ConfigurationManager.d.ts.map +1 -0
- package/dist/types/model/service/IDPSignInManager.d.ts +1 -0
- package/dist/types/model/service/IDPSignInManager.d.ts.map +1 -1
- package/dist/types/model/service/InviteManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordResetManager.d.ts +1 -1
- package/dist/types/model/service/PasswordResetManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordlessSignInManager.d.ts +54 -0
- package/dist/types/model/service/PasswordlessSignInManager.d.ts.map +1 -0
- package/dist/types/model/service/PersonManager.d.ts +1 -0
- package/dist/types/model/service/PersonManager.d.ts.map +1 -1
- package/dist/types/model/service/PersonTokenManager.d.ts +3 -0
- package/dist/types/model/service/PersonTokenManager.d.ts.map +1 -0
- package/dist/types/model/service/helpers/getPreferredProject.d.ts +3 -0
- package/dist/types/model/service/helpers/getPreferredProject.d.ts.map +1 -0
- package/dist/types/model/service/idp/IdentityProviderHandler.d.ts +3 -3
- package/dist/types/model/service/idp/IdentityProviderHandler.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/AppleProvider.d.ts +10 -2
- package/dist/types/model/service/idp/providers/AppleProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/FacebookProvider.d.ts +10 -2
- package/dist/types/model/service/idp/providers/FacebookProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts +4 -4
- package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCProvider.d.ts +6 -2
- package/dist/types/model/service/idp/providers/OIDCProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCTypes.d.ts +21 -5
- package/dist/types/model/service/idp/providers/OIDCTypes.d.ts.map +1 -1
- package/dist/types/model/type/PersonToken.d.ts +16 -0
- package/dist/types/model/type/PersonToken.d.ts.map +1 -0
- package/dist/types/model/type/index.d.ts +1 -0
- package/dist/types/model/type/index.d.ts.map +1 -1
- package/dist/types/model/utils/tokenUtils.d.ts +8 -0
- package/dist/types/model/utils/tokenUtils.d.ts.map +1 -1
- package/dist/types/resolvers/ResolverFactory.d.ts +8 -0
- package/dist/types/resolvers/ResolverFactory.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/configuration/ConfigurationMutationResolver.d.ts +9 -0
- package/dist/types/resolvers/mutation/configuration/ConfigurationMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/person/IDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts +13 -0
- package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/person/ResetPasswordMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts +13 -0
- package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts +9 -0
- package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts.map +1 -0
- package/dist/types/resolvers/responseHelpers/PersonResponseFactory.d.ts.map +1 -1
- package/dist/types/resolvers/types/ProjectTypeResolver.d.ts +3 -3
- package/dist/types/schema/index.d.ts +362 -38
- package/dist/types/schema/index.d.ts.map +1 -1
- package/dist/types/schema/tenant.graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/utils/batchQuery.d.ts.map +1 -1
- package/{graphql-tenant.codegen.yml → graphql.codegen.yml} +1 -1
- package/package.json +23 -27
- package/src/TenantContainer.ts +18 -0
- package/src/migrations/2024-08-26-120000-passwordless.ts +31 -0
- package/src/migrations/runner.ts +2 -0
- package/src/migrations/snapshot-template-end.txt +3 -0
- package/src/migrations/snapshot.ts +33 -5
- package/src/model/authorization/PermissionActions.ts +7 -0
- package/src/model/authorization/PermissionsFactory.ts +5 -0
- package/src/model/commands/configuration/UpdateConfigurationCommand.ts +26 -0
- package/src/model/commands/configuration/index.ts +1 -0
- package/src/model/commands/index.ts +2 -2
- package/src/model/commands/person/CreatePersonCommand.ts +1 -0
- package/src/model/commands/person/TogglePersonPasswordlessCommand.ts +18 -0
- package/src/model/commands/person/index.ts +1 -0
- package/src/model/commands/personToken/ActivateOtpCommand.ts +24 -0
- package/src/model/commands/personToken/CreatePersonTokenCommand.ts +42 -0
- package/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts +23 -0
- package/src/model/commands/personToken/InvalidateTokenCommand.ts +22 -0
- package/src/model/commands/personToken/ResetPasswordCommand.ts +28 -0
- package/src/model/commands/personToken/SavePersonTokenCommand.ts +42 -0
- package/src/model/commands/personToken/index.ts +6 -0
- package/src/model/consts/expirations.ts +2 -0
- package/src/model/mailing/UserMailer.ts +14 -0
- package/src/model/mailing/templates/PasswordlessSignIn.mustache.ts +15 -0
- package/src/model/mailing/type.ts +3 -0
- package/src/model/queries/configuration/ConfigurationQuery.ts +30 -0
- package/src/model/queries/configuration/index.ts +1 -0
- package/src/model/queries/index.ts +1 -0
- package/src/model/queries/person/PersonQueryBuilderFactory.ts +1 -0
- package/src/model/queries/person/types.ts +1 -0
- package/src/model/queries/personToken/PersonTokenQuery.ts +35 -0
- package/src/model/service/ConfigurationManager.ts +22 -0
- package/src/model/service/IDPSignInManager.ts +7 -6
- package/src/model/service/InviteManager.ts +5 -6
- package/src/model/service/OtpAuthenticator.ts +1 -1
- package/src/model/service/PasswordResetManager.ts +4 -10
- package/src/model/service/PasswordlessSignInManager.ts +190 -0
- package/src/model/service/PersonManager.ts +6 -0
- package/src/model/service/PersonTokenManager.ts +2 -0
- package/src/model/service/helpers/getPreferredProject.ts +11 -0
- package/src/model/service/idp/IdentityProviderHandler.ts +3 -3
- package/src/model/service/idp/providers/AppleProvider.ts +3 -3
- package/src/model/service/idp/providers/FacebookProvider.ts +3 -3
- package/src/model/service/idp/providers/OIDCHelpers.ts +11 -6
- package/src/model/service/idp/providers/OIDCProvider.ts +10 -4
- package/src/model/service/idp/providers/OIDCTypes.ts +5 -1
- package/src/model/type/PersonToken.ts +21 -0
- package/src/model/type/index.ts +1 -0
- package/src/model/utils/tokenUtils.ts +47 -0
- package/src/resolvers/ResolverFactory.ts +19 -0
- package/src/resolvers/mutation/configuration/ConfigurationMutationResolver.ts +29 -0
- package/src/resolvers/mutation/person/IDPMutationResolver.ts +4 -1
- package/src/resolvers/mutation/person/PasswordlessMutationResolver.ts +81 -0
- package/src/resolvers/mutation/person/ResetPasswordMutationResolver.ts +1 -10
- package/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.ts +44 -0
- package/src/resolvers/query/ConfigurationQueryResolver.ts +21 -0
- package/src/resolvers/responseHelpers/PersonResponseFactory.ts +1 -0
- package/src/resolvers/types/ProjectTypeResolver.ts +3 -3
- package/src/schema/index.ts +362 -35
- package/src/schema/tenant.graphql.ts +162 -10
- package/tests/cases/integration/mocked/addProjectMemberMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/changeMyPasswordMutation.test.ts +2 -2
- package/tests/cases/integration/mocked/changeMyProfileMutation.test.ts +2 -2
- package/tests/cases/integration/mocked/changePasswordMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/changeProfileMutation.test.ts +2 -2
- package/tests/cases/integration/mocked/confirmOtpMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/createApiKeyMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/createSessionKeyMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/disableApiKeyMutation.ts +1 -1
- package/tests/cases/integration/mocked/inviteMutations.test.ts +3 -3
- package/tests/cases/integration/mocked/listProjectMembersQuery.test.ts +1 -1
- package/tests/cases/integration/mocked/personByIdQuery.test.ts +1 -1
- package/tests/cases/integration/mocked/prepareOtpMutation.test.ts +3 -3
- package/tests/cases/integration/mocked/removeProjectMemberMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signInIdpMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signInMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signOutMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signUpMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/sql/{createPasswordResetSql.ts → createPersonTokenSql.ts} +5 -3
- package/tests/cases/integration/mocked/sql/getPersonByEmailSql.ts +2 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdSql.ts +1 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdentity.ts +1 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdpSql.ts +1 -1
- package/tests/cases/integration/mocked/updateProjectMemberMutation.test.ts +1 -1
- package/tests/cases/migrations/2020-06-08-134000-tenant-credentials.test.ts +5 -3
- package/tests/cases/unit/authorization/membershipAwareAccessNode.test.ts +9 -9
- package/tests/cases/unit/authorization/membershipMatcher.test.ts +10 -10
- package/tests/src/IdPMock.ts +2 -2
- package/tests/src/mailer.ts +3 -4
- package/tests/src/testGraphql.ts +2 -2
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs +0 -30
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js +0 -30
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js.map +0 -1
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.cjs +0 -38
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.cjs.map +0 -1
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.js +0 -38
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.js.map +0 -1
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs +0 -24
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js +0 -24
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js.map +0 -1
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs +0 -30
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js +0 -30
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js.map +0 -1
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.cjs +0 -38
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.cjs.map +0 -1
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.js +0 -38
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.js.map +0 -1
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs +0 -24
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js +0 -24
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js.map +0 -1
- package/dist/tests/cases/integration/mocked/sql/createPasswordResetSql.d.ts.map +0 -1
- package/dist/tests/src/testTenantDb.d.ts +0 -31
- package/dist/tests/src/testTenantDb.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/CreatePasswordResetRequestCommand.d.ts +0 -12
- package/dist/types/model/commands/passwordReset/CreatePasswordResetRequestCommand.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/ResetPasswordCommand.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/SavePasswordResetRequestCommand.d.ts +0 -10
- package/dist/types/model/commands/passwordReset/SavePasswordResetRequestCommand.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/index.d.ts +0 -4
- package/dist/types/model/commands/passwordReset/index.d.ts.map +0 -1
- package/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.ts +0 -25
- package/src/model/commands/passwordReset/ResetPasswordCommand.ts +0 -57
- package/src/model/commands/passwordReset/SavePasswordResetRequestCommand.ts +0 -28
- package/src/model/commands/passwordReset/index.ts +0 -3
- package/tests/src/testTenantDb.ts +0 -202
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ChangePasswordCommand = require("../person/ChangePasswordCommand.cjs");
|
|
4
|
+
const Response = require("../../utils/Response.cjs");
|
|
5
|
+
const PersonTokenQuery = require("../../queries/personToken/PersonTokenQuery.cjs");
|
|
6
|
+
const InvalidateTokenCommand = require("./InvalidateTokenCommand.cjs");
|
|
7
|
+
require("@contember/database");
|
|
8
|
+
require("../../type/ApiKey.cjs");
|
|
9
|
+
const tokenUtils = require("../../utils/tokenUtils.cjs");
|
|
10
|
+
class ResetPasswordCommand {
|
|
11
|
+
constructor(token, password) {
|
|
12
|
+
this.token = token;
|
|
13
|
+
this.password = password;
|
|
14
|
+
}
|
|
15
|
+
async execute({ db, providers, bus }) {
|
|
16
|
+
const now = providers.now();
|
|
17
|
+
const token = await db.createQueryHandler().fetch(PersonTokenQuery.PersonTokenQuery.byToken(this.token, "password_reset"));
|
|
18
|
+
const tokenValidationResult = tokenUtils.validateToken({ entry: token, token: this.token, now, validationType: "token" });
|
|
19
|
+
if (!tokenValidationResult.ok) {
|
|
20
|
+
return tokenValidationResult;
|
|
21
|
+
}
|
|
22
|
+
await bus.execute(new InvalidateTokenCommand.InvalidateTokenCommand(tokenValidationResult.result.id));
|
|
23
|
+
await bus.execute(new ChangePasswordCommand.ChangePasswordCommand(tokenValidationResult.result.person_id, this.password));
|
|
24
|
+
return new Response.ResponseOk(null);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ResetPasswordCommand = ResetPasswordCommand;
|
|
28
|
+
//# sourceMappingURL=ResetPasswordCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResetPasswordCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseOk } from '../../utils/Response'\nimport { PersonTokenQuery } from '../../queries/personToken/PersonTokenQuery'\nimport { InvalidateTokenCommand } from './InvalidateTokenCommand'\nimport { validateToken } from '../../utils'\nimport { PersonToken } from '../../type'\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 now = providers.now()\n\t\tconst token = await db.createQueryHandler().fetch(PersonTokenQuery.byToken(this.token, 'password_reset'))\n\t\tconst tokenValidationResult = validateToken({ entry: token, token: this.token, now, validationType: 'token' })\n\t\tif (!tokenValidationResult.ok) {\n\t\t\treturn tokenValidationResult\n\t\t}\n\t\tawait bus.execute(new InvalidateTokenCommand(tokenValidationResult.result.id))\n\t\tawait bus.execute(new ChangePasswordCommand(tokenValidationResult.result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| PersonToken.TokenValidationError\n\nexport type ResetPasswordCommandResponse = Response<null, PersonToken.TokenValidationError>\n"],"names":["PersonTokenQuery","validateToken","InvalidateTokenCommand","ChangePasswordCommand","ResponseOk"],"mappings":";;;;;;;;;AAQO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7D,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,MAAM,UAAU,IAAI;AACpB,UAAA,QAAQ,MAAM,GAAG,qBAAqB,MAAMA,iBAAA,iBAAiB,QAAQ,KAAK,OAAO,gBAAgB,CAAC;AAClG,UAAA,wBAAwBC,WAAAA,cAAc,EAAE,OAAO,OAAO,OAAO,KAAK,OAAO,KAAK,gBAAgB,QAAA,CAAS;AACzG,QAAA,CAAC,sBAAsB,IAAI;AACvB,aAAA;AAAA,IAAA;AAER,UAAM,IAAI,QAAQ,IAAIC,uBAAAA,uBAAuB,sBAAsB,OAAO,EAAE,CAAC;AACvE,UAAA,IAAI,QAAQ,IAAIC,4CAAsB,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAE3F,WAAA,IAAIC,oBAAW,IAAI;AAAA,EAAA;AAE5B;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ChangePasswordCommand } from "../person/ChangePasswordCommand.js";
|
|
2
|
+
import { ResponseOk } from "../../utils/Response.js";
|
|
3
|
+
import { PersonTokenQuery } from "../../queries/personToken/PersonTokenQuery.js";
|
|
4
|
+
import { InvalidateTokenCommand } from "./InvalidateTokenCommand.js";
|
|
5
|
+
import "@contember/database";
|
|
6
|
+
import "../../type/ApiKey.js";
|
|
7
|
+
import { validateToken } from "../../utils/tokenUtils.js";
|
|
8
|
+
class ResetPasswordCommand {
|
|
9
|
+
constructor(token, password) {
|
|
10
|
+
this.token = token;
|
|
11
|
+
this.password = password;
|
|
12
|
+
}
|
|
13
|
+
async execute({ db, providers, bus }) {
|
|
14
|
+
const now = providers.now();
|
|
15
|
+
const token = await db.createQueryHandler().fetch(PersonTokenQuery.byToken(this.token, "password_reset"));
|
|
16
|
+
const tokenValidationResult = validateToken({ entry: token, token: this.token, now, validationType: "token" });
|
|
17
|
+
if (!tokenValidationResult.ok) {
|
|
18
|
+
return tokenValidationResult;
|
|
19
|
+
}
|
|
20
|
+
await bus.execute(new InvalidateTokenCommand(tokenValidationResult.result.id));
|
|
21
|
+
await bus.execute(new ChangePasswordCommand(tokenValidationResult.result.person_id, this.password));
|
|
22
|
+
return new ResponseOk(null);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
ResetPasswordCommand
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ResetPasswordCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResetPasswordCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseOk } from '../../utils/Response'\nimport { PersonTokenQuery } from '../../queries/personToken/PersonTokenQuery'\nimport { InvalidateTokenCommand } from './InvalidateTokenCommand'\nimport { validateToken } from '../../utils'\nimport { PersonToken } from '../../type'\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 now = providers.now()\n\t\tconst token = await db.createQueryHandler().fetch(PersonTokenQuery.byToken(this.token, 'password_reset'))\n\t\tconst tokenValidationResult = validateToken({ entry: token, token: this.token, now, validationType: 'token' })\n\t\tif (!tokenValidationResult.ok) {\n\t\t\treturn tokenValidationResult\n\t\t}\n\t\tawait bus.execute(new InvalidateTokenCommand(tokenValidationResult.result.id))\n\t\tawait bus.execute(new ChangePasswordCommand(tokenValidationResult.result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| PersonToken.TokenValidationError\n\nexport type ResetPasswordCommandResponse = Response<null, PersonToken.TokenValidationError>\n"],"names":[],"mappings":";;;;;;;AAQO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7D,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,MAAM,UAAU,IAAI;AACpB,UAAA,QAAQ,MAAM,GAAG,qBAAqB,MAAM,iBAAiB,QAAQ,KAAK,OAAO,gBAAgB,CAAC;AAClG,UAAA,wBAAwB,cAAc,EAAE,OAAO,OAAO,OAAO,KAAK,OAAO,KAAK,gBAAgB,QAAA,CAAS;AACzG,QAAA,CAAC,sBAAsB,IAAI;AACvB,aAAA;AAAA,IAAA;AAER,UAAM,IAAI,QAAQ,IAAI,uBAAuB,sBAAsB,OAAO,EAAE,CAAC;AACvE,UAAA,IAAI,QAAQ,IAAI,sBAAsB,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAE3F,WAAA,IAAI,WAAW,IAAI;AAAA,EAAA;AAE5B;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
class SavePersonTokenCommand {
|
|
6
|
+
constructor(personId, tokenHash, type, expirationMinutes) {
|
|
7
|
+
this.personId = personId;
|
|
8
|
+
this.tokenHash = tokenHash;
|
|
9
|
+
this.type = type;
|
|
10
|
+
this.expirationMinutes = expirationMinutes;
|
|
11
|
+
}
|
|
12
|
+
async execute({ db, providers }) {
|
|
13
|
+
const id = providers.uuid();
|
|
14
|
+
const expiresAt = time.plusMinutes(providers.now(), this.expirationMinutes);
|
|
15
|
+
await Database.InsertBuilder.create().into("person_token").values({
|
|
16
|
+
id,
|
|
17
|
+
token_hash: this.tokenHash,
|
|
18
|
+
person_id: this.personId,
|
|
19
|
+
expires_at: expiresAt,
|
|
20
|
+
created_at: providers.now(),
|
|
21
|
+
used_at: null,
|
|
22
|
+
type: this.type
|
|
23
|
+
}).execute(db);
|
|
24
|
+
return { id, expiresAt };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.SavePersonTokenCommand = SavePersonTokenCommand;
|
|
28
|
+
//# sourceMappingURL=SavePersonTokenCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SavePersonTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/SavePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\nimport { PersonToken } from '../../type'\n\nclass SavePersonTokenCommand implements Command<SavePersonTokenCommand.Result> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<SavePersonTokenCommand.Result> {\n\t\tconst id = providers.uuid()\n\t\tconst expiresAt = plusMinutes(providers.now(), this.expirationMinutes)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_token')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: expiresAt,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t\ttype: this.type,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn { id, expiresAt }\n\t}\n}\n\nnamespace SavePersonTokenCommand {\n\texport interface Result {\n\t\tid: string\n\t\texpiresAt: Date\n\t}\n}\n\nexport { SavePersonTokenCommand }\n"],"names":["plusMinutes","InsertBuilder"],"mappings":";;;;AAMA,MAAM,uBAAyE;AAAA,EAC9E,YACkB,UACA,WACA,MACA,mBAChB;AAJgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAAmE;AAChF,UAAA,KAAK,UAAU,KAAK;AAC1B,UAAM,YAAYA,KAAAA,YAAY,UAAU,IAAI,GAAG,KAAK,iBAAiB;AACrE,UAAMC,SAAAA,cAAc,OAAO,EACzB,KAAK,cAAc,EACnB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY;AAAA,MACZ,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,IAAA,CACX,EACA,QAAQ,EAAE;AAEL,WAAA,EAAE,IAAI,UAAU;AAAA,EAAA;AAEzB;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InsertBuilder as InsertBuilder$1 } from "@contember/database";
|
|
2
|
+
import { plusMinutes } from "../../utils/time.js";
|
|
3
|
+
class SavePersonTokenCommand {
|
|
4
|
+
constructor(personId, tokenHash, type, expirationMinutes) {
|
|
5
|
+
this.personId = personId;
|
|
6
|
+
this.tokenHash = tokenHash;
|
|
7
|
+
this.type = type;
|
|
8
|
+
this.expirationMinutes = expirationMinutes;
|
|
9
|
+
}
|
|
10
|
+
async execute({ db, providers }) {
|
|
11
|
+
const id = providers.uuid();
|
|
12
|
+
const expiresAt = plusMinutes(providers.now(), this.expirationMinutes);
|
|
13
|
+
await InsertBuilder$1.create().into("person_token").values({
|
|
14
|
+
id,
|
|
15
|
+
token_hash: this.tokenHash,
|
|
16
|
+
person_id: this.personId,
|
|
17
|
+
expires_at: expiresAt,
|
|
18
|
+
created_at: providers.now(),
|
|
19
|
+
used_at: null,
|
|
20
|
+
type: this.type
|
|
21
|
+
}).execute(db);
|
|
22
|
+
return { id, expiresAt };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
SavePersonTokenCommand
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=SavePersonTokenCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SavePersonTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/SavePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\nimport { PersonToken } from '../../type'\n\nclass SavePersonTokenCommand implements Command<SavePersonTokenCommand.Result> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<SavePersonTokenCommand.Result> {\n\t\tconst id = providers.uuid()\n\t\tconst expiresAt = plusMinutes(providers.now(), this.expirationMinutes)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_token')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: expiresAt,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t\ttype: this.type,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn { id, expiresAt }\n\t}\n}\n\nnamespace SavePersonTokenCommand {\n\texport interface Result {\n\t\tid: string\n\t\texpiresAt: Date\n\t}\n}\n\nexport { SavePersonTokenCommand }\n"],"names":["InsertBuilder"],"mappings":";;AAMA,MAAM,uBAAyE;AAAA,EAC9E,YACkB,UACA,WACA,MACA,mBAChB;AAJgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAAmE;AAChF,UAAA,KAAK,UAAU,KAAK;AAC1B,UAAM,YAAY,YAAY,UAAU,IAAI,GAAG,KAAK,iBAAiB;AACrE,UAAMA,gBAAc,OAAO,EACzB,KAAK,cAAc,EACnB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY;AAAA,MACZ,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,IAAA,CACX,EACA,QAAQ,EAAE;AAEL,WAAA,EAAE,IAAI,UAAU;AAAA,EAAA;AAEzB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,EAAA;AAAA,EAElG,MAAa,QAAQ,EAAE,IAAI,aAAmD;AACvE,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,SAAS,MAAMA,uBAAc,SACjC,KAAK,SAAS,EACd,OAAO;AAAA,MACP;AAAA,MACA,MAAM,KAAK,QAAQ;AAAA,MACnB,MAAM,KAAK,QAAQ;AAAA,MACnB,QAAQ,KAAK,QAAQ;AAAA,MACrB,YAAY,KAAK;AAAA,IAAA,CACjB,EACA,WAAWC,4BAAmB,SAAS,EACvC,QAAQ,EAAE;AACL,WAAA,SAAS,IAAI,KAAK;AAAA,EAAA;AAE3B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,EAAA;AAAA,EAElG,MAAa,QAAQ,EAAE,IAAI,aAAmD;AACvE,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,SAAS,MAAMA,gBAAc,SACjC,KAAK,SAAS,EACd,OAAO;AAAA,MACP;AAAA,MACA,MAAM,KAAK,QAAQ;AAAA,MACnB,MAAM,KAAK,QAAQ;AAAA,MACnB,QAAQ,KAAK,QAAQ;AAAA,MACrB,YAAY,KAAK;AAAA,IAAA,CACjB,EACA,WAAW,mBAAmB,SAAS,EACvC,QAAQ,EAAE;AACL,WAAA,SAAS,IAAI,KAAK;AAAA,EAAA;AAE3B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetProjectSecretCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SetProjectSecretCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,EAAA;AAAA,EAE7E,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,EAAE,OAAO,QAAQ,IAAI,MAAM,UAAU,QAAQ,KAAK,KAAK;AAC7D,UAAM,KAAKA,SAAAA,cAAc,OAAA,EACvB,KAAK,gBAAgB,EACrB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,KAAK,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,MAC1B,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B,EACA,WAAWC,SAAA,mBAAmB,QAAQ,CAAC,cAAc,KAAK,GAAG;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B;AACI,UAAA,GAAG,QAAQ,EAAE;AAAA,EAAA;AAErB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetProjectSecretCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SetProjectSecretCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,EAAA;AAAA,EAE7E,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,EAAE,OAAO,QAAQ,IAAI,MAAM,UAAU,QAAQ,KAAK,KAAK;AAC7D,UAAM,KAAKA,gBAAc,OAAA,EACvB,KAAK,gBAAgB,EACrB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,KAAK,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,MAC1B,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B,EACA,WAAW,mBAAmB,QAAQ,CAAC,cAAc,KAAK,GAAG;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B;AACI,UAAA,GAAG,QAAQ,EAAE;AAAA,EAAA;AAErB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,EAAA;AAAA,EAExD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,SAA8B;AAAA,MACnC,YAAY;AAAA,IACb;AACI,QAAA,KAAK,KAAK,WAAW,QAAW;AAC5B,aAAA,SAAS,KAAK,KAAK;AAAA,IAAA;AAEvB,QAAA,KAAK,KAAK,SAAS,QAAW;AAC1B,aAAA,OAAO,KAAK,KAAK;AAAA,IAAA;AAGnB,UAAAA,SAAA,cAAc,SAClB,MAAM,SAAS,EACf,OAAO,MAAM,EACb,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,EAAA;AAAA,EAExD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,SAA8B;AAAA,MACnC,YAAY;AAAA,IACb;AACI,QAAA,KAAK,KAAK,WAAW,QAAW;AAC5B,aAAA,SAAS,KAAK,KAAK;AAAA,IAAA;AAEvB,QAAA,KAAK,KAAK,SAAS,QAAW;AAC1B,aAAA,OAAO,KAAK,KAAK;AAAA,IAAA;AAGnB,UAAAA,gBAAc,SAClB,MAAM,SAAS,EACf,OAAO,MAAM,EACb,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const PASSWORD_RESET_EXPIRATION_MINUTES = 60;
|
|
4
|
+
const INVITATION_RESET_TOKEN_EXPIRATION_MINUTES = 60 * 24;
|
|
5
|
+
exports.INVITATION_RESET_TOKEN_EXPIRATION_MINUTES = INVITATION_RESET_TOKEN_EXPIRATION_MINUTES;
|
|
6
|
+
exports.PASSWORD_RESET_EXPIRATION_MINUTES = PASSWORD_RESET_EXPIRATION_MINUTES;
|
|
7
|
+
//# sourceMappingURL=expirations.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expirations.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/consts/expirations.ts"],"sourcesContent":["export const PASSWORD_RESET_EXPIRATION_MINUTES = 60\nexport const INVITATION_RESET_TOKEN_EXPIRATION_MINUTES = 60 * 24\n"],"names":[],"mappings":";;AAAO,MAAM,oCAAoC;AAC1C,MAAM,4CAA4C,KAAK;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expirations.js","sources":["../../../../../../packages/engine-tenant-api/src/model/consts/expirations.ts"],"sourcesContent":["export const PASSWORD_RESET_EXPIRATION_MINUTES = 60\nexport const INVITATION_RESET_TOKEN_EXPIRATION_MINUTES = 60 * 24\n"],"names":[],"mappings":"AAAO,MAAM,oCAAoC;AAC1C,MAAM,4CAA4C,KAAK;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Password.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\n\n\nexport type MaybePassword = Password | typeof NoPassword\n\nexport const NoPassword = {\n\tgetPlain: () => null,\n\tgetHash: () => null,\n}\n\nexport interface Password {\n\tgetPlain(): string | null\n\n\tgetHash(providers: Providers): Promise<string>\n}\n\nexport class PasswordHash implements Password {\n\tconstructor(private readonly hash: string) {\n\t}\n\n\tgetHash(providers: Providers): Promise<string> {\n\t\treturn Promise.resolve(this.hash)\n\t}\n\n\tgetPlain(): string | null {\n\t\treturn null\n\t}\n}\n\nexport class PasswordPlain implements Password {\n\tconstructor(private readonly plain: string) {\n\t}\n\n\tgetHash(providers: Providers) {\n\t\treturn providers.bcrypt(this.plain)\n\t}\n\n\tgetPlain() {\n\t\treturn this.plain\n\t}\n}\n"],"names":[],"mappings":";;AAKO,MAAM,aAAa;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAChB;AAQO,MAAM,aAAiC;AAAA,EAC7C,YAA6B,MAAc;AAAd,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"Password.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\n\n\nexport type MaybePassword = Password | typeof NoPassword\n\nexport const NoPassword = {\n\tgetPlain: () => null,\n\tgetHash: () => null,\n}\n\nexport interface Password {\n\tgetPlain(): string | null\n\n\tgetHash(providers: Providers): Promise<string>\n}\n\nexport class PasswordHash implements Password {\n\tconstructor(private readonly hash: string) {\n\t}\n\n\tgetHash(providers: Providers): Promise<string> {\n\t\treturn Promise.resolve(this.hash)\n\t}\n\n\tgetPlain(): string | null {\n\t\treturn null\n\t}\n}\n\nexport class PasswordPlain implements Password {\n\tconstructor(private readonly plain: string) {\n\t}\n\n\tgetHash(providers: Providers) {\n\t\treturn providers.bcrypt(this.plain)\n\t}\n\n\tgetPlain() {\n\t\treturn this.plain\n\t}\n}\n"],"names":[],"mappings":";;AAKO,MAAM,aAAa;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAChB;AAQO,MAAM,aAAiC;AAAA,EAC7C,YAA6B,MAAc;AAAd,SAAA,OAAA;AAAA,EAAA;AAAA,EAG7B,QAAQ,WAAuC;AACvC,WAAA,QAAQ,QAAQ,KAAK,IAAI;AAAA,EAAA;AAAA,EAGjC,WAA0B;AAClB,WAAA;AAAA,EAAA;AAET;AAEO,MAAM,cAAkC;AAAA,EAC9C,YAA6B,OAAe;AAAf,SAAA,QAAA;AAAA,EAAA;AAAA,EAG7B,QAAQ,WAAsB;AACtB,WAAA,UAAU,OAAO,KAAK,KAAK;AAAA,EAAA;AAAA,EAGnC,WAAW;AACV,WAAO,KAAK;AAAA,EAAA;AAEd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Password.js","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\n\n\nexport type MaybePassword = Password | typeof NoPassword\n\nexport const NoPassword = {\n\tgetPlain: () => null,\n\tgetHash: () => null,\n}\n\nexport interface Password {\n\tgetPlain(): string | null\n\n\tgetHash(providers: Providers): Promise<string>\n}\n\nexport class PasswordHash implements Password {\n\tconstructor(private readonly hash: string) {\n\t}\n\n\tgetHash(providers: Providers): Promise<string> {\n\t\treturn Promise.resolve(this.hash)\n\t}\n\n\tgetPlain(): string | null {\n\t\treturn null\n\t}\n}\n\nexport class PasswordPlain implements Password {\n\tconstructor(private readonly plain: string) {\n\t}\n\n\tgetHash(providers: Providers) {\n\t\treturn providers.bcrypt(this.plain)\n\t}\n\n\tgetPlain() {\n\t\treturn this.plain\n\t}\n}\n"],"names":[],"mappings":"AAKO,MAAM,aAAa;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAChB;AAQO,MAAM,aAAiC;AAAA,EAC7C,YAA6B,MAAc;AAAd,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"Password.js","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\n\n\nexport type MaybePassword = Password | typeof NoPassword\n\nexport const NoPassword = {\n\tgetPlain: () => null,\n\tgetHash: () => null,\n}\n\nexport interface Password {\n\tgetPlain(): string | null\n\n\tgetHash(providers: Providers): Promise<string>\n}\n\nexport class PasswordHash implements Password {\n\tconstructor(private readonly hash: string) {\n\t}\n\n\tgetHash(providers: Providers): Promise<string> {\n\t\treturn Promise.resolve(this.hash)\n\t}\n\n\tgetPlain(): string | null {\n\t\treturn null\n\t}\n}\n\nexport class PasswordPlain implements Password {\n\tconstructor(private readonly plain: string) {\n\t}\n\n\tgetHash(providers: Providers) {\n\t\treturn providers.bcrypt(this.plain)\n\t}\n\n\tgetPlain() {\n\t\treturn this.plain\n\t}\n}\n"],"names":[],"mappings":"AAKO,MAAM,aAAa;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAChB;AAQO,MAAM,aAAiC;AAAA,EAC7C,YAA6B,MAAc;AAAd,SAAA,OAAA;AAAA,EAAA;AAAA,EAG7B,QAAQ,WAAuC;AACvC,WAAA,QAAQ,QAAQ,KAAK,IAAI;AAAA,EAAA;AAAA,EAGjC,WAA0B;AAClB,WAAA;AAAA,EAAA;AAET;AAEO,MAAM,cAAkC;AAAA,EAC9C,YAA6B,OAAe;AAAf,SAAA,QAAA;AAAA,EAAA;AAAA,EAG7B,QAAQ,WAAsB;AACtB,WAAA,UAAU,OAAO,KAAK,KAAK;AAAA,EAAA;AAAA,EAGnC,WAAW;AACV,WAAO,KAAK;AAAA,EAAA;AAEd;"}
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const NewUserInvited_mustache = require("./templates/NewUserInvited.mustache.cjs");
|
|
4
4
|
const ExistingUserInvited_mustache = require("./templates/ExistingUserInvited.mustache.cjs");
|
|
5
5
|
const PasswordReset_mustache = require("./templates/PasswordReset.mustache.cjs");
|
|
6
|
+
const PasswordlessSignIn_mustache = require("./templates/PasswordlessSignIn.mustache.cjs");
|
|
6
7
|
const type = require("./type.cjs");
|
|
7
8
|
require("../queries/apiKey/ApiKeyQuery.cjs");
|
|
8
|
-
const MailTemplateQuery = require("../queries/mailTemplate/MailTemplateQuery.cjs");
|
|
9
9
|
require("@contember/database");
|
|
10
|
+
const MailTemplateQuery = require("../queries/mailTemplate/MailTemplateQuery.cjs");
|
|
10
11
|
require("../authorization/PermissionActions.cjs");
|
|
11
12
|
require("@contember/authorization");
|
|
12
13
|
require("../authorization/PermissionContext.cjs");
|
|
@@ -42,6 +43,14 @@ class UserMailer {
|
|
|
42
43
|
};
|
|
43
44
|
await this.sendTemplate(template, mailArguments);
|
|
44
45
|
}
|
|
46
|
+
async sendPasswordlessEmail(dbContext, mailArguments, customMailOptions) {
|
|
47
|
+
const template = await this.getCustomTemplate(dbContext, { type: type.MailType.passwordlessSignIn, ...customMailOptions }) || {
|
|
48
|
+
subject: "Sign in here",
|
|
49
|
+
content: PasswordlessSignIn_mustache,
|
|
50
|
+
replyTo: null
|
|
51
|
+
};
|
|
52
|
+
await this.sendTemplate(template, mailArguments);
|
|
53
|
+
}
|
|
45
54
|
async sendTemplate(template, mailArguments) {
|
|
46
55
|
const html = await this.templateRenderer.render(template.content, mailArguments);
|
|
47
56
|
await this.mailer.send({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMailer.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/UserMailer.ts"],"sourcesContent":["import { Mailer, TemplateRenderer } from '../../utils'\nimport NewUserInvited from './templates/NewUserInvited.mustache'\nimport ExistingUserInvited from './templates/ExistingUserInvited.mustache'\nimport PasswordReset from './templates/PasswordReset.mustache'\nimport { MailTemplateData, MailTemplateIdentifier, MailType } from './type'\nimport { MailTemplateQuery } from '../queries'\nimport Layout from './templates/Layout.mustache'\nimport { DatabaseContext } from '../utils'\n\nexport class UserMailer {\n\tconstructor(\n\t\tprivate readonly mailer: Mailer,\n\t\tprivate readonly templateRenderer: TemplateRenderer,\n\t) { }\n\n\tasync sendNewUserInvitedMail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; password: string | null; token: string | null; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.newUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: NewUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendExistingUserInvitedEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.existingUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: ExistingUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendPasswordResetEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; token: string; project?: string; projectSlug?: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.passwordReset, ...customMailOptions })) || {\n\t\t\tsubject: 'Password reset',\n\t\t\tcontent: PasswordReset,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tprivate async sendTemplate(\n\t\ttemplate: Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'>,\n\t\tmailArguments: Record<string, any>,\n\t) {\n\t\tconst html = await this.templateRenderer.render(template.content, mailArguments)\n\t\tawait this.mailer.send({\n\t\t\tto: mailArguments.email,\n\t\t\tsubject: await this.templateRenderer.render(template.subject, mailArguments),\n\t\t\thtml,\n\t\t\t...(template.replyTo ? {\n\t\t\t\treplyTo: template.replyTo,\n\t\t\t} : {}),\n\t\t})\n\t}\n\n\tprivate async getCustomTemplate(\n\t\tdbContext: DatabaseContext,\n\t\tidentifier: MailTemplateIdentifier,\n\t): Promise<Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'> | null> {\n\t\tconst customTemplate =\n\t\t\t(await dbContext.queryHandler.fetch(new MailTemplateQuery(identifier)))\n\t\t\t?? (await dbContext.queryHandler.fetch(new MailTemplateQuery({ ...identifier, projectId: null })))\n\n\t\tif (!customTemplate) {\n\t\t\treturn null\n\t\t}\n\t\tconst content = customTemplate.useLayout ? Layout(customTemplate.content) : customTemplate.content\n\t\treturn { content, subject: customTemplate.subject, replyTo: customTemplate.replyTo }\n\t}\n}\n"],"names":["MailType","NewUserInvited","ExistingUserInvited","PasswordReset","MailTemplateQuery","Layout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserMailer.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/UserMailer.ts"],"sourcesContent":["import { Mailer, TemplateRenderer } from '../../utils'\nimport NewUserInvited from './templates/NewUserInvited.mustache'\nimport ExistingUserInvited from './templates/ExistingUserInvited.mustache'\nimport PasswordReset from './templates/PasswordReset.mustache'\nimport PasswordlessSignIn from './templates/PasswordlessSignIn.mustache'\nimport { MailTemplateData, MailTemplateIdentifier, MailType } from './type'\nimport { MailTemplateQuery } from '../queries'\nimport Layout from './templates/Layout.mustache'\nimport { DatabaseContext } from '../utils'\n\nexport class UserMailer {\n\tconstructor(\n\t\tprivate readonly mailer: Mailer,\n\t\tprivate readonly templateRenderer: TemplateRenderer,\n\t) { }\n\n\tasync sendNewUserInvitedMail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; password: string | null; token: string | null; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.newUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: NewUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendExistingUserInvitedEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.existingUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: ExistingUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendPasswordResetEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; token: string; project?: string; projectSlug?: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.passwordReset, ...customMailOptions })) || {\n\t\t\tsubject: 'Password reset',\n\t\t\tcontent: PasswordReset,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendPasswordlessEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; token: string; project?: string; projectSlug?: string; url?: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.passwordlessSignIn, ...customMailOptions })) || {\n\t\t\tsubject: 'Sign in here',\n\t\t\tcontent: PasswordlessSignIn,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tprivate async sendTemplate(\n\t\ttemplate: Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'>,\n\t\tmailArguments: Record<string, any>,\n\t) {\n\t\tconst html = await this.templateRenderer.render(template.content, mailArguments)\n\t\tawait this.mailer.send({\n\t\t\tto: mailArguments.email,\n\t\t\tsubject: await this.templateRenderer.render(template.subject, mailArguments),\n\t\t\thtml,\n\t\t\t...(template.replyTo ? {\n\t\t\t\treplyTo: template.replyTo,\n\t\t\t} : {}),\n\t\t})\n\t}\n\n\tprivate async getCustomTemplate(\n\t\tdbContext: DatabaseContext,\n\t\tidentifier: MailTemplateIdentifier,\n\t): Promise<Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'> | null> {\n\t\tconst customTemplate =\n\t\t\t(await dbContext.queryHandler.fetch(new MailTemplateQuery(identifier)))\n\t\t\t?? (await dbContext.queryHandler.fetch(new MailTemplateQuery({ ...identifier, projectId: null })))\n\n\t\tif (!customTemplate) {\n\t\t\treturn null\n\t\t}\n\t\tconst content = customTemplate.useLayout ? Layout(customTemplate.content) : customTemplate.content\n\t\treturn { content, subject: customTemplate.subject, replyTo: customTemplate.replyTo }\n\t}\n}\n"],"names":["MailType","NewUserInvited","ExistingUserInvited","PasswordReset","PasswordlessSignIn","MailTemplateQuery","Layout"],"mappings":";;;;;;;;;;;;;;;;AAUO,MAAM,WAAW;AAAA,EACvB,YACkB,QACA,kBAChB;AAFgB,SAAA,SAAA;AACA,SAAA,mBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,uBACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAMA,cAAS,gBAAgB,GAAG,kBAAmB,CAAA,KAAM;AAAA,MACtH,SAAS;AAAA,MACT,SAASC;AAAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAM,6BACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAMD,cAAS,qBAAqB,GAAG,kBAAmB,CAAA,KAAM;AAAA,MAC3H,SAAS;AAAA,MACT,SAASE;AAAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAM,uBACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAMF,cAAS,eAAe,GAAG,kBAAmB,CAAA,KAAM;AAAA,MACrH,SAAS;AAAA,MACT,SAASG;AAAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAM,sBACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAMH,cAAS,oBAAoB,GAAG,kBAAmB,CAAA,KAAM;AAAA,MAC1H,SAAS;AAAA,MACT,SAASI;AAAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAc,aACb,UACA,eACC;AACD,UAAM,OAAO,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,aAAa;AACzE,UAAA,KAAK,OAAO,KAAK;AAAA,MACtB,IAAI,cAAc;AAAA,MAClB,SAAS,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,aAAa;AAAA,MAC3E;AAAA,MACA,GAAI,SAAS,UAAU;AAAA,QACtB,SAAS,SAAS;AAAA,MAAA,IACf,CAAA;AAAA,IAAC,CACL;AAAA,EAAA;AAAA,EAGF,MAAc,kBACb,WACA,YAC4E;AACtE,UAAA,iBACJ,MAAM,UAAU,aAAa,MAAM,IAAIC,kBAAA,kBAAkB,UAAU,CAAC,KACjE,MAAM,UAAU,aAAa,MAAM,IAAIA,oCAAkB,EAAE,GAAG,YAAY,WAAW,KAAK,CAAC,CAAC;AAEjG,QAAI,CAAC,gBAAgB;AACb,aAAA;AAAA,IAAA;AAER,UAAM,UAAU,eAAe,YAAYC,gBAAO,eAAe,OAAO,IAAI,eAAe;AAC3F,WAAO,EAAE,SAAS,SAAS,eAAe,SAAS,SAAS,eAAe,QAAQ;AAAA,EAAA;AAErF;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import NewUserInvited from "./templates/NewUserInvited.mustache.js";
|
|
2
2
|
import ExistingUserInvited from "./templates/ExistingUserInvited.mustache.js";
|
|
3
3
|
import PasswordReset from "./templates/PasswordReset.mustache.js";
|
|
4
|
+
import PasswordlessSignIn from "./templates/PasswordlessSignIn.mustache.js";
|
|
4
5
|
import { MailType } from "./type.js";
|
|
5
6
|
import "../queries/apiKey/ApiKeyQuery.js";
|
|
6
|
-
import { MailTemplateQuery } from "../queries/mailTemplate/MailTemplateQuery.js";
|
|
7
7
|
import "@contember/database";
|
|
8
|
+
import { MailTemplateQuery } from "../queries/mailTemplate/MailTemplateQuery.js";
|
|
8
9
|
import "../authorization/PermissionActions.js";
|
|
9
10
|
import "@contember/authorization";
|
|
10
11
|
import "../authorization/PermissionContext.js";
|
|
@@ -40,6 +41,14 @@ class UserMailer {
|
|
|
40
41
|
};
|
|
41
42
|
await this.sendTemplate(template, mailArguments);
|
|
42
43
|
}
|
|
44
|
+
async sendPasswordlessEmail(dbContext, mailArguments, customMailOptions) {
|
|
45
|
+
const template = await this.getCustomTemplate(dbContext, { type: MailType.passwordlessSignIn, ...customMailOptions }) || {
|
|
46
|
+
subject: "Sign in here",
|
|
47
|
+
content: PasswordlessSignIn,
|
|
48
|
+
replyTo: null
|
|
49
|
+
};
|
|
50
|
+
await this.sendTemplate(template, mailArguments);
|
|
51
|
+
}
|
|
43
52
|
async sendTemplate(template, mailArguments) {
|
|
44
53
|
const html = await this.templateRenderer.render(template.content, mailArguments);
|
|
45
54
|
await this.mailer.send({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMailer.js","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/UserMailer.ts"],"sourcesContent":["import { Mailer, TemplateRenderer } from '../../utils'\nimport NewUserInvited from './templates/NewUserInvited.mustache'\nimport ExistingUserInvited from './templates/ExistingUserInvited.mustache'\nimport PasswordReset from './templates/PasswordReset.mustache'\nimport { MailTemplateData, MailTemplateIdentifier, MailType } from './type'\nimport { MailTemplateQuery } from '../queries'\nimport Layout from './templates/Layout.mustache'\nimport { DatabaseContext } from '../utils'\n\nexport class UserMailer {\n\tconstructor(\n\t\tprivate readonly mailer: Mailer,\n\t\tprivate readonly templateRenderer: TemplateRenderer,\n\t) { }\n\n\tasync sendNewUserInvitedMail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; password: string | null; token: string | null; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.newUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: NewUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendExistingUserInvitedEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.existingUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: ExistingUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendPasswordResetEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; token: string; project?: string; projectSlug?: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.passwordReset, ...customMailOptions })) || {\n\t\t\tsubject: 'Password reset',\n\t\t\tcontent: PasswordReset,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tprivate async sendTemplate(\n\t\ttemplate: Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'>,\n\t\tmailArguments: Record<string, any>,\n\t) {\n\t\tconst html = await this.templateRenderer.render(template.content, mailArguments)\n\t\tawait this.mailer.send({\n\t\t\tto: mailArguments.email,\n\t\t\tsubject: await this.templateRenderer.render(template.subject, mailArguments),\n\t\t\thtml,\n\t\t\t...(template.replyTo ? {\n\t\t\t\treplyTo: template.replyTo,\n\t\t\t} : {}),\n\t\t})\n\t}\n\n\tprivate async getCustomTemplate(\n\t\tdbContext: DatabaseContext,\n\t\tidentifier: MailTemplateIdentifier,\n\t): Promise<Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'> | null> {\n\t\tconst customTemplate =\n\t\t\t(await dbContext.queryHandler.fetch(new MailTemplateQuery(identifier)))\n\t\t\t?? (await dbContext.queryHandler.fetch(new MailTemplateQuery({ ...identifier, projectId: null })))\n\n\t\tif (!customTemplate) {\n\t\t\treturn null\n\t\t}\n\t\tconst content = customTemplate.useLayout ? Layout(customTemplate.content) : customTemplate.content\n\t\treturn { content, subject: customTemplate.subject, replyTo: customTemplate.replyTo }\n\t}\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserMailer.js","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/UserMailer.ts"],"sourcesContent":["import { Mailer, TemplateRenderer } from '../../utils'\nimport NewUserInvited from './templates/NewUserInvited.mustache'\nimport ExistingUserInvited from './templates/ExistingUserInvited.mustache'\nimport PasswordReset from './templates/PasswordReset.mustache'\nimport PasswordlessSignIn from './templates/PasswordlessSignIn.mustache'\nimport { MailTemplateData, MailTemplateIdentifier, MailType } from './type'\nimport { MailTemplateQuery } from '../queries'\nimport Layout from './templates/Layout.mustache'\nimport { DatabaseContext } from '../utils'\n\nexport class UserMailer {\n\tconstructor(\n\t\tprivate readonly mailer: Mailer,\n\t\tprivate readonly templateRenderer: TemplateRenderer,\n\t) { }\n\n\tasync sendNewUserInvitedMail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; password: string | null; token: string | null; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.newUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: NewUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendExistingUserInvitedEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; project: string; projectSlug: string },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.existingUserInvited, ...customMailOptions })) || {\n\t\t\tsubject: 'You have been invited to {{project}}',\n\t\t\tcontent: ExistingUserInvited,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendPasswordResetEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; token: string; project?: string; projectSlug?: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.passwordReset, ...customMailOptions })) || {\n\t\t\tsubject: 'Password reset',\n\t\t\tcontent: PasswordReset,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tasync sendPasswordlessEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; token: string; project?: string; projectSlug?: string; url?: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst template = (await this.getCustomTemplate(dbContext, { type: MailType.passwordlessSignIn, ...customMailOptions })) || {\n\t\t\tsubject: 'Sign in here',\n\t\t\tcontent: PasswordlessSignIn,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendTemplate(template, mailArguments)\n\t}\n\n\tprivate async sendTemplate(\n\t\ttemplate: Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'>,\n\t\tmailArguments: Record<string, any>,\n\t) {\n\t\tconst html = await this.templateRenderer.render(template.content, mailArguments)\n\t\tawait this.mailer.send({\n\t\t\tto: mailArguments.email,\n\t\t\tsubject: await this.templateRenderer.render(template.subject, mailArguments),\n\t\t\thtml,\n\t\t\t...(template.replyTo ? {\n\t\t\t\treplyTo: template.replyTo,\n\t\t\t} : {}),\n\t\t})\n\t}\n\n\tprivate async getCustomTemplate(\n\t\tdbContext: DatabaseContext,\n\t\tidentifier: MailTemplateIdentifier,\n\t): Promise<Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'> | null> {\n\t\tconst customTemplate =\n\t\t\t(await dbContext.queryHandler.fetch(new MailTemplateQuery(identifier)))\n\t\t\t?? (await dbContext.queryHandler.fetch(new MailTemplateQuery({ ...identifier, projectId: null })))\n\n\t\tif (!customTemplate) {\n\t\t\treturn null\n\t\t}\n\t\tconst content = customTemplate.useLayout ? Layout(customTemplate.content) : customTemplate.content\n\t\treturn { content, subject: customTemplate.subject, replyTo: customTemplate.replyTo }\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUO,MAAM,WAAW;AAAA,EACvB,YACkB,QACA,kBAChB;AAFgB,SAAA,SAAA;AACA,SAAA,mBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,uBACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAM,SAAS,gBAAgB,GAAG,kBAAmB,CAAA,KAAM;AAAA,MACtH,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAM,6BACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAM,SAAS,qBAAqB,GAAG,kBAAmB,CAAA,KAAM;AAAA,MAC3H,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAM,uBACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAM,SAAS,eAAe,GAAG,kBAAmB,CAAA,KAAM;AAAA,MACrH,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAM,sBACL,WACA,eACA,mBACgB;AAChB,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,EAAE,MAAM,SAAS,oBAAoB,GAAG,kBAAmB,CAAA,KAAM;AAAA,MAC1H,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IACV;AACM,UAAA,KAAK,aAAa,UAAU,aAAa;AAAA,EAAA;AAAA,EAGhD,MAAc,aACb,UACA,eACC;AACD,UAAM,OAAO,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,aAAa;AACzE,UAAA,KAAK,OAAO,KAAK;AAAA,MACtB,IAAI,cAAc;AAAA,MAClB,SAAS,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,aAAa;AAAA,MAC3E;AAAA,MACA,GAAI,SAAS,UAAU;AAAA,QACtB,SAAS,SAAS;AAAA,MAAA,IACf,CAAA;AAAA,IAAC,CACL;AAAA,EAAA;AAAA,EAGF,MAAc,kBACb,WACA,YAC4E;AACtE,UAAA,iBACJ,MAAM,UAAU,aAAa,MAAM,IAAI,kBAAkB,UAAU,CAAC,KACjE,MAAM,UAAU,aAAa,MAAM,IAAI,kBAAkB,EAAE,GAAG,YAAY,WAAW,KAAK,CAAC,CAAC;AAEjG,QAAI,CAAC,gBAAgB;AACb,aAAA;AAAA,IAAA;AAER,UAAM,UAAU,eAAe,YAAY,OAAO,eAAe,OAAO,IAAI,eAAe;AAC3F,WAAO,EAAE,SAAS,SAAS,eAAe,SAAS,SAAS,eAAe,QAAQ;AAAA,EAAA;AAErF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExistingUserInvited.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/ExistingUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br> you have been invited to contribute on project {{project}}.</p>\n\t<p>Since you already have an account for e-mail <strong>{{email}}</strong>, just login with your e-mail and password.</p>\n`)\n"],"names":["Layout"],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"ExistingUserInvited.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/ExistingUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br> you have been invited to contribute on project {{project}}.</p>\n\t<p>Since you already have an account for e-mail <strong>{{email}}</strong>, just login with your e-mail and password.</p>\n`)\n"],"names":["Layout"],"mappings":";;AAEA,MAAA,sBAAeA,gBAAO;AAAA;AAAA;AAAA,CAGrB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExistingUserInvited.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/ExistingUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br> you have been invited to contribute on project {{project}}.</p>\n\t<p>Since you already have an account for e-mail <strong>{{email}}</strong>, just login with your e-mail and password.</p>\n`)\n"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"ExistingUserInvited.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/ExistingUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br> you have been invited to contribute on project {{project}}.</p>\n\t<p>Since you already have an account for e-mail <strong>{{email}}</strong>, just login with your e-mail and password.</p>\n`)\n"],"names":[],"mappings":";AAEA,MAAA,sBAAe,OAAO;AAAA;AAAA;AAAA,CAGrB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewUserInvited.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/NewUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br>you have been invited to contribute on project {{project}}.</p>\n\t{{#password}}\n\t\t<p>An account has been created for you with a following credentials:</p>\n\t\t<table>\n\t\t\t<tr><th>E-mail:</th><td>{{email}}</td></tr>\n\t\t\t<tr><th>Password:</th><td>{{password}}</td></tr>\n\t\t</table>\n\t{{/password}}\n\t{{#token}}\n\t\t<p>An account for e-mail <strong>{{email}}</strong> has been created.</p>\n\t\t<p>To setup a password, use following code in appropriate interface:</p>\n\t\t<code>{{token}}</code>\n\t{{/token}}\n`)\n"],"names":["Layout"],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"NewUserInvited.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/NewUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br>you have been invited to contribute on project {{project}}.</p>\n\t{{#password}}\n\t\t<p>An account has been created for you with a following credentials:</p>\n\t\t<table>\n\t\t\t<tr><th>E-mail:</th><td>{{email}}</td></tr>\n\t\t\t<tr><th>Password:</th><td>{{password}}</td></tr>\n\t\t</table>\n\t{{/password}}\n\t{{#token}}\n\t\t<p>An account for e-mail <strong>{{email}}</strong> has been created.</p>\n\t\t<p>To setup a password, use following code in appropriate interface:</p>\n\t\t<code>{{token}}</code>\n\t{{/token}}\n`)\n"],"names":["Layout"],"mappings":";;AAEA,MAAA,iBAAeA,gBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAcrB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewUserInvited.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/NewUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br>you have been invited to contribute on project {{project}}.</p>\n\t{{#password}}\n\t\t<p>An account has been created for you with a following credentials:</p>\n\t\t<table>\n\t\t\t<tr><th>E-mail:</th><td>{{email}}</td></tr>\n\t\t\t<tr><th>Password:</th><td>{{password}}</td></tr>\n\t\t</table>\n\t{{/password}}\n\t{{#token}}\n\t\t<p>An account for e-mail <strong>{{email}}</strong> has been created.</p>\n\t\t<p>To setup a password, use following code in appropriate interface:</p>\n\t\t<code>{{token}}</code>\n\t{{/token}}\n`)\n"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"NewUserInvited.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/NewUserInvited.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,<br>you have been invited to contribute on project {{project}}.</p>\n\t{{#password}}\n\t\t<p>An account has been created for you with a following credentials:</p>\n\t\t<table>\n\t\t\t<tr><th>E-mail:</th><td>{{email}}</td></tr>\n\t\t\t<tr><th>Password:</th><td>{{password}}</td></tr>\n\t\t</table>\n\t{{/password}}\n\t{{#token}}\n\t\t<p>An account for e-mail <strong>{{email}}</strong> has been created.</p>\n\t\t<p>To setup a password, use following code in appropriate interface:</p>\n\t\t<code>{{token}}</code>\n\t{{/token}}\n`)\n"],"names":[],"mappings":";AAEA,MAAA,iBAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAcrB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordReset.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/PasswordReset.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,</p>\n\t<p>\n\t\tpassword reset was requested for your account ({{email}}):<br>\n\t\tCopy & paste following token and follow instructions in password reset interface:<br>\n\t\t<code>{{token}}</code>\n\t</p>\n`)\n"],"names":["Layout"],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"PasswordReset.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/PasswordReset.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,</p>\n\t<p>\n\t\tpassword reset was requested for your account ({{email}}):<br>\n\t\tCopy & paste following token and follow instructions in password reset interface:<br>\n\t\t<code>{{token}}</code>\n\t</p>\n`)\n"],"names":["Layout"],"mappings":";;AAEA,MAAA,gBAAeA,gBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOrB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordReset.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/PasswordReset.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,</p>\n\t<p>\n\t\tpassword reset was requested for your account ({{email}}):<br>\n\t\tCopy & paste following token and follow instructions in password reset interface:<br>\n\t\t<code>{{token}}</code>\n\t</p>\n`)\n"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"PasswordReset.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/PasswordReset.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,</p>\n\t<p>\n\t\tpassword reset was requested for your account ({{email}}):<br>\n\t\tCopy & paste following token and follow instructions in password reset interface:<br>\n\t\t<code>{{token}}</code>\n\t</p>\n`)\n"],"names":[],"mappings":";AAEA,MAAA,gBAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOrB;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const Layout_mustache = require("./Layout.mustache.cjs");
|
|
3
|
+
const PasswordlessSignIn = Layout_mustache(`
|
|
4
|
+
<p>Hello,</p>
|
|
5
|
+
<p>
|
|
6
|
+
sign in was requested for your account ({{email}}):<br>
|
|
7
|
+
{{#url}}
|
|
8
|
+
<p>Click the following link to sign in:</p>
|
|
9
|
+
<a href="{{url}}">{{url}}</a>
|
|
10
|
+
{{/url}}
|
|
11
|
+
{{^url}}
|
|
12
|
+
<p>Passwordless sign-in is misconfigured. Please contact your administrator.</p>
|
|
13
|
+
{{/url}}
|
|
14
|
+
</p>
|
|
15
|
+
`);
|
|
16
|
+
module.exports = PasswordlessSignIn;
|
|
17
|
+
//# sourceMappingURL=PasswordlessSignIn.mustache.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordlessSignIn.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/PasswordlessSignIn.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,</p>\n\t<p>\n\t\tsign in was requested for your account ({{email}}):<br>\n\t\t{{#url}}\n\t\t\t<p>Click the following link to sign in:</p>\n\t\t\t<a href=\"{{url}}\">{{url}}</a>\n\t\t{{/url}}\n\t\t{{^url}}\n\t\t\t<p>Passwordless sign-in is misconfigured. Please contact your administrator.</p>\n\t\t{{/url}}\n\t</p>\n`)\n"],"names":["Layout"],"mappings":";;AAEA,MAAA,qBAAeA,gBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAYrB;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Layout from "./Layout.mustache.js";
|
|
2
|
+
const PasswordlessSignIn = Layout(`
|
|
3
|
+
<p>Hello,</p>
|
|
4
|
+
<p>
|
|
5
|
+
sign in was requested for your account ({{email}}):<br>
|
|
6
|
+
{{#url}}
|
|
7
|
+
<p>Click the following link to sign in:</p>
|
|
8
|
+
<a href="{{url}}">{{url}}</a>
|
|
9
|
+
{{/url}}
|
|
10
|
+
{{^url}}
|
|
11
|
+
<p>Passwordless sign-in is misconfigured. Please contact your administrator.</p>
|
|
12
|
+
{{/url}}
|
|
13
|
+
</p>
|
|
14
|
+
`);
|
|
15
|
+
export {
|
|
16
|
+
PasswordlessSignIn as default
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=PasswordlessSignIn.mustache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordlessSignIn.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/PasswordlessSignIn.mustache.ts"],"sourcesContent":["import Layout from './Layout.mustache'\n// language=Mustache\nexport default Layout(`\n\t<p>Hello,</p>\n\t<p>\n\t\tsign in was requested for your account ({{email}}):<br>\n\t\t{{#url}}\n\t\t\t<p>Click the following link to sign in:</p>\n\t\t\t<a href=\"{{url}}\">{{url}}</a>\n\t\t{{/url}}\n\t\t{{^url}}\n\t\t\t<p>Passwordless sign-in is misconfigured. Please contact your administrator.</p>\n\t\t{{/url}}\n\t</p>\n`)\n"],"names":[],"mappings":";AAEA,MAAA,qBAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAYrB;"}
|
|
@@ -4,14 +4,16 @@ var MailType = /* @__PURE__ */ ((MailType2) => {
|
|
|
4
4
|
MailType2["existingUserInvited"] = "existingUserInvited";
|
|
5
5
|
MailType2["newUserInvited"] = "newUserInvited";
|
|
6
6
|
MailType2["passwordReset"] = "passwordReset";
|
|
7
|
+
MailType2["passwordlessSignIn"] = "passwordlessSignIn";
|
|
7
8
|
return MailType2;
|
|
8
9
|
})(MailType || {});
|
|
9
10
|
const mailTypeFromSchemaToDb = (type) => {
|
|
10
11
|
return {
|
|
11
12
|
EXISTING_USER_INVITED: "existingUserInvited",
|
|
12
13
|
NEW_USER_INVITED: "newUserInvited",
|
|
13
|
-
RESET_PASSWORD_REQUEST: "passwordReset"
|
|
14
|
-
|
|
14
|
+
RESET_PASSWORD_REQUEST: "passwordReset",
|
|
15
|
+
PASSWORDLESS_SIGN_IN: "passwordlessSignIn"
|
|
16
|
+
/* passwordlessSignIn */
|
|
15
17
|
}[type];
|
|
16
18
|
};
|
|
17
19
|
const mailTypeFromDbToSchema = (type) => {
|
|
@@ -27,7 +29,11 @@ const mailTypeFromDbToSchema = (type) => {
|
|
|
27
29
|
[
|
|
28
30
|
"passwordReset"
|
|
29
31
|
/* passwordReset */
|
|
30
|
-
]: "RESET_PASSWORD_REQUEST"
|
|
32
|
+
]: "RESET_PASSWORD_REQUEST",
|
|
33
|
+
[
|
|
34
|
+
"passwordlessSignIn"
|
|
35
|
+
/* passwordlessSignIn */
|
|
36
|
+
]: "PASSWORDLESS_SIGN_IN"
|
|
31
37
|
}[type];
|
|
32
38
|
};
|
|
33
39
|
exports.MailType = MailType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/type.ts"],"sourcesContent":["import { MailType as SchemaMailType } from '../../schema'\n\nexport enum MailType {\n\texistingUserInvited = 'existingUserInvited',\n\tnewUserInvited = 'newUserInvited',\n\tpasswordReset = 'passwordReset',\n}\n\nexport const mailTypeFromSchemaToDb = (type: SchemaMailType): MailType => {\n\treturn {\n\t\tEXISTING_USER_INVITED: MailType.existingUserInvited,\n\t\tNEW_USER_INVITED: MailType.newUserInvited,\n\t\tRESET_PASSWORD_REQUEST: MailType.passwordReset,\n\t}[type]\n}\n\nexport const mailTypeFromDbToSchema = (type: MailType): SchemaMailType => {\n\treturn {\n\t\t[MailType.existingUserInvited]: 'EXISTING_USER_INVITED' as const,\n\t\t[MailType.newUserInvited]: 'NEW_USER_INVITED' as const,\n\t\t[MailType.passwordReset]: 'RESET_PASSWORD_REQUEST' as const,\n\t}[type]\n}\n\nexport interface MailTemplateIdentifier {\n\tprojectId: string | null\n\ttype: MailType\n\tvariant: string\n}\n\nexport interface MailTemplateData {\n\tsubject: string\n\tcontent: string\n\tuseLayout: boolean\n\treplyTo: string | null\n}\n\nexport interface MailTemplate extends MailTemplateIdentifier, MailTemplateData {}\n"],"names":["MailType"],"mappings":";;AAEY,IAAA,6BAAAA,cAAL;AACNA,YAAA,qBAAsB,IAAA;AACtBA,YAAA,gBAAiB,IAAA;AACjBA,YAAA,eAAgB,IAAA;
|
|
1
|
+
{"version":3,"file":"type.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/type.ts"],"sourcesContent":["import { MailType as SchemaMailType } from '../../schema'\n\nexport enum MailType {\n\texistingUserInvited = 'existingUserInvited',\n\tnewUserInvited = 'newUserInvited',\n\tpasswordReset = 'passwordReset',\n\tpasswordlessSignIn = 'passwordlessSignIn',\n}\n\nexport const mailTypeFromSchemaToDb = (type: SchemaMailType): MailType => {\n\treturn {\n\t\tEXISTING_USER_INVITED: MailType.existingUserInvited,\n\t\tNEW_USER_INVITED: MailType.newUserInvited,\n\t\tRESET_PASSWORD_REQUEST: MailType.passwordReset,\n\t\tPASSWORDLESS_SIGN_IN: MailType.passwordlessSignIn,\n\t}[type]\n}\n\nexport const mailTypeFromDbToSchema = (type: MailType): SchemaMailType => {\n\treturn {\n\t\t[MailType.existingUserInvited]: 'EXISTING_USER_INVITED' as const,\n\t\t[MailType.newUserInvited]: 'NEW_USER_INVITED' as const,\n\t\t[MailType.passwordReset]: 'RESET_PASSWORD_REQUEST' as const,\n\t\t[MailType.passwordlessSignIn]: 'PASSWORDLESS_SIGN_IN' as const,\n\t}[type]\n}\n\nexport interface MailTemplateIdentifier {\n\tprojectId: string | null\n\ttype: MailType\n\tvariant: string\n}\n\nexport interface MailTemplateData {\n\tsubject: string\n\tcontent: string\n\tuseLayout: boolean\n\treplyTo: string | null\n}\n\nexport interface MailTemplate extends MailTemplateIdentifier, MailTemplateData {}\n"],"names":["MailType"],"mappings":";;AAEY,IAAA,6BAAAA,cAAL;AACNA,YAAA,qBAAsB,IAAA;AACtBA,YAAA,gBAAiB,IAAA;AACjBA,YAAA,eAAgB,IAAA;AAChBA,YAAA,oBAAqB,IAAA;AAJVA,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;AAOC,MAAA,yBAAyB,CAAC,SAAmC;AAClE,SAAA;AAAA,IACN,uBAAuB;AAAA,IACvB,kBAAkB;AAAA,IAClB,wBAAwB;AAAA,IACxB,sBAAsB;AAAA;AAAA,IACrB,IAAI;AACP;AAEa,MAAA,yBAAyB,CAAC,SAAmC;AAClE,SAAA;AAAA,IACN;AAAA,MAAC;AAAA;AAAA,OAA+B;AAAA,IAChC;AAAA,MAAC;AAAA;AAAA,OAA0B;AAAA,IAC3B;AAAA,MAAC;AAAA;AAAA,OAAyB;AAAA,IAC1B;AAAA,MAAC;AAAA;AAAA,IAA8B,GAAA;AAAA,IAC9B,IAAI;AACP;;;;"}
|
|
@@ -2,14 +2,16 @@ var MailType = /* @__PURE__ */ ((MailType2) => {
|
|
|
2
2
|
MailType2["existingUserInvited"] = "existingUserInvited";
|
|
3
3
|
MailType2["newUserInvited"] = "newUserInvited";
|
|
4
4
|
MailType2["passwordReset"] = "passwordReset";
|
|
5
|
+
MailType2["passwordlessSignIn"] = "passwordlessSignIn";
|
|
5
6
|
return MailType2;
|
|
6
7
|
})(MailType || {});
|
|
7
8
|
const mailTypeFromSchemaToDb = (type) => {
|
|
8
9
|
return {
|
|
9
10
|
EXISTING_USER_INVITED: "existingUserInvited",
|
|
10
11
|
NEW_USER_INVITED: "newUserInvited",
|
|
11
|
-
RESET_PASSWORD_REQUEST: "passwordReset"
|
|
12
|
-
|
|
12
|
+
RESET_PASSWORD_REQUEST: "passwordReset",
|
|
13
|
+
PASSWORDLESS_SIGN_IN: "passwordlessSignIn"
|
|
14
|
+
/* passwordlessSignIn */
|
|
13
15
|
}[type];
|
|
14
16
|
};
|
|
15
17
|
const mailTypeFromDbToSchema = (type) => {
|
|
@@ -25,7 +27,11 @@ const mailTypeFromDbToSchema = (type) => {
|
|
|
25
27
|
[
|
|
26
28
|
"passwordReset"
|
|
27
29
|
/* passwordReset */
|
|
28
|
-
]: "RESET_PASSWORD_REQUEST"
|
|
30
|
+
]: "RESET_PASSWORD_REQUEST",
|
|
31
|
+
[
|
|
32
|
+
"passwordlessSignIn"
|
|
33
|
+
/* passwordlessSignIn */
|
|
34
|
+
]: "PASSWORDLESS_SIGN_IN"
|
|
29
35
|
}[type];
|
|
30
36
|
};
|
|
31
37
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/type.ts"],"sourcesContent":["import { MailType as SchemaMailType } from '../../schema'\n\nexport enum MailType {\n\texistingUserInvited = 'existingUserInvited',\n\tnewUserInvited = 'newUserInvited',\n\tpasswordReset = 'passwordReset',\n}\n\nexport const mailTypeFromSchemaToDb = (type: SchemaMailType): MailType => {\n\treturn {\n\t\tEXISTING_USER_INVITED: MailType.existingUserInvited,\n\t\tNEW_USER_INVITED: MailType.newUserInvited,\n\t\tRESET_PASSWORD_REQUEST: MailType.passwordReset,\n\t}[type]\n}\n\nexport const mailTypeFromDbToSchema = (type: MailType): SchemaMailType => {\n\treturn {\n\t\t[MailType.existingUserInvited]: 'EXISTING_USER_INVITED' as const,\n\t\t[MailType.newUserInvited]: 'NEW_USER_INVITED' as const,\n\t\t[MailType.passwordReset]: 'RESET_PASSWORD_REQUEST' as const,\n\t}[type]\n}\n\nexport interface MailTemplateIdentifier {\n\tprojectId: string | null\n\ttype: MailType\n\tvariant: string\n}\n\nexport interface MailTemplateData {\n\tsubject: string\n\tcontent: string\n\tuseLayout: boolean\n\treplyTo: string | null\n}\n\nexport interface MailTemplate extends MailTemplateIdentifier, MailTemplateData {}\n"],"names":["MailType"],"mappings":"AAEY,IAAA,6BAAAA,cAAL;AACNA,YAAA,qBAAsB,IAAA;AACtBA,YAAA,gBAAiB,IAAA;AACjBA,YAAA,eAAgB,IAAA;
|
|
1
|
+
{"version":3,"file":"type.js","sources":["../../../../../../packages/engine-tenant-api/src/model/mailing/type.ts"],"sourcesContent":["import { MailType as SchemaMailType } from '../../schema'\n\nexport enum MailType {\n\texistingUserInvited = 'existingUserInvited',\n\tnewUserInvited = 'newUserInvited',\n\tpasswordReset = 'passwordReset',\n\tpasswordlessSignIn = 'passwordlessSignIn',\n}\n\nexport const mailTypeFromSchemaToDb = (type: SchemaMailType): MailType => {\n\treturn {\n\t\tEXISTING_USER_INVITED: MailType.existingUserInvited,\n\t\tNEW_USER_INVITED: MailType.newUserInvited,\n\t\tRESET_PASSWORD_REQUEST: MailType.passwordReset,\n\t\tPASSWORDLESS_SIGN_IN: MailType.passwordlessSignIn,\n\t}[type]\n}\n\nexport const mailTypeFromDbToSchema = (type: MailType): SchemaMailType => {\n\treturn {\n\t\t[MailType.existingUserInvited]: 'EXISTING_USER_INVITED' as const,\n\t\t[MailType.newUserInvited]: 'NEW_USER_INVITED' as const,\n\t\t[MailType.passwordReset]: 'RESET_PASSWORD_REQUEST' as const,\n\t\t[MailType.passwordlessSignIn]: 'PASSWORDLESS_SIGN_IN' as const,\n\t}[type]\n}\n\nexport interface MailTemplateIdentifier {\n\tprojectId: string | null\n\ttype: MailType\n\tvariant: string\n}\n\nexport interface MailTemplateData {\n\tsubject: string\n\tcontent: string\n\tuseLayout: boolean\n\treplyTo: string | null\n}\n\nexport interface MailTemplate extends MailTemplateIdentifier, MailTemplateData {}\n"],"names":["MailType"],"mappings":"AAEY,IAAA,6BAAAA,cAAL;AACNA,YAAA,qBAAsB,IAAA;AACtBA,YAAA,gBAAiB,IAAA;AACjBA,YAAA,eAAgB,IAAA;AAChBA,YAAA,oBAAqB,IAAA;AAJVA,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;AAOC,MAAA,yBAAyB,CAAC,SAAmC;AAClE,SAAA;AAAA,IACN,uBAAuB;AAAA,IACvB,kBAAkB;AAAA,IAClB,wBAAwB;AAAA,IACxB,sBAAsB;AAAA;AAAA,IACrB,IAAI;AACP;AAEa,MAAA,yBAAyB,CAAC,SAAmC;AAClE,SAAA;AAAA,IACN;AAAA,MAAC;AAAA;AAAA,OAA+B;AAAA,IAChC;AAAA,MAAC;AAAA;AAAA,OAA0B;AAAA,IAC3B;AAAA,MAAC;AAAA;AAAA,OAAyB;AAAA,IAC1B;AAAA,MAAC;AAAA;AAAA,IAA8B,GAAA;AAAA,IAC9B,IAAI;AACP;"}
|