@contember/engine-tenant-api 2.1.0-alpha.9 → 2.1.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/CLAUDE.md +37 -0
- package/dist/development/index.cjs +5 -6
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +2 -3
- package/dist/development/src/TenantContainer.cjs +73 -2
- package/dist/development/src/TenantContainer.cjs.map +1 -1
- package/dist/development/src/TenantContainer.js +73 -2
- package/dist/development/src/TenantContainer.js.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.cjs +1 -0
- package/dist/development/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.js +1 -0
- 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/2018-08-02-174310-init.cjs.map +1 -1
- package/dist/development/src/migrations/2018-08-02-174310-init.js.map +1 -1
- package/dist/development/src/migrations/2018-09-03-140621-identity-project.cjs.map +1 -1
- package/dist/development/src/migrations/2018-09-03-140621-identity-project.js.map +1 -1
- package/dist/development/src/migrations/2018-10-26-165450-setup-api-key.cjs.map +1 -1
- package/dist/development/src/migrations/2018-10-26-165450-setup-api-key.js.map +1 -1
- package/dist/development/src/migrations/2018-10-26-175155-variables.cjs.map +1 -1
- package/dist/development/src/migrations/2018-10-26-175155-variables.js.map +1 -1
- package/dist/development/src/migrations/2019-02-18-110949-project-slug.cjs.map +1 -1
- package/dist/development/src/migrations/2019-02-18-110949-project-slug.js.map +1 -1
- package/dist/development/src/migrations/2019-02-18-160155-session-expiration.cjs.map +1 -1
- package/dist/development/src/migrations/2019-02-18-160155-session-expiration.js.map +1 -1
- package/dist/development/src/migrations/2019-05-03-163729-api-key-disabled-at.cjs.map +1 -1
- package/dist/development/src/migrations/2019-05-03-163729-api-key-disabled-at.js.map +1 -1
- package/dist/development/src/migrations/2019-08-14-153300-project-slug-unique.cjs.map +1 -1
- package/dist/development/src/migrations/2019-08-14-153300-project-slug-unique.js.map +1 -1
- package/dist/development/src/migrations/2019-09-06-111000-membership.cjs.map +1 -1
- package/dist/development/src/migrations/2019-09-06-111000-membership.js.map +1 -1
- package/dist/development/src/migrations/2019-09-06-111001-drop-old-member.cjs.map +1 -1
- package/dist/development/src/migrations/2019-09-06-111001-drop-old-member.js.map +1 -1
- package/dist/development/src/migrations/2020-01-29-idenity-note.cjs.map +1 -1
- package/dist/development/src/migrations/2020-01-29-idenity-note.js.map +1 -1
- package/dist/development/src/migrations/2020-04-17-fix-person-index.cjs.map +1 -1
- package/dist/development/src/migrations/2020-04-17-fix-person-index.js.map +1 -1
- package/dist/development/src/migrations/2020-05-01-170000-api-key-index.cjs.map +1 -1
- package/dist/development/src/migrations/2020-05-01-170000-api-key-index.js.map +1 -1
- package/dist/development/src/migrations/2020-06-08-134000-tenant-credentials.cjs.map +1 -1
- package/dist/development/src/migrations/2020-06-08-134000-tenant-credentials.js.map +1 -1
- package/dist/development/src/migrations/2020-08-07-110000-person-otp.cjs.map +1 -1
- package/dist/development/src/migrations/2020-08-07-110000-person-otp.js.map +1 -1
- package/dist/development/src/migrations/2020-08-17-162200-mail-templates.cjs.map +1 -1
- package/dist/development/src/migrations/2020-08-17-162200-mail-templates.js.map +1 -1
- package/dist/development/src/migrations/2020-08-21-143400-person-password-reset.cjs.map +1 -1
- package/dist/development/src/migrations/2020-08-21-143400-person-password-reset.js.map +1 -1
- package/dist/development/src/migrations/2020-09-07-094200-identity-provider.cjs.map +1 -1
- package/dist/development/src/migrations/2020-09-07-094200-identity-provider.js.map +1 -1
- package/dist/development/src/migrations/2021-03-28-134000-timestamp.cjs.map +1 -1
- package/dist/development/src/migrations/2021-03-28-134000-timestamp.js.map +1 -1
- package/dist/development/src/migrations/2021-07-26-105000-project-config.cjs.map +1 -1
- package/dist/development/src/migrations/2021-07-26-105000-project-config.js.map +1 -1
- package/dist/development/src/migrations/2021-07-26-132000-project-secrets.cjs.map +1 -1
- package/dist/development/src/migrations/2021-07-26-132000-project-secrets.js.map +1 -1
- package/dist/development/src/migrations/2021-07-27-174000-project-alias-index.cjs.map +1 -1
- package/dist/development/src/migrations/2021-07-27-174000-project-alias-index.js.map +1 -1
- package/dist/development/src/migrations/2021-11-24-130000-person-password-null.cjs.map +1 -1
- package/dist/development/src/migrations/2021-11-24-130000-person-password-null.js.map +1 -1
- package/dist/development/src/migrations/2021-11-24-161500-mail-template-project-null.cjs.map +1 -1
- package/dist/development/src/migrations/2021-11-24-161500-mail-template-project-null.js.map +1 -1
- package/dist/development/src/migrations/2022-01-04-144000-person-unique-identity.cjs.map +1 -1
- package/dist/development/src/migrations/2022-01-04-144000-person-unique-identity.js.map +1 -1
- package/dist/development/src/migrations/2022-02-09-111800-fix-crypted.cjs.map +1 -1
- package/dist/development/src/migrations/2022-02-09-111800-fix-crypted.js.map +1 -1
- package/dist/development/src/migrations/2022-02-11-153000-idp-auto-sign-up.cjs.map +1 -1
- package/dist/development/src/migrations/2022-02-11-153000-idp-auto-sign-up.js.map +1 -1
- package/dist/development/src/migrations/2022-06-29-105000-person-idp.cjs.map +1 -1
- package/dist/development/src/migrations/2022-06-29-105000-person-idp.js.map +1 -1
- package/dist/development/src/migrations/2022-07-07-135000-person-email-opt-uniq.cjs.map +1 -1
- package/dist/development/src/migrations/2022-07-07-135000-person-email-opt-uniq.js.map +1 -1
- package/dist/development/src/migrations/2022-07-07-141000-person-display-name.cjs.map +1 -1
- package/dist/development/src/migrations/2022-07-07-141000-person-display-name.js.map +1 -1
- package/dist/development/src/migrations/2022-07-14-145000-person-login-options.cjs.map +1 -1
- package/dist/development/src/migrations/2022-07-14-145000-person-login-options.js.map +1 -1
- package/dist/development/src/migrations/2022-11-08-project-update-notification.cjs.map +1 -1
- package/dist/development/src/migrations/2022-11-08-project-update-notification.js.map +1 -1
- package/dist/development/src/migrations/2023-01-20-135500-person-email-normalize.cjs.map +1 -1
- package/dist/development/src/migrations/2023-01-20-135500-person-email-normalize.js.map +1 -1
- package/dist/development/src/migrations/2023-06-03-104000-person-disabled.cjs.map +1 -1
- package/dist/development/src/migrations/2023-06-03-104000-person-disabled.js.map +1 -1
- package/dist/development/src/migrations/2023-09-01-165000-idp-return-config.cjs.map +1 -1
- package/dist/development/src/migrations/2023-09-01-165000-idp-return-config.js.map +1 -1
- package/dist/development/src/migrations/2024-06-20-140000-mail-reply.cjs.map +1 -1
- package/dist/development/src/migrations/2024-06-20-140000-mail-reply.js.map +1 -1
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -1
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.js.map +1 -1
- package/dist/development/src/migrations/2025-04-16-180000-config-up.cjs +39 -0
- package/dist/development/src/migrations/2025-04-16-180000-config-up.cjs.map +1 -0
- package/dist/development/src/migrations/2025-04-16-180000-config-up.js +40 -0
- package/dist/development/src/migrations/2025-04-16-180000-config-up.js.map +1 -0
- package/dist/development/src/migrations/2025-04-17-160000-auth-log.cjs +45 -0
- package/dist/development/src/migrations/2025-04-17-160000-auth-log.cjs.map +1 -0
- package/dist/development/src/migrations/2025-04-17-160000-auth-log.js +46 -0
- package/dist/development/src/migrations/2025-04-17-160000-auth-log.js.map +1 -0
- package/dist/development/src/migrations/runner.cjs +9 -4
- package/dist/development/src/migrations/runner.cjs.map +1 -1
- package/dist/development/src/migrations/runner.js +7 -2
- package/dist/development/src/migrations/runner.js.map +1 -1
- package/dist/development/src/migrations/snapshot.cjs +56 -1
- package/dist/development/src/migrations/snapshot.cjs.map +1 -1
- package/dist/development/src/migrations/snapshot.js +56 -1
- 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 +6 -0
- package/dist/development/src/model/authorization/MembershipMatcher.cjs.map +1 -1
- package/dist/development/src/model/authorization/MembershipMatcher.js +6 -0
- package/dist/development/src/model/authorization/MembershipMatcher.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionActions.cjs.map +1 -1
- 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 +2 -0
- package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.js +2 -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/authorization/Roles.cjs.map +1 -1
- package/dist/development/src/model/authorization/Roles.js.map +1 -1
- package/dist/development/src/model/commands/CommandBus.cjs +1 -3
- package/dist/development/src/model/commands/CommandBus.cjs.map +1 -1
- package/dist/development/src/model/commands/CommandBus.js +1 -3
- 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 +7 -7
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.js +2 -2
- 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/authLog/CreateAuthLogEntryCommand.cjs +27 -0
- package/dist/development/src/model/commands/authLog/CreateAuthLogEntryCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/authLog/CreateAuthLogEntryCommand.js +27 -0
- package/dist/development/src/model/commands/authLog/CreateAuthLogEntryCommand.js.map +1 -0
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -5
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -5
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -1
- 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 +6 -2
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.js +6 -2
- 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 +16 -12
- package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.js +16 -12
- 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 +4 -10
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js +4 -10
- 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.map +1 -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.map +1 -1
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs +12 -10
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js +9 -7
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs +5 -5
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js +1 -1
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -1
- 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/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.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/development/src/model/mailing/templates/Layout.mustache.cjs.map +1 -1
- package/dist/development/src/model/mailing/templates/Layout.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/type.cjs.map +1 -1
- package/dist/development/src/model/mailing/type.js.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs +5 -9
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js +2 -6
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.cjs +43 -0
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.js +43 -0
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.js.map +1 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs +18 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js +18 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js.map +1 -1
- 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/mailTemplate/helpers.cjs.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/helpers.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.cjs +5 -3
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.js +5 -3
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs +5 -15
- package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.js +5 -15
- 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 +1 -4
- package/dist/development/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectSlugSpecification.js +1 -4
- 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.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs +3 -3
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js.map +1 -1
- 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 +6 -8
- package/dist/development/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectSecretsQuery.js +6 -8
- 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/AuthLogService.cjs +36 -0
- package/dist/development/src/model/service/AuthLogService.cjs.map +1 -0
- package/dist/development/src/model/service/AuthLogService.js +36 -0
- package/dist/development/src/model/service/AuthLogService.js.map +1 -0
- package/dist/development/src/model/service/ConfigurationManager.cjs +0 -12
- package/dist/development/src/model/service/ConfigurationManager.cjs.map +1 -1
- package/dist/development/src/model/service/ConfigurationManager.js +0 -12
- package/dist/development/src/model/service/ConfigurationManager.js.map +1 -1
- 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 +46 -12
- package/dist/development/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.js +46 -12
- package/dist/development/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/development/src/model/service/InviteManager.cjs +14 -8
- package/dist/development/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/development/src/model/service/InviteManager.js +14 -8
- 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 +1 -1
- package/dist/development/src/model/service/MembershipValidator.cjs.map +1 -1
- package/dist/development/src/model/service/MembershipValidator.js +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 +0 -3
- package/dist/development/src/model/service/OtpManager.cjs.map +1 -1
- package/dist/development/src/model/service/OtpManager.js +0 -3
- package/dist/development/src/model/service/OtpManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.cjs +21 -12
- package/dist/development/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.js +20 -11
- package/dist/development/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.cjs +40 -8
- package/dist/development/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.js +40 -8
- package/dist/development/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordStrengthValidator.cjs +69 -0
- package/dist/development/src/model/service/PasswordStrengthValidator.cjs.map +1 -0
- package/dist/development/src/model/service/PasswordStrengthValidator.js +69 -0
- package/dist/development/src/model/service/PasswordStrengthValidator.js.map +1 -0
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs +94 -25
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordlessSignInManager.js +86 -17
- package/dist/development/src/model/service/PasswordlessSignInManager.js.map +1 -1
- package/dist/development/src/model/service/PersonAccessManager.cjs +7 -29
- package/dist/development/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonAccessManager.js +7 -29
- package/dist/development/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/development/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectManager.cjs.map +1 -1
- 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.map +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 +56 -31
- package/dist/development/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignInManager.js +57 -32
- package/dist/development/src/model/service/SignInManager.js.map +1 -1
- package/dist/development/src/model/service/SignUpManager.cjs +13 -8
- package/dist/development/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignUpManager.js +11 -6
- package/dist/development/src/model/service/SignUpManager.js.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.cjs +6 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.js +6 -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.map +1 -1
- package/dist/development/src/model/service/helpers/getPreferredProject.js.map +1 -1
- 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 +6 -4
- package/dist/development/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPManager.js +6 -4
- package/dist/development/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPResponseError.cjs +0 -3
- package/dist/development/src/model/service/idp/IDPResponseError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPResponseError.js +0 -3
- package/dist/development/src/model/service/idp/IDPResponseError.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPValidationError.cjs +0 -3
- package/dist/development/src/model/service/idp/IDPValidationError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPValidationError.js +0 -3
- package/dist/development/src/model/service/idp/IDPValidationError.js.map +1 -1
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.cjs +0 -3
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.js +0 -3
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.cjs +0 -3
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.js +0 -3
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.js.map +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.map +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.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -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 +2 -1
- package/dist/development/src/model/utils/Response.cjs.map +1 -1
- package/dist/development/src/model/utils/Response.js +2 -1
- package/dist/development/src/model/utils/Response.js.map +1 -1
- package/dist/development/src/model/utils/blacklist.cjs +10006 -0
- package/dist/development/src/model/utils/blacklist.cjs.map +1 -0
- package/dist/development/src/model/utils/blacklist.js +10006 -0
- package/dist/development/src/model/utils/blacklist.js.map +1 -0
- package/dist/development/src/model/utils/email.cjs.map +1 -1
- package/dist/development/src/model/utils/email.js.map +1 -1
- package/dist/{production/src/model/utils/typeUtils.cjs → development/src/model/utils/hex.cjs} +1 -1
- package/dist/development/src/model/utils/hex.cjs.map +1 -0
- package/dist/development/src/model/utils/{typeUtils.js → hex.js} +1 -1
- package/dist/development/src/model/utils/hex.js.map +1 -0
- package/dist/development/src/model/utils/interval.cjs +8 -0
- package/dist/development/src/model/utils/interval.cjs.map +1 -0
- package/dist/development/src/model/utils/interval.js +8 -0
- package/dist/development/src/model/utils/interval.js.map +1 -0
- package/dist/development/src/model/utils/time.cjs.map +1 -1
- package/dist/development/src/model/utils/time.js.map +1 -1
- package/dist/development/src/model/utils/{tokenUtils.cjs → token.cjs} +3 -3
- package/dist/development/src/model/utils/token.cjs.map +1 -0
- package/dist/development/src/model/utils/{tokenUtils.js → token.js} +2 -2
- package/dist/development/src/model/utils/token.js.map +1 -0
- package/dist/development/src/resolvers/ResolverFactory.cjs +22 -7
- package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.js +23 -8
- package/dist/development/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.cjs +10 -2
- package/dist/development/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.js +10 -2
- package/dist/development/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/development/src/resolvers/errorUtils.cjs +15 -4
- package/dist/development/src/resolvers/errorUtils.cjs.map +1 -1
- package/dist/development/src/resolvers/errorUtils.js +15 -4
- 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 +4 -3
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js +2 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs +17 -6
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.js +17 -6
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs +14 -0
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.js +14 -0
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs +7 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.js +7 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs +12 -3
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js +12 -3
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.cjs +3 -2
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.js +2 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.cjs +26 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.js +26 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +20 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js +20 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs +25 -2
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.js +25 -2
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.cjs +24 -0
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.js +24 -0
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.cjs +2 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.js +2 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +3 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +3 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs +3 -2
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.js +2 -1
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs +1 -0
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js +1 -0
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs +3 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js +3 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/IDPQueryResolver.cjs +1 -0
- package/dist/development/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/IDPQueryResolver.js +1 -0
- package/dist/development/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.cjs +1 -0
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.js +1 -0
- 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 +1 -0
- package/dist/development/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/PersonQueryResolver.js +1 -0
- package/dist/development/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.cjs +1 -0
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.js +1 -0
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.cjs +1 -0
- package/dist/development/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.js +1 -0
- package/dist/development/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.cjs +1 -0
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.js +1 -0
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.cjs +1 -0
- package/dist/development/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.js +1 -0
- package/dist/development/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.cjs +7 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.js +7 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/development/src/schema/tenant.graphql.cjs +64 -2
- package/dist/development/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/development/src/schema/tenant.graphql.js +64 -2
- 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/development/src/utils/tick.cjs.map +1 -1
- package/dist/development/src/utils/tick.js.map +1 -1
- package/dist/production/index.cjs +5 -6
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +2 -3
- package/dist/production/src/TenantContainer.cjs +73 -2
- package/dist/production/src/TenantContainer.cjs.map +1 -1
- package/dist/production/src/TenantContainer.js +73 -2
- package/dist/production/src/TenantContainer.js.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.cjs +1 -0
- package/dist/production/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.js +1 -0
- 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/2018-08-02-174310-init.cjs.map +1 -1
- package/dist/production/src/migrations/2018-08-02-174310-init.js.map +1 -1
- package/dist/production/src/migrations/2018-09-03-140621-identity-project.cjs.map +1 -1
- package/dist/production/src/migrations/2018-09-03-140621-identity-project.js.map +1 -1
- package/dist/production/src/migrations/2018-10-26-165450-setup-api-key.cjs.map +1 -1
- package/dist/production/src/migrations/2018-10-26-165450-setup-api-key.js.map +1 -1
- package/dist/production/src/migrations/2018-10-26-175155-variables.cjs.map +1 -1
- package/dist/production/src/migrations/2018-10-26-175155-variables.js.map +1 -1
- package/dist/production/src/migrations/2019-02-18-110949-project-slug.cjs.map +1 -1
- package/dist/production/src/migrations/2019-02-18-110949-project-slug.js.map +1 -1
- package/dist/production/src/migrations/2019-02-18-160155-session-expiration.cjs.map +1 -1
- package/dist/production/src/migrations/2019-02-18-160155-session-expiration.js.map +1 -1
- package/dist/production/src/migrations/2019-05-03-163729-api-key-disabled-at.cjs.map +1 -1
- package/dist/production/src/migrations/2019-05-03-163729-api-key-disabled-at.js.map +1 -1
- package/dist/production/src/migrations/2019-08-14-153300-project-slug-unique.cjs.map +1 -1
- package/dist/production/src/migrations/2019-08-14-153300-project-slug-unique.js.map +1 -1
- package/dist/production/src/migrations/2019-09-06-111000-membership.cjs.map +1 -1
- package/dist/production/src/migrations/2019-09-06-111000-membership.js.map +1 -1
- package/dist/production/src/migrations/2019-09-06-111001-drop-old-member.cjs.map +1 -1
- package/dist/production/src/migrations/2019-09-06-111001-drop-old-member.js.map +1 -1
- package/dist/production/src/migrations/2020-01-29-idenity-note.cjs.map +1 -1
- package/dist/production/src/migrations/2020-01-29-idenity-note.js.map +1 -1
- package/dist/production/src/migrations/2020-04-17-fix-person-index.cjs.map +1 -1
- package/dist/production/src/migrations/2020-04-17-fix-person-index.js.map +1 -1
- package/dist/production/src/migrations/2020-05-01-170000-api-key-index.cjs.map +1 -1
- package/dist/production/src/migrations/2020-05-01-170000-api-key-index.js.map +1 -1
- package/dist/production/src/migrations/2020-06-08-134000-tenant-credentials.cjs.map +1 -1
- package/dist/production/src/migrations/2020-06-08-134000-tenant-credentials.js.map +1 -1
- package/dist/production/src/migrations/2020-08-07-110000-person-otp.cjs.map +1 -1
- package/dist/production/src/migrations/2020-08-07-110000-person-otp.js.map +1 -1
- package/dist/production/src/migrations/2020-08-17-162200-mail-templates.cjs.map +1 -1
- package/dist/production/src/migrations/2020-08-17-162200-mail-templates.js.map +1 -1
- package/dist/production/src/migrations/2020-08-21-143400-person-password-reset.cjs.map +1 -1
- package/dist/production/src/migrations/2020-08-21-143400-person-password-reset.js.map +1 -1
- package/dist/production/src/migrations/2020-09-07-094200-identity-provider.cjs.map +1 -1
- package/dist/production/src/migrations/2020-09-07-094200-identity-provider.js.map +1 -1
- package/dist/production/src/migrations/2021-03-28-134000-timestamp.cjs.map +1 -1
- package/dist/production/src/migrations/2021-03-28-134000-timestamp.js.map +1 -1
- package/dist/production/src/migrations/2021-07-26-105000-project-config.cjs.map +1 -1
- package/dist/production/src/migrations/2021-07-26-105000-project-config.js.map +1 -1
- package/dist/production/src/migrations/2021-07-26-132000-project-secrets.cjs.map +1 -1
- package/dist/production/src/migrations/2021-07-26-132000-project-secrets.js.map +1 -1
- package/dist/production/src/migrations/2021-07-27-174000-project-alias-index.cjs.map +1 -1
- package/dist/production/src/migrations/2021-07-27-174000-project-alias-index.js.map +1 -1
- package/dist/production/src/migrations/2021-11-24-130000-person-password-null.cjs.map +1 -1
- package/dist/production/src/migrations/2021-11-24-130000-person-password-null.js.map +1 -1
- package/dist/production/src/migrations/2021-11-24-161500-mail-template-project-null.cjs.map +1 -1
- package/dist/production/src/migrations/2021-11-24-161500-mail-template-project-null.js.map +1 -1
- package/dist/production/src/migrations/2022-01-04-144000-person-unique-identity.cjs.map +1 -1
- package/dist/production/src/migrations/2022-01-04-144000-person-unique-identity.js.map +1 -1
- package/dist/production/src/migrations/2022-02-09-111800-fix-crypted.cjs.map +1 -1
- package/dist/production/src/migrations/2022-02-09-111800-fix-crypted.js.map +1 -1
- package/dist/production/src/migrations/2022-02-11-153000-idp-auto-sign-up.cjs.map +1 -1
- package/dist/production/src/migrations/2022-02-11-153000-idp-auto-sign-up.js.map +1 -1
- package/dist/production/src/migrations/2022-06-29-105000-person-idp.cjs.map +1 -1
- package/dist/production/src/migrations/2022-06-29-105000-person-idp.js.map +1 -1
- package/dist/production/src/migrations/2022-07-07-135000-person-email-opt-uniq.cjs.map +1 -1
- package/dist/production/src/migrations/2022-07-07-135000-person-email-opt-uniq.js.map +1 -1
- package/dist/production/src/migrations/2022-07-07-141000-person-display-name.cjs.map +1 -1
- package/dist/production/src/migrations/2022-07-07-141000-person-display-name.js.map +1 -1
- package/dist/production/src/migrations/2022-07-14-145000-person-login-options.cjs.map +1 -1
- package/dist/production/src/migrations/2022-07-14-145000-person-login-options.js.map +1 -1
- package/dist/production/src/migrations/2022-11-08-project-update-notification.cjs.map +1 -1
- package/dist/production/src/migrations/2022-11-08-project-update-notification.js.map +1 -1
- package/dist/production/src/migrations/2023-01-20-135500-person-email-normalize.cjs.map +1 -1
- package/dist/production/src/migrations/2023-01-20-135500-person-email-normalize.js.map +1 -1
- package/dist/production/src/migrations/2023-06-03-104000-person-disabled.cjs.map +1 -1
- package/dist/production/src/migrations/2023-06-03-104000-person-disabled.js.map +1 -1
- package/dist/production/src/migrations/2023-09-01-165000-idp-return-config.cjs.map +1 -1
- package/dist/production/src/migrations/2023-09-01-165000-idp-return-config.js.map +1 -1
- package/dist/production/src/migrations/2024-06-20-140000-mail-reply.cjs.map +1 -1
- package/dist/production/src/migrations/2024-06-20-140000-mail-reply.js.map +1 -1
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -1
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.js.map +1 -1
- package/dist/production/src/migrations/2025-04-16-180000-config-up.cjs +39 -0
- package/dist/production/src/migrations/2025-04-16-180000-config-up.cjs.map +1 -0
- package/dist/production/src/migrations/2025-04-16-180000-config-up.js +40 -0
- package/dist/production/src/migrations/2025-04-16-180000-config-up.js.map +1 -0
- package/dist/production/src/migrations/2025-04-17-160000-auth-log.cjs +45 -0
- package/dist/production/src/migrations/2025-04-17-160000-auth-log.cjs.map +1 -0
- package/dist/production/src/migrations/2025-04-17-160000-auth-log.js +46 -0
- package/dist/production/src/migrations/2025-04-17-160000-auth-log.js.map +1 -0
- package/dist/production/src/migrations/runner.cjs +9 -4
- package/dist/production/src/migrations/runner.cjs.map +1 -1
- package/dist/production/src/migrations/runner.js +7 -2
- package/dist/production/src/migrations/runner.js.map +1 -1
- package/dist/production/src/migrations/snapshot.cjs +56 -1
- package/dist/production/src/migrations/snapshot.cjs.map +1 -1
- package/dist/production/src/migrations/snapshot.js +56 -1
- 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 +6 -0
- package/dist/production/src/model/authorization/MembershipMatcher.cjs.map +1 -1
- package/dist/production/src/model/authorization/MembershipMatcher.js +6 -0
- package/dist/production/src/model/authorization/MembershipMatcher.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionActions.cjs.map +1 -1
- 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 +2 -0
- package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.js +2 -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/authorization/Roles.cjs.map +1 -1
- package/dist/production/src/model/authorization/Roles.js.map +1 -1
- package/dist/production/src/model/commands/CommandBus.cjs +1 -3
- package/dist/production/src/model/commands/CommandBus.cjs.map +1 -1
- package/dist/production/src/model/commands/CommandBus.js +1 -3
- 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 +7 -7
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.js +2 -2
- 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/authLog/CreateAuthLogEntryCommand.cjs +27 -0
- package/dist/production/src/model/commands/authLog/CreateAuthLogEntryCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/authLog/CreateAuthLogEntryCommand.js +27 -0
- package/dist/production/src/model/commands/authLog/CreateAuthLogEntryCommand.js.map +1 -0
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -5
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -5
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -1
- 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 +6 -2
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.js +6 -2
- 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 +16 -12
- package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.js +16 -12
- 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 +4 -10
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js +4 -10
- 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.map +1 -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.map +1 -1
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs +12 -10
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js +9 -7
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs +5 -5
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js +1 -1
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -1
- 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/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.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/production/src/model/mailing/templates/Layout.mustache.cjs.map +1 -1
- package/dist/production/src/model/mailing/templates/Layout.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/type.cjs.map +1 -1
- package/dist/production/src/model/mailing/type.js.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs +5 -9
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js +2 -6
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.cjs +43 -0
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.js +43 -0
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.js.map +1 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs +18 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js +18 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js.map +1 -1
- 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/mailTemplate/helpers.cjs.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/helpers.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.cjs +5 -3
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.js +5 -3
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs +5 -15
- package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.js +5 -15
- 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 +1 -4
- package/dist/production/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectSlugSpecification.js +1 -4
- 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.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs +3 -3
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js.map +1 -1
- 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 +6 -8
- package/dist/production/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectSecretsQuery.js +6 -8
- 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/AuthLogService.cjs +36 -0
- package/dist/production/src/model/service/AuthLogService.cjs.map +1 -0
- package/dist/production/src/model/service/AuthLogService.js +36 -0
- package/dist/production/src/model/service/AuthLogService.js.map +1 -0
- package/dist/production/src/model/service/ConfigurationManager.cjs +0 -12
- package/dist/production/src/model/service/ConfigurationManager.cjs.map +1 -1
- package/dist/production/src/model/service/ConfigurationManager.js +0 -12
- package/dist/production/src/model/service/ConfigurationManager.js.map +1 -1
- 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 +46 -12
- package/dist/production/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.js +46 -12
- package/dist/production/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/production/src/model/service/InviteManager.cjs +14 -8
- package/dist/production/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/production/src/model/service/InviteManager.js +14 -8
- 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 +1 -1
- package/dist/production/src/model/service/MembershipValidator.cjs.map +1 -1
- package/dist/production/src/model/service/MembershipValidator.js +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 +0 -3
- package/dist/production/src/model/service/OtpManager.cjs.map +1 -1
- package/dist/production/src/model/service/OtpManager.js +0 -3
- package/dist/production/src/model/service/OtpManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.cjs +21 -12
- package/dist/production/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.js +20 -11
- package/dist/production/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.cjs +40 -8
- package/dist/production/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.js +40 -8
- package/dist/production/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordStrengthValidator.cjs +69 -0
- package/dist/production/src/model/service/PasswordStrengthValidator.cjs.map +1 -0
- package/dist/production/src/model/service/PasswordStrengthValidator.js +69 -0
- package/dist/production/src/model/service/PasswordStrengthValidator.js.map +1 -0
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs +94 -25
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordlessSignInManager.js +86 -17
- package/dist/production/src/model/service/PasswordlessSignInManager.js.map +1 -1
- package/dist/production/src/model/service/PersonAccessManager.cjs +7 -29
- package/dist/production/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonAccessManager.js +7 -29
- package/dist/production/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/production/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectManager.cjs.map +1 -1
- 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.map +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 +56 -31
- package/dist/production/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignInManager.js +57 -32
- package/dist/production/src/model/service/SignInManager.js.map +1 -1
- package/dist/production/src/model/service/SignUpManager.cjs +13 -8
- package/dist/production/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignUpManager.js +11 -6
- package/dist/production/src/model/service/SignUpManager.js.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.cjs +6 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.js +6 -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.map +1 -1
- package/dist/production/src/model/service/helpers/getPreferredProject.js.map +1 -1
- 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 +6 -4
- package/dist/production/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPManager.js +6 -4
- package/dist/production/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPResponseError.cjs +0 -3
- package/dist/production/src/model/service/idp/IDPResponseError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPResponseError.js +0 -3
- package/dist/production/src/model/service/idp/IDPResponseError.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPValidationError.cjs +0 -3
- package/dist/production/src/model/service/idp/IDPValidationError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPValidationError.js +0 -3
- package/dist/production/src/model/service/idp/IDPValidationError.js.map +1 -1
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.cjs +0 -3
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.js +0 -3
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.cjs +0 -3
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.js +0 -3
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.js.map +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.map +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.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -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 +2 -1
- package/dist/production/src/model/utils/Response.cjs.map +1 -1
- package/dist/production/src/model/utils/Response.js +2 -1
- package/dist/production/src/model/utils/Response.js.map +1 -1
- package/dist/production/src/model/utils/blacklist.cjs +10006 -0
- package/dist/production/src/model/utils/blacklist.cjs.map +1 -0
- package/dist/production/src/model/utils/blacklist.js +10006 -0
- package/dist/production/src/model/utils/blacklist.js.map +1 -0
- package/dist/production/src/model/utils/email.cjs.map +1 -1
- package/dist/production/src/model/utils/email.js.map +1 -1
- package/dist/{development/src/model/utils/typeUtils.cjs → production/src/model/utils/hex.cjs} +1 -1
- package/dist/production/src/model/utils/hex.cjs.map +1 -0
- package/dist/production/src/model/utils/{typeUtils.js → hex.js} +1 -1
- package/dist/production/src/model/utils/hex.js.map +1 -0
- package/dist/production/src/model/utils/interval.cjs +8 -0
- package/dist/production/src/model/utils/interval.cjs.map +1 -0
- package/dist/production/src/model/utils/interval.js +8 -0
- package/dist/production/src/model/utils/interval.js.map +1 -0
- package/dist/production/src/model/utils/time.cjs.map +1 -1
- package/dist/production/src/model/utils/time.js.map +1 -1
- package/dist/production/src/model/utils/{tokenUtils.cjs → token.cjs} +3 -3
- package/dist/production/src/model/utils/token.cjs.map +1 -0
- package/dist/production/src/model/utils/{tokenUtils.js → token.js} +2 -2
- package/dist/production/src/model/utils/token.js.map +1 -0
- package/dist/production/src/resolvers/ResolverFactory.cjs +22 -7
- package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.js +23 -8
- package/dist/production/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.cjs +10 -2
- package/dist/production/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.js +10 -2
- package/dist/production/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/production/src/resolvers/errorUtils.cjs +15 -4
- package/dist/production/src/resolvers/errorUtils.cjs.map +1 -1
- package/dist/production/src/resolvers/errorUtils.js +15 -4
- 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 +4 -3
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js +2 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs +17 -6
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.js +17 -6
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs +14 -0
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.js +14 -0
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs +7 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.js +7 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs +12 -3
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js +12 -3
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.cjs +3 -2
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.js +2 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.cjs +26 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.js +26 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +20 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js +20 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs +25 -2
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.js +25 -2
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.cjs +24 -0
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.js +24 -0
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.cjs +2 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.js +2 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +3 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +3 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs +3 -2
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.js +2 -1
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs +1 -0
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js +1 -0
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs +3 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js +3 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/IDPQueryResolver.cjs +1 -0
- package/dist/production/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/IDPQueryResolver.js +1 -0
- package/dist/production/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.cjs +1 -0
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.js +1 -0
- 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 +1 -0
- package/dist/production/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/PersonQueryResolver.js +1 -0
- package/dist/production/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.cjs +1 -0
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.js +1 -0
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.cjs +1 -0
- package/dist/production/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.js +1 -0
- package/dist/production/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.cjs +1 -0
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.js +1 -0
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.cjs +1 -0
- package/dist/production/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.js +1 -0
- package/dist/production/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.cjs +7 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.js +7 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/production/src/schema/tenant.graphql.cjs +64 -2
- package/dist/production/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/production/src/schema/tenant.graphql.js +64 -2
- 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/production/src/utils/tick.cjs.map +1 -1
- package/dist/production/src/utils/tick.js.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/createSessionToken.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/signIn.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createPersonSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createSessionKeySql.d.ts +1 -1
- package/dist/tests/cases/integration/mocked/sql/createSessionKeySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getConfigSql.d.ts +3 -0
- package/dist/tests/cases/integration/mocked/sql/getConfigSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/getIdentityProjectsSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getIdpBySlugSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getMailTemplateSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getNextLoginAttemptSql.d.ts +3 -0
- package/dist/tests/cases/integration/mocked/sql/getNextLoginAttemptSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/getPersonByEmailSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonByIdSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonByIdentity.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonByIdpSql.d.ts.map +1 -1
- package/dist/tests/src/testTenant.d.ts +2 -0
- package/dist/tests/src/testTenant.d.ts.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/TenantContainer.d.ts +10 -4
- package/dist/types/TenantContainer.d.ts.map +1 -1
- package/dist/types/migrations/2018-08-02-174310-init.d.ts.map +1 -1
- package/dist/types/migrations/2018-09-03-140621-identity-project.d.ts.map +1 -1
- package/dist/types/migrations/2018-10-26-165450-setup-api-key.d.ts.map +1 -1
- package/dist/types/migrations/2018-10-26-175155-variables.d.ts.map +1 -1
- package/dist/types/migrations/2019-02-18-110949-project-slug.d.ts.map +1 -1
- package/dist/types/migrations/2019-02-18-160155-session-expiration.d.ts.map +1 -1
- package/dist/types/migrations/2019-05-03-163729-api-key-disabled-at.d.ts.map +1 -1
- package/dist/types/migrations/2019-08-14-153300-project-slug-unique.d.ts.map +1 -1
- package/dist/types/migrations/2019-09-06-111000-membership.d.ts.map +1 -1
- package/dist/types/migrations/2019-09-06-111001-drop-old-member.d.ts.map +1 -1
- package/dist/types/migrations/2020-01-29-idenity-note.d.ts.map +1 -1
- package/dist/types/migrations/2020-04-17-fix-person-index.d.ts.map +1 -1
- package/dist/types/migrations/2020-05-01-170000-api-key-index.d.ts.map +1 -1
- package/dist/types/migrations/2020-06-08-134000-tenant-credentials.d.ts.map +1 -1
- package/dist/types/migrations/2020-08-07-110000-person-otp.d.ts.map +1 -1
- package/dist/types/migrations/2020-08-17-162200-mail-templates.d.ts.map +1 -1
- package/dist/types/migrations/2020-08-21-143400-person-password-reset.d.ts.map +1 -1
- package/dist/types/migrations/2020-09-07-094200-identity-provider.d.ts.map +1 -1
- package/dist/types/migrations/2021-03-28-134000-timestamp.d.ts.map +1 -1
- package/dist/types/migrations/2021-07-26-105000-project-config.d.ts.map +1 -1
- package/dist/types/migrations/2021-07-26-132000-project-secrets.d.ts.map +1 -1
- package/dist/types/migrations/2021-07-27-174000-project-alias-index.d.ts.map +1 -1
- package/dist/types/migrations/2021-11-24-130000-person-password-null.d.ts.map +1 -1
- package/dist/types/migrations/2021-11-24-161500-mail-template-project-null.d.ts.map +1 -1
- package/dist/types/migrations/2022-01-04-144000-person-unique-identity.d.ts.map +1 -1
- package/dist/types/migrations/2022-02-09-111800-fix-crypted.d.ts.map +1 -1
- package/dist/types/migrations/2022-02-11-153000-idp-auto-sign-up.d.ts.map +1 -1
- package/dist/types/migrations/2022-06-29-105000-person-idp.d.ts.map +1 -1
- package/dist/types/migrations/2022-07-07-135000-person-email-opt-uniq.d.ts.map +1 -1
- package/dist/types/migrations/2022-07-07-141000-person-display-name.d.ts.map +1 -1
- package/dist/types/migrations/2022-07-14-145000-person-login-options.d.ts.map +1 -1
- package/dist/types/migrations/2022-11-08-project-update-notification.d.ts.map +1 -1
- package/dist/types/migrations/2023-01-20-135500-person-email-normalize.d.ts.map +1 -1
- package/dist/types/migrations/2023-06-03-104000-person-disabled.d.ts.map +1 -1
- package/dist/types/migrations/2023-09-01-165000-idp-return-config.d.ts.map +1 -1
- package/dist/types/migrations/2024-06-20-140000-mail-reply.d.ts.map +1 -1
- package/dist/types/migrations/2024-08-26-120000-passwordless.d.ts.map +1 -1
- package/dist/types/migrations/2025-04-16-180000-config-up.d.ts +3 -0
- package/dist/types/migrations/2025-04-16-180000-config-up.d.ts.map +1 -0
- package/dist/types/migrations/2025-04-17-160000-auth-log.d.ts +3 -0
- package/dist/types/migrations/2025-04-17-160000-auth-log.d.ts.map +1 -0
- package/dist/types/migrations/runner.d.ts.map +1 -1
- package/dist/types/migrations/snapshot-factory.d.ts.map +1 -1
- package/dist/types/migrations/snapshot.d.ts.map +1 -1
- package/dist/types/migrations/types.d.ts.map +1 -1
- package/dist/types/model/authorization/AclSchemaAccessNodeFactory.d.ts.map +1 -1
- package/dist/types/model/authorization/IdentityScope.d.ts +1 -1
- package/dist/types/model/authorization/IdentityScope.d.ts.map +1 -1
- package/dist/types/model/authorization/MembershipMatcher.d.ts.map +1 -1
- 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/Command.d.ts +1 -1
- package/dist/types/model/commands/Command.d.ts.map +1 -1
- package/dist/types/model/commands/CommandBus.d.ts.map +1 -1
- package/dist/types/model/commands/authLog/CreateAuthLogEntryCommand.d.ts +26 -0
- package/dist/types/model/commands/authLog/CreateAuthLogEntryCommand.d.ts.map +1 -0
- package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts.map +1 -1
- package/dist/types/model/commands/identity/PatchIdentityGlobalRoles.d.ts.map +1 -1
- package/dist/types/model/commands/mailTemplate/AddMailTemplateCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/types.d.ts.map +1 -1
- package/dist/types/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/CreatePersonCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/ResetPasswordCommand.d.ts.map +1 -1
- package/dist/types/model/dtos/AuthLogBag.d.ts +3 -0
- package/dist/types/model/dtos/AuthLogBag.d.ts.map +1 -0
- package/dist/types/model/dtos/Password.d.ts.map +1 -1
- package/dist/types/model/mailing/UserMailer.d.ts +1 -0
- package/dist/types/model/mailing/UserMailer.d.ts.map +1 -1
- package/dist/types/model/queries/authLog/NextLoginAttemptQuery.d.ts +7 -0
- package/dist/types/model/queries/authLog/NextLoginAttemptQuery.d.ts.map +1 -0
- package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts +1 -1
- package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts.map +1 -1
- package/dist/types/model/queries/mailTemplate/helpers.d.ts.map +1 -1
- package/dist/types/model/queries/membership/ProjectMembersQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/ProjectMembershipByIdentityQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/ProjectRolesByIdentityQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/ProjectSlugSpecification.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonQuery.d.ts.map +1 -1
- package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts.map +1 -1
- package/dist/types/model/queries/project/ProjectSecretsQuery.d.ts.map +1 -1
- package/dist/types/model/service/AuthLogService.d.ts +34 -0
- package/dist/types/model/service/AuthLogService.d.ts.map +1 -0
- package/dist/types/model/service/ConfigurationManager.d.ts +1 -3
- package/dist/types/model/service/ConfigurationManager.d.ts.map +1 -1
- package/dist/types/model/service/EmailValidator.d.ts.map +1 -1
- package/dist/types/model/service/IDPSignInManager.d.ts +5 -1
- 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/MembershipValidator.d.ts +1 -1
- package/dist/types/model/service/MembershipValidator.d.ts.map +1 -1
- package/dist/types/model/service/OtpManager.d.ts +0 -1
- package/dist/types/model/service/OtpManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordChangeManager.d.ts +8 -4
- package/dist/types/model/service/PasswordChangeManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordResetManager.d.ts +11 -4
- package/dist/types/model/service/PasswordResetManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordStrengthValidator.d.ts +11 -0
- package/dist/types/model/service/PasswordStrengthValidator.d.ts.map +1 -0
- package/dist/types/model/service/PasswordlessSignInManager.d.ts +16 -6
- package/dist/types/model/service/PasswordlessSignInManager.d.ts.map +1 -1
- package/dist/types/model/service/PersonAccessManager.d.ts +2 -1
- package/dist/types/model/service/PersonAccessManager.d.ts.map +1 -1
- package/dist/types/model/service/PersonManager.d.ts.map +1 -1
- package/dist/types/model/service/ProjectManager.d.ts.map +1 -1
- package/dist/types/model/service/ProjectMemberManager.d.ts.map +1 -1
- package/dist/types/model/service/RolesManager.d.ts.map +1 -1
- package/dist/types/model/service/SignInManager.d.ts +9 -4
- package/dist/types/model/service/SignInManager.d.ts.map +1 -1
- package/dist/types/model/service/SignUpManager.d.ts +7 -3
- package/dist/types/model/service/SignUpManager.d.ts.map +1 -1
- package/dist/types/model/service/apiKey/ApiKeyManager.d.ts +1 -1
- package/dist/types/model/service/apiKey/ApiKeyManager.d.ts.map +1 -1
- package/dist/types/model/service/apiKey/ApiKeyService.d.ts.map +1 -1
- package/dist/types/model/service/idp/IDPManager.d.ts.map +1 -1
- package/dist/types/model/service/idp/IDPResponseError.d.ts +0 -1
- package/dist/types/model/service/idp/IDPResponseError.d.ts.map +1 -1
- package/dist/types/model/service/idp/IDPValidationError.d.ts +0 -1
- package/dist/types/model/service/idp/IDPValidationError.d.ts.map +1 -1
- package/dist/types/model/service/idp/IdentityProviderHandler.d.ts.map +1 -1
- package/dist/types/model/service/idp/IdentityProviderNotFoundError.d.ts +0 -1
- package/dist/types/model/service/idp/IdentityProviderNotFoundError.d.ts.map +1 -1
- package/dist/types/model/service/idp/InvalidIDPConfigurationError.d.ts +0 -1
- package/dist/types/model/service/idp/InvalidIDPConfigurationError.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/FacebookProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCTypes.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/helpers.d.ts.map +1 -1
- package/dist/types/model/type/ApiKey.d.ts +1 -1
- package/dist/types/model/type/ApiKey.d.ts.map +1 -1
- package/dist/types/model/type/AuthLog.d.ts +2 -0
- package/dist/types/model/type/AuthLog.d.ts.map +1 -0
- package/dist/types/model/type/Config.d.ts +28 -0
- package/dist/types/model/type/Config.d.ts.map +1 -0
- package/dist/types/model/type/Project.d.ts.map +1 -1
- package/dist/types/model/utils/DatabaseContext.d.ts.map +1 -1
- package/dist/types/model/utils/Response.d.ts +4 -3
- package/dist/types/model/utils/Response.d.ts.map +1 -1
- package/dist/types/model/utils/blacklist.d.ts +2 -0
- package/dist/types/model/utils/blacklist.d.ts.map +1 -0
- package/dist/types/model/utils/{typeUtils.d.ts → hex.d.ts} +1 -1
- package/dist/types/model/utils/hex.d.ts.map +1 -0
- package/dist/types/model/utils/index.d.ts +1 -1
- package/dist/types/model/utils/index.d.ts.map +1 -1
- package/dist/types/model/utils/interval.d.ts +3 -0
- package/dist/types/model/utils/interval.d.ts.map +1 -0
- package/dist/types/model/utils/{tokenUtils.d.ts → token.d.ts} +2 -2
- package/dist/types/model/utils/token.d.ts.map +1 -0
- package/dist/types/resolvers/ResolverFactory.d.ts.map +1 -1
- package/dist/types/resolvers/TenantResolverContext.d.ts +2 -0
- package/dist/types/resolvers/TenantResolverContext.d.ts.map +1 -1
- package/dist/types/resolvers/TenantResolverContextFactory.d.ts +9 -4
- package/dist/types/resolvers/TenantResolverContextFactory.d.ts.map +1 -1
- package/dist/types/resolvers/errorUtils.d.ts +7 -5
- package/dist/types/resolvers/errorUtils.d.ts.map +1 -1
- package/dist/types/resolvers/membershipUtils.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/ChangePasswordMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/ChangeProfileMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/DisablePersonMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/IDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/InviteMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/OtpMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/ResetPasswordMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/SignInMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/SignOutMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/SignUpMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/IDPQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/PersonQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/types/IdentityTypeResolver.d.ts.map +1 -1
- package/dist/types/resolvers/types/ProjectTypeResolver.d.ts +2 -2
- package/dist/types/resolvers/types/ProjectTypeResolver.d.ts.map +1 -1
- package/dist/types/schema/index.d.ts +103 -8
- package/dist/types/schema/index.d.ts.map +1 -1
- package/dist/types/schema/tenant.graphql.d.ts.map +1 -1
- package/dist/types/schema/types.d.ts +8 -0
- package/dist/types/schema/types.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/utils/Mailer.d.ts.map +1 -1
- package/dist/types/utils/batchQuery.d.ts +4 -1
- package/dist/types/utils/batchQuery.d.ts.map +1 -1
- package/graphql.codegen.yml +7 -3
- package/package.json +30 -24
- package/src/TenantContainer.ts +156 -156
- package/src/bin/runMigrations.ts +0 -2
- package/src/migrations/2018-08-02-174310-init.ts +1 -1
- package/src/migrations/2018-09-03-140621-identity-project.ts +1 -1
- package/src/migrations/2018-10-26-165450-setup-api-key.ts +1 -1
- package/src/migrations/2018-10-26-175155-variables.ts +1 -1
- package/src/migrations/2019-02-18-110949-project-slug.ts +1 -1
- package/src/migrations/2019-02-18-160155-session-expiration.ts +1 -1
- package/src/migrations/2019-05-03-163729-api-key-disabled-at.ts +1 -1
- package/src/migrations/2019-08-14-153300-project-slug-unique.ts +1 -1
- package/src/migrations/2019-09-06-111000-membership.ts +1 -1
- package/src/migrations/2019-09-06-111001-drop-old-member.ts +1 -1
- package/src/migrations/2020-01-29-idenity-note.ts +1 -2
- package/src/migrations/2020-04-17-fix-person-index.ts +1 -2
- package/src/migrations/2020-05-01-170000-api-key-index.ts +1 -2
- package/src/migrations/2020-06-08-134000-tenant-credentials.ts +1 -1
- package/src/migrations/2020-08-07-110000-person-otp.ts +1 -2
- package/src/migrations/2020-08-17-162200-mail-templates.ts +1 -1
- package/src/migrations/2020-08-21-143400-person-password-reset.ts +1 -2
- package/src/migrations/2020-09-07-094200-identity-provider.ts +1 -1
- package/src/migrations/2021-03-28-134000-timestamp.ts +1 -3
- package/src/migrations/2021-07-26-105000-project-config.ts +1 -2
- package/src/migrations/2021-07-26-132000-project-secrets.ts +1 -1
- package/src/migrations/2021-07-27-174000-project-alias-index.ts +1 -2
- package/src/migrations/2021-11-24-130000-person-password-null.ts +1 -2
- package/src/migrations/2021-11-24-161500-mail-template-project-null.ts +1 -1
- package/src/migrations/2022-01-04-144000-person-unique-identity.ts +1 -1
- package/src/migrations/2022-02-09-111800-fix-crypted.ts +1 -1
- package/src/migrations/2022-02-11-153000-idp-auto-sign-up.ts +1 -1
- package/src/migrations/2022-06-29-105000-person-idp.ts +1 -1
- package/src/migrations/2022-07-07-135000-person-email-opt-uniq.ts +1 -1
- package/src/migrations/2022-07-07-141000-person-display-name.ts +1 -2
- package/src/migrations/2022-07-14-145000-person-login-options.ts +1 -2
- package/src/migrations/2022-11-08-project-update-notification.ts +1 -2
- package/src/migrations/2023-01-20-135500-person-email-normalize.ts +1 -2
- package/src/migrations/2023-06-03-104000-person-disabled.ts +1 -1
- package/src/migrations/2023-09-01-165000-idp-return-config.ts +1 -1
- package/src/migrations/2024-06-20-140000-mail-reply.ts +1 -1
- package/src/migrations/2024-08-26-120000-passwordless.ts +1 -1
- package/src/migrations/2025-04-16-180000-config-up.ts +39 -0
- package/src/migrations/2025-04-17-160000-auth-log.ts +45 -0
- package/src/migrations/runner.ts +4 -1
- package/src/migrations/snapshot-factory.ts +0 -1
- package/src/migrations/snapshot.ts +57 -2
- package/src/migrations/types.ts +1 -1
- package/src/model/authorization/AclSchemaAccessNodeFactory.ts +0 -1
- package/src/model/authorization/IdentityScope.ts +1 -1
- package/src/model/authorization/MembershipMatcher.ts +6 -0
- package/src/model/authorization/PermissionActions.ts +12 -8
- package/src/model/authorization/PermissionsFactory.ts +3 -1
- package/src/model/commands/Command.ts +1 -1
- package/src/model/commands/CommandBus.ts +1 -3
- package/src/model/commands/apiKey/CreateApiKeyCommand.ts +1 -1
- package/src/model/commands/authLog/CreateAuthLogEntryCommand.ts +49 -0
- package/src/model/commands/configuration/UpdateConfigurationCommand.ts +24 -6
- package/src/model/commands/identity/PatchIdentityGlobalRoles.ts +7 -2
- package/src/model/commands/mailTemplate/AddMailTemplateCommand.ts +18 -12
- package/src/model/commands/membership/types.ts +2 -2
- package/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.ts +2 -4
- package/src/model/commands/person/ChangeProfileCommand.ts +1 -1
- package/src/model/commands/person/CreatePersonCommand.ts +11 -9
- package/src/model/commands/person/TogglePersonPasswordlessCommand.ts +1 -1
- package/src/model/commands/personToken/CreatePersonTokenCommand.ts +8 -6
- package/src/model/commands/personToken/ResetPasswordCommand.ts +1 -2
- package/src/model/dtos/AuthLogBag.ts +2 -0
- package/src/model/dtos/Password.ts +0 -1
- package/src/model/mailing/UserMailer.ts +16 -8
- package/src/model/queries/apiKey/ApiKeyQuery.ts +9 -6
- package/src/model/queries/authLog/NextLoginAttemptQuery.ts +66 -0
- package/src/model/queries/configuration/ConfigurationQuery.ts +20 -10
- package/src/model/queries/mailTemplate/helpers.ts +11 -10
- package/src/model/queries/membership/ProjectMembersQuery.ts +9 -8
- package/src/model/queries/membership/ProjectMembershipByIdentityQuery.ts +5 -9
- package/src/model/queries/membership/ProjectRolesByIdentityQuery.ts +5 -6
- package/src/model/queries/membership/ProjectSlugSpecification.ts +9 -12
- package/src/model/queries/person/PersonQuery.ts +0 -1
- package/src/model/queries/personToken/PersonTokenQuery.ts +0 -1
- package/src/model/queries/project/ProjectSecretsQuery.ts +1 -2
- package/src/model/queries/project/ProjectsByIdentityQuery.ts +3 -3
- package/src/model/service/AuthLogService.ts +64 -0
- package/src/model/service/ConfigurationManager.ts +1 -9
- package/src/model/service/EmailValidator.ts +0 -1
- package/src/model/service/IDPSignInManager.ts +51 -14
- package/src/model/service/InviteManager.ts +18 -12
- package/src/model/service/MembershipValidator.ts +2 -2
- package/src/model/service/OtpAuthenticator.ts +1 -1
- package/src/model/service/OtpManager.ts +0 -3
- package/src/model/service/PasswordChangeManager.ts +27 -13
- package/src/model/service/PasswordResetManager.ts +47 -12
- package/src/model/service/PasswordStrengthValidator.ts +96 -0
- package/src/model/service/PasswordlessSignInManager.ts +106 -26
- package/src/model/service/PersonAccessManager.ts +8 -28
- package/src/model/service/PersonManager.ts +0 -1
- package/src/model/service/ProjectManager.ts +1 -7
- package/src/model/service/ProjectMemberManager.ts +6 -2
- package/src/model/service/RolesManager.ts +6 -2
- package/src/model/service/SecretsManager.ts +1 -1
- package/src/model/service/SignInManager.ts +68 -34
- package/src/model/service/SignUpManager.ts +16 -8
- package/src/model/service/apiKey/ApiKeyManager.ts +11 -5
- package/src/model/service/apiKey/ApiKeyService.ts +1 -2
- package/src/model/service/idp/IDPManager.ts +6 -5
- package/src/model/service/idp/IDPResponseError.ts +0 -3
- package/src/model/service/idp/IDPValidationError.ts +0 -3
- package/src/model/service/idp/IdentityProviderHandler.ts +1 -2
- package/src/model/service/idp/IdentityProviderNotFoundError.ts +0 -3
- package/src/model/service/idp/InvalidIDPConfigurationError.ts +0 -3
- package/src/model/service/idp/providers/FacebookProvider.ts +0 -3
- package/src/model/service/idp/providers/OIDCHelpers.ts +10 -2
- package/src/model/service/idp/providers/OIDCProvider.ts +0 -1
- package/src/model/service/idp/providers/OIDCTypes.ts +0 -1
- package/src/model/service/idp/providers/helpers.ts +9 -8
- package/src/model/type/ApiKey.ts +1 -1
- package/src/model/type/AuthLog.ts +14 -0
- package/src/model/type/Config.ts +31 -0
- package/src/model/type/Project.ts +0 -1
- package/src/model/utils/DatabaseContext.ts +0 -1
- package/src/model/utils/Response.ts +9 -3
- package/src/model/utils/blacklist.ts +5 -0
- package/src/model/utils/index.ts +1 -1
- package/src/model/utils/interval.ts +14 -0
- package/src/model/utils/{tokenUtils.ts → token.ts} +1 -2
- package/src/resolvers/ResolverFactory.ts +24 -10
- package/src/resolvers/TenantResolverContext.ts +2 -0
- package/src/resolvers/TenantResolverContextFactory.ts +10 -0
- package/src/resolvers/errorUtils.ts +24 -5
- package/src/resolvers/membershipUtils.ts +3 -5
- package/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.ts +2 -1
- package/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.ts +2 -7
- package/src/resolvers/mutation/idp/AddIDPMutationResolver.ts +1 -1
- package/src/resolvers/mutation/idp/UpdateIDPMutationResolver.ts +1 -1
- package/src/resolvers/mutation/person/ChangePasswordMutationResolver.ts +16 -8
- package/src/resolvers/mutation/person/ChangeProfileMutationResolver.ts +14 -2
- package/src/resolvers/mutation/person/DisablePersonMutationResolver.ts +10 -9
- package/src/resolvers/mutation/person/IDPMutationResolver.ts +12 -10
- package/src/resolvers/mutation/person/InviteMutationResolver.ts +1 -9
- package/src/resolvers/mutation/person/OtpMutationResolver.ts +25 -1
- package/src/resolvers/mutation/person/PasswordlessMutationResolver.ts +31 -4
- package/src/resolvers/mutation/person/ResetPasswordMutationResolver.ts +27 -3
- package/src/resolvers/mutation/person/SignInMutationResolver.ts +35 -12
- package/src/resolvers/mutation/person/SignOutMutationResolver.ts +2 -1
- package/src/resolvers/mutation/person/SignUpMutationResolver.ts +2 -9
- package/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.ts +2 -3
- package/src/resolvers/mutation/project/CreateProjectMutationResolver.ts +1 -1
- package/src/resolvers/mutation/project/UpdateProjectMutationResolver.ts +1 -1
- package/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.ts +1 -6
- package/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.ts +1 -6
- package/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.ts +2 -13
- package/src/resolvers/query/ConfigurationQueryResolver.ts +2 -3
- package/src/resolvers/query/IDPQueryResolver.ts +0 -1
- package/src/resolvers/query/PersonQueryResolver.ts +1 -6
- package/src/resolvers/query/ProjectMembersQueryResolver.ts +2 -2
- package/src/resolvers/query/ProjectQueryResolver.ts +2 -2
- package/src/resolvers/types/IdentityTypeResolver.ts +1 -8
- package/src/resolvers/types/ProjectTypeResolver.ts +8 -3
- package/src/schema/index.ts +888 -359
- package/src/schema/tenant.graphql.ts +64 -2
- package/src/schema/types.ts +4 -0
- package/src/utils/Mailer.ts +1 -5
- package/src/utils/batchQuery.ts +4 -1
- package/tests/cases/integration/mocked/addProjectMemberMutation.test.ts +0 -1
- package/tests/cases/integration/mocked/changeMyPasswordMutation.test.ts +52 -3
- package/tests/cases/integration/mocked/changeMyProfileMutation.test.ts +26 -6
- package/tests/cases/integration/mocked/changePasswordMutation.test.ts +10 -3
- package/tests/cases/integration/mocked/changeProfileMutation.test.ts +7 -3
- package/tests/cases/integration/mocked/confirmOtpMutation.test.ts +13 -9
- package/tests/cases/integration/mocked/createApiKeyMutation.test.ts +0 -1
- package/tests/cases/integration/mocked/createSessionKeyMutation.test.ts +9 -22
- package/tests/cases/integration/mocked/gql/createSessionToken.ts +5 -2
- package/tests/cases/integration/mocked/gql/signIn.ts +5 -2
- package/tests/cases/integration/mocked/inviteMutations.test.ts +6 -28
- package/tests/cases/integration/mocked/listProjectMembersQuery.test.ts +1 -1
- package/tests/cases/integration/mocked/prepareOtpMutation.test.ts +1 -2
- package/tests/cases/integration/mocked/removeProjectMemberMutation.test.ts +0 -1
- package/tests/cases/integration/mocked/signInIdpMutation.test.ts +16 -2
- package/tests/cases/integration/mocked/signInMutation.test.ts +64 -24
- package/tests/cases/integration/mocked/signOutMutation.test.ts +0 -6
- package/tests/cases/integration/mocked/signUpMutation.test.ts +3 -13
- package/tests/cases/integration/mocked/sql/createPersonSql.ts +8 -1
- package/tests/cases/integration/mocked/sql/createSessionKeySql.ts +2 -2
- package/tests/cases/integration/mocked/sql/getApiKeySql.ts +2 -2
- package/tests/cases/integration/mocked/sql/getConfigSql.ts +29 -0
- package/tests/cases/integration/mocked/sql/getIdentityProjectsSql.ts +1 -1
- package/tests/cases/integration/mocked/sql/getIdpBySlugSql.ts +2 -1
- package/tests/cases/integration/mocked/sql/getMailTemplateSql.ts +18 -14
- package/tests/cases/integration/mocked/sql/getNextLoginAttemptSql.ts +20 -0
- package/tests/cases/integration/mocked/sql/getPersonByEmailSql.ts +3 -2
- package/tests/cases/integration/mocked/sql/getPersonByIdSql.ts +2 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdentity.ts +2 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdpSql.ts +3 -2
- package/tests/cases/integration/mocked/updateProjectMemberMutation.test.ts +0 -1
- package/tests/cases/migrations/2020-06-08-134000-tenant-credentials.test.ts +1 -1
- package/tests/cases/unit/authorization/membershipAwareAccessNode.test.ts +1 -5
- package/tests/src/testTenant.ts +13 -0
- package/dist/development/src/model/utils/password.cjs +0 -12
- package/dist/development/src/model/utils/password.cjs.map +0 -1
- package/dist/development/src/model/utils/password.js +0 -12
- package/dist/development/src/model/utils/password.js.map +0 -1
- package/dist/development/src/model/utils/tokenUtils.cjs.map +0 -1
- package/dist/development/src/model/utils/tokenUtils.js.map +0 -1
- package/dist/development/src/model/utils/typeUtils.cjs.map +0 -1
- package/dist/development/src/model/utils/typeUtils.js.map +0 -1
- package/dist/production/src/model/utils/password.cjs +0 -12
- package/dist/production/src/model/utils/password.cjs.map +0 -1
- package/dist/production/src/model/utils/password.js +0 -12
- package/dist/production/src/model/utils/password.js.map +0 -1
- package/dist/production/src/model/utils/tokenUtils.cjs.map +0 -1
- package/dist/production/src/model/utils/tokenUtils.js.map +0 -1
- package/dist/production/src/model/utils/typeUtils.cjs.map +0 -1
- package/dist/production/src/model/utils/typeUtils.js.map +0 -1
- package/dist/types/model/utils/password.d.ts +0 -4
- package/dist/types/model/utils/password.d.ts.map +0 -1
- package/dist/types/model/utils/tokenUtils.d.ts.map +0 -1
- package/dist/types/model/utils/typeUtils.d.ts.map +0 -1
- package/src/model/utils/password.ts +0 -8
- package/tests/.eslintrc.cjs +0 -5
- /package/src/model/utils/{typeUtils.ts → hex.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncreaseOtpAttemptCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { Literal, UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class IncreaseOtpAttemptCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_attempts: new Literal('otp_attempts + 1'),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,IAChB;AADgB,SAAA,KAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IncreaseOtpAttemptCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { Literal, UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class IncreaseOtpAttemptCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_attempts: new Literal('otp_attempts + 1'),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,IAChB;AADgB,SAAA,KAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,QAAQ,MAAMA,gBAAc,OAAA,EAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAA,CAAI,EACrB,OAAO;AAAA,MACP,cAAc,IAAI,QAAQ,kBAAkB;AAAA,IAAA,CAC5C,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAI,wBAAA;AAAA,IACX;AAAA,EACD;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidateTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","ImplementationException"],"mappings":";;;;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"InvalidateTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","ImplementationException"],"mappings":";;;;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,EAAa;AAAA,EAE1C,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,QAAQ,MAAMA,SAAAA,cAAc,OAAA,EAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAA,CAAI,EACrB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS,UAAU,IAAA;AAAA,IAAI,CACvB,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAIC,WAAAA,wBAAA;AAAA,IACX;AAAA,EACD;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidateTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"InvalidateTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,EAAa;AAAA,EAE1C,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,QAAQ,MAAMA,gBAAc,OAAA,EAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAA,CAAI,EACrB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS,UAAU,IAAA;AAAA,IAAI,CACvB,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAI,wBAAA;AAAA,IACX;AAAA,EACD;AACD;"}
|
|
@@ -6,16 +6,16 @@ const PersonTokenQuery = require("../../queries/personToken/PersonTokenQuery.cjs
|
|
|
6
6
|
const InvalidateTokenCommand = require("./InvalidateTokenCommand.cjs");
|
|
7
7
|
require("@contember/database");
|
|
8
8
|
require("../../type/ApiKey.cjs");
|
|
9
|
-
const
|
|
9
|
+
const token = require("../../utils/token.cjs");
|
|
10
10
|
class ResetPasswordCommand {
|
|
11
|
-
constructor(
|
|
12
|
-
this.token =
|
|
11
|
+
constructor(token2, password) {
|
|
12
|
+
this.token = token2;
|
|
13
13
|
this.password = password;
|
|
14
14
|
}
|
|
15
15
|
async execute({ db, providers, bus }) {
|
|
16
16
|
const now = providers.now();
|
|
17
|
-
const token = await db.createQueryHandler().fetch(PersonTokenQuery.PersonTokenQuery.byToken(this.token, "password_reset"));
|
|
18
|
-
const tokenValidationResult =
|
|
17
|
+
const token$1 = await db.createQueryHandler().fetch(PersonTokenQuery.PersonTokenQuery.byToken(this.token, "password_reset"));
|
|
18
|
+
const tokenValidationResult = token.validateToken({ entry: token$1, token: this.token, now, validationType: "token" });
|
|
19
19
|
if (!tokenValidationResult.ok) {
|
|
20
20
|
return tokenValidationResult;
|
|
21
21
|
}
|
|
@@ -1 +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
|
|
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 = PersonToken.TokenValidationError\n\nexport type ResetPasswordCommandResponse = Response<null, PersonToken.TokenValidationError>\n"],"names":["token","PersonTokenQuery","validateToken","InvalidateTokenCommand","ChangePasswordCommand","ResponseOk"],"mappings":";;;;;;;;;AAQO,MAAM,qBAAsE;AAAA,EAClF,YAA6BA,QAAgC,UAAkB;AAAlD,SAAA,QAAAA;AAAgC,SAAA,WAAA;AAAA,EAAmB;AAAA,EAEhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AAC1F,UAAM,MAAM,UAAU,IAAA;AACtB,UAAMA,UAAQ,MAAM,GAAG,qBAAqB,MAAMC,iBAAAA,iBAAiB,QAAQ,KAAK,OAAO,gBAAgB,CAAC;AACxG,UAAM,wBAAwBC,MAAAA,cAAc,EAAE,OAAOF,SAAO,OAAO,KAAK,OAAO,KAAK,gBAAgB,QAAA,CAAS;AAC7G,QAAI,CAAC,sBAAsB,IAAI;AAC9B,aAAO;AAAA,IACR;AACA,UAAM,IAAI,QAAQ,IAAIG,uBAAAA,uBAAuB,sBAAsB,OAAO,EAAE,CAAC;AAC7E,UAAM,IAAI,QAAQ,IAAIC,4CAAsB,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAElG,WAAO,IAAIC,SAAAA,WAAW,IAAI;AAAA,EAC3B;AACD;;"}
|
|
@@ -4,7 +4,7 @@ import { PersonTokenQuery } from "../../queries/personToken/PersonTokenQuery.js"
|
|
|
4
4
|
import { InvalidateTokenCommand } from "./InvalidateTokenCommand.js";
|
|
5
5
|
import "@contember/database";
|
|
6
6
|
import "../../type/ApiKey.js";
|
|
7
|
-
import { validateToken } from "../../utils/
|
|
7
|
+
import { validateToken } from "../../utils/token.js";
|
|
8
8
|
class ResetPasswordCommand {
|
|
9
9
|
constructor(token, password) {
|
|
10
10
|
this.token = token;
|
|
@@ -1 +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
|
|
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 = 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,EAAmB;AAAA,EAEhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AAC1F,UAAM,MAAM,UAAU,IAAA;AACtB,UAAM,QAAQ,MAAM,GAAG,qBAAqB,MAAM,iBAAiB,QAAQ,KAAK,OAAO,gBAAgB,CAAC;AACxG,UAAM,wBAAwB,cAAc,EAAE,OAAO,OAAO,OAAO,KAAK,OAAO,KAAK,gBAAgB,QAAA,CAAS;AAC7G,QAAI,CAAC,sBAAsB,IAAI;AAC9B,aAAO;AAAA,IACR;AACA,UAAM,IAAI,QAAQ,IAAI,uBAAuB,sBAAsB,OAAO,EAAE,CAAC;AAC7E,UAAM,IAAI,QAAQ,IAAI,sBAAsB,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAElG,WAAO,IAAI,WAAW,IAAI;AAAA,EAC3B;AACD;"}
|
|
@@ -1 +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,
|
|
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,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAAmE;AACtF,UAAM,KAAK,UAAU,KAAA;AACrB,UAAM,YAAYA,KAAAA,YAAY,UAAU,IAAA,GAAO,KAAK,iBAAiB;AACrE,UAAMC,SAAAA,cAAc,OAAA,EAClB,KAAK,cAAc,EACnB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY;AAAA,MACZ,YAAY,UAAU,IAAA;AAAA,MACtB,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,IAAA,CACX,EACA,QAAQ,EAAE;AAEZ,WAAO,EAAE,IAAI,UAAA;AAAA,EACd;AACD;;"}
|
|
@@ -1 +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,
|
|
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,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAAmE;AACtF,UAAM,KAAK,UAAU,KAAA;AACrB,UAAM,YAAY,YAAY,UAAU,IAAA,GAAO,KAAK,iBAAiB;AACrE,UAAMA,gBAAc,OAAA,EAClB,KAAK,cAAc,EACnB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY;AAAA,MACZ,YAAY,UAAU,IAAA;AAAA,MACtB,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,IAAA,CACX,EACA,QAAQ,EAAE;AAEZ,WAAO,EAAE,IAAI,UAAA;AAAA,EACd;AACD;"}
|
|
@@ -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,EAAkB;AAAA,EAEpH,MAAa,QAAQ,EAAE,IAAI,aAAmD;AAC7E,UAAM,KAAK,UAAU,KAAA;AACrB,UAAM,SAAS,MAAMA,uBAAc,OAAA,EACjC,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,SAAAA,mBAAmB,SAAS,EACvC,QAAQ,EAAE;AACZ,WAAO,SAAS,IAAI,KAAK;AAAA,EAC1B;AACD;;"}
|
|
@@ -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,EAAkB;AAAA,EAEpH,MAAa,QAAQ,EAAE,IAAI,aAAmD;AAC7E,UAAM,KAAK,UAAU,KAAA;AACrB,UAAM,SAAS,MAAMA,gBAAc,OAAA,EACjC,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;AACZ,WAAO,SAAS,IAAI,KAAK;AAAA,EAC1B;AACD;"}
|
|
@@ -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,EAAgB;AAAA,EAE7F,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,KAAK,UAAU,KAAA;AACrB,UAAM,EAAE,OAAO,QAAA,IAAY,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,IAAA;AAAA,MACtB,YAAY,UAAU,IAAA;AAAA,IAAI,CAC1B,EACA,WAAWC,SAAAA,mBAAmB,QAAQ,CAAC,cAAc,KAAK,GAAG;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAA;AAAA,IAAI,CAC1B;AACF,UAAM,GAAG,QAAQ,EAAE;AAAA,EACpB;AACD;;"}
|
|
@@ -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,EAAgB;AAAA,EAE7F,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,KAAK,UAAU,KAAA;AACrB,UAAM,EAAE,OAAO,QAAA,IAAY,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,IAAA;AAAA,MACtB,YAAY,UAAU,IAAA;AAAA,IAAI,CAC1B,EACA,WAAW,mBAAmB,QAAQ,CAAC,cAAc,KAAK,GAAG;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAA;AAAA,IAAI,CAC1B;AACF,UAAM,GAAG,QAAQ,EAAE;AAAA,EACpB;AACD;"}
|
|
@@ -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,EAAkD;AAAA,EAE1G,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,SAA8B;AAAA,MACnC,YAAY;AAAA,IAAA;AAEb,QAAI,KAAK,KAAK,WAAW,QAAW;AACnC,aAAO,SAAS,KAAK,KAAK;AAAA,IAC3B;AACA,QAAI,KAAK,KAAK,SAAS,QAAW;AACjC,aAAO,OAAO,KAAK,KAAK;AAAA,IACzB;AAEA,UAAMA,SAAAA,cAAc,SAClB,MAAM,SAAS,EACf,OAAO,MAAM,EACb,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EACb;AACD;;"}
|
|
@@ -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,EAAkD;AAAA,EAE1G,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,SAA8B;AAAA,MACnC,YAAY;AAAA,IAAA;AAEb,QAAI,KAAK,KAAK,WAAW,QAAW;AACnC,aAAO,SAAS,KAAK,KAAK;AAAA,IAC3B;AACA,QAAI,KAAK,KAAK,SAAS,QAAW;AACjC,aAAO,OAAO,KAAK,KAAK;AAAA,IACzB;AAEA,UAAMA,gBAAc,SAClB,MAAM,SAAS,EACf,OAAO,MAAM,EACb,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EACb;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Password.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\n\
|
|
1
|
+
{"version":3,"file":"Password.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\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":";;AAIO,MAAM,aAAa;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAChB;AAQO,MAAM,aAAiC;AAAA,EAC7C,YAA6B,MAAc;AAAd,SAAA,OAAA;AAAA,EAC7B;AAAA,EAEA,QAAQ,WAAuC;AAC9C,WAAO,QAAQ,QAAQ,KAAK,IAAI;AAAA,EACjC;AAAA,EAEA,WAA0B;AACzB,WAAO;AAAA,EACR;AACD;AAEO,MAAM,cAAkC;AAAA,EAC9C,YAA6B,OAAe;AAAf,SAAA,QAAA;AAAA,EAC7B;AAAA,EAEA,QAAQ,WAAsB;AAC7B,WAAO,UAAU,OAAO,KAAK,KAAK;AAAA,EACnC;AAAA,EAEA,WAAW;AACV,WAAO,KAAK;AAAA,EACb;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Password.js","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\n\
|
|
1
|
+
{"version":3,"file":"Password.js","sources":["../../../../../../packages/engine-tenant-api/src/model/dtos/Password.ts"],"sourcesContent":["import { Providers } from '../providers'\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":"AAIO,MAAM,aAAa;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAChB;AAQO,MAAM,aAAiC;AAAA,EAC7C,YAA6B,MAAc;AAAd,SAAA,OAAA;AAAA,EAC7B;AAAA,EAEA,QAAQ,WAAuC;AAC9C,WAAO,QAAQ,QAAQ,KAAK,IAAI;AAAA,EACjC;AAAA,EAEA,WAA0B;AACzB,WAAO;AAAA,EACR;AACD;AAEO,MAAM,cAAkC;AAAA,EAC9C,YAA6B,OAAe;AAAf,SAAA,QAAA;AAAA,EAC7B;AAAA,EAEA,QAAQ,WAAsB;AAC7B,WAAO,UAAU,OAAO,KAAK,KAAK;AAAA,EACnC;AAAA,EAEA,WAAW;AACV,WAAO,KAAK;AAAA,EACb;AACD;"}
|
|
@@ -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 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'\nimport { Acl } from '@contember/schema'\n\nexport class UserMailer {\n\tconstructor(\n\t\tprivate readonly mailer: Mailer,\n\t\tprivate readonly templateRenderer: TemplateRenderer,\n\t) {
|
|
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'\nimport { Acl } from '@contember/schema'\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: {\n\t\t\temail: string\n\t\t\tpassword: string | null\n\t\t\ttoken: string | null\n\t\t\tproject: string\n\t\t\tprojectSlug: string\n\t\t\tmemberships: readonly Acl.Membership[]\n\t\t},\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst templateId = { type: MailType.newUserInvited, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\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.sendMail(templateId, template, mailArguments)\n\t}\n\n\tasync sendExistingUserInvitedEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; project: string; projectSlug: string; memberships: readonly Acl.Membership[] },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst templateId = { type: MailType.existingUserInvited, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\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.sendMail(templateId, 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 templateId = { type: MailType.passwordReset, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\n\t\t\tsubject: 'Password reset',\n\t\t\tcontent: PasswordReset,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendMail(templateId, 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; requestId: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst templateId = { type: MailType.passwordlessSignIn, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\n\t\t\tsubject: 'Sign in here',\n\t\t\tcontent: PasswordlessSignIn,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendMail(templateId, template, mailArguments)\n\t}\n\n\tprivate async sendMail(\n\t\ttemplateId: MailTemplateIdentifier,\n\t\ttemplate: Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'>,\n\t\tvariables: Record<string, any>,\n\t) {\n\t\tconst html = await this.templateRenderer.render(template.content, variables)\n\t\tawait this.mailer.send({\n\t\t\tto: variables.email,\n\t\t\tsubject: await this.templateRenderer.render(template.subject, variables),\n\t\t\thtml,\n\t\t\tvariables,\n\t\t\ttemplate: templateId,\n\t\t\t...(template.replyTo\n\t\t\t\t? {\n\t\t\t\t\treplyTo: template.replyTo,\n\t\t\t\t}\n\t\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 = (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":";;;;;;;;;;;;;;;;AAWO,MAAM,WAAW;AAAA,EACvB,YACkB,QACA,kBAChB;AAFgB,SAAA,SAAA;AACA,SAAA,mBAAA;AAAA,EACf;AAAA,EAEH,MAAM,uBACL,WACA,eAQA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAMA,KAAAA,SAAS,gBAAgB,GAAG,kBAAA;AACvD,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAASC;AAAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAM,6BACL,WACA,eACA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAMD,KAAAA,SAAS,qBAAqB,GAAG,kBAAA;AAC5D,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAASE;AAAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAM,uBACL,WACA,eACA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAMF,KAAAA,SAAS,eAAe,GAAG,kBAAA;AACtD,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAASG;AAAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAM,sBACL,WACA,eACA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAMH,KAAAA,SAAS,oBAAoB,GAAG,kBAAA;AAC3D,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAASI;AAAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAc,SACb,YACA,UACA,WACC;AACD,UAAM,OAAO,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,SAAS;AAC3E,UAAM,KAAK,OAAO,KAAK;AAAA,MACtB,IAAI,UAAU;AAAA,MACd,SAAS,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,SAAS;AAAA,MACvE;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,GAAI,SAAS,UACV;AAAA,QACD,SAAS,SAAS;AAAA,MAAA,IAEjB,CAAA;AAAA,IAAC,CACJ;AAAA,EACF;AAAA,EAEA,MAAc,kBACb,WACA,YAC4E;AAC5E,UAAM,iBAAkB,MAAM,UAAU,aAAa,MAAM,IAAIC,kBAAAA,kBAAkB,UAAU,CAAC,KACvF,MAAM,UAAU,aAAa,MAAM,IAAIA,oCAAkB,EAAE,GAAG,YAAY,WAAW,KAAA,CAAM,CAAC;AAEjG,QAAI,CAAC,gBAAgB;AACpB,aAAO;AAAA,IACR;AACA,UAAM,UAAU,eAAe,YAAYC,gBAAO,eAAe,OAAO,IAAI,eAAe;AAC3F,WAAO,EAAE,SAAS,SAAS,eAAe,SAAS,SAAS,eAAe,QAAA;AAAA,EAC5E;AACD;;"}
|
|
@@ -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 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'\nimport { Acl } from '@contember/schema'\n\nexport class UserMailer {\n\tconstructor(\n\t\tprivate readonly mailer: Mailer,\n\t\tprivate readonly templateRenderer: TemplateRenderer,\n\t) {
|
|
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'\nimport { Acl } from '@contember/schema'\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: {\n\t\t\temail: string\n\t\t\tpassword: string | null\n\t\t\ttoken: string | null\n\t\t\tproject: string\n\t\t\tprojectSlug: string\n\t\t\tmemberships: readonly Acl.Membership[]\n\t\t},\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst templateId = { type: MailType.newUserInvited, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\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.sendMail(templateId, template, mailArguments)\n\t}\n\n\tasync sendExistingUserInvitedEmail(\n\t\tdbContext: DatabaseContext,\n\t\tmailArguments: { email: string; project: string; projectSlug: string; memberships: readonly Acl.Membership[] },\n\t\tcustomMailOptions: { projectId: string; variant: string },\n\t): Promise<void> {\n\t\tconst templateId = { type: MailType.existingUserInvited, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\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.sendMail(templateId, 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 templateId = { type: MailType.passwordReset, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\n\t\t\tsubject: 'Password reset',\n\t\t\tcontent: PasswordReset,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendMail(templateId, 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; requestId: string },\n\t\tcustomMailOptions: { projectId: string | null; variant: string },\n\t): Promise<void> {\n\t\tconst templateId = { type: MailType.passwordlessSignIn, ...customMailOptions }\n\t\tconst template = (await this.getCustomTemplate(dbContext, templateId)) || {\n\t\t\tsubject: 'Sign in here',\n\t\t\tcontent: PasswordlessSignIn,\n\t\t\treplyTo: null,\n\t\t}\n\t\tawait this.sendMail(templateId, template, mailArguments)\n\t}\n\n\tprivate async sendMail(\n\t\ttemplateId: MailTemplateIdentifier,\n\t\ttemplate: Pick<MailTemplateData, 'subject' | 'content' | 'replyTo'>,\n\t\tvariables: Record<string, any>,\n\t) {\n\t\tconst html = await this.templateRenderer.render(template.content, variables)\n\t\tawait this.mailer.send({\n\t\t\tto: variables.email,\n\t\t\tsubject: await this.templateRenderer.render(template.subject, variables),\n\t\t\thtml,\n\t\t\tvariables,\n\t\t\ttemplate: templateId,\n\t\t\t...(template.replyTo\n\t\t\t\t? {\n\t\t\t\t\treplyTo: template.replyTo,\n\t\t\t\t}\n\t\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 = (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":";;;;;;;;;;;;;;AAWO,MAAM,WAAW;AAAA,EACvB,YACkB,QACA,kBAChB;AAFgB,SAAA,SAAA;AACA,SAAA,mBAAA;AAAA,EACf;AAAA,EAEH,MAAM,uBACL,WACA,eAQA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAM,SAAS,gBAAgB,GAAG,kBAAA;AACvD,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAM,6BACL,WACA,eACA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAM,SAAS,qBAAqB,GAAG,kBAAA;AAC5D,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAM,uBACL,WACA,eACA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAM,SAAS,eAAe,GAAG,kBAAA;AACtD,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAM,sBACL,WACA,eACA,mBACgB;AAChB,UAAM,aAAa,EAAE,MAAM,SAAS,oBAAoB,GAAG,kBAAA;AAC3D,UAAM,WAAY,MAAM,KAAK,kBAAkB,WAAW,UAAU,KAAM;AAAA,MACzE,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAEV,UAAM,KAAK,SAAS,YAAY,UAAU,aAAa;AAAA,EACxD;AAAA,EAEA,MAAc,SACb,YACA,UACA,WACC;AACD,UAAM,OAAO,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,SAAS;AAC3E,UAAM,KAAK,OAAO,KAAK;AAAA,MACtB,IAAI,UAAU;AAAA,MACd,SAAS,MAAM,KAAK,iBAAiB,OAAO,SAAS,SAAS,SAAS;AAAA,MACvE;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,GAAI,SAAS,UACV;AAAA,QACD,SAAS,SAAS;AAAA,MAAA,IAEjB,CAAA;AAAA,IAAC,CACJ;AAAA,EACF;AAAA,EAEA,MAAc,kBACb,WACA,YAC4E;AAC5E,UAAM,iBAAkB,MAAM,UAAU,aAAa,MAAM,IAAI,kBAAkB,UAAU,CAAC,KACvF,MAAM,UAAU,aAAa,MAAM,IAAI,kBAAkB,EAAE,GAAG,YAAY,WAAW,KAAA,CAAM,CAAC;AAEjG,QAAI,CAAC,gBAAgB;AACpB,aAAO;AAAA,IACR;AACA,UAAM,UAAU,eAAe,YAAY,OAAO,eAAe,OAAO,IAAI,eAAe;AAC3F,WAAO,EAAE,SAAS,SAAS,eAAe,SAAS,SAAS,eAAe,QAAA;AAAA,EAC5E;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/Layout.mustache.ts"],"sourcesContent":["// language=Mustache\nexport default (inner: string) => `\n\t<div style=\"background:#f8f8f8;padding: 50px 10px;font-family:sans-serif;line-height:25px;color:#444;\">\n\t\t<div style=\"background-color:#ffffff;max-width:600px;margin:0 auto;padding:15px 30px;border-radius:6px;border:1px solid #ddd;\">\n\t\t\t${inner}\n\t\t</div>\n\t</div>\n`\n"],"names":[],"mappings":";AACA,
|
|
1
|
+
{"version":3,"file":"Layout.mustache.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/Layout.mustache.ts"],"sourcesContent":["// language=Mustache\nexport default (inner: string) => `\n\t<div style=\"background:#f8f8f8;padding: 50px 10px;font-family:sans-serif;line-height:25px;color:#444;\">\n\t\t<div style=\"background-color:#ffffff;max-width:600px;margin:0 auto;padding:15px 30px;border-radius:6px;border:1px solid #ddd;\">\n\t\t\t${inner}\n\t\t</div>\n\t</div>\n`\n"],"names":[],"mappings":";AACA,MAAA,SAAe,CAAC,UAAkB;AAAA;AAAA;AAAA,KAG7B,KAAK;AAAA;AAAA;AAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/Layout.mustache.ts"],"sourcesContent":["// language=Mustache\nexport default (inner: string) => `\n\t<div style=\"background:#f8f8f8;padding: 50px 10px;font-family:sans-serif;line-height:25px;color:#444;\">\n\t\t<div style=\"background-color:#ffffff;max-width:600px;margin:0 auto;padding:15px 30px;border-radius:6px;border:1px solid #ddd;\">\n\t\t\t${inner}\n\t\t</div>\n\t</div>\n`\n"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"Layout.mustache.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/mailing/templates/Layout.mustache.ts"],"sourcesContent":["// language=Mustache\nexport default (inner: string) => `\n\t<div style=\"background:#f8f8f8;padding: 50px 10px;font-family:sans-serif;line-height:25px;color:#444;\">\n\t\t<div style=\"background-color:#ffffff;max-width:600px;margin:0 auto;padding:15px 30px;border-radius:6px;border:1px solid #ddd;\">\n\t\t\t${inner}\n\t\t</div>\n\t</div>\n`\n"],"names":[],"mappings":"AACA,MAAA,SAAe,CAAC,UAAkB;AAAA;AAAA;AAAA,KAG7B,KAAK;AAAA;AAAA;AAAA;"}
|
|
@@ -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\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":";;
|
|
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":";;AAEO,IAAK,6BAAAA,cAAL;AACNA,YAAA,qBAAA,IAAsB;AACtBA,YAAA,gBAAA,IAAiB;AACjBA,YAAA,eAAA,IAAgB;AAChBA,YAAA,oBAAA,IAAqB;AAJV,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;AAOL,MAAM,yBAAyB,CAAC,SAAmC;AACzE,SAAO;AAAA,IACN,uBAAuB;AAAA,IACvB,kBAAkB;AAAA,IAClB,wBAAwB;AAAA,IACxB,sBAAsB;AAAA;AAAA,EAAA,EACrB,IAAI;AACP;AAEO,MAAM,yBAAyB,CAAC,SAAmC;AACzE,SAAO;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,OAA8B;AAAA,EAAA,EAC9B,IAAI;AACP;;;;"}
|
|
@@ -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\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":"
|
|
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":"AAEO,IAAK,6BAAAA,cAAL;AACNA,YAAA,qBAAA,IAAsB;AACtBA,YAAA,gBAAA,IAAiB;AACjBA,YAAA,eAAA,IAAgB;AAChBA,YAAA,oBAAA,IAAqB;AAJV,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;AAOL,MAAM,yBAAyB,CAAC,SAAmC;AACzE,SAAO;AAAA,IACN,uBAAuB;AAAA,IACvB,kBAAkB;AAAA,IAClB,wBAAwB;AAAA,IACxB,sBAAsB;AAAA;AAAA,EAAA,EACrB,IAAI;AACP;AAEO,MAAM,yBAAyB,CAAC,SAAmC;AACzE,SAAO;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,OAA8B;AAAA,EAAA,EAC9B,IAAI;AACP;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const Database = require("@contember/database");
|
|
4
4
|
require("../../type/ApiKey.cjs");
|
|
5
|
-
const
|
|
5
|
+
const token = require("../../utils/token.cjs");
|
|
6
6
|
class ApiKeyByIdQuery extends Database.DatabaseQuery {
|
|
7
7
|
constructor(apiKeyId) {
|
|
8
8
|
super();
|
|
@@ -16,21 +16,17 @@ class ApiKeyByIdQuery extends Database.DatabaseQuery {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
class ApiKeyByTokenQuery extends Database.DatabaseQuery {
|
|
19
|
-
constructor(
|
|
19
|
+
constructor(token2) {
|
|
20
20
|
super();
|
|
21
|
-
this.token =
|
|
21
|
+
this.token = token2;
|
|
22
22
|
}
|
|
23
23
|
async fetch({ db }) {
|
|
24
|
-
const tokenHash =
|
|
24
|
+
const tokenHash = token.computeTokenHash(this.token);
|
|
25
25
|
const rows = await apiKeyBaseQuery.where({ token_hash: tokenHash }).getResult(db);
|
|
26
26
|
return this.fetchOneOrNull(rows);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
const apiKeyBaseQuery = Database.SelectBuilder.create().select(["api_key", "id"]).select(["api_key", "type"]).select(["api_key", "identity_id"]).select(["api_key", "disabled_at"]).select(["api_key", "expires_at"]).select(["identity", "roles"]).select(["api_key", "expiration"]).select(["person", "id"], "person_id").from("api_key").join(
|
|
30
|
-
"identity",
|
|
31
|
-
"identity",
|
|
32
|
-
(joinClause) => joinClause.compareColumns(["api_key", "identity_id"], Database.Operator.eq, ["identity", "id"])
|
|
33
|
-
).leftJoin(
|
|
29
|
+
const apiKeyBaseQuery = Database.SelectBuilder.create().select(["api_key", "id"]).select(["api_key", "type"]).select(["api_key", "identity_id"]).select(["api_key", "disabled_at"]).select(["api_key", "expires_at"]).select(["identity", "roles"]).select(["api_key", "expiration"]).select(["person", "id"], "person_id").from("api_key").join("identity", "identity", (joinClause) => joinClause.compareColumns(["api_key", "identity_id"], Database.Operator.eq, ["identity", "id"])).leftJoin(
|
|
34
30
|
"person",
|
|
35
31
|
"person",
|
|
36
32
|
(on) => on.compareColumns(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause
|
|
1
|
+
{"version":3,"file":"ApiKeyQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause => joinClause.compareColumns(['api_key', 'identity_id'], Operator.eq, ['identity', 'id']))\n\t.leftJoin(\n\t\t'person',\n\t\t'person',\n\t\ton =>\n\t\t\ton.compareColumns(\n\t\t\t\t['person', 'identity_id'],\n\t\t\t\tOperator.eq,\n\t\t\t\t['identity', 'id'],\n\t\t\t),\n\t)\n"],"names":["DatabaseQuery","Operator","token","computeTokenHash","SelectBuilder"],"mappings":";;;;;AAIO,MAAM,wBAAwBA,SAAAA,cAAgC;AAAA,EACpE,YAA6B,UAAkB;AAC9C,UAAA;AAD4B,SAAA,WAAA;AAAA,EAE7B;AAAA,EAEA,MAAM,MAAM,EAAE,MAAoD;AACjE,UAAM,OAAO,MAAM,gBACjB;AAAA,MACA,CAAA,UAAS,MAAM,QAAQ,CAAC,WAAW,IAAI,GAAGC,SAAAA,SAAS,IAAI,KAAK,QAAQ;AAAA,IAAA,EAEpE,UAAU,EAAE;AAEd,WAAO,KAAK,eAAe,IAAI;AAAA,EAChC;AACD;AAEO,MAAM,2BAA2BD,SAAAA,cAAgC;AAAA,EACvE,YAA6BE,QAAe;AAC3C,UAAA;AAD4B,SAAA,QAAAA;AAAA,EAE7B;AAAA,EAEA,MAAM,MAAM,EAAE,MAAoD;AACjE,UAAM,YAAYC,MAAAA,iBAAiB,KAAK,KAAK;AAC7C,UAAM,OAAO,MAAM,gBACjB,MAAM,EAAE,YAAY,UAAA,CAAW,EAC/B,UAAU,EAAE;AAEd,WAAO,KAAK,eAAe,IAAI;AAAA,EAChC;AACD;AAaA,MAAM,kBAAkBC,SAAAA,cAAc,OAAA,EACpC,OAAO,CAAC,WAAW,IAAI,CAAC,EACxB,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,UAAU,IAAI,GAAG,WAAW,EACpC,KAAK,SAAS,EACd,KAAK,YAAY,YAAY,CAAA,eAAc,WAAW,eAAe,CAAC,WAAW,aAAa,GAAGH,SAAAA,SAAS,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,EACjI;AAAA,EACA;AAAA,EACA;AAAA,EACA,QACC,GAAG;AAAA,IACF,CAAC,UAAU,aAAa;AAAA,IACxBA,SAAAA,SAAS;AAAA,IACT,CAAC,YAAY,IAAI;AAAA,EAAA;AAEpB;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectBuilder, Operator, DatabaseQuery } from "@contember/database";
|
|
2
2
|
import "../../type/ApiKey.js";
|
|
3
|
-
import { computeTokenHash } from "../../utils/
|
|
3
|
+
import { computeTokenHash } from "../../utils/token.js";
|
|
4
4
|
class ApiKeyByIdQuery extends DatabaseQuery {
|
|
5
5
|
constructor(apiKeyId) {
|
|
6
6
|
super();
|
|
@@ -24,11 +24,7 @@ class ApiKeyByTokenQuery extends DatabaseQuery {
|
|
|
24
24
|
return this.fetchOneOrNull(rows);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
const apiKeyBaseQuery = SelectBuilder.create().select(["api_key", "id"]).select(["api_key", "type"]).select(["api_key", "identity_id"]).select(["api_key", "disabled_at"]).select(["api_key", "expires_at"]).select(["identity", "roles"]).select(["api_key", "expiration"]).select(["person", "id"], "person_id").from("api_key").join(
|
|
28
|
-
"identity",
|
|
29
|
-
"identity",
|
|
30
|
-
(joinClause) => joinClause.compareColumns(["api_key", "identity_id"], Operator.eq, ["identity", "id"])
|
|
31
|
-
).leftJoin(
|
|
27
|
+
const apiKeyBaseQuery = SelectBuilder.create().select(["api_key", "id"]).select(["api_key", "type"]).select(["api_key", "identity_id"]).select(["api_key", "disabled_at"]).select(["api_key", "expires_at"]).select(["identity", "roles"]).select(["api_key", "expiration"]).select(["person", "id"], "person_id").from("api_key").join("identity", "identity", (joinClause) => joinClause.compareColumns(["api_key", "identity_id"], Operator.eq, ["identity", "id"])).leftJoin(
|
|
32
28
|
"person",
|
|
33
29
|
"person",
|
|
34
30
|
(on) => on.compareColumns(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause
|
|
1
|
+
{"version":3,"file":"ApiKeyQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause => joinClause.compareColumns(['api_key', 'identity_id'], Operator.eq, ['identity', 'id']))\n\t.leftJoin(\n\t\t'person',\n\t\t'person',\n\t\ton =>\n\t\t\ton.compareColumns(\n\t\t\t\t['person', 'identity_id'],\n\t\t\t\tOperator.eq,\n\t\t\t\t['identity', 'id'],\n\t\t\t),\n\t)\n"],"names":[],"mappings":";;;AAIO,MAAM,wBAAwB,cAAgC;AAAA,EACpE,YAA6B,UAAkB;AAC9C,UAAA;AAD4B,SAAA,WAAA;AAAA,EAE7B;AAAA,EAEA,MAAM,MAAM,EAAE,MAAoD;AACjE,UAAM,OAAO,MAAM,gBACjB;AAAA,MACA,CAAA,UAAS,MAAM,QAAQ,CAAC,WAAW,IAAI,GAAG,SAAS,IAAI,KAAK,QAAQ;AAAA,IAAA,EAEpE,UAAU,EAAE;AAEd,WAAO,KAAK,eAAe,IAAI;AAAA,EAChC;AACD;AAEO,MAAM,2BAA2B,cAAgC;AAAA,EACvE,YAA6B,OAAe;AAC3C,UAAA;AAD4B,SAAA,QAAA;AAAA,EAE7B;AAAA,EAEA,MAAM,MAAM,EAAE,MAAoD;AACjE,UAAM,YAAY,iBAAiB,KAAK,KAAK;AAC7C,UAAM,OAAO,MAAM,gBACjB,MAAM,EAAE,YAAY,UAAA,CAAW,EAC/B,UAAU,EAAE;AAEd,WAAO,KAAK,eAAe,IAAI;AAAA,EAChC;AACD;AAaA,MAAM,kBAAkB,cAAc,OAAA,EACpC,OAAO,CAAC,WAAW,IAAI,CAAC,EACxB,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,UAAU,IAAI,GAAG,WAAW,EACpC,KAAK,SAAS,EACd,KAAK,YAAY,YAAY,CAAA,eAAc,WAAW,eAAe,CAAC,WAAW,aAAa,GAAG,SAAS,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,EACjI;AAAA,EACA;AAAA,EACA;AAAA,EACA,QACC,GAAG;AAAA,IACF,CAAC,UAAU,aAAa;AAAA,IACxB,SAAS;AAAA,IACT,CAAC,YAAY,IAAI;AAAA,EAAA;AAEpB;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
class NextLoginAttemptQuery extends Database.DatabaseQuery {
|
|
5
|
+
constructor(email) {
|
|
6
|
+
super();
|
|
7
|
+
this.email = email;
|
|
8
|
+
}
|
|
9
|
+
async fetch({ db }) {
|
|
10
|
+
const qb = Database.SelectBuilder.create().with("cfg", (it) => it.from("config")).with("last_successful_reset", (it) => it.select(new Database.Literal("MAX(person_auth_log.created_at)"), "created_at").from("person_auth_log").join("person", "person", (it2) => it2.columnsEq(["person", "id"], ["person_auth_log", "person_id"])).where({
|
|
11
|
+
type: "password_reset",
|
|
12
|
+
success: true,
|
|
13
|
+
email: this.email
|
|
14
|
+
})).with("window_start", (it) => it.select(
|
|
15
|
+
new Database.Literal(`
|
|
16
|
+
GREATEST(
|
|
17
|
+
COALESCE(last_successful_reset.created_at, NOW() - cfg.login_attempt_window),
|
|
18
|
+
NOW() - cfg.login_attempt_window
|
|
19
|
+
)`),
|
|
20
|
+
"start_time"
|
|
21
|
+
).from("cfg").from("last_successful_reset")).with("failed_logins", (it) => it.select(new Database.Literal("COUNT(*)"), "fails").select(new Database.Literal("MAX(person_auth_log.created_at)"), "last_fail").from("person_auth_log").from("window_start").where({
|
|
22
|
+
person_input_identifier: this.email,
|
|
23
|
+
type: "login",
|
|
24
|
+
success: false
|
|
25
|
+
}).where(new Database.Literal("person_auth_log.created_at >= window_start.start_time"))).select(
|
|
26
|
+
new Database.Literal(`
|
|
27
|
+
CASE WHEN failed_logins.fails = 0
|
|
28
|
+
THEN NOW()
|
|
29
|
+
ELSE LEAST(
|
|
30
|
+
failed_logins.last_fail + cfg.login_max_backoff,
|
|
31
|
+
failed_logins.last_fail + cfg.login_base_backoff * (POWER(2, failed_logins.fails - 1))
|
|
32
|
+
) END`),
|
|
33
|
+
"next_allowed_login"
|
|
34
|
+
).from("failed_logins").from("cfg");
|
|
35
|
+
const result = await qb.getResult(db);
|
|
36
|
+
if (result.length === 0) {
|
|
37
|
+
return /* @__PURE__ */ new Date();
|
|
38
|
+
}
|
|
39
|
+
return result[0].next_allowed_login;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.NextLoginAttemptQuery = NextLoginAttemptQuery;
|
|
43
|
+
//# sourceMappingURL=NextLoginAttemptQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextLoginAttemptQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/authLog/NextLoginAttemptQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, SelectBuilder } from '@contember/database'\n\nexport class NextLoginAttemptQuery extends DatabaseQuery<Date> {\n\tconstructor(\n\t\tprivate readonly email: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Date> {\n\t\tconst qb = SelectBuilder.create()\n\t\t\t.with('cfg', it => it.from('config'))\n\t\t\t.with('last_successful_reset', it =>\n\t\t\t\tit\n\t\t\t\t\t.select(new Literal('MAX(person_auth_log.created_at)'), 'created_at')\n\t\t\t\t\t.from('person_auth_log')\n\t\t\t\t\t.join('person', 'person', it => it.columnsEq(['person', 'id'], ['person_auth_log', 'person_id']))\n\t\t\t\t\t.where({\n\t\t\t\t\t\ttype: 'password_reset',\n\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\temail: this.email,\n\t\t\t\t\t}))\n\t\t\t.with('window_start', it =>\n\t\t\t\tit\n\t\t\t\t\t.select(\n\t\t\t\t\t\tnew Literal(`\n\t\t\t\t\tGREATEST(\n\t\t\t\t\t\tCOALESCE(last_successful_reset.created_at, NOW() - cfg.login_attempt_window), \n\t\t\t\t\t\tNOW() - cfg.login_attempt_window\n\t\t\t\t\t)`),\n\t\t\t\t\t\t'start_time',\n\t\t\t\t\t)\n\t\t\t\t\t.from('cfg')\n\t\t\t\t\t.from('last_successful_reset'))\n\t\t\t.with('failed_logins', it =>\n\t\t\t\tit\n\t\t\t\t\t.select(new Literal('COUNT(*)'), 'fails')\n\t\t\t\t\t.select(new Literal('MAX(person_auth_log.created_at)'), 'last_fail')\n\t\t\t\t\t.from('person_auth_log')\n\t\t\t\t\t.from('window_start')\n\t\t\t\t\t.where({\n\t\t\t\t\t\tperson_input_identifier: this.email,\n\t\t\t\t\t\ttype: 'login',\n\t\t\t\t\t\tsuccess: false,\n\t\t\t\t\t})\n\t\t\t\t\t.where(new Literal('person_auth_log.created_at >= window_start.start_time')))\n\t\t\t.select(\n\t\t\t\tnew Literal(`\n\t\t\t\tCASE WHEN failed_logins.fails = 0 \n\t\t\t\tTHEN NOW() \n\t\t\t\tELSE LEAST(\n\t\t\t\t\tfailed_logins.last_fail + cfg.login_max_backoff, \n\t\t\t\t\tfailed_logins.last_fail + cfg.login_base_backoff * (POWER(2, failed_logins.fails - 1))\n\t\t\t\t) END`),\n\t\t\t\t'next_allowed_login',\n\t\t\t)\n\t\t\t.from('failed_logins')\n\t\t\t.from('cfg')\n\n\t\tconst result = await qb.getResult(db)\n\t\tif (result.length === 0) {\n\t\t\treturn new Date()\n\t\t}\n\t\treturn result[0].next_allowed_login\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder","Literal","it"],"mappings":";;;AAEO,MAAM,8BAA8BA,SAAAA,cAAoB;AAAA,EAC9D,YACkB,OAChB;AACD,UAAA;AAFiB,SAAA,QAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,EAAE,MAAwC;AACrD,UAAM,KAAKC,SAAAA,cAAc,OAAA,EACvB,KAAK,OAAO,QAAM,GAAG,KAAK,QAAQ,CAAC,EACnC,KAAK,yBAAyB,CAAA,OAC9B,GACE,OAAO,IAAIC,iBAAQ,iCAAiC,GAAG,YAAY,EACnE,KAAK,iBAAiB,EACtB,KAAK,UAAU,UAAU,CAAAC,QAAMA,IAAG,UAAU,CAAC,UAAU,IAAI,GAAG,CAAC,mBAAmB,WAAW,CAAC,CAAC,EAC/F,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO,KAAK;AAAA,IAAA,CACZ,CAAC,EACH,KAAK,gBAAgB,QACrB,GACE;AAAA,MACA,IAAID,iBAAQ;AAAA;AAAA;AAAA;AAAA,OAIX;AAAA,MACD;AAAA,IAAA,EAEA,KAAK,KAAK,EACV,KAAK,uBAAuB,CAAC,EAC/B,KAAK,iBAAiB,CAAA,OACtB,GACE,OAAO,IAAIA,SAAAA,QAAQ,UAAU,GAAG,OAAO,EACvC,OAAO,IAAIA,SAAAA,QAAQ,iCAAiC,GAAG,WAAW,EAClE,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,MAAM;AAAA,MACN,yBAAyB,KAAK;AAAA,MAC9B,MAAM;AAAA,MACN,SAAS;AAAA,IAAA,CACT,EACA,MAAM,IAAIA,SAAAA,QAAQ,uDAAuD,CAAC,CAAC,EAC7E;AAAA,MACA,IAAIA,iBAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAMN;AAAA,MACN;AAAA,IAAA,EAEA,KAAK,eAAe,EACpB,KAAK,KAAK;AAEZ,UAAM,SAAS,MAAM,GAAG,UAAU,EAAE;AACpC,QAAI,OAAO,WAAW,GAAG;AACxB,iCAAW,KAAA;AAAA,IACZ;AACA,WAAO,OAAO,CAAC,EAAE;AAAA,EAClB;AACD;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DatabaseQuery, SelectBuilder, Literal } from "@contember/database";
|
|
2
|
+
class NextLoginAttemptQuery extends DatabaseQuery {
|
|
3
|
+
constructor(email) {
|
|
4
|
+
super();
|
|
5
|
+
this.email = email;
|
|
6
|
+
}
|
|
7
|
+
async fetch({ db }) {
|
|
8
|
+
const qb = SelectBuilder.create().with("cfg", (it) => it.from("config")).with("last_successful_reset", (it) => it.select(new Literal("MAX(person_auth_log.created_at)"), "created_at").from("person_auth_log").join("person", "person", (it2) => it2.columnsEq(["person", "id"], ["person_auth_log", "person_id"])).where({
|
|
9
|
+
type: "password_reset",
|
|
10
|
+
success: true,
|
|
11
|
+
email: this.email
|
|
12
|
+
})).with("window_start", (it) => it.select(
|
|
13
|
+
new Literal(`
|
|
14
|
+
GREATEST(
|
|
15
|
+
COALESCE(last_successful_reset.created_at, NOW() - cfg.login_attempt_window),
|
|
16
|
+
NOW() - cfg.login_attempt_window
|
|
17
|
+
)`),
|
|
18
|
+
"start_time"
|
|
19
|
+
).from("cfg").from("last_successful_reset")).with("failed_logins", (it) => it.select(new Literal("COUNT(*)"), "fails").select(new Literal("MAX(person_auth_log.created_at)"), "last_fail").from("person_auth_log").from("window_start").where({
|
|
20
|
+
person_input_identifier: this.email,
|
|
21
|
+
type: "login",
|
|
22
|
+
success: false
|
|
23
|
+
}).where(new Literal("person_auth_log.created_at >= window_start.start_time"))).select(
|
|
24
|
+
new Literal(`
|
|
25
|
+
CASE WHEN failed_logins.fails = 0
|
|
26
|
+
THEN NOW()
|
|
27
|
+
ELSE LEAST(
|
|
28
|
+
failed_logins.last_fail + cfg.login_max_backoff,
|
|
29
|
+
failed_logins.last_fail + cfg.login_base_backoff * (POWER(2, failed_logins.fails - 1))
|
|
30
|
+
) END`),
|
|
31
|
+
"next_allowed_login"
|
|
32
|
+
).from("failed_logins").from("cfg");
|
|
33
|
+
const result = await qb.getResult(db);
|
|
34
|
+
if (result.length === 0) {
|
|
35
|
+
return /* @__PURE__ */ new Date();
|
|
36
|
+
}
|
|
37
|
+
return result[0].next_allowed_login;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
NextLoginAttemptQuery
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=NextLoginAttemptQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextLoginAttemptQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/authLog/NextLoginAttemptQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, SelectBuilder } from '@contember/database'\n\nexport class NextLoginAttemptQuery extends DatabaseQuery<Date> {\n\tconstructor(\n\t\tprivate readonly email: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Date> {\n\t\tconst qb = SelectBuilder.create()\n\t\t\t.with('cfg', it => it.from('config'))\n\t\t\t.with('last_successful_reset', it =>\n\t\t\t\tit\n\t\t\t\t\t.select(new Literal('MAX(person_auth_log.created_at)'), 'created_at')\n\t\t\t\t\t.from('person_auth_log')\n\t\t\t\t\t.join('person', 'person', it => it.columnsEq(['person', 'id'], ['person_auth_log', 'person_id']))\n\t\t\t\t\t.where({\n\t\t\t\t\t\ttype: 'password_reset',\n\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\temail: this.email,\n\t\t\t\t\t}))\n\t\t\t.with('window_start', it =>\n\t\t\t\tit\n\t\t\t\t\t.select(\n\t\t\t\t\t\tnew Literal(`\n\t\t\t\t\tGREATEST(\n\t\t\t\t\t\tCOALESCE(last_successful_reset.created_at, NOW() - cfg.login_attempt_window), \n\t\t\t\t\t\tNOW() - cfg.login_attempt_window\n\t\t\t\t\t)`),\n\t\t\t\t\t\t'start_time',\n\t\t\t\t\t)\n\t\t\t\t\t.from('cfg')\n\t\t\t\t\t.from('last_successful_reset'))\n\t\t\t.with('failed_logins', it =>\n\t\t\t\tit\n\t\t\t\t\t.select(new Literal('COUNT(*)'), 'fails')\n\t\t\t\t\t.select(new Literal('MAX(person_auth_log.created_at)'), 'last_fail')\n\t\t\t\t\t.from('person_auth_log')\n\t\t\t\t\t.from('window_start')\n\t\t\t\t\t.where({\n\t\t\t\t\t\tperson_input_identifier: this.email,\n\t\t\t\t\t\ttype: 'login',\n\t\t\t\t\t\tsuccess: false,\n\t\t\t\t\t})\n\t\t\t\t\t.where(new Literal('person_auth_log.created_at >= window_start.start_time')))\n\t\t\t.select(\n\t\t\t\tnew Literal(`\n\t\t\t\tCASE WHEN failed_logins.fails = 0 \n\t\t\t\tTHEN NOW() \n\t\t\t\tELSE LEAST(\n\t\t\t\t\tfailed_logins.last_fail + cfg.login_max_backoff, \n\t\t\t\t\tfailed_logins.last_fail + cfg.login_base_backoff * (POWER(2, failed_logins.fails - 1))\n\t\t\t\t) END`),\n\t\t\t\t'next_allowed_login',\n\t\t\t)\n\t\t\t.from('failed_logins')\n\t\t\t.from('cfg')\n\n\t\tconst result = await qb.getResult(db)\n\t\tif (result.length === 0) {\n\t\t\treturn new Date()\n\t\t}\n\t\treturn result[0].next_allowed_login\n\t}\n}\n"],"names":["it"],"mappings":";AAEO,MAAM,8BAA8B,cAAoB;AAAA,EAC9D,YACkB,OAChB;AACD,UAAA;AAFiB,SAAA,QAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,EAAE,MAAwC;AACrD,UAAM,KAAK,cAAc,OAAA,EACvB,KAAK,OAAO,QAAM,GAAG,KAAK,QAAQ,CAAC,EACnC,KAAK,yBAAyB,CAAA,OAC9B,GACE,OAAO,IAAI,QAAQ,iCAAiC,GAAG,YAAY,EACnE,KAAK,iBAAiB,EACtB,KAAK,UAAU,UAAU,CAAAA,QAAMA,IAAG,UAAU,CAAC,UAAU,IAAI,GAAG,CAAC,mBAAmB,WAAW,CAAC,CAAC,EAC/F,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO,KAAK;AAAA,IAAA,CACZ,CAAC,EACH,KAAK,gBAAgB,QACrB,GACE;AAAA,MACA,IAAI,QAAQ;AAAA;AAAA;AAAA;AAAA,OAIX;AAAA,MACD;AAAA,IAAA,EAEA,KAAK,KAAK,EACV,KAAK,uBAAuB,CAAC,EAC/B,KAAK,iBAAiB,CAAA,OACtB,GACE,OAAO,IAAI,QAAQ,UAAU,GAAG,OAAO,EACvC,OAAO,IAAI,QAAQ,iCAAiC,GAAG,WAAW,EAClE,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,MAAM;AAAA,MACN,yBAAyB,KAAK;AAAA,MAC9B,MAAM;AAAA,MACN,SAAS;AAAA,IAAA,CACT,EACA,MAAM,IAAI,QAAQ,uDAAuD,CAAC,CAAC,EAC7E;AAAA,MACA,IAAI,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAMN;AAAA,MACN;AAAA,IAAA,EAEA,KAAK,eAAe,EACpB,KAAK,KAAK;AAEZ,UAAM,SAAS,MAAM,GAAG,UAAU,EAAE;AACpC,QAAI,OAAO,WAAW,GAAG;AACxB,iCAAW,KAAA;AAAA,IACZ;AACA,WAAO,OAAO,CAAC,EAAE;AAAA,EAClB;AACD;"}
|