@contember/engine-tenant-api 2.0.0-alpha.9 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/index.cjs +18 -6
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +20 -8
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/TenantContainer.cjs +7 -1
- package/dist/development/src/TenantContainer.cjs.map +1 -1
- package/dist/development/src/TenantContainer.js +7 -1
- package/dist/development/src/TenantContainer.js.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.js.map +1 -1
- package/dist/development/src/exceptions.cjs.map +1 -1
- package/dist/development/src/exceptions.js.map +1 -1
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.cjs +31 -0
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -0
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.js +32 -0
- package/dist/development/src/migrations/2024-08-26-120000-passwordless.js.map +1 -0
- package/dist/development/src/migrations/runner.cjs +3 -1
- package/dist/development/src/migrations/runner.cjs.map +1 -1
- package/dist/development/src/migrations/runner.js +3 -1
- package/dist/development/src/migrations/runner.js.map +1 -1
- package/dist/development/src/migrations/snapshot.cjs +33 -5
- package/dist/development/src/migrations/snapshot.cjs.map +1 -1
- package/dist/development/src/migrations/snapshot.js +33 -5
- package/dist/development/src/migrations/snapshot.js.map +1 -1
- package/dist/development/src/migrations/tenantCredentials.cjs.map +1 -1
- package/dist/development/src/migrations/tenantCredentials.js.map +1 -1
- package/dist/development/src/model/authorization/AclSchemaAccessNodeFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/AclSchemaAccessNodeFactory.js.map +1 -1
- package/dist/development/src/model/authorization/DirectPermissionsAccessNode.cjs.map +1 -1
- package/dist/development/src/model/authorization/DirectPermissionsAccessNode.js.map +1 -1
- package/dist/development/src/model/authorization/Identity.cjs.map +1 -1
- package/dist/development/src/model/authorization/Identity.js.map +1 -1
- package/dist/development/src/model/authorization/IdentityFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/IdentityFactory.js.map +1 -1
- package/dist/development/src/model/authorization/IdentityScope.cjs.map +1 -1
- package/dist/development/src/model/authorization/IdentityScope.js.map +1 -1
- package/dist/development/src/model/authorization/MembershipMatcher.cjs.map +1 -1
- package/dist/development/src/model/authorization/MembershipMatcher.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionActions.cjs +5 -0
- package/dist/development/src/model/authorization/PermissionActions.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionActions.js +5 -0
- package/dist/development/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionContext.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionContext.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.cjs +5 -0
- package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.js +5 -0
- package/dist/development/src/model/authorization/PermissionsFactory.js.map +1 -1
- package/dist/development/src/model/authorization/ProjectScope.cjs.map +1 -1
- package/dist/development/src/model/authorization/ProjectScope.js.map +1 -1
- package/dist/development/src/model/authorization/ProjectScopeFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/ProjectScopeFactory.js.map +1 -1
- package/dist/development/src/model/commands/CommandBus.cjs.map +1 -1
- package/dist/development/src/model/commands/CommandBus.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableIdentityApiKeysCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableIdentityApiKeysCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableOneOffApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/DisableOneOffApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -0
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -0
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -0
- package/dist/development/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/DisableIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/DisableIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/EnableIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/EnableIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/AddMailTemplateCommand.js.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/RemoveMailTemplateCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/mailTemplate/RemoveMailTemplateCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/AddProjectMemberCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/AddProjectMemberCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMemberCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMemberCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/development/src/model/commands/otp/ConfirmOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/otp/ConfirmOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/otp/DisableOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/otp/DisableOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/otp/PrepareOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/otp/PrepareOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/ChangePasswordCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/ChangePasswordCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/ChangeProfileCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/ChangeProfileCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.cjs +2 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.js +2 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/DisablePersonCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.cjs +18 -0
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js +18 -0
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs +20 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js +20 -0
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs +33 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js +33 -0
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs +19 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js +19 -0
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs +19 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js +19 -0
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs +28 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js +28 -0
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs +28 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js +28 -0
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -0
- package/dist/development/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/CreateProjectCommand.js.map +1 -1
- package/dist/development/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
- package/dist/development/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
- package/dist/development/src/model/consts/expirations.cjs +7 -0
- package/dist/development/src/model/consts/expirations.cjs.map +1 -0
- package/dist/development/src/model/consts/expirations.js +7 -0
- package/dist/development/src/model/consts/expirations.js.map +1 -0
- package/dist/development/src/model/dtos/Password.cjs.map +1 -1
- package/dist/development/src/model/dtos/Password.js.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.cjs +10 -1
- package/dist/development/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.js +10 -1
- package/dist/development/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/development/src/model/mailing/templates/ExistingUserInvited.mustache.cjs.map +1 -1
- package/dist/development/src/model/mailing/templates/ExistingUserInvited.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/templates/NewUserInvited.mustache.cjs.map +1 -1
- package/dist/development/src/model/mailing/templates/NewUserInvited.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/templates/PasswordReset.mustache.cjs.map +1 -1
- package/dist/development/src/model/mailing/templates/PasswordReset.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs +17 -0
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs.map +1 -0
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.js +18 -0
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -0
- package/dist/development/src/model/mailing/type.cjs +9 -3
- package/dist/development/src/model/mailing/type.cjs.map +1 -1
- package/dist/development/src/model/mailing/type.js +9 -3
- package/dist/development/src/model/mailing/type.js.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs +21 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js +21 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js.map +1 -0
- package/dist/development/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembershipByIdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectRolesByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectRolesByIdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectSlugSpecification.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdPQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdPQuery.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdentityBatchQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonByIdentityBatchQuery.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonQuery.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs +29 -0
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js +29 -0
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js.map +1 -0
- package/dist/development/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectSecretsQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectUpdateTimestampQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectUpdateTimestampQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsQuery.js.map +1 -1
- package/dist/development/src/model/service/ConfigurationManager.cjs +27 -0
- package/dist/development/src/model/service/ConfigurationManager.cjs.map +1 -0
- package/dist/development/src/model/service/ConfigurationManager.js +27 -0
- package/dist/development/src/model/service/ConfigurationManager.js.map +1 -0
- package/dist/development/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/development/src/model/service/EmailValidator.js.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.cjs +1 -1
- package/dist/development/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.js +1 -1
- package/dist/development/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/development/src/model/service/InviteManager.cjs +7 -7
- package/dist/development/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/development/src/model/service/InviteManager.js +6 -6
- package/dist/development/src/model/service/InviteManager.js.map +1 -1
- package/dist/development/src/model/service/MailTemplateManager.cjs.map +1 -1
- package/dist/development/src/model/service/MailTemplateManager.js.map +1 -1
- package/dist/development/src/model/service/MembershipValidator.cjs.map +1 -1
- package/dist/development/src/model/service/MembershipValidator.js.map +1 -1
- package/dist/development/src/model/service/OtpAuthenticator.cjs.map +1 -1
- package/dist/development/src/model/service/OtpAuthenticator.js.map +1 -1
- package/dist/development/src/model/service/OtpManager.cjs.map +1 -1
- package/dist/development/src/model/service/OtpManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.cjs +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.js +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.cjs +7 -15
- package/dist/development/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.js +7 -15
- package/dist/development/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs +135 -0
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs.map +1 -0
- package/dist/development/src/model/service/PasswordlessSignInManager.js +135 -0
- package/dist/development/src/model/service/PasswordlessSignInManager.js.map +1 -0
- package/dist/development/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/development/src/model/service/PersonManager.cjs +7 -0
- package/dist/development/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonManager.js +7 -0
- package/dist/development/src/model/service/PersonManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectManager.cjs +2 -2
- package/dist/development/src/model/service/ProjectManager.cjs.map +1 -1
- package/dist/development/src/model/service/ProjectManager.js +2 -2
- package/dist/development/src/model/service/ProjectManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/development/src/model/service/RolesManager.cjs +1 -1
- package/dist/development/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/development/src/model/service/RolesManager.js +1 -1
- package/dist/development/src/model/service/RolesManager.js.map +1 -1
- package/dist/development/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/development/src/model/service/SecretsManager.js.map +1 -1
- package/dist/development/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignInManager.js.map +1 -1
- package/dist/development/src/model/service/SignUpManager.cjs +1 -1
- package/dist/development/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignUpManager.js +1 -1
- package/dist/development/src/model/service/SignUpManager.js.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.js.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyService.cjs.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyService.js.map +1 -1
- package/dist/development/src/model/service/helpers/getPreferredProject.cjs +13 -0
- package/dist/development/src/model/service/helpers/getPreferredProject.cjs.map +1 -0
- package/dist/development/src/model/service/helpers/getPreferredProject.js +13 -0
- package/dist/development/src/model/service/helpers/getPreferredProject.js.map +1 -0
- package/dist/development/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPResponseError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPResponseError.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPValidationError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPValidationError.js.map +1 -1
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
- package/dist/development/src/model/service/idp/InvalidIDPConfigurationError.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.cjs +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.js +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.cjs +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.js +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs +9 -5
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js +9 -5
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs +9 -3
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js +9 -3
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs +6 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.js +6 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/helpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/helpers.js.map +1 -1
- package/dist/development/src/model/service/membershipUtils.cjs.map +1 -1
- package/dist/development/src/model/service/membershipUtils.js.map +1 -1
- package/dist/development/src/model/type/ApiKey.cjs.map +1 -1
- package/dist/development/src/model/type/ApiKey.js.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/development/src/model/utils/Response.cjs.map +1 -1
- package/dist/development/src/model/utils/Response.js.map +1 -1
- package/dist/development/src/model/utils/password.cjs.map +1 -1
- package/dist/development/src/model/utils/password.js.map +1 -1
- package/dist/development/src/model/utils/tokenUtils.cjs +39 -0
- package/dist/development/src/model/utils/tokenUtils.cjs.map +1 -1
- package/dist/development/src/model/utils/tokenUtils.js +40 -1
- package/dist/development/src/model/utils/tokenUtils.js.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.cjs +8 -1
- package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.js +8 -1
- package/dist/development/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/development/src/resolvers/errorUtils.cjs.map +1 -1
- package/dist/development/src/resolvers/errorUtils.js.map +1 -1
- package/dist/development/src/resolvers/membershipUtils.cjs.map +1 -1
- package/dist/development/src/resolvers/membershipUtils.js.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +41 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +41 -0
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs +4 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js +4 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +83 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js +83 -0
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +52 -0
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +52 -0
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs +34 -0
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js +34 -0
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -0
- package/dist/development/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/MeQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/MeQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs +1 -0
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js +1 -0
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/development/src/schema/tenant.graphql.cjs +162 -10
- package/dist/development/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/development/src/schema/tenant.graphql.js +162 -10
- package/dist/development/src/schema/tenant.graphql.js.map +1 -1
- package/dist/development/src/utils/Mailer.cjs.map +1 -1
- package/dist/development/src/utils/Mailer.js.map +1 -1
- package/dist/development/src/utils/TemplateRenderer.cjs.map +1 -1
- package/dist/development/src/utils/TemplateRenderer.js.map +1 -1
- package/dist/development/src/utils/array.cjs.map +1 -1
- package/dist/development/src/utils/array.js.map +1 -1
- package/dist/development/src/utils/batchQuery.cjs.map +1 -1
- package/dist/development/src/utils/batchQuery.js.map +1 -1
- package/dist/production/index.cjs +18 -6
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +20 -8
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/TenantContainer.cjs +7 -1
- package/dist/production/src/TenantContainer.cjs.map +1 -1
- package/dist/production/src/TenantContainer.js +7 -1
- package/dist/production/src/TenantContainer.js.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.js.map +1 -1
- package/dist/production/src/exceptions.cjs.map +1 -1
- package/dist/production/src/exceptions.js.map +1 -1
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.cjs +31 -0
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.cjs.map +1 -0
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.js +32 -0
- package/dist/production/src/migrations/2024-08-26-120000-passwordless.js.map +1 -0
- package/dist/production/src/migrations/runner.cjs +3 -1
- package/dist/production/src/migrations/runner.cjs.map +1 -1
- package/dist/production/src/migrations/runner.js +3 -1
- package/dist/production/src/migrations/runner.js.map +1 -1
- package/dist/production/src/migrations/snapshot.cjs +33 -5
- package/dist/production/src/migrations/snapshot.cjs.map +1 -1
- package/dist/production/src/migrations/snapshot.js +33 -5
- package/dist/production/src/migrations/snapshot.js.map +1 -1
- package/dist/production/src/migrations/tenantCredentials.cjs.map +1 -1
- package/dist/production/src/migrations/tenantCredentials.js.map +1 -1
- package/dist/production/src/model/authorization/AclSchemaAccessNodeFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/AclSchemaAccessNodeFactory.js.map +1 -1
- package/dist/production/src/model/authorization/DirectPermissionsAccessNode.cjs.map +1 -1
- package/dist/production/src/model/authorization/DirectPermissionsAccessNode.js.map +1 -1
- package/dist/production/src/model/authorization/Identity.cjs.map +1 -1
- package/dist/production/src/model/authorization/Identity.js.map +1 -1
- package/dist/production/src/model/authorization/IdentityFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/IdentityFactory.js.map +1 -1
- package/dist/production/src/model/authorization/IdentityScope.cjs.map +1 -1
- package/dist/production/src/model/authorization/IdentityScope.js.map +1 -1
- package/dist/production/src/model/authorization/MembershipMatcher.cjs.map +1 -1
- package/dist/production/src/model/authorization/MembershipMatcher.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionActions.cjs +5 -0
- package/dist/production/src/model/authorization/PermissionActions.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionActions.js +5 -0
- package/dist/production/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionContext.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionContext.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.cjs +5 -0
- package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.js +5 -0
- package/dist/production/src/model/authorization/PermissionsFactory.js.map +1 -1
- package/dist/production/src/model/authorization/ProjectScope.cjs.map +1 -1
- package/dist/production/src/model/authorization/ProjectScope.js.map +1 -1
- package/dist/production/src/model/authorization/ProjectScopeFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/ProjectScopeFactory.js.map +1 -1
- package/dist/production/src/model/commands/CommandBus.cjs.map +1 -1
- package/dist/production/src/model/commands/CommandBus.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableIdentityApiKeysCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableIdentityApiKeysCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableOneOffApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/DisableOneOffApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs +20 -0
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js +20 -0
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -0
- package/dist/production/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/DisableIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/DisableIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/EnableIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/EnableIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/AddMailTemplateCommand.js.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/RemoveMailTemplateCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/mailTemplate/RemoveMailTemplateCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/AddProjectMemberCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/AddProjectMemberCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/CreateOrUpdateProjectMembershipCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMemberCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMemberCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.js.map +1 -1
- package/dist/production/src/model/commands/otp/ConfirmOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/otp/ConfirmOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/otp/DisableOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/otp/DisableOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/otp/PrepareOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/otp/PrepareOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/ChangePasswordCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/ChangePasswordCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/ChangeProfileCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/ChangeProfileCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.cjs +2 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.js +2 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/DisablePersonCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.cjs +18 -0
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js +18 -0
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs +20 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js +20 -0
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs +33 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js +33 -0
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs +19 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js +19 -0
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs +19 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js +19 -0
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs +28 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js +28 -0
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs +28 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js +28 -0
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -0
- package/dist/production/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/CreateProjectCommand.js.map +1 -1
- package/dist/production/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
- package/dist/production/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
- package/dist/production/src/model/consts/expirations.cjs +7 -0
- package/dist/production/src/model/consts/expirations.cjs.map +1 -0
- package/dist/production/src/model/consts/expirations.js +7 -0
- package/dist/production/src/model/consts/expirations.js.map +1 -0
- package/dist/production/src/model/dtos/Password.cjs.map +1 -1
- package/dist/production/src/model/dtos/Password.js.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.cjs +10 -1
- package/dist/production/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.js +10 -1
- package/dist/production/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/production/src/model/mailing/templates/ExistingUserInvited.mustache.cjs.map +1 -1
- package/dist/production/src/model/mailing/templates/ExistingUserInvited.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/templates/NewUserInvited.mustache.cjs.map +1 -1
- package/dist/production/src/model/mailing/templates/NewUserInvited.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/templates/PasswordReset.mustache.cjs.map +1 -1
- package/dist/production/src/model/mailing/templates/PasswordReset.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs +17 -0
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.cjs.map +1 -0
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.js +18 -0
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -0
- package/dist/production/src/model/mailing/type.cjs +9 -3
- package/dist/production/src/model/mailing/type.cjs.map +1 -1
- package/dist/production/src/model/mailing/type.js +9 -3
- package/dist/production/src/model/mailing/type.js.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs +21 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js +21 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js.map +1 -0
- package/dist/production/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectRolesByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectRolesByIdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectSlugSpecification.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectSlugSpecification.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdPQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdPQuery.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdentityBatchQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonByIdentityBatchQuery.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonQuery.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs +29 -0
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js +29 -0
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js.map +1 -0
- package/dist/production/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectSecretsQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectSecretsQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectUpdateTimestampQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectUpdateTimestampQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsQuery.js.map +1 -1
- package/dist/production/src/model/service/ConfigurationManager.cjs +27 -0
- package/dist/production/src/model/service/ConfigurationManager.cjs.map +1 -0
- package/dist/production/src/model/service/ConfigurationManager.js +27 -0
- package/dist/production/src/model/service/ConfigurationManager.js.map +1 -0
- package/dist/production/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/production/src/model/service/EmailValidator.js.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.cjs +1 -1
- package/dist/production/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.js +1 -1
- package/dist/production/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/production/src/model/service/InviteManager.cjs +7 -7
- package/dist/production/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/production/src/model/service/InviteManager.js +6 -6
- package/dist/production/src/model/service/InviteManager.js.map +1 -1
- package/dist/production/src/model/service/MailTemplateManager.cjs.map +1 -1
- package/dist/production/src/model/service/MailTemplateManager.js.map +1 -1
- package/dist/production/src/model/service/MembershipValidator.cjs.map +1 -1
- package/dist/production/src/model/service/MembershipValidator.js.map +1 -1
- package/dist/production/src/model/service/OtpAuthenticator.cjs.map +1 -1
- package/dist/production/src/model/service/OtpAuthenticator.js.map +1 -1
- package/dist/production/src/model/service/OtpManager.cjs.map +1 -1
- package/dist/production/src/model/service/OtpManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.cjs +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.js +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.cjs +7 -15
- package/dist/production/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.js +7 -15
- package/dist/production/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs +135 -0
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs.map +1 -0
- package/dist/production/src/model/service/PasswordlessSignInManager.js +135 -0
- package/dist/production/src/model/service/PasswordlessSignInManager.js.map +1 -0
- package/dist/production/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/production/src/model/service/PersonManager.cjs +7 -0
- package/dist/production/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonManager.js +7 -0
- package/dist/production/src/model/service/PersonManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectManager.cjs +2 -2
- package/dist/production/src/model/service/ProjectManager.cjs.map +1 -1
- package/dist/production/src/model/service/ProjectManager.js +2 -2
- package/dist/production/src/model/service/ProjectManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/production/src/model/service/RolesManager.cjs +1 -1
- package/dist/production/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/production/src/model/service/RolesManager.js +1 -1
- package/dist/production/src/model/service/RolesManager.js.map +1 -1
- package/dist/production/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/production/src/model/service/SecretsManager.js.map +1 -1
- package/dist/production/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignInManager.js.map +1 -1
- package/dist/production/src/model/service/SignUpManager.cjs +1 -1
- package/dist/production/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignUpManager.js +1 -1
- package/dist/production/src/model/service/SignUpManager.js.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.js.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyService.cjs.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyService.js.map +1 -1
- package/dist/production/src/model/service/helpers/getPreferredProject.cjs +13 -0
- package/dist/production/src/model/service/helpers/getPreferredProject.cjs.map +1 -0
- package/dist/production/src/model/service/helpers/getPreferredProject.js +13 -0
- package/dist/production/src/model/service/helpers/getPreferredProject.js.map +1 -0
- package/dist/production/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPResponseError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPResponseError.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPValidationError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPValidationError.js.map +1 -1
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IdentityProviderNotFoundError.js.map +1 -1
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.cjs.map +1 -1
- package/dist/production/src/model/service/idp/InvalidIDPConfigurationError.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.cjs +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.js +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.cjs +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.js +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs +9 -5
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js +9 -5
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs +9 -3
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js +9 -3
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs +6 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.js +6 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/helpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/helpers.js.map +1 -1
- package/dist/production/src/model/service/membershipUtils.cjs.map +1 -1
- package/dist/production/src/model/service/membershipUtils.js.map +1 -1
- package/dist/production/src/model/type/ApiKey.cjs.map +1 -1
- package/dist/production/src/model/type/ApiKey.js.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/production/src/model/utils/Response.cjs.map +1 -1
- package/dist/production/src/model/utils/Response.js.map +1 -1
- package/dist/production/src/model/utils/password.cjs.map +1 -1
- package/dist/production/src/model/utils/password.js.map +1 -1
- package/dist/production/src/model/utils/tokenUtils.cjs +39 -0
- package/dist/production/src/model/utils/tokenUtils.cjs.map +1 -1
- package/dist/production/src/model/utils/tokenUtils.js +40 -1
- package/dist/production/src/model/utils/tokenUtils.js.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.cjs +8 -1
- package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.js +8 -1
- package/dist/production/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/production/src/resolvers/errorUtils.cjs.map +1 -1
- package/dist/production/src/resolvers/errorUtils.js.map +1 -1
- package/dist/production/src/resolvers/membershipUtils.cjs.map +1 -1
- package/dist/production/src/resolvers/membershipUtils.js.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +41 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +41 -0
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs +4 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js +4 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +83 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js +83 -0
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +52 -0
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +52 -0
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs +34 -0
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js +34 -0
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -0
- package/dist/production/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/MeQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/MeQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs +1 -0
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js +1 -0
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/production/src/schema/tenant.graphql.cjs +162 -10
- package/dist/production/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/production/src/schema/tenant.graphql.js +162 -10
- package/dist/production/src/schema/tenant.graphql.js.map +1 -1
- package/dist/production/src/utils/Mailer.cjs.map +1 -1
- package/dist/production/src/utils/Mailer.js.map +1 -1
- package/dist/production/src/utils/TemplateRenderer.cjs.map +1 -1
- package/dist/production/src/utils/TemplateRenderer.js.map +1 -1
- package/dist/production/src/utils/array.cjs.map +1 -1
- package/dist/production/src/utils/array.js.map +1 -1
- package/dist/production/src/utils/batchQuery.cjs.map +1 -1
- package/dist/production/src/utils/batchQuery.js.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/{createPasswordResetSql.d.ts → createPersonTokenSql.d.ts} +3 -2
- package/dist/tests/cases/integration/mocked/sql/createPersonTokenSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/getPersonByEmailSql.d.ts.map +1 -1
- package/dist/tests/src/IdPMock.d.ts +2 -2
- package/dist/tests/src/IdPMock.d.ts.map +1 -1
- package/dist/tests/src/mailer.d.ts.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/TenantContainer.d.ts +18 -0
- package/dist/types/TenantContainer.d.ts.map +1 -1
- package/dist/types/migrations/2024-08-26-120000-passwordless.d.ts +3 -0
- package/dist/types/migrations/2024-08-26-120000-passwordless.d.ts.map +1 -0
- package/dist/types/migrations/runner.d.ts.map +1 -1
- package/dist/types/migrations/snapshot.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionActions.d.ts +25 -0
- package/dist/types/model/authorization/PermissionActions.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionsFactory.d.ts.map +1 -1
- package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts +8 -0
- package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts.map +1 -0
- package/dist/types/model/commands/configuration/index.d.ts +2 -0
- package/dist/types/model/commands/configuration/index.d.ts.map +1 -0
- package/dist/types/model/commands/index.d.ts +2 -2
- package/dist/types/model/commands/index.d.ts.map +1 -1
- package/dist/types/model/commands/person/CreatePersonCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/TogglePersonPasswordlessCommand.d.ts +8 -0
- package/dist/types/model/commands/person/TogglePersonPasswordlessCommand.d.ts.map +1 -0
- package/dist/types/model/commands/person/index.d.ts +1 -0
- package/dist/types/model/commands/person/index.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/ActivateOtpCommand.d.ts +8 -0
- package/dist/types/model/commands/personToken/ActivateOtpCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts +19 -0
- package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/IncreaseOtpAttemptCommand.d.ts +7 -0
- package/dist/types/model/commands/personToken/IncreaseOtpAttemptCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/InvalidateTokenCommand.d.ts +7 -0
- package/dist/types/model/commands/personToken/InvalidateTokenCommand.d.ts.map +1 -0
- package/dist/types/model/commands/{passwordReset → personToken}/ResetPasswordCommand.d.ts +3 -2
- package/dist/types/model/commands/personToken/ResetPasswordCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/SavePersonTokenCommand.d.ts +19 -0
- package/dist/types/model/commands/personToken/SavePersonTokenCommand.d.ts.map +1 -0
- package/dist/types/model/commands/personToken/index.d.ts +7 -0
- package/dist/types/model/commands/personToken/index.d.ts.map +1 -0
- package/dist/types/model/consts/expirations.d.ts +3 -0
- package/dist/types/model/consts/expirations.d.ts.map +1 -0
- package/dist/types/model/mailing/UserMailer.d.ts +10 -0
- package/dist/types/model/mailing/UserMailer.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/PasswordlessSignIn.mustache.d.ts +3 -0
- package/dist/types/model/mailing/templates/PasswordlessSignIn.mustache.d.ts.map +1 -0
- package/dist/types/model/mailing/type.d.ts +2 -1
- package/dist/types/model/mailing/type.d.ts.map +1 -1
- package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts +6 -0
- package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts.map +1 -0
- package/dist/types/model/queries/configuration/index.d.ts +2 -0
- package/dist/types/model/queries/configuration/index.d.ts.map +1 -0
- package/dist/types/model/queries/index.d.ts +1 -0
- package/dist/types/model/queries/index.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonQueryBuilderFactory.d.ts.map +1 -1
- package/dist/types/model/queries/person/types.d.ts +1 -0
- package/dist/types/model/queries/person/types.d.ts.map +1 -1
- package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts +12 -0
- package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts.map +1 -0
- package/dist/types/model/service/ConfigurationManager.d.ts +9 -0
- package/dist/types/model/service/ConfigurationManager.d.ts.map +1 -0
- package/dist/types/model/service/IDPSignInManager.d.ts +1 -0
- package/dist/types/model/service/IDPSignInManager.d.ts.map +1 -1
- package/dist/types/model/service/InviteManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordResetManager.d.ts +1 -1
- package/dist/types/model/service/PasswordResetManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordlessSignInManager.d.ts +54 -0
- package/dist/types/model/service/PasswordlessSignInManager.d.ts.map +1 -0
- package/dist/types/model/service/PersonManager.d.ts +1 -0
- package/dist/types/model/service/PersonManager.d.ts.map +1 -1
- package/dist/types/model/service/PersonTokenManager.d.ts +3 -0
- package/dist/types/model/service/PersonTokenManager.d.ts.map +1 -0
- package/dist/types/model/service/helpers/getPreferredProject.d.ts +3 -0
- package/dist/types/model/service/helpers/getPreferredProject.d.ts.map +1 -0
- package/dist/types/model/service/idp/IdentityProviderHandler.d.ts +3 -3
- package/dist/types/model/service/idp/IdentityProviderHandler.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/AppleProvider.d.ts +10 -2
- package/dist/types/model/service/idp/providers/AppleProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/FacebookProvider.d.ts +10 -2
- package/dist/types/model/service/idp/providers/FacebookProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts +4 -4
- package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCProvider.d.ts +6 -2
- package/dist/types/model/service/idp/providers/OIDCProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCTypes.d.ts +21 -5
- package/dist/types/model/service/idp/providers/OIDCTypes.d.ts.map +1 -1
- package/dist/types/model/type/PersonToken.d.ts +16 -0
- package/dist/types/model/type/PersonToken.d.ts.map +1 -0
- package/dist/types/model/type/index.d.ts +1 -0
- package/dist/types/model/type/index.d.ts.map +1 -1
- package/dist/types/model/utils/tokenUtils.d.ts +8 -0
- package/dist/types/model/utils/tokenUtils.d.ts.map +1 -1
- package/dist/types/resolvers/ResolverFactory.d.ts +8 -0
- package/dist/types/resolvers/ResolverFactory.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/configuration/ConfigurationMutationResolver.d.ts +9 -0
- package/dist/types/resolvers/mutation/configuration/ConfigurationMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/person/IDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts +13 -0
- package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/person/ResetPasswordMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts +13 -0
- package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts +9 -0
- package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts.map +1 -0
- package/dist/types/resolvers/responseHelpers/PersonResponseFactory.d.ts.map +1 -1
- package/dist/types/resolvers/types/ProjectTypeResolver.d.ts +3 -3
- package/dist/types/schema/index.d.ts +362 -38
- package/dist/types/schema/index.d.ts.map +1 -1
- package/dist/types/schema/tenant.graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/utils/batchQuery.d.ts.map +1 -1
- package/{graphql-tenant.codegen.yml → graphql.codegen.yml} +1 -1
- package/package.json +23 -27
- package/src/TenantContainer.ts +18 -0
- package/src/migrations/2024-08-26-120000-passwordless.ts +31 -0
- package/src/migrations/runner.ts +2 -0
- package/src/migrations/snapshot-template-end.txt +3 -0
- package/src/migrations/snapshot.ts +33 -5
- package/src/model/authorization/PermissionActions.ts +7 -0
- package/src/model/authorization/PermissionsFactory.ts +5 -0
- package/src/model/commands/configuration/UpdateConfigurationCommand.ts +26 -0
- package/src/model/commands/configuration/index.ts +1 -0
- package/src/model/commands/index.ts +2 -2
- package/src/model/commands/person/CreatePersonCommand.ts +1 -0
- package/src/model/commands/person/TogglePersonPasswordlessCommand.ts +18 -0
- package/src/model/commands/person/index.ts +1 -0
- package/src/model/commands/personToken/ActivateOtpCommand.ts +24 -0
- package/src/model/commands/personToken/CreatePersonTokenCommand.ts +42 -0
- package/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts +23 -0
- package/src/model/commands/personToken/InvalidateTokenCommand.ts +22 -0
- package/src/model/commands/personToken/ResetPasswordCommand.ts +28 -0
- package/src/model/commands/personToken/SavePersonTokenCommand.ts +42 -0
- package/src/model/commands/personToken/index.ts +6 -0
- package/src/model/consts/expirations.ts +2 -0
- package/src/model/mailing/UserMailer.ts +14 -0
- package/src/model/mailing/templates/PasswordlessSignIn.mustache.ts +15 -0
- package/src/model/mailing/type.ts +3 -0
- package/src/model/queries/configuration/ConfigurationQuery.ts +30 -0
- package/src/model/queries/configuration/index.ts +1 -0
- package/src/model/queries/index.ts +1 -0
- package/src/model/queries/person/PersonQueryBuilderFactory.ts +1 -0
- package/src/model/queries/person/types.ts +1 -0
- package/src/model/queries/personToken/PersonTokenQuery.ts +35 -0
- package/src/model/service/ConfigurationManager.ts +22 -0
- package/src/model/service/IDPSignInManager.ts +7 -6
- package/src/model/service/InviteManager.ts +5 -6
- package/src/model/service/OtpAuthenticator.ts +1 -1
- package/src/model/service/PasswordResetManager.ts +4 -10
- package/src/model/service/PasswordlessSignInManager.ts +190 -0
- package/src/model/service/PersonManager.ts +6 -0
- package/src/model/service/PersonTokenManager.ts +2 -0
- package/src/model/service/helpers/getPreferredProject.ts +11 -0
- package/src/model/service/idp/IdentityProviderHandler.ts +3 -3
- package/src/model/service/idp/providers/AppleProvider.ts +3 -3
- package/src/model/service/idp/providers/FacebookProvider.ts +3 -3
- package/src/model/service/idp/providers/OIDCHelpers.ts +11 -6
- package/src/model/service/idp/providers/OIDCProvider.ts +10 -4
- package/src/model/service/idp/providers/OIDCTypes.ts +5 -1
- package/src/model/type/PersonToken.ts +21 -0
- package/src/model/type/index.ts +1 -0
- package/src/model/utils/tokenUtils.ts +47 -0
- package/src/resolvers/ResolverFactory.ts +19 -0
- package/src/resolvers/mutation/configuration/ConfigurationMutationResolver.ts +29 -0
- package/src/resolvers/mutation/person/IDPMutationResolver.ts +4 -1
- package/src/resolvers/mutation/person/PasswordlessMutationResolver.ts +81 -0
- package/src/resolvers/mutation/person/ResetPasswordMutationResolver.ts +1 -10
- package/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.ts +44 -0
- package/src/resolvers/query/ConfigurationQueryResolver.ts +21 -0
- package/src/resolvers/responseHelpers/PersonResponseFactory.ts +1 -0
- package/src/resolvers/types/ProjectTypeResolver.ts +3 -3
- package/src/schema/index.ts +362 -35
- package/src/schema/tenant.graphql.ts +162 -10
- package/tests/cases/integration/mocked/addProjectMemberMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/changeMyPasswordMutation.test.ts +2 -2
- package/tests/cases/integration/mocked/changeMyProfileMutation.test.ts +2 -2
- package/tests/cases/integration/mocked/changePasswordMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/changeProfileMutation.test.ts +2 -2
- package/tests/cases/integration/mocked/confirmOtpMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/createApiKeyMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/createSessionKeyMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/disableApiKeyMutation.ts +1 -1
- package/tests/cases/integration/mocked/inviteMutations.test.ts +3 -3
- package/tests/cases/integration/mocked/listProjectMembersQuery.test.ts +1 -1
- package/tests/cases/integration/mocked/personByIdQuery.test.ts +1 -1
- package/tests/cases/integration/mocked/prepareOtpMutation.test.ts +3 -3
- package/tests/cases/integration/mocked/removeProjectMemberMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signInIdpMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signInMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signOutMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/signUpMutation.test.ts +1 -1
- package/tests/cases/integration/mocked/sql/{createPasswordResetSql.ts → createPersonTokenSql.ts} +5 -3
- package/tests/cases/integration/mocked/sql/getPersonByEmailSql.ts +2 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdSql.ts +1 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdentity.ts +1 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdpSql.ts +1 -1
- package/tests/cases/integration/mocked/updateProjectMemberMutation.test.ts +1 -1
- package/tests/cases/migrations/2020-06-08-134000-tenant-credentials.test.ts +5 -3
- package/tests/cases/unit/authorization/membershipAwareAccessNode.test.ts +9 -9
- package/tests/cases/unit/authorization/membershipMatcher.test.ts +10 -10
- package/tests/src/IdPMock.ts +2 -2
- package/tests/src/mailer.ts +3 -4
- package/tests/src/testGraphql.ts +2 -2
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs +0 -30
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js +0 -30
- package/dist/development/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js.map +0 -1
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.cjs +0 -38
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.cjs.map +0 -1
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.js +0 -38
- package/dist/development/src/model/commands/passwordReset/ResetPasswordCommand.js.map +0 -1
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs +0 -24
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js +0 -24
- package/dist/development/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js.map +0 -1
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs +0 -30
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js +0 -30
- package/dist/production/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.js.map +0 -1
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.cjs +0 -38
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.cjs.map +0 -1
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.js +0 -38
- package/dist/production/src/model/commands/passwordReset/ResetPasswordCommand.js.map +0 -1
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs +0 -24
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.cjs.map +0 -1
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js +0 -24
- package/dist/production/src/model/commands/passwordReset/SavePasswordResetRequestCommand.js.map +0 -1
- package/dist/tests/cases/integration/mocked/sql/createPasswordResetSql.d.ts.map +0 -1
- package/dist/tests/src/testTenantDb.d.ts +0 -31
- package/dist/tests/src/testTenantDb.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/CreatePasswordResetRequestCommand.d.ts +0 -12
- package/dist/types/model/commands/passwordReset/CreatePasswordResetRequestCommand.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/ResetPasswordCommand.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/SavePasswordResetRequestCommand.d.ts +0 -10
- package/dist/types/model/commands/passwordReset/SavePasswordResetRequestCommand.d.ts.map +0 -1
- package/dist/types/model/commands/passwordReset/index.d.ts +0 -4
- package/dist/types/model/commands/passwordReset/index.d.ts.map +0 -1
- package/src/model/commands/passwordReset/CreatePasswordResetRequestCommand.ts +0 -25
- package/src/model/commands/passwordReset/ResetPasswordCommand.ts +0 -57
- package/src/model/commands/passwordReset/SavePasswordResetRequestCommand.ts +0 -28
- package/src/model/commands/passwordReset/index.ts +0 -3
- package/tests/src/testTenantDb.ts +0 -202
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonTokenQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/personToken/PersonTokenQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, SelectBuilder } from '@contember/database'\nimport { PersonToken } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class PersonTokenQuery extends DatabaseQuery<PersonToken.Row | null> {\n\n\tprivate constructor(\n\t\tprivate readonly identifierType: 'id' | 'token_hash',\n\t\tprivate readonly identifier: string,\n\t\tprivate readonly type: PersonToken.Type,\n\t) {\n\t\tsuper()\n\t}\n\n\tpublic static byId(id: string, type: PersonToken.Type): PersonTokenQuery {\n\t\treturn new PersonTokenQuery('id', id, type)\n\t}\n\n\tpublic static byToken(token: string, type: PersonToken.Type): PersonTokenQuery {\n\t\tconst tokenHash = computeTokenHash(token)\n\t\treturn new PersonTokenQuery('token_hash', tokenHash, type)\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<PersonToken.Row | null> {\n\t\tconst result = await SelectBuilder.create<PersonToken.Row>()\n\t\t\t.from('person_token')\n\t\t\t.select(new Literal('*'))\n\t\t\t.where({\n\t\t\t\t[this.identifierType]: this.identifier,\n\t\t\t\ttype: this.type,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\treturn this.fetchOneOrNull(result)\n\t}\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,yBAAyB,cAAsC;AAAA,EAEnE,YACU,gBACA,YACA,MAChB;AACK,UAAA;AAJW,SAAA,iBAAA;AACA,SAAA,aAAA;AACA,SAAA,OAAA;AAAA,EAAA;AAAA,EAKlB,OAAc,KAAK,IAAY,MAA0C;AACxE,WAAO,IAAI,iBAAiB,MAAM,IAAI,IAAI;AAAA,EAAA;AAAA,EAG3C,OAAc,QAAQ,OAAe,MAA0C;AACxE,UAAA,YAAY,iBAAiB,KAAK;AACxC,WAAO,IAAI,iBAAiB,cAAc,WAAW,IAAI;AAAA,EAAA;AAAA,EAG1D,MAAM,MAAM,EAAE,MAA0D;AACvE,UAAM,SAAS,MAAM,cAAc,OAAA,EACjC,KAAK,cAAc,EACnB,OAAO,IAAI,QAAQ,GAAG,CAAC,EACvB,MAAM;AAAA,MACN,CAAC,KAAK,cAAc,GAAG,KAAK;AAAA,MAC5B,MAAM,KAAK;AAAA,IAAA,CACX,EACA,UAAU,EAAE;AACP,WAAA,KAAK,eAAe,MAAM;AAAA,EAAA;AAEnC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectBySlugQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, SelectBuilder } from '@contember/database'\nimport { DatabaseQueryable } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectBySlugQuery extends DatabaseQuery<(Project & { updatedAt: Date }) | null> {\n\tconstructor(private readonly projectSlug: string, private readonly alias = false) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<(Project & { updatedAt: Date }) | null> {\n\t\tconst baseQb = SelectBuilder.create<Project & { updatedAt: Date }>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.select('updated_at', 'updatedAt')\n\t\t\t.from('project')\n\t\tconst rows = await baseQb\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tconst row = this.fetchOneOrNull(rows)\n\t\tif (!this.alias || row) {\n\t\t\treturn row\n\t\t}\n\t\tconst rows2 = await baseQb //\n\t\t\t.where(expr => expr.raw('config->? \\\\? ?', 'alias', this.projectSlug))\n\t\t\t.getResult(db)\n\t\treturn this.fetchOneOrNull(rows2)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAIO,MAAM,2BAA2BA,SAAAA,cAAsD;AAAA,EAC7F,YAA6B,aAAsC,QAAQ,OAAO;AAC3E;AADsB,SAAA,cAAA;AAAsC,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectBySlugQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, SelectBuilder } from '@contember/database'\nimport { DatabaseQueryable } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectBySlugQuery extends DatabaseQuery<(Project & { updatedAt: Date }) | null> {\n\tconstructor(private readonly projectSlug: string, private readonly alias = false) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<(Project & { updatedAt: Date }) | null> {\n\t\tconst baseQb = SelectBuilder.create<Project & { updatedAt: Date }>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.select('updated_at', 'updatedAt')\n\t\t\t.from('project')\n\t\tconst rows = await baseQb\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tconst row = this.fetchOneOrNull(rows)\n\t\tif (!this.alias || row) {\n\t\t\treturn row\n\t\t}\n\t\tconst rows2 = await baseQb //\n\t\t\t.where(expr => expr.raw('config->? \\\\? ?', 'alias', this.projectSlug))\n\t\t\t.getResult(db)\n\t\treturn this.fetchOneOrNull(rows2)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAIO,MAAM,2BAA2BA,SAAAA,cAAsD;AAAA,EAC7F,YAA6B,aAAsC,QAAQ,OAAO;AAC3E,UAAA;AADsB,SAAA,cAAA;AAAsC,SAAA,QAAA;AAAA,EAAA;AAAA,EAInE,MAAM,MAAM,EAAE,MAA0E;AACjF,UAAA,SAASC,uBAAc,OAAsC,EACjE,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,OAAO,cAAc,WAAW,EAChC,KAAK,SAAS;AACV,UAAA,OAAO,MAAM,OACjB,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IAAA,CACX,EACA,UAAU,EAAE;AACR,UAAA,MAAM,KAAK,eAAe,IAAI;AAChC,QAAA,CAAC,KAAK,SAAS,KAAK;AAChB,aAAA;AAAA,IAAA;AAER,UAAM,QAAQ,MAAM,OAClB,MAAM,UAAQ,KAAK,IAAI,mBAAmB,SAAS,KAAK,WAAW,CAAC,EACpE,UAAU,EAAE;AACP,WAAA,KAAK,eAAe,KAAK;AAAA,EAAA;AAElC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectBySlugQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, SelectBuilder } from '@contember/database'\nimport { DatabaseQueryable } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectBySlugQuery extends DatabaseQuery<(Project & { updatedAt: Date }) | null> {\n\tconstructor(private readonly projectSlug: string, private readonly alias = false) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<(Project & { updatedAt: Date }) | null> {\n\t\tconst baseQb = SelectBuilder.create<Project & { updatedAt: Date }>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.select('updated_at', 'updatedAt')\n\t\t\t.from('project')\n\t\tconst rows = await baseQb\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tconst row = this.fetchOneOrNull(rows)\n\t\tif (!this.alias || row) {\n\t\t\treturn row\n\t\t}\n\t\tconst rows2 = await baseQb //\n\t\t\t.where(expr => expr.raw('config->? \\\\? ?', 'alias', this.projectSlug))\n\t\t\t.getResult(db)\n\t\treturn this.fetchOneOrNull(rows2)\n\t}\n}\n"],"names":[],"mappings":";AAIO,MAAM,2BAA2B,cAAsD;AAAA,EAC7F,YAA6B,aAAsC,QAAQ,OAAO;AAC3E;AADsB,SAAA,cAAA;AAAsC,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectBySlugQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, SelectBuilder } from '@contember/database'\nimport { DatabaseQueryable } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectBySlugQuery extends DatabaseQuery<(Project & { updatedAt: Date }) | null> {\n\tconstructor(private readonly projectSlug: string, private readonly alias = false) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<(Project & { updatedAt: Date }) | null> {\n\t\tconst baseQb = SelectBuilder.create<Project & { updatedAt: Date }>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.select('updated_at', 'updatedAt')\n\t\t\t.from('project')\n\t\tconst rows = await baseQb\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tconst row = this.fetchOneOrNull(rows)\n\t\tif (!this.alias || row) {\n\t\t\treturn row\n\t\t}\n\t\tconst rows2 = await baseQb //\n\t\t\t.where(expr => expr.raw('config->? \\\\? ?', 'alias', this.projectSlug))\n\t\t\t.getResult(db)\n\t\treturn this.fetchOneOrNull(rows2)\n\t}\n}\n"],"names":[],"mappings":";AAIO,MAAM,2BAA2B,cAAsD;AAAA,EAC7F,YAA6B,aAAsC,QAAQ,OAAO;AAC3E,UAAA;AADsB,SAAA,cAAA;AAAsC,SAAA,QAAA;AAAA,EAAA;AAAA,EAInE,MAAM,MAAM,EAAE,MAA0E;AACjF,UAAA,SAAS,cAAc,OAAsC,EACjE,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,OAAO,cAAc,WAAW,EAChC,KAAK,SAAS;AACV,UAAA,OAAO,MAAM,OACjB,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IAAA,CACX,EACA,UAAU,EAAE;AACR,UAAA,MAAM,KAAK,eAAe,IAAI;AAChC,QAAA,CAAC,KAAK,SAAS,KAAK;AAChB,aAAA;AAAA,IAAA;AAER,UAAM,QAAQ,MAAM,OAClB,MAAM,UAAQ,KAAK,IAAI,mBAAmB,SAAS,KAAK,WAAW,CAAC,EACpE,UAAU,EAAE;AACP,WAAA,KAAK,eAAe,KAAK;AAAA,EAAA;AAElC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSecretsQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectSecretsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Providers } from '../../providers'\n\ntype ProjectSecretsQueryResult = { key: string; value: Buffer; needsReEncrypt: boolean }[]\n\nexport class ProjectSecretsQuery extends DatabaseQuery<ProjectSecretsQueryResult> {\n\tconstructor(private readonly projectId: string, private readonly providers: Providers) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectSecretsQueryResult> {\n\t\tconst qb = SelectBuilder.create<{ value: Buffer; version: number; key: string }>()\n\t\t\t.from('project_secret')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t})\n\t\t\t.select('value')\n\t\t\t.select('version')\n\t\t\t.select('key')\n\t\tconst rows = await qb.getResult(db)\n\t\treturn await Promise.all(\n\t\t\trows.map(async it => {\n\t\t\t\treturn ({\n\t\t\t\t\tkey: it.key,\n\t\t\t\t\t...await this.providers.decrypt(it.value, it.version),\n\t\t\t\t})\n\t\t\t},\n\t\t\t),\n\t\t)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAKO,MAAM,4BAA4BA,SAAAA,cAAyC;AAAA,EACjF,YAA6B,WAAoC,WAAsB;AAChF;AADsB,SAAA,YAAA;AAAoC,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectSecretsQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectSecretsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Providers } from '../../providers'\n\ntype ProjectSecretsQueryResult = { key: string; value: Buffer; needsReEncrypt: boolean }[]\n\nexport class ProjectSecretsQuery extends DatabaseQuery<ProjectSecretsQueryResult> {\n\tconstructor(private readonly projectId: string, private readonly providers: Providers) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectSecretsQueryResult> {\n\t\tconst qb = SelectBuilder.create<{ value: Buffer; version: number; key: string }>()\n\t\t\t.from('project_secret')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t})\n\t\t\t.select('value')\n\t\t\t.select('version')\n\t\t\t.select('key')\n\t\tconst rows = await qb.getResult(db)\n\t\treturn await Promise.all(\n\t\t\trows.map(async it => {\n\t\t\t\treturn ({\n\t\t\t\t\tkey: it.key,\n\t\t\t\t\t...await this.providers.decrypt(it.value, it.version),\n\t\t\t\t})\n\t\t\t},\n\t\t\t),\n\t\t)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAKO,MAAM,4BAA4BA,SAAAA,cAAyC;AAAA,EACjF,YAA6B,WAAoC,WAAsB;AAChF,UAAA;AADsB,SAAA,YAAA;AAAoC,SAAA,YAAA;AAAA,EAAA;AAAA,EAIjE,MAAM,MAAM,EAAE,MAA6D;AAC1E,UAAM,KAAKC,SAAAA,cAAc,OAAA,EACvB,KAAK,gBAAgB,EACrB,MAAM;AAAA,MACN,YAAY,KAAK;AAAA,IAAA,CACjB,EACA,OAAO,OAAO,EACd,OAAO,SAAS,EAChB,OAAO,KAAK;AACd,UAAM,OAAO,MAAM,GAAG,UAAU,EAAE;AAClC,WAAO,MAAM,QAAQ;AAAA,MACpB,KAAK;AAAA,QAAI,OAAM,OAAM;AACZ,iBAAA;AAAA,YACP,KAAK,GAAG;AAAA,YACR,GAAG,MAAM,KAAK,UAAU,QAAQ,GAAG,OAAO,GAAG,OAAO;AAAA,UACrD;AAAA,QAAA;AAAA,MACD;AAAA,IAED;AAAA,EAAA;AAEF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSecretsQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectSecretsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Providers } from '../../providers'\n\ntype ProjectSecretsQueryResult = { key: string; value: Buffer; needsReEncrypt: boolean }[]\n\nexport class ProjectSecretsQuery extends DatabaseQuery<ProjectSecretsQueryResult> {\n\tconstructor(private readonly projectId: string, private readonly providers: Providers) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectSecretsQueryResult> {\n\t\tconst qb = SelectBuilder.create<{ value: Buffer; version: number; key: string }>()\n\t\t\t.from('project_secret')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t})\n\t\t\t.select('value')\n\t\t\t.select('version')\n\t\t\t.select('key')\n\t\tconst rows = await qb.getResult(db)\n\t\treturn await Promise.all(\n\t\t\trows.map(async it => {\n\t\t\t\treturn ({\n\t\t\t\t\tkey: it.key,\n\t\t\t\t\t...await this.providers.decrypt(it.value, it.version),\n\t\t\t\t})\n\t\t\t},\n\t\t\t),\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";AAKO,MAAM,4BAA4B,cAAyC;AAAA,EACjF,YAA6B,WAAoC,WAAsB;AAChF;AADsB,SAAA,YAAA;AAAoC,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectSecretsQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectSecretsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Providers } from '../../providers'\n\ntype ProjectSecretsQueryResult = { key: string; value: Buffer; needsReEncrypt: boolean }[]\n\nexport class ProjectSecretsQuery extends DatabaseQuery<ProjectSecretsQueryResult> {\n\tconstructor(private readonly projectId: string, private readonly providers: Providers) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectSecretsQueryResult> {\n\t\tconst qb = SelectBuilder.create<{ value: Buffer; version: number; key: string }>()\n\t\t\t.from('project_secret')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t})\n\t\t\t.select('value')\n\t\t\t.select('version')\n\t\t\t.select('key')\n\t\tconst rows = await qb.getResult(db)\n\t\treturn await Promise.all(\n\t\t\trows.map(async it => {\n\t\t\t\treturn ({\n\t\t\t\t\tkey: it.key,\n\t\t\t\t\t...await this.providers.decrypt(it.value, it.version),\n\t\t\t\t})\n\t\t\t},\n\t\t\t),\n\t\t)\n\t}\n}\n"],"names":[],"mappings":";AAKO,MAAM,4BAA4B,cAAyC;AAAA,EACjF,YAA6B,WAAoC,WAAsB;AAChF,UAAA;AADsB,SAAA,YAAA;AAAoC,SAAA,YAAA;AAAA,EAAA;AAAA,EAIjE,MAAM,MAAM,EAAE,MAA6D;AAC1E,UAAM,KAAK,cAAc,OAAA,EACvB,KAAK,gBAAgB,EACrB,MAAM;AAAA,MACN,YAAY,KAAK;AAAA,IAAA,CACjB,EACA,OAAO,OAAO,EACd,OAAO,SAAS,EAChB,OAAO,KAAK;AACd,UAAM,OAAO,MAAM,GAAG,UAAU,EAAE;AAClC,WAAO,MAAM,QAAQ;AAAA,MACpB,KAAK;AAAA,QAAI,OAAM,OAAM;AACZ,iBAAA;AAAA,YACP,KAAK,GAAG;AAAA,YACR,GAAG,MAAM,KAAK,UAAU,QAAQ,GAAG,OAAO,GAAG,OAAO;AAAA,UACrD;AAAA,QAAA;AAAA,MACD;AAAA,IAED;AAAA,EAAA;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectUpdateTimestampQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectUpdateTimestampQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class ProjectUpdateTimestampQuery extends DatabaseQuery<Date | null> {\n\tconstructor(private readonly projectSlug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Date | null> {\n\t\tconst rows = await SelectBuilder.create<{ updated_at: Date }>()\n\t\t\t.select('updated_at')\n\t\t\t.from('project')\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)?.updated_at ?? null\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAEO,MAAM,oCAAoCA,SAAAA,cAA2B;AAAA,EAC3E,YAA6B,aAAqB;AAC3C;AADsB,SAAA,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectUpdateTimestampQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectUpdateTimestampQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class ProjectUpdateTimestampQuery extends DatabaseQuery<Date | null> {\n\tconstructor(private readonly projectSlug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Date | null> {\n\t\tconst rows = await SelectBuilder.create<{ updated_at: Date }>()\n\t\t\t.select('updated_at')\n\t\t\t.from('project')\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)?.updated_at ?? null\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAEO,MAAM,oCAAoCA,SAAAA,cAA2B;AAAA,EAC3E,YAA6B,aAAqB;AAC3C,UAAA;AADsB,SAAA,cAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAA+C;AACtD,UAAA,OAAO,MAAMC,uBAAc,SAC/B,OAAO,YAAY,EACnB,KAAK,SAAS,EACd,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IAAA,CACX,EACA,UAAU,EAAE;AAEd,WAAO,KAAK,eAAe,IAAI,GAAG,cAAc;AAAA,EAAA;AAElD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectUpdateTimestampQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectUpdateTimestampQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class ProjectUpdateTimestampQuery extends DatabaseQuery<Date | null> {\n\tconstructor(private readonly projectSlug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Date | null> {\n\t\tconst rows = await SelectBuilder.create<{ updated_at: Date }>()\n\t\t\t.select('updated_at')\n\t\t\t.from('project')\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)?.updated_at ?? null\n\t}\n}\n"],"names":[],"mappings":";AAEO,MAAM,oCAAoC,cAA2B;AAAA,EAC3E,YAA6B,aAAqB;AAC3C;AADsB,SAAA,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectUpdateTimestampQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectUpdateTimestampQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class ProjectUpdateTimestampQuery extends DatabaseQuery<Date | null> {\n\tconstructor(private readonly projectSlug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Date | null> {\n\t\tconst rows = await SelectBuilder.create<{ updated_at: Date }>()\n\t\t\t.select('updated_at')\n\t\t\t.from('project')\n\t\t\t.where({\n\t\t\t\tslug: this.projectSlug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)?.updated_at ?? null\n\t}\n}\n"],"names":[],"mappings":";AAEO,MAAM,oCAAoC,cAA2B;AAAA,EAC3E,YAA6B,aAAqB;AAC3C,UAAA;AADsB,SAAA,cAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAA+C;AACtD,UAAA,OAAO,MAAM,cAAc,SAC/B,OAAO,YAAY,EACnB,KAAK,SAAS,EACd,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IAAA,CACX,EACA,UAAU,EAAE;AAEd,WAAO,KAAK,eAAe,IAAI,GAAG,cAAc;AAAA,EAAA;AAElD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsByIdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { ProjectsQuery } from './ProjectsQuery'\nimport { PermissionActions, PermissionContext } from '../../authorization'\nimport { Project } from '../../type'\n\nexport class ProjectsByIdentityQuery extends DatabaseQuery<Project[]> {\n\tconstructor(private readonly identityId: string, private readonly permissionContext: PermissionContext) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<Project[]> {\n\t\tconst canAuthorizedEntityViewAll = await this.permissionContext.isAllowed({\n\t\t\taction: PermissionActions.PROJECT_VIEW,\n\t\t})\n\n\t\tif (this.identityId === this.permissionContext.identity.id && canAuthorizedEntityViewAll) {\n\t\t\treturn await new ProjectsQuery().fetch(queryable)\n\t\t}\n\n\t\tconst qb = SelectBuilder.create<Project>()\n\t\t\t.select(['project', 'id'])\n\t\t\t.select(['project', 'name'])\n\t\t\t.select(['project', 'slug'])\n\t\t\t.select(['project', 'config'])\n\t\t\t.from('project')\n\t\t\t.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create() //\n\t\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t\t.select('project_id')\n\t\t\t\t\t\t.where({\n\t\t\t\t\t\t\tidentity_id: this.identityId,\n\t\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)\n\n\t\tconst qbWithIdentityPermissions = canAuthorizedEntityViewAll\n\t\t\t? qb\n\t\t\t: qb.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create().from('project_membership').select('project_id').where({\n\t\t\t\t\t\tidentity_id: this.permissionContext.identity.id,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t )\n\n\t\treturn await qbWithIdentityPermissions.getResult(queryable.db)\n\t}\n}\n"],"names":["DatabaseQuery","PermissionActions","ProjectsQuery","SelectBuilder"],"mappings":";;;;;;;;;AAKO,MAAM,gCAAgCA,SAAAA,cAAyB;AAAA,EACrE,YAA6B,YAAqC,mBAAsC;AACjG;AADsB,SAAA,aAAA;AAAqC,SAAA,oBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectsByIdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { ProjectsQuery } from './ProjectsQuery'\nimport { PermissionActions, PermissionContext } from '../../authorization'\nimport { Project } from '../../type'\n\nexport class ProjectsByIdentityQuery extends DatabaseQuery<Project[]> {\n\tconstructor(private readonly identityId: string, private readonly permissionContext: PermissionContext) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<Project[]> {\n\t\tconst canAuthorizedEntityViewAll = await this.permissionContext.isAllowed({\n\t\t\taction: PermissionActions.PROJECT_VIEW,\n\t\t})\n\n\t\tif (this.identityId === this.permissionContext.identity.id && canAuthorizedEntityViewAll) {\n\t\t\treturn await new ProjectsQuery().fetch(queryable)\n\t\t}\n\n\t\tconst qb = SelectBuilder.create<Project>()\n\t\t\t.select(['project', 'id'])\n\t\t\t.select(['project', 'name'])\n\t\t\t.select(['project', 'slug'])\n\t\t\t.select(['project', 'config'])\n\t\t\t.from('project')\n\t\t\t.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create() //\n\t\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t\t.select('project_id')\n\t\t\t\t\t\t.where({\n\t\t\t\t\t\t\tidentity_id: this.identityId,\n\t\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)\n\n\t\tconst qbWithIdentityPermissions = canAuthorizedEntityViewAll\n\t\t\t? qb\n\t\t\t: qb.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create().from('project_membership').select('project_id').where({\n\t\t\t\t\t\tidentity_id: this.permissionContext.identity.id,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t )\n\n\t\treturn await qbWithIdentityPermissions.getResult(queryable.db)\n\t}\n}\n"],"names":["DatabaseQuery","PermissionActions","ProjectsQuery","SelectBuilder"],"mappings":";;;;;;;;;AAKO,MAAM,gCAAgCA,SAAAA,cAAyB;AAAA,EACrE,YAA6B,YAAqC,mBAAsC;AACjG,UAAA;AADsB,SAAA,aAAA;AAAqC,SAAA,oBAAA;AAAA,EAAA;AAAA,EAIlE,MAAM,MAAM,WAAkD;AAC7D,UAAM,6BAA6B,MAAM,KAAK,kBAAkB,UAAU;AAAA,MACzE,QAAQC,kBAAAA,kBAAkB;AAAA,IAAA,CAC1B;AAED,QAAI,KAAK,eAAe,KAAK,kBAAkB,SAAS,MAAM,4BAA4B;AACzF,aAAO,MAAM,IAAIC,cAAAA,gBAAgB,MAAM,SAAS;AAAA,IAAA;AAGjD,UAAM,KAAKC,SAAAA,cAAc,OAAgB,EACvC,OAAO,CAAC,WAAW,IAAI,CAAC,EACxB,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,QAAQ,CAAC,EAC5B,KAAK,SAAS,EACd;AAAA,MAAM,WACN,MAAM;AAAA,QACL,CAAC,WAAW,IAAI;AAAA,QAChBA,uBAAc,OACZ,EAAA,KAAK,oBAAoB,EACzB,OAAO,YAAY,EACnB,MAAM;AAAA,UACN,aAAa,KAAK;AAAA,QAClB,CAAA;AAAA,MAAA;AAAA,IAEJ;AAEK,UAAA,4BAA4B,6BAC/B,KACA,GAAG;AAAA,MAAM,WACV,MAAM;AAAA,QACL,CAAC,WAAW,IAAI;AAAA,QAChBA,uBAAc,OAAS,EAAA,KAAK,oBAAoB,EAAE,OAAO,YAAY,EAAE,MAAM;AAAA,UAC5E,aAAa,KAAK,kBAAkB,SAAS;AAAA,QAC7C,CAAA;AAAA,MAAA;AAAA,IAED;AAEH,WAAO,MAAM,0BAA0B,UAAU,UAAU,EAAE;AAAA,EAAA;AAE/D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsByIdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { ProjectsQuery } from './ProjectsQuery'\nimport { PermissionActions, PermissionContext } from '../../authorization'\nimport { Project } from '../../type'\n\nexport class ProjectsByIdentityQuery extends DatabaseQuery<Project[]> {\n\tconstructor(private readonly identityId: string, private readonly permissionContext: PermissionContext) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<Project[]> {\n\t\tconst canAuthorizedEntityViewAll = await this.permissionContext.isAllowed({\n\t\t\taction: PermissionActions.PROJECT_VIEW,\n\t\t})\n\n\t\tif (this.identityId === this.permissionContext.identity.id && canAuthorizedEntityViewAll) {\n\t\t\treturn await new ProjectsQuery().fetch(queryable)\n\t\t}\n\n\t\tconst qb = SelectBuilder.create<Project>()\n\t\t\t.select(['project', 'id'])\n\t\t\t.select(['project', 'name'])\n\t\t\t.select(['project', 'slug'])\n\t\t\t.select(['project', 'config'])\n\t\t\t.from('project')\n\t\t\t.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create() //\n\t\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t\t.select('project_id')\n\t\t\t\t\t\t.where({\n\t\t\t\t\t\t\tidentity_id: this.identityId,\n\t\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)\n\n\t\tconst qbWithIdentityPermissions = canAuthorizedEntityViewAll\n\t\t\t? qb\n\t\t\t: qb.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create().from('project_membership').select('project_id').where({\n\t\t\t\t\t\tidentity_id: this.permissionContext.identity.id,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t )\n\n\t\treturn await qbWithIdentityPermissions.getResult(queryable.db)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,gCAAgC,cAAyB;AAAA,EACrE,YAA6B,YAAqC,mBAAsC;AACjG;AADsB,SAAA,aAAA;AAAqC,SAAA,oBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectsByIdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { ProjectsQuery } from './ProjectsQuery'\nimport { PermissionActions, PermissionContext } from '../../authorization'\nimport { Project } from '../../type'\n\nexport class ProjectsByIdentityQuery extends DatabaseQuery<Project[]> {\n\tconstructor(private readonly identityId: string, private readonly permissionContext: PermissionContext) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<Project[]> {\n\t\tconst canAuthorizedEntityViewAll = await this.permissionContext.isAllowed({\n\t\t\taction: PermissionActions.PROJECT_VIEW,\n\t\t})\n\n\t\tif (this.identityId === this.permissionContext.identity.id && canAuthorizedEntityViewAll) {\n\t\t\treturn await new ProjectsQuery().fetch(queryable)\n\t\t}\n\n\t\tconst qb = SelectBuilder.create<Project>()\n\t\t\t.select(['project', 'id'])\n\t\t\t.select(['project', 'name'])\n\t\t\t.select(['project', 'slug'])\n\t\t\t.select(['project', 'config'])\n\t\t\t.from('project')\n\t\t\t.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create() //\n\t\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t\t.select('project_id')\n\t\t\t\t\t\t.where({\n\t\t\t\t\t\t\tidentity_id: this.identityId,\n\t\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)\n\n\t\tconst qbWithIdentityPermissions = canAuthorizedEntityViewAll\n\t\t\t? qb\n\t\t\t: qb.where(where =>\n\t\t\t\twhere.in(\n\t\t\t\t\t['project', 'id'],\n\t\t\t\t\tSelectBuilder.create().from('project_membership').select('project_id').where({\n\t\t\t\t\t\tidentity_id: this.permissionContext.identity.id,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t )\n\n\t\treturn await qbWithIdentityPermissions.getResult(queryable.db)\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAKO,MAAM,gCAAgC,cAAyB;AAAA,EACrE,YAA6B,YAAqC,mBAAsC;AACjG,UAAA;AADsB,SAAA,aAAA;AAAqC,SAAA,oBAAA;AAAA,EAAA;AAAA,EAIlE,MAAM,MAAM,WAAkD;AAC7D,UAAM,6BAA6B,MAAM,KAAK,kBAAkB,UAAU;AAAA,MACzE,QAAQ,kBAAkB;AAAA,IAAA,CAC1B;AAED,QAAI,KAAK,eAAe,KAAK,kBAAkB,SAAS,MAAM,4BAA4B;AACzF,aAAO,MAAM,IAAI,gBAAgB,MAAM,SAAS;AAAA,IAAA;AAGjD,UAAM,KAAK,cAAc,OAAgB,EACvC,OAAO,CAAC,WAAW,IAAI,CAAC,EACxB,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,QAAQ,CAAC,EAC5B,KAAK,SAAS,EACd;AAAA,MAAM,WACN,MAAM;AAAA,QACL,CAAC,WAAW,IAAI;AAAA,QAChB,cAAc,OACZ,EAAA,KAAK,oBAAoB,EACzB,OAAO,YAAY,EACnB,MAAM;AAAA,UACN,aAAa,KAAK;AAAA,QAClB,CAAA;AAAA,MAAA;AAAA,IAEJ;AAEK,UAAA,4BAA4B,6BAC/B,KACA,GAAG;AAAA,MAAM,WACV,MAAM;AAAA,QACL,CAAC,WAAW,IAAI;AAAA,QAChB,cAAc,OAAS,EAAA,KAAK,oBAAoB,EAAE,OAAO,YAAY,EAAE,MAAM;AAAA,UAC5E,aAAa,KAAK,kBAAkB,SAAS;AAAA,QAC7C,CAAA;AAAA,MAAA;AAAA,IAED;AAEH,WAAO,MAAM,0BAA0B,UAAU,UAAU,EAAE;AAAA,EAAA;AAE/D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectsQuery extends DatabaseQuery<Project[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<Project[]> {\n\t\treturn await SelectBuilder.create<Project>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.from('project')\n\t\t\t.orderBy('slug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAGO,MAAM,sBAAsBA,SAAAA,cAAyB;AAAA,EAC3D,MAAM,MAAM,EAAE,MAA6C;AACnD,WAAA,MAAMC,SAAAA,cAAc,OAAgB,EACzC,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,KAAK,SAAS,EACd,QAAQ,MAAM,EACd,UAAU,EAAE;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectsQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectsQuery extends DatabaseQuery<Project[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<Project[]> {\n\t\treturn await SelectBuilder.create<Project>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.from('project')\n\t\t\t.orderBy('slug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAGO,MAAM,sBAAsBA,SAAAA,cAAyB;AAAA,EAC3D,MAAM,MAAM,EAAE,MAA6C;AACnD,WAAA,MAAMC,SAAAA,cAAc,OAAgB,EACzC,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,KAAK,SAAS,EACd,QAAQ,MAAM,EACd,UAAU,EAAE;AAAA,EAAA;AAEhB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectsQuery extends DatabaseQuery<Project[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<Project[]> {\n\t\treturn await SelectBuilder.create<Project>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.from('project')\n\t\t\t.orderBy('slug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,sBAAsB,cAAyB;AAAA,EAC3D,MAAM,MAAM,EAAE,MAA6C;AACnD,WAAA,MAAM,cAAc,OAAgB,EACzC,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,KAAK,SAAS,EACd,QAAQ,MAAM,EACd,UAAU,EAAE;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectsQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/project/ProjectsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { Project } from '../../type'\n\nexport class ProjectsQuery extends DatabaseQuery<Project[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<Project[]> {\n\t\treturn await SelectBuilder.create<Project>()\n\t\t\t.select('id')\n\t\t\t.select('name')\n\t\t\t.select('slug')\n\t\t\t.select('config')\n\t\t\t.from('project')\n\t\t\t.orderBy('slug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,sBAAsB,cAAyB;AAAA,EAC3D,MAAM,MAAM,EAAE,MAA6C;AACnD,WAAA,MAAM,cAAc,OAAgB,EACzC,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,QAAQ,EACf,KAAK,SAAS,EACd,QAAQ,MAAM,EACd,UAAU,EAAE;AAAA,EAAA;AAEhB;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Response = require("../utils/Response.cjs");
|
|
4
|
+
require("../type/ApiKey.cjs");
|
|
5
|
+
require("@contember/database");
|
|
6
|
+
require("node:crypto");
|
|
7
|
+
const UpdateConfigurationCommand = require("../commands/configuration/UpdateConfigurationCommand.cjs");
|
|
8
|
+
require("../queries/apiKey/ApiKeyQuery.cjs");
|
|
9
|
+
const ConfigurationQuery = require("../queries/configuration/ConfigurationQuery.cjs");
|
|
10
|
+
require("../authorization/PermissionActions.cjs");
|
|
11
|
+
require("@contember/authorization");
|
|
12
|
+
require("../authorization/PermissionContext.cjs");
|
|
13
|
+
require("../authorization/PermissionsFactory.cjs");
|
|
14
|
+
require("@contember/schema");
|
|
15
|
+
class ConfigurationManager {
|
|
16
|
+
constructor() {
|
|
17
|
+
}
|
|
18
|
+
async updateConfiguration(db, configuration) {
|
|
19
|
+
await db.commandBus.execute(new UpdateConfigurationCommand.UpdateConfigurationCommand(configuration));
|
|
20
|
+
return new Response.ResponseOk(null);
|
|
21
|
+
}
|
|
22
|
+
async fetchConfiguration(db) {
|
|
23
|
+
return await db.queryHandler.fetch(new ConfigurationQuery.ConfigurationQuery());
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ConfigurationManager = ConfigurationManager;
|
|
27
|
+
//# sourceMappingURL=ConfigurationManager.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationManager.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/ConfigurationManager.ts"],"sourcesContent":["import { Config, ConfigInput, ConfigureErrorCode } from '../../schema'\nimport { Response, ResponseOk } from '../utils/Response'\nimport { DatabaseContext } from '../utils'\nimport { UpdateConfigurationCommand } from '../commands'\nimport { ConfigurationQuery } from '../queries'\n\nexport class ConfigurationManager {\n\tconstructor() {\n\t}\n\n\tpublic async updateConfiguration(db: DatabaseContext, configuration: ConfigInput): Promise<Response<null, ConfigureErrorCode>> {\n\t\t// todo: validate configuration\n\n\t\tawait db.commandBus.execute(new UpdateConfigurationCommand(configuration))\n\n\t\treturn new ResponseOk(null)\n\t}\n\n\tpublic async fetchConfiguration(db: DatabaseContext): Promise<Config> {\n\t\treturn await db.queryHandler.fetch(new ConfigurationQuery())\n\t}\n}\n"],"names":["UpdateConfigurationCommand","ResponseOk","ConfigurationQuery"],"mappings":";;;;;;;;;;;;;;AAMO,MAAM,qBAAqB;AAAA,EACjC,cAAc;AAAA,EAAA;AAAA,EAGd,MAAa,oBAAoB,IAAqB,eAAyE;AAG9H,UAAM,GAAG,WAAW,QAAQ,IAAIA,2BAAA,2BAA2B,aAAa,CAAC;AAElE,WAAA,IAAIC,oBAAW,IAAI;AAAA,EAAA;AAAA,EAG3B,MAAa,mBAAmB,IAAsC;AACrE,WAAO,MAAM,GAAG,aAAa,MAAM,IAAIC,uCAAoB;AAAA,EAAA;AAE7D;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ResponseOk } from "../utils/Response.js";
|
|
2
|
+
import "../type/ApiKey.js";
|
|
3
|
+
import "@contember/database";
|
|
4
|
+
import "node:crypto";
|
|
5
|
+
import { UpdateConfigurationCommand } from "../commands/configuration/UpdateConfigurationCommand.js";
|
|
6
|
+
import "../queries/apiKey/ApiKeyQuery.js";
|
|
7
|
+
import { ConfigurationQuery } from "../queries/configuration/ConfigurationQuery.js";
|
|
8
|
+
import "../authorization/PermissionActions.js";
|
|
9
|
+
import "@contember/authorization";
|
|
10
|
+
import "../authorization/PermissionContext.js";
|
|
11
|
+
import "../authorization/PermissionsFactory.js";
|
|
12
|
+
import "@contember/schema";
|
|
13
|
+
class ConfigurationManager {
|
|
14
|
+
constructor() {
|
|
15
|
+
}
|
|
16
|
+
async updateConfiguration(db, configuration) {
|
|
17
|
+
await db.commandBus.execute(new UpdateConfigurationCommand(configuration));
|
|
18
|
+
return new ResponseOk(null);
|
|
19
|
+
}
|
|
20
|
+
async fetchConfiguration(db) {
|
|
21
|
+
return await db.queryHandler.fetch(new ConfigurationQuery());
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
ConfigurationManager
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=ConfigurationManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationManager.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/ConfigurationManager.ts"],"sourcesContent":["import { Config, ConfigInput, ConfigureErrorCode } from '../../schema'\nimport { Response, ResponseOk } from '../utils/Response'\nimport { DatabaseContext } from '../utils'\nimport { UpdateConfigurationCommand } from '../commands'\nimport { ConfigurationQuery } from '../queries'\n\nexport class ConfigurationManager {\n\tconstructor() {\n\t}\n\n\tpublic async updateConfiguration(db: DatabaseContext, configuration: ConfigInput): Promise<Response<null, ConfigureErrorCode>> {\n\t\t// todo: validate configuration\n\n\t\tawait db.commandBus.execute(new UpdateConfigurationCommand(configuration))\n\n\t\treturn new ResponseOk(null)\n\t}\n\n\tpublic async fetchConfiguration(db: DatabaseContext): Promise<Config> {\n\t\treturn await db.queryHandler.fetch(new ConfigurationQuery())\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAMO,MAAM,qBAAqB;AAAA,EACjC,cAAc;AAAA,EAAA;AAAA,EAGd,MAAa,oBAAoB,IAAqB,eAAyE;AAG9H,UAAM,GAAG,WAAW,QAAQ,IAAI,2BAA2B,aAAa,CAAC;AAElE,WAAA,IAAI,WAAW,IAAI;AAAA,EAAA;AAAA,EAG3B,MAAa,mBAAmB,IAAsC;AACrE,WAAO,MAAM,GAAG,aAAa,MAAM,IAAI,oBAAoB;AAAA,EAAA;AAE7D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailValidator.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/EmailValidator.ts"],"sourcesContent":["import { DatabaseContext } from '../utils'\nimport { validateEmail } from '../utils/email'\nimport { ResponseError } from '../utils/Response'\nimport { PersonQuery } from '../queries'\n\nexport class EmailValidator {\n\n\tpublic async validateEmail(db: DatabaseContext, email: string): Promise<ResponseError<EmailValidatorError> | null> {\n\t\tif (!validateEmail(email.trim())) {\n\t\t\treturn new ResponseError('INVALID_EMAIL_FORMAT', 'E-mail address is not in a valid format')\n\t\t}\n\t\tif (await this.isEmailAlreadyUsed(db, email)) {\n\t\t\treturn new ResponseError('EMAIL_ALREADY_EXISTS', `User with email ${email} already exists`)\n\t\t}\n\t\treturn null\n\t}\n\n\tprivate async isEmailAlreadyUsed(db: DatabaseContext, email: string): Promise<boolean> {\n\t\tconst personOrNull = await db.queryHandler.fetch(PersonQuery.byEmail(email))\n\t\treturn personOrNull !== null\n\t}\n}\n\nexport type EmailValidatorError =\n\t| 'EMAIL_ALREADY_EXISTS'\n\t| 'INVALID_EMAIL_FORMAT'\n"],"names":["email","validateEmail","ResponseError","PersonQuery"],"mappings":";;;;;;;;;;;;AAKO,MAAM,eAAe;AAAA,EAE3B,MAAa,cAAc,IAAqBA,SAAmE;AAClH,QAAI,CAACC,MAAA,cAAcD,QAAM,KAAM,CAAA,GAAG;AAC1B,aAAA,IAAIE,
|
|
1
|
+
{"version":3,"file":"EmailValidator.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/EmailValidator.ts"],"sourcesContent":["import { DatabaseContext } from '../utils'\nimport { validateEmail } from '../utils/email'\nimport { ResponseError } from '../utils/Response'\nimport { PersonQuery } from '../queries'\n\nexport class EmailValidator {\n\n\tpublic async validateEmail(db: DatabaseContext, email: string): Promise<ResponseError<EmailValidatorError> | null> {\n\t\tif (!validateEmail(email.trim())) {\n\t\t\treturn new ResponseError('INVALID_EMAIL_FORMAT', 'E-mail address is not in a valid format')\n\t\t}\n\t\tif (await this.isEmailAlreadyUsed(db, email)) {\n\t\t\treturn new ResponseError('EMAIL_ALREADY_EXISTS', `User with email ${email} already exists`)\n\t\t}\n\t\treturn null\n\t}\n\n\tprivate async isEmailAlreadyUsed(db: DatabaseContext, email: string): Promise<boolean> {\n\t\tconst personOrNull = await db.queryHandler.fetch(PersonQuery.byEmail(email))\n\t\treturn personOrNull !== null\n\t}\n}\n\nexport type EmailValidatorError =\n\t| 'EMAIL_ALREADY_EXISTS'\n\t| 'INVALID_EMAIL_FORMAT'\n"],"names":["email","validateEmail","ResponseError","PersonQuery"],"mappings":";;;;;;;;;;;;AAKO,MAAM,eAAe;AAAA,EAE3B,MAAa,cAAc,IAAqBA,SAAmE;AAClH,QAAI,CAACC,MAAA,cAAcD,QAAM,KAAM,CAAA,GAAG;AAC1B,aAAA,IAAIE,SAAAA,cAAc,wBAAwB,yCAAyC;AAAA,IAAA;AAE3F,QAAI,MAAM,KAAK,mBAAmB,IAAIF,OAAK,GAAG;AAC7C,aAAO,IAAIE,SAAA,cAAc,wBAAwB,mBAAmBF,OAAK,iBAAiB;AAAA,IAAA;AAEpF,WAAA;AAAA,EAAA;AAAA,EAGR,MAAc,mBAAmB,IAAqBA,QAAiC;AAChF,UAAA,eAAe,MAAM,GAAG,aAAa,MAAMG,wBAAY,QAAQH,MAAK,CAAC;AAC3E,WAAO,iBAAiB;AAAA,EAAA;AAE1B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailValidator.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/EmailValidator.ts"],"sourcesContent":["import { DatabaseContext } from '../utils'\nimport { validateEmail } from '../utils/email'\nimport { ResponseError } from '../utils/Response'\nimport { PersonQuery } from '../queries'\n\nexport class EmailValidator {\n\n\tpublic async validateEmail(db: DatabaseContext, email: string): Promise<ResponseError<EmailValidatorError> | null> {\n\t\tif (!validateEmail(email.trim())) {\n\t\t\treturn new ResponseError('INVALID_EMAIL_FORMAT', 'E-mail address is not in a valid format')\n\t\t}\n\t\tif (await this.isEmailAlreadyUsed(db, email)) {\n\t\t\treturn new ResponseError('EMAIL_ALREADY_EXISTS', `User with email ${email} already exists`)\n\t\t}\n\t\treturn null\n\t}\n\n\tprivate async isEmailAlreadyUsed(db: DatabaseContext, email: string): Promise<boolean> {\n\t\tconst personOrNull = await db.queryHandler.fetch(PersonQuery.byEmail(email))\n\t\treturn personOrNull !== null\n\t}\n}\n\nexport type EmailValidatorError =\n\t| 'EMAIL_ALREADY_EXISTS'\n\t| 'INVALID_EMAIL_FORMAT'\n"],"names":[],"mappings":";;;;;;;;;;AAKO,MAAM,eAAe;AAAA,EAE3B,MAAa,cAAc,IAAqB,OAAmE;AAClH,QAAI,CAAC,cAAc,MAAM,KAAM,CAAA,GAAG;AAC1B,aAAA,IAAI,cAAc,wBAAwB,yCAAyC;AAAA,
|
|
1
|
+
{"version":3,"file":"EmailValidator.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/EmailValidator.ts"],"sourcesContent":["import { DatabaseContext } from '../utils'\nimport { validateEmail } from '../utils/email'\nimport { ResponseError } from '../utils/Response'\nimport { PersonQuery } from '../queries'\n\nexport class EmailValidator {\n\n\tpublic async validateEmail(db: DatabaseContext, email: string): Promise<ResponseError<EmailValidatorError> | null> {\n\t\tif (!validateEmail(email.trim())) {\n\t\t\treturn new ResponseError('INVALID_EMAIL_FORMAT', 'E-mail address is not in a valid format')\n\t\t}\n\t\tif (await this.isEmailAlreadyUsed(db, email)) {\n\t\t\treturn new ResponseError('EMAIL_ALREADY_EXISTS', `User with email ${email} already exists`)\n\t\t}\n\t\treturn null\n\t}\n\n\tprivate async isEmailAlreadyUsed(db: DatabaseContext, email: string): Promise<boolean> {\n\t\tconst personOrNull = await db.queryHandler.fetch(PersonQuery.byEmail(email))\n\t\treturn personOrNull !== null\n\t}\n}\n\nexport type EmailValidatorError =\n\t| 'EMAIL_ALREADY_EXISTS'\n\t| 'INVALID_EMAIL_FORMAT'\n"],"names":[],"mappings":";;;;;;;;;;AAKO,MAAM,eAAe;AAAA,EAE3B,MAAa,cAAc,IAAqB,OAAmE;AAClH,QAAI,CAAC,cAAc,MAAM,KAAM,CAAA,GAAG;AAC1B,aAAA,IAAI,cAAc,wBAAwB,yCAAyC;AAAA,IAAA;AAE3F,QAAI,MAAM,KAAK,mBAAmB,IAAI,KAAK,GAAG;AAC7C,aAAO,IAAI,cAAc,wBAAwB,mBAAmB,KAAK,iBAAiB;AAAA,IAAA;AAEpF,WAAA;AAAA,EAAA;AAAA,EAGR,MAAc,mBAAmB,IAAqB,OAAiC;AAChF,UAAA,eAAe,MAAM,GAAG,aAAa,MAAM,YAAY,QAAQ,KAAK,CAAC;AAC3E,WAAO,iBAAiB;AAAA,EAAA;AAE1B;"}
|
|
@@ -62,7 +62,7 @@ class IDPSignInManager {
|
|
|
62
62
|
return new Response.ResponseError("PERSON_DISABLED", `Person with e-mail ${claim.email} is disabled`);
|
|
63
63
|
}
|
|
64
64
|
const sessionToken = await this.apiKeyManager.createSessionApiKey(db, personRow.identity_id, expiration);
|
|
65
|
-
return new Response.ResponseOk({ person: personRow, token: sessionToken });
|
|
65
|
+
return new Response.ResponseOk({ person: personRow, token: sessionToken, idpResponse: claim });
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async initSignInIDP(dbContext, idpSlug, data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDPSignInManager.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/IDPSignInManager.ts"],"sourcesContent":["import { ApiKeyManager } from './apiKey'\nimport { IdentityProviderBySlugQuery, PersonByIdPQuery, PersonQuery, PersonRow } from '../queries'\nimport {
|
|
1
|
+
{"version":3,"file":"IDPSignInManager.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/IDPSignInManager.ts"],"sourcesContent":["import { ApiKeyManager } from './apiKey'\nimport { IdentityProviderBySlugQuery, PersonByIdPQuery, PersonQuery, PersonRow } from '../queries'\nimport { IDPResponse, IDPHandlerRegistry, IDPResponseError, IDPValidationError } from './idp'\nimport { Response, ResponseError, ResponseOk } from '../utils/Response'\nimport { InitSignInIdpErrorCode, InitSignInIdpResult, SignInIdpErrorCode } from '../../schema'\nimport { DatabaseContext } from '../utils'\nimport { CreateIdentityCommand, CreatePersonCommand, CreatePersonIdentityProviderIdentifierCommand } from '../commands'\nimport { TenantRole } from '../authorization'\nimport { NoPassword } from '../dtos'\nimport { IdentityProviderRow } from '../queries/idp/types'\n\nclass IDPSignInManager {\n\tconstructor(\n\t\tprivate readonly apiKeyManager: ApiKeyManager,\n\t\tprivate readonly idpRegistry: IDPHandlerRegistry,\n\t) {}\n\n\tasync signInIDP(\n\t\tdbContext: DatabaseContext,\n\t\tidpSlug: string,\n\t\tresponseData: unknown,\n\t\texpiration?: number,\n\t): Promise<IDPSignInManager.SignInIDPResponse> {\n\t\treturn dbContext.transaction(async (db): Promise<IDPSignInManager.SignInIDPResponse> => {\n\t\t\tconst provider = await db.queryHandler.fetch(new IdentityProviderBySlugQuery(idpSlug))\n\t\t\tif (!provider || provider.disabledAt) {\n\t\t\t\tthrow new Error('provider not found')\n\t\t\t}\n\t\t\tconst providerService = this.idpRegistry.getHandler(provider.type)\n\t\t\tconst validatedConfig = providerService.validateConfiguration(provider.configuration)\n\t\t\tlet claim: IDPResponse\n\t\t\ttry {\n\t\t\t\tclaim = await providerService.processResponse(\n\t\t\t\t\tvalidatedConfig,\n\t\t\t\t\tresponseData,\n\t\t\t\t)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof IDPResponseError) {\n\t\t\t\t\treturn new ResponseError('INVALID_IDP_RESPONSE', e.message)\n\t\t\t\t}\n\t\t\t\tif (e instanceof IDPValidationError) {\n\t\t\t\t\treturn new ResponseError('IDP_VALIDATION_FAILED', e.message)\n\t\t\t\t}\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tconst personRow = await this.resolvePerson(db, claim, provider)\n\n\t\t\tif (!personRow) {\n\t\t\t\treturn new ResponseError('PERSON_NOT_FOUND', `Person ${claim.email} not found`)\n\t\t\t}\n\n\t\t\tif (personRow.disabled_at !== null) {\n\t\t\t\treturn new ResponseError('PERSON_DISABLED', `Person with e-mail ${claim.email} is disabled`)\n\t\t\t}\n\n\t\t\tconst sessionToken = await this.apiKeyManager.createSessionApiKey(db, personRow.identity_id, expiration)\n\t\t\treturn new ResponseOk({ person: personRow, token: sessionToken, idpResponse: claim })\n\t\t})\n\t}\n\n\tasync initSignInIDP(dbContext: DatabaseContext, idpSlug: string, data: unknown): Promise<IDPSignInManager.InitSignInIDPResponse> {\n\t\tconst provider = await dbContext.queryHandler.fetch(new IdentityProviderBySlugQuery(idpSlug))\n\t\tif (!provider || provider.disabledAt) {\n\t\t\treturn new ResponseError('PROVIDER_NOT_FOUND', `Identity provider ${idpSlug} not found`)\n\t\t}\n\t\tconst providerService = this.idpRegistry.getHandler(provider.type)\n\t\tconst validatedConfig = providerService.validateConfiguration(provider.configuration)\n\t\ttry {\n\t\t\tconst initResponse = await providerService.initAuth(validatedConfig, data)\n\n\t\t\tconst publicConfig = providerService.getPublicConfiguration\n\t\t\t\t? providerService.getPublicConfiguration(validatedConfig)\n\t\t\t\t: validatedConfig\n\n\t\t\treturn new ResponseOk({\n\t\t\t\t...initResponse,\n\t\t\t\tidpConfiguration: provider.initReturnsConfig ? publicConfig : null,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tif (e instanceof IDPValidationError) {\n\t\t\t\treturn new ResponseError('IDP_VALIDATION_FAILED', e.message)\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}\n\n\tprivate async resolvePerson(db: DatabaseContext, claim: IDPResponse, provider: IdentityProviderRow): Promise<PersonRow | null> {\n\t\tconst personByIdPQuery = new PersonByIdPQuery(provider.id, claim.externalIdentifier)\n\t\tconst personByIdp = await db.queryHandler.fetch(personByIdPQuery)\n\t\tif (personByIdp) {\n\t\t\treturn personByIdp\n\t\t}\n\n\t\tif (!provider.exclusive) {\n\t\t\tconst personByEmail = claim.email ? await db.queryHandler.fetch(PersonQuery.byEmail(claim.email)) : null\n\t\t\tif (personByEmail) {\n\t\t\t\tawait this.saveIdpIdentifier(db, provider, claim, personByEmail)\n\t\t\t\treturn personByEmail\n\t\t\t}\n\t\t}\n\n\t\tif (provider.autoSignUp) {\n\t\t\tconst signedUpPerson = await this.signUp(db, claim, provider)\n\t\t\tawait this.saveIdpIdentifier(db, provider, claim, signedUpPerson)\n\t\t\treturn signedUpPerson\n\t\t}\n\n\t\treturn null\n\t}\n\n\tprivate async signUp(db: DatabaseContext, { email, name, externalIdentifier }: IDPResponse, provider: IdentityProviderRow): Promise<PersonRow> {\n\t\tconst roles = [TenantRole.PERSON]\n\t\tconst identityId = await db.commandBus.execute(new CreateIdentityCommand(roles))\n\t\tconst newPerson = await db.commandBus.execute(new CreatePersonCommand({\n\t\t\tidentityId,\n\t\t\temail: provider.exclusive ? undefined : email,\n\t\t\tpassword: NoPassword,\n\t\t\tname: name ?? email?.split('@')[0] ?? externalIdentifier,\n\t\t\tidpOnly: provider.exclusive,\n\t\t}))\n\n\t\treturn {\n\t\t\t...newPerson,\n\t\t\troles,\n\t\t}\n\t}\n\n\tprivate async saveIdpIdentifier(db: DatabaseContext, provider: IdentityProviderRow, claim: IDPResponse, person: PersonRow) {\n\t\tawait db.commandBus.execute(new CreatePersonIdentityProviderIdentifierCommand(provider.id, person.id, claim.externalIdentifier))\n\t}\n}\n\nnamespace IDPSignInManager {\n\texport type InitSignInIDPResponse = Response<InitSignInIdpResult, InitSignInIdpErrorCode>\n\n\tinterface SignInIDPResult {\n\t\treadonly person: PersonRow\n\t\treadonly token: string\n\t\treadonly idpResponse?: Record<string, unknown>\n\t}\n\n\texport type SignInIDPResponse = Response<SignInIDPResult, SignInIdpErrorCode>\n}\n\nexport { IDPSignInManager }\n"],"names":["IdentityProviderBySlugQuery","IDPResponseError","ResponseError","IDPValidationError","ResponseOk","PersonByIdPQuery","PersonQuery","TenantRole","CreateIdentityCommand","CreatePersonCommand","NoPassword","CreatePersonIdentityProviderIdentifierCommand"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,MAAM,iBAAiB;AAAA,EACtB,YACkB,eACA,aAChB;AAFgB,SAAA,gBAAA;AACA,SAAA,cAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,UACL,WACA,SACA,cACA,YAC8C;AACvC,WAAA,UAAU,YAAY,OAAO,OAAoD;AACjF,YAAA,WAAW,MAAM,GAAG,aAAa,MAAM,IAAIA,4BAAAA,4BAA4B,OAAO,CAAC;AACjF,UAAA,CAAC,YAAY,SAAS,YAAY;AAC/B,cAAA,IAAI,MAAM,oBAAoB;AAAA,MAAA;AAErC,YAAM,kBAAkB,KAAK,YAAY,WAAW,SAAS,IAAI;AACjE,YAAM,kBAAkB,gBAAgB,sBAAsB,SAAS,aAAa;AAChF,UAAA;AACA,UAAA;AACH,gBAAQ,MAAM,gBAAgB;AAAA,UAC7B;AAAA,UACA;AAAA,QACD;AAAA,eACQ,GAAG;AACX,YAAI,aAAaC,iBAAAA,kBAAkB;AAClC,iBAAO,IAAIC,SAAA,cAAc,wBAAwB,EAAE,OAAO;AAAA,QAAA;AAE3D,YAAI,aAAaC,mBAAAA,oBAAoB;AACpC,iBAAO,IAAID,SAAA,cAAc,yBAAyB,EAAE,OAAO;AAAA,QAAA;AAEtD,cAAA;AAAA,MAAA;AAEP,YAAM,YAAY,MAAM,KAAK,cAAc,IAAI,OAAO,QAAQ;AAE9D,UAAI,CAAC,WAAW;AACf,eAAO,IAAIA,SAAc,cAAA,oBAAoB,UAAU,MAAM,KAAK,YAAY;AAAA,MAAA;AAG3E,UAAA,UAAU,gBAAgB,MAAM;AACnC,eAAO,IAAIA,SAAc,cAAA,mBAAmB,sBAAsB,MAAM,KAAK,cAAc;AAAA,MAAA;AAGtF,YAAA,eAAe,MAAM,KAAK,cAAc,oBAAoB,IAAI,UAAU,aAAa,UAAU;AAChG,aAAA,IAAIE,SAAAA,WAAW,EAAE,QAAQ,WAAW,OAAO,cAAc,aAAa,OAAO;AAAA,IAAA,CACpF;AAAA,EAAA;AAAA,EAGF,MAAM,cAAc,WAA4B,SAAiB,MAAgE;AAC1H,UAAA,WAAW,MAAM,UAAU,aAAa,MAAM,IAAIJ,4BAAAA,4BAA4B,OAAO,CAAC;AACxF,QAAA,CAAC,YAAY,SAAS,YAAY;AACrC,aAAO,IAAIE,SAAA,cAAc,sBAAsB,qBAAqB,OAAO,YAAY;AAAA,IAAA;AAExF,UAAM,kBAAkB,KAAK,YAAY,WAAW,SAAS,IAAI;AACjE,UAAM,kBAAkB,gBAAgB,sBAAsB,SAAS,aAAa;AAChF,QAAA;AACH,YAAM,eAAe,MAAM,gBAAgB,SAAS,iBAAiB,IAAI;AAEzE,YAAM,eAAe,gBAAgB,yBAClC,gBAAgB,uBAAuB,eAAe,IACtD;AAEH,aAAO,IAAIE,SAAAA,WAAW;AAAA,QACrB,GAAG;AAAA,QACH,kBAAkB,SAAS,oBAAoB,eAAe;AAAA,MAAA,CAC9D;AAAA,aACO,GAAG;AACX,UAAI,aAAaD,mBAAAA,oBAAoB;AACpC,eAAO,IAAID,SAAA,cAAc,yBAAyB,EAAE,OAAO;AAAA,MAAA;AAEtD,YAAA;AAAA,IAAA;AAAA,EACP;AAAA,EAGD,MAAc,cAAc,IAAqB,OAAoB,UAA0D;AAC9H,UAAM,mBAAmB,IAAIG,iBAAA,iBAAiB,SAAS,IAAI,MAAM,kBAAkB;AACnF,UAAM,cAAc,MAAM,GAAG,aAAa,MAAM,gBAAgB;AAChE,QAAI,aAAa;AACT,aAAA;AAAA,IAAA;AAGJ,QAAA,CAAC,SAAS,WAAW;AACxB,YAAM,gBAAgB,MAAM,QAAQ,MAAM,GAAG,aAAa,MAAMC,YAAAA,YAAY,QAAQ,MAAM,KAAK,CAAC,IAAI;AACpG,UAAI,eAAe;AAClB,cAAM,KAAK,kBAAkB,IAAI,UAAU,OAAO,aAAa;AACxD,eAAA;AAAA,MAAA;AAAA,IACR;AAGD,QAAI,SAAS,YAAY;AACxB,YAAM,iBAAiB,MAAM,KAAK,OAAO,IAAI,OAAO,QAAQ;AAC5D,YAAM,KAAK,kBAAkB,IAAI,UAAU,OAAO,cAAc;AACzD,aAAA;AAAA,IAAA;AAGD,WAAA;AAAA,EAAA;AAAA,EAGR,MAAc,OAAO,IAAqB,EAAE,OAAO,MAAM,sBAAmC,UAAmD;AACxI,UAAA,QAAQ,CAACC,MAAA,WAAW,MAAM;AAC1B,UAAA,aAAa,MAAM,GAAG,WAAW,QAAQ,IAAIC,sBAAAA,sBAAsB,KAAK,CAAC;AAC/E,UAAM,YAAY,MAAM,GAAG,WAAW,QAAQ,IAAIC,oBAAAA,oBAAoB;AAAA,MACrE;AAAA,MACA,OAAO,SAAS,YAAY,SAAY;AAAA,MACxC,UAAUC,SAAA;AAAA,MACV,MAAM,QAAQ,OAAO,MAAM,GAAG,EAAE,CAAC,KAAK;AAAA,MACtC,SAAS,SAAS;AAAA,IAAA,CAClB,CAAC;AAEK,WAAA;AAAA,MACN,GAAG;AAAA,MACH;AAAA,IACD;AAAA,EAAA;AAAA,EAGD,MAAc,kBAAkB,IAAqB,UAA+B,OAAoB,QAAmB;AACpH,UAAA,GAAG,WAAW,QAAQ,IAAIC,8CAAAA,8CAA8C,SAAS,IAAI,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAAA,EAAA;AAEjI;;"}
|
|
@@ -60,7 +60,7 @@ class IDPSignInManager {
|
|
|
60
60
|
return new ResponseError("PERSON_DISABLED", `Person with e-mail ${claim.email} is disabled`);
|
|
61
61
|
}
|
|
62
62
|
const sessionToken = await this.apiKeyManager.createSessionApiKey(db, personRow.identity_id, expiration);
|
|
63
|
-
return new ResponseOk({ person: personRow, token: sessionToken });
|
|
63
|
+
return new ResponseOk({ person: personRow, token: sessionToken, idpResponse: claim });
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
async initSignInIDP(dbContext, idpSlug, data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDPSignInManager.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/IDPSignInManager.ts"],"sourcesContent":["import { ApiKeyManager } from './apiKey'\nimport { IdentityProviderBySlugQuery, PersonByIdPQuery, PersonQuery, PersonRow } from '../queries'\nimport {
|
|
1
|
+
{"version":3,"file":"IDPSignInManager.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/IDPSignInManager.ts"],"sourcesContent":["import { ApiKeyManager } from './apiKey'\nimport { IdentityProviderBySlugQuery, PersonByIdPQuery, PersonQuery, PersonRow } from '../queries'\nimport { IDPResponse, IDPHandlerRegistry, IDPResponseError, IDPValidationError } from './idp'\nimport { Response, ResponseError, ResponseOk } from '../utils/Response'\nimport { InitSignInIdpErrorCode, InitSignInIdpResult, SignInIdpErrorCode } from '../../schema'\nimport { DatabaseContext } from '../utils'\nimport { CreateIdentityCommand, CreatePersonCommand, CreatePersonIdentityProviderIdentifierCommand } from '../commands'\nimport { TenantRole } from '../authorization'\nimport { NoPassword } from '../dtos'\nimport { IdentityProviderRow } from '../queries/idp/types'\n\nclass IDPSignInManager {\n\tconstructor(\n\t\tprivate readonly apiKeyManager: ApiKeyManager,\n\t\tprivate readonly idpRegistry: IDPHandlerRegistry,\n\t) {}\n\n\tasync signInIDP(\n\t\tdbContext: DatabaseContext,\n\t\tidpSlug: string,\n\t\tresponseData: unknown,\n\t\texpiration?: number,\n\t): Promise<IDPSignInManager.SignInIDPResponse> {\n\t\treturn dbContext.transaction(async (db): Promise<IDPSignInManager.SignInIDPResponse> => {\n\t\t\tconst provider = await db.queryHandler.fetch(new IdentityProviderBySlugQuery(idpSlug))\n\t\t\tif (!provider || provider.disabledAt) {\n\t\t\t\tthrow new Error('provider not found')\n\t\t\t}\n\t\t\tconst providerService = this.idpRegistry.getHandler(provider.type)\n\t\t\tconst validatedConfig = providerService.validateConfiguration(provider.configuration)\n\t\t\tlet claim: IDPResponse\n\t\t\ttry {\n\t\t\t\tclaim = await providerService.processResponse(\n\t\t\t\t\tvalidatedConfig,\n\t\t\t\t\tresponseData,\n\t\t\t\t)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof IDPResponseError) {\n\t\t\t\t\treturn new ResponseError('INVALID_IDP_RESPONSE', e.message)\n\t\t\t\t}\n\t\t\t\tif (e instanceof IDPValidationError) {\n\t\t\t\t\treturn new ResponseError('IDP_VALIDATION_FAILED', e.message)\n\t\t\t\t}\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tconst personRow = await this.resolvePerson(db, claim, provider)\n\n\t\t\tif (!personRow) {\n\t\t\t\treturn new ResponseError('PERSON_NOT_FOUND', `Person ${claim.email} not found`)\n\t\t\t}\n\n\t\t\tif (personRow.disabled_at !== null) {\n\t\t\t\treturn new ResponseError('PERSON_DISABLED', `Person with e-mail ${claim.email} is disabled`)\n\t\t\t}\n\n\t\t\tconst sessionToken = await this.apiKeyManager.createSessionApiKey(db, personRow.identity_id, expiration)\n\t\t\treturn new ResponseOk({ person: personRow, token: sessionToken, idpResponse: claim })\n\t\t})\n\t}\n\n\tasync initSignInIDP(dbContext: DatabaseContext, idpSlug: string, data: unknown): Promise<IDPSignInManager.InitSignInIDPResponse> {\n\t\tconst provider = await dbContext.queryHandler.fetch(new IdentityProviderBySlugQuery(idpSlug))\n\t\tif (!provider || provider.disabledAt) {\n\t\t\treturn new ResponseError('PROVIDER_NOT_FOUND', `Identity provider ${idpSlug} not found`)\n\t\t}\n\t\tconst providerService = this.idpRegistry.getHandler(provider.type)\n\t\tconst validatedConfig = providerService.validateConfiguration(provider.configuration)\n\t\ttry {\n\t\t\tconst initResponse = await providerService.initAuth(validatedConfig, data)\n\n\t\t\tconst publicConfig = providerService.getPublicConfiguration\n\t\t\t\t? providerService.getPublicConfiguration(validatedConfig)\n\t\t\t\t: validatedConfig\n\n\t\t\treturn new ResponseOk({\n\t\t\t\t...initResponse,\n\t\t\t\tidpConfiguration: provider.initReturnsConfig ? publicConfig : null,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tif (e instanceof IDPValidationError) {\n\t\t\t\treturn new ResponseError('IDP_VALIDATION_FAILED', e.message)\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}\n\n\tprivate async resolvePerson(db: DatabaseContext, claim: IDPResponse, provider: IdentityProviderRow): Promise<PersonRow | null> {\n\t\tconst personByIdPQuery = new PersonByIdPQuery(provider.id, claim.externalIdentifier)\n\t\tconst personByIdp = await db.queryHandler.fetch(personByIdPQuery)\n\t\tif (personByIdp) {\n\t\t\treturn personByIdp\n\t\t}\n\n\t\tif (!provider.exclusive) {\n\t\t\tconst personByEmail = claim.email ? await db.queryHandler.fetch(PersonQuery.byEmail(claim.email)) : null\n\t\t\tif (personByEmail) {\n\t\t\t\tawait this.saveIdpIdentifier(db, provider, claim, personByEmail)\n\t\t\t\treturn personByEmail\n\t\t\t}\n\t\t}\n\n\t\tif (provider.autoSignUp) {\n\t\t\tconst signedUpPerson = await this.signUp(db, claim, provider)\n\t\t\tawait this.saveIdpIdentifier(db, provider, claim, signedUpPerson)\n\t\t\treturn signedUpPerson\n\t\t}\n\n\t\treturn null\n\t}\n\n\tprivate async signUp(db: DatabaseContext, { email, name, externalIdentifier }: IDPResponse, provider: IdentityProviderRow): Promise<PersonRow> {\n\t\tconst roles = [TenantRole.PERSON]\n\t\tconst identityId = await db.commandBus.execute(new CreateIdentityCommand(roles))\n\t\tconst newPerson = await db.commandBus.execute(new CreatePersonCommand({\n\t\t\tidentityId,\n\t\t\temail: provider.exclusive ? undefined : email,\n\t\t\tpassword: NoPassword,\n\t\t\tname: name ?? email?.split('@')[0] ?? externalIdentifier,\n\t\t\tidpOnly: provider.exclusive,\n\t\t}))\n\n\t\treturn {\n\t\t\t...newPerson,\n\t\t\troles,\n\t\t}\n\t}\n\n\tprivate async saveIdpIdentifier(db: DatabaseContext, provider: IdentityProviderRow, claim: IDPResponse, person: PersonRow) {\n\t\tawait db.commandBus.execute(new CreatePersonIdentityProviderIdentifierCommand(provider.id, person.id, claim.externalIdentifier))\n\t}\n}\n\nnamespace IDPSignInManager {\n\texport type InitSignInIDPResponse = Response<InitSignInIdpResult, InitSignInIdpErrorCode>\n\n\tinterface SignInIDPResult {\n\t\treadonly person: PersonRow\n\t\treadonly token: string\n\t\treadonly idpResponse?: Record<string, unknown>\n\t}\n\n\texport type SignInIDPResponse = Response<SignInIDPResult, SignInIdpErrorCode>\n}\n\nexport { IDPSignInManager }\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,MAAM,iBAAiB;AAAA,EACtB,YACkB,eACA,aAChB;AAFgB,SAAA,gBAAA;AACA,SAAA,cAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,UACL,WACA,SACA,cACA,YAC8C;AACvC,WAAA,UAAU,YAAY,OAAO,OAAoD;AACjF,YAAA,WAAW,MAAM,GAAG,aAAa,MAAM,IAAI,4BAA4B,OAAO,CAAC;AACjF,UAAA,CAAC,YAAY,SAAS,YAAY;AAC/B,cAAA,IAAI,MAAM,oBAAoB;AAAA,MAAA;AAErC,YAAM,kBAAkB,KAAK,YAAY,WAAW,SAAS,IAAI;AACjE,YAAM,kBAAkB,gBAAgB,sBAAsB,SAAS,aAAa;AAChF,UAAA;AACA,UAAA;AACH,gBAAQ,MAAM,gBAAgB;AAAA,UAC7B;AAAA,UACA;AAAA,QACD;AAAA,eACQ,GAAG;AACX,YAAI,aAAa,kBAAkB;AAClC,iBAAO,IAAI,cAAc,wBAAwB,EAAE,OAAO;AAAA,QAAA;AAE3D,YAAI,aAAa,oBAAoB;AACpC,iBAAO,IAAI,cAAc,yBAAyB,EAAE,OAAO;AAAA,QAAA;AAEtD,cAAA;AAAA,MAAA;AAEP,YAAM,YAAY,MAAM,KAAK,cAAc,IAAI,OAAO,QAAQ;AAE9D,UAAI,CAAC,WAAW;AACf,eAAO,IAAI,cAAc,oBAAoB,UAAU,MAAM,KAAK,YAAY;AAAA,MAAA;AAG3E,UAAA,UAAU,gBAAgB,MAAM;AACnC,eAAO,IAAI,cAAc,mBAAmB,sBAAsB,MAAM,KAAK,cAAc;AAAA,MAAA;AAGtF,YAAA,eAAe,MAAM,KAAK,cAAc,oBAAoB,IAAI,UAAU,aAAa,UAAU;AAChG,aAAA,IAAI,WAAW,EAAE,QAAQ,WAAW,OAAO,cAAc,aAAa,OAAO;AAAA,IAAA,CACpF;AAAA,EAAA;AAAA,EAGF,MAAM,cAAc,WAA4B,SAAiB,MAAgE;AAC1H,UAAA,WAAW,MAAM,UAAU,aAAa,MAAM,IAAI,4BAA4B,OAAO,CAAC;AACxF,QAAA,CAAC,YAAY,SAAS,YAAY;AACrC,aAAO,IAAI,cAAc,sBAAsB,qBAAqB,OAAO,YAAY;AAAA,IAAA;AAExF,UAAM,kBAAkB,KAAK,YAAY,WAAW,SAAS,IAAI;AACjE,UAAM,kBAAkB,gBAAgB,sBAAsB,SAAS,aAAa;AAChF,QAAA;AACH,YAAM,eAAe,MAAM,gBAAgB,SAAS,iBAAiB,IAAI;AAEzE,YAAM,eAAe,gBAAgB,yBAClC,gBAAgB,uBAAuB,eAAe,IACtD;AAEH,aAAO,IAAI,WAAW;AAAA,QACrB,GAAG;AAAA,QACH,kBAAkB,SAAS,oBAAoB,eAAe;AAAA,MAAA,CAC9D;AAAA,aACO,GAAG;AACX,UAAI,aAAa,oBAAoB;AACpC,eAAO,IAAI,cAAc,yBAAyB,EAAE,OAAO;AAAA,MAAA;AAEtD,YAAA;AAAA,IAAA;AAAA,EACP;AAAA,EAGD,MAAc,cAAc,IAAqB,OAAoB,UAA0D;AAC9H,UAAM,mBAAmB,IAAI,iBAAiB,SAAS,IAAI,MAAM,kBAAkB;AACnF,UAAM,cAAc,MAAM,GAAG,aAAa,MAAM,gBAAgB;AAChE,QAAI,aAAa;AACT,aAAA;AAAA,IAAA;AAGJ,QAAA,CAAC,SAAS,WAAW;AACxB,YAAM,gBAAgB,MAAM,QAAQ,MAAM,GAAG,aAAa,MAAM,YAAY,QAAQ,MAAM,KAAK,CAAC,IAAI;AACpG,UAAI,eAAe;AAClB,cAAM,KAAK,kBAAkB,IAAI,UAAU,OAAO,aAAa;AACxD,eAAA;AAAA,MAAA;AAAA,IACR;AAGD,QAAI,SAAS,YAAY;AACxB,YAAM,iBAAiB,MAAM,KAAK,OAAO,IAAI,OAAO,QAAQ;AAC5D,YAAM,KAAK,kBAAkB,IAAI,UAAU,OAAO,cAAc;AACzD,aAAA;AAAA,IAAA;AAGD,WAAA;AAAA,EAAA;AAAA,EAGR,MAAc,OAAO,IAAqB,EAAE,OAAO,MAAM,sBAAmC,UAAmD;AACxI,UAAA,QAAQ,CAAC,WAAW,MAAM;AAC1B,UAAA,aAAa,MAAM,GAAG,WAAW,QAAQ,IAAI,sBAAsB,KAAK,CAAC;AAC/E,UAAM,YAAY,MAAM,GAAG,WAAW,QAAQ,IAAI,oBAAoB;AAAA,MACrE;AAAA,MACA,OAAO,SAAS,YAAY,SAAY;AAAA,MACxC,UAAU;AAAA,MACV,MAAM,QAAQ,OAAO,MAAM,GAAG,EAAE,CAAC,KAAK;AAAA,MACtC,SAAS,SAAS;AAAA,IAAA,CAClB,CAAC;AAEK,WAAA;AAAA,MACN,GAAG;AAAA,MACH;AAAA,IACD;AAAA,EAAA;AAAA,EAGD,MAAc,kBAAkB,IAAqB,UAA+B,OAAoB,QAAmB;AACpH,UAAA,GAAG,WAAW,QAAQ,IAAI,8CAA8C,SAAS,IAAI,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAAA,EAAA;AAEjI;"}
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("../type/ApiKey.cjs");
|
|
4
4
|
require("@contember/database");
|
|
5
5
|
require("node:crypto");
|
|
6
|
+
const Response = require("../utils/Response.cjs");
|
|
6
7
|
const CreatePersonCommand = require("../commands/person/CreatePersonCommand.cjs");
|
|
7
8
|
const CreateIdentityCommand = require("../commands/identity/CreateIdentityCommand.cjs");
|
|
8
9
|
const CreateOrUpdateProjectMembershipCommand = require("../commands/membership/CreateOrUpdateProjectMembershipCommand.cjs");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const SavePasswordResetRequestCommand = require("../commands/passwordReset/SavePasswordResetRequestCommand.cjs");
|
|
10
|
+
const CreatePersonTokenCommand = require("../commands/personToken/CreatePersonTokenCommand.cjs");
|
|
11
|
+
const SavePersonTokenCommand = require("../commands/personToken/SavePersonTokenCommand.cjs");
|
|
12
12
|
require("../queries/apiKey/ApiKeyQuery.cjs");
|
|
13
13
|
const PersonQuery = require("../queries/person/PersonQuery.cjs");
|
|
14
14
|
require("../authorization/PermissionActions.cjs");
|
|
@@ -20,7 +20,7 @@ require("@contember/schema");
|
|
|
20
20
|
const membershipUtils = require("./membershipUtils.cjs");
|
|
21
21
|
const Password = require("../dtos/Password.cjs");
|
|
22
22
|
const email = require("../utils/email.cjs");
|
|
23
|
-
const
|
|
23
|
+
const expirations = require("../consts/expirations.cjs");
|
|
24
24
|
class InviteManager {
|
|
25
25
|
constructor(providers, mailer, projectSchemaResolver) {
|
|
26
26
|
this.providers = providers;
|
|
@@ -57,11 +57,11 @@ class InviteManager {
|
|
|
57
57
|
password: passwordWrapper
|
|
58
58
|
}));
|
|
59
59
|
if (method === "RESET_PASSWORD") {
|
|
60
|
-
const result = await trx.commandBus.execute(
|
|
60
|
+
const result = await trx.commandBus.execute(CreatePersonTokenCommand.CreatePersonTokenCommand.createPasswordResetRequest(person.id, await this.getInviteExpiration(project.slug)));
|
|
61
61
|
resetToken = result.token;
|
|
62
62
|
}
|
|
63
63
|
if (passwordResetTokenHash) {
|
|
64
|
-
await trx.commandBus.execute(new
|
|
64
|
+
await trx.commandBus.execute(new SavePersonTokenCommand.SavePersonTokenCommand(person.id, passwordResetTokenHash, "password_reset", await this.getInviteExpiration(project.slug)));
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
for (const membershipUpdate of membershipUtils.createAppendMembershipVariables(memberships)) {
|
|
@@ -87,7 +87,7 @@ class InviteManager {
|
|
|
87
87
|
}
|
|
88
88
|
async getInviteExpiration(projectSlug) {
|
|
89
89
|
const schema = await this.projectSchemaResolver.getSchema(projectSlug);
|
|
90
|
-
return schema?.settings.tenant?.inviteExpirationMinutes ?? INVITATION_RESET_TOKEN_EXPIRATION_MINUTES;
|
|
90
|
+
return schema?.settings.tenant?.inviteExpirationMinutes ?? expirations.INVITATION_RESET_TOKEN_EXPIRATION_MINUTES;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
class InviteResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InviteManager.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/InviteManager.ts"],"sourcesContent":["import {\n\tCreateIdentityCommand,\n\tCreateOrUpdateProjectMembershipCommand,\n\
|
|
1
|
+
{"version":3,"file":"InviteManager.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/InviteManager.ts"],"sourcesContent":["import {\n\tCreateIdentityCommand,\n\tCreateOrUpdateProjectMembershipCommand,\n\tCreatePersonCommand,\n\tCreatePersonTokenCommand,\n\tSavePersonTokenCommand,\n} from '../commands'\nimport { Providers } from '../providers'\nimport { PersonQuery, PersonRow } from '../queries'\nimport { Project, ProjectSchemaResolver } from '../type'\nimport { InviteErrorCode, InviteMethod } from '../../schema'\nimport { TenantRole } from '../authorization'\nimport { UserMailer } from '../mailing'\nimport { createAppendMembershipVariables } from './membershipUtils'\nimport { Response, ResponseError, ResponseOk } from '../utils/Response'\nimport { DatabaseContext, TokenHash } from '../utils'\nimport { NoPassword, PasswordPlain } from '../dtos'\nimport { Acl } from '@contember/schema'\nimport { validateEmail } from '../utils/email'\nimport { INVITATION_RESET_TOKEN_EXPIRATION_MINUTES } from '../consts/expirations'\n\nexport interface InviteData {\n\temail: string\n\tname?: string\n\tproject: Project\n\tmemberships: readonly Acl.Membership[]\n\tnoEmail?: boolean\n\tpassword?: string\n\temailVariant?: string\n\tmethod?: InviteMethod\n\tpasswordResetTokenHash?: TokenHash\n}\n\nexport class InviteManager {\n\tconstructor(\n\t\tprivate readonly providers: Providers,\n\t\tprivate readonly mailer: UserMailer,\n\t\tprivate readonly projectSchemaResolver: ProjectSchemaResolver,\n\t) { }\n\n\tasync invite(\n\t\tdbContext: DatabaseContext,\n\t\t{\n\t\t\temail,\n\t\t\tproject,\n\t\t\tname,\n\t\t\tmemberships,\n\t\t\tmethod,\n\t\t\temailVariant,\n\t\t\tnoEmail = false,\n\t\t\tpassword,\n\t\t\tpasswordResetTokenHash,\n\t\t}: InviteData,\n\t): Promise<InviteResponse> {\n\t\tif (!validateEmail(email.trim())) {\n\t\t\treturn new ResponseError('INVALID_EMAIL_FORMAT', 'E-mail address is not in a valid format')\n\t\t}\n\n\t\treturn await dbContext.transaction(async trx => {\n\t\t\tlet person: Omit<PersonRow, 'roles'> | null = await trx.queryHandler.fetch(PersonQuery.byEmail(email))\n\t\t\tconst isNew = !person\n\t\t\tlet generatedPassword: string | null = null\n\t\t\tlet resetToken: string | null = null\n\t\t\tif (!person) {\n\t\t\t\tconst identityId = await trx.commandBus.execute(new CreateIdentityCommand([TenantRole.PERSON]))\n\n\t\t\t\tgeneratedPassword = password ??\n\t\t\t\t\t(method === 'CREATE_PASSWORD' ? (await this.providers.randomBytes(9)).toString('base64') : null)\n\t\t\t\tconst passwordWrapper = generatedPassword !== null ? new PasswordPlain(generatedPassword) : NoPassword\n\n\t\t\t\tperson = await trx.commandBus.execute(new CreatePersonCommand({\n\t\t\t\t\tidentityId,\n\t\t\t\t\temail,\n\t\t\t\t\tname,\n\t\t\t\t\tpassword: passwordWrapper,\n\t\t\t\t}))\n\t\t\t\tif (method === 'RESET_PASSWORD') {\n\t\t\t\t\tconst result = await trx.commandBus.execute(CreatePersonTokenCommand.createPasswordResetRequest(person.id, await this.getInviteExpiration(project.slug)))\n\t\t\t\t\tresetToken = result.token\n\t\t\t\t}\n\t\t\t\tif (passwordResetTokenHash) {\n\t\t\t\t\tawait trx.commandBus.execute(new SavePersonTokenCommand(person.id, passwordResetTokenHash, 'password_reset', await this.getInviteExpiration(project.slug)))\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const membershipUpdate of createAppendMembershipVariables(memberships)) {\n\t\t\t\tawait trx.commandBus.execute(new CreateOrUpdateProjectMembershipCommand(project.id, person.identity_id, membershipUpdate))\n\t\t\t}\n\t\t\tif (!noEmail) {\n\t\t\t\tconst customMailOptions = {\n\t\t\t\t\tprojectId: project.id,\n\t\t\t\t\tvariant: emailVariant ?? '',\n\t\t\t\t}\n\t\t\t\tif (isNew) {\n\t\t\t\t\tawait this.mailer.sendNewUserInvitedMail(\n\t\t\t\t\t\ttrx,\n\t\t\t\t\t\t{ email, project: project.name, projectSlug: project.slug, password: generatedPassword, token: resetToken },\n\t\t\t\t\t\tcustomMailOptions,\n\t\t\t\t\t)\n\t\t\t\t} else {\n\t\t\t\t\tawait this.mailer.sendExistingUserInvitedEmail(trx, { email, project: project.name, projectSlug: project.slug }, customMailOptions)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new ResponseOk(new InviteResult(person, isNew))\n\t\t})\n\t}\n\n\tprivate async getInviteExpiration(projectSlug: string): Promise<number> {\n\t\tconst schema = await this.projectSchemaResolver.getSchema(projectSlug)\n\n\t\treturn schema?.settings.tenant?.inviteExpirationMinutes ?? INVITATION_RESET_TOKEN_EXPIRATION_MINUTES\n\t}\n}\n\nexport type InviteResponse = Response<InviteResult, InviteErrorCode>\n\nexport class InviteResult {\n\tconstructor(public readonly person: Omit<PersonRow, 'roles'>, public readonly isNew: boolean) { }\n}\n"],"names":["email","validateEmail","ResponseError","PersonQuery","CreateIdentityCommand","TenantRole","PasswordPlain","NoPassword","CreatePersonCommand","CreatePersonTokenCommand","SavePersonTokenCommand","createAppendMembershipVariables","CreateOrUpdateProjectMembershipCommand","ResponseOk","INVITATION_RESET_TOKEN_EXPIRATION_MINUTES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiCO,MAAM,cAAc;AAAA,EAC1B,YACkB,WACA,QACA,uBAChB;AAHgB,SAAA,YAAA;AACA,SAAA,SAAA;AACA,SAAA,wBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,OACL,WACA;AAAA,IAAA,OACCA;AAAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,EAAA,GAEyB;AAC1B,QAAI,CAACC,MAAA,cAAcD,QAAM,KAAM,CAAA,GAAG;AAC1B,aAAA,IAAIE,SAAAA,cAAc,wBAAwB,yCAAyC;AAAA,IAAA;AAG3F,WAAO,MAAM,UAAU,YAAY,OAAM,QAAO;AAC3C,UAAA,SAA0C,MAAM,IAAI,aAAa,MAAMC,wBAAY,QAAQH,OAAK,CAAC;AACrG,YAAM,QAAQ,CAAC;AACf,UAAI,oBAAmC;AACvC,UAAI,aAA4B;AAChC,UAAI,CAAC,QAAQ;AACN,cAAA,aAAa,MAAM,IAAI,WAAW,QAAQ,IAAII,sBAAAA,sBAAsB,CAACC,MAAAA,WAAW,MAAM,CAAC,CAAC;AAE1E,4BAAA,aAClB,WAAW,qBAAqB,MAAM,KAAK,UAAU,YAAY,CAAC,GAAG,SAAS,QAAQ,IAAI;AAC5F,cAAM,kBAAkB,sBAAsB,OAAO,IAAIC,SAAA,cAAc,iBAAiB,IAAIC,SAAA;AAE5F,iBAAS,MAAM,IAAI,WAAW,QAAQ,IAAIC,oBAAAA,oBAAoB;AAAA,UAC7D;AAAA,UAAA,OACAR;AAAAA,UACA;AAAA,UACA,UAAU;AAAA,QAAA,CACV,CAAC;AACF,YAAI,WAAW,kBAAkB;AAChC,gBAAM,SAAS,MAAM,IAAI,WAAW,QAAQS,yBAAyB,yBAAA,2BAA2B,OAAO,IAAI,MAAM,KAAK,oBAAoB,QAAQ,IAAI,CAAC,CAAC;AACxJ,uBAAa,OAAO;AAAA,QAAA;AAErB,YAAI,wBAAwB;AAC3B,gBAAM,IAAI,WAAW,QAAQ,IAAIC,8CAAuB,OAAO,IAAI,wBAAwB,kBAAkB,MAAM,KAAK,oBAAoB,QAAQ,IAAI,CAAC,CAAC;AAAA,QAAA;AAAA,MAC3J;AAEU,iBAAA,oBAAoBC,gDAAgC,WAAW,GAAG;AACtE,cAAA,IAAI,WAAW,QAAQ,IAAIC,uCAAA,uCAAuC,QAAQ,IAAI,OAAO,aAAa,gBAAgB,CAAC;AAAA,MAAA;AAE1H,UAAI,CAAC,SAAS;AACb,cAAM,oBAAoB;AAAA,UACzB,WAAW,QAAQ;AAAA,UACnB,SAAS,gBAAgB;AAAA,QAC1B;AACA,YAAI,OAAO;AACV,gBAAM,KAAK,OAAO;AAAA,YACjB;AAAA,YACA,EAAA,OAAEZ,SAAO,SAAS,QAAQ,MAAM,aAAa,QAAQ,MAAM,UAAU,mBAAmB,OAAO,WAAW;AAAA,YAC1G;AAAA,UACD;AAAA,QAAA,OACM;AACN,gBAAM,KAAK,OAAO,6BAA6B,KAAK,EAAEA,OAAAA,SAAO,SAAS,QAAQ,MAAM,aAAa,QAAQ,KAAA,GAAQ,iBAAiB;AAAA,QAAA;AAAA,MACnI;AAED,aAAO,IAAIa,SAAAA,WAAW,IAAI,aAAa,QAAQ,KAAK,CAAC;AAAA,IAAA,CACrD;AAAA,EAAA;AAAA,EAGF,MAAc,oBAAoB,aAAsC;AACvE,UAAM,SAAS,MAAM,KAAK,sBAAsB,UAAU,WAAW;AAE9D,WAAA,QAAQ,SAAS,QAAQ,2BAA2BC,YAAA;AAAA,EAAA;AAE7D;AAIO,MAAM,aAAa;AAAA,EACzB,YAA4B,QAAkD,OAAgB;AAAlE,SAAA,SAAA;AAAkD,SAAA,QAAA;AAAA,EAAA;AAC/E;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../type/ApiKey.js";
|
|
2
2
|
import "@contember/database";
|
|
3
3
|
import "node:crypto";
|
|
4
|
+
import { ResponseError, ResponseOk } from "../utils/Response.js";
|
|
4
5
|
import { CreatePersonCommand } from "../commands/person/CreatePersonCommand.js";
|
|
5
6
|
import { CreateIdentityCommand } from "../commands/identity/CreateIdentityCommand.js";
|
|
6
7
|
import { CreateOrUpdateProjectMembershipCommand } from "../commands/membership/CreateOrUpdateProjectMembershipCommand.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { SavePasswordResetRequestCommand } from "../commands/passwordReset/SavePasswordResetRequestCommand.js";
|
|
8
|
+
import { CreatePersonTokenCommand } from "../commands/personToken/CreatePersonTokenCommand.js";
|
|
9
|
+
import { SavePersonTokenCommand } from "../commands/personToken/SavePersonTokenCommand.js";
|
|
10
10
|
import "../queries/apiKey/ApiKeyQuery.js";
|
|
11
11
|
import { PersonQuery } from "../queries/person/PersonQuery.js";
|
|
12
12
|
import "../authorization/PermissionActions.js";
|
|
@@ -18,7 +18,7 @@ import "@contember/schema";
|
|
|
18
18
|
import { createAppendMembershipVariables } from "./membershipUtils.js";
|
|
19
19
|
import { PasswordPlain, NoPassword } from "../dtos/Password.js";
|
|
20
20
|
import { validateEmail } from "../utils/email.js";
|
|
21
|
-
|
|
21
|
+
import { INVITATION_RESET_TOKEN_EXPIRATION_MINUTES } from "../consts/expirations.js";
|
|
22
22
|
class InviteManager {
|
|
23
23
|
constructor(providers, mailer, projectSchemaResolver) {
|
|
24
24
|
this.providers = providers;
|
|
@@ -55,11 +55,11 @@ class InviteManager {
|
|
|
55
55
|
password: passwordWrapper
|
|
56
56
|
}));
|
|
57
57
|
if (method === "RESET_PASSWORD") {
|
|
58
|
-
const result = await trx.commandBus.execute(
|
|
58
|
+
const result = await trx.commandBus.execute(CreatePersonTokenCommand.createPasswordResetRequest(person.id, await this.getInviteExpiration(project.slug)));
|
|
59
59
|
resetToken = result.token;
|
|
60
60
|
}
|
|
61
61
|
if (passwordResetTokenHash) {
|
|
62
|
-
await trx.commandBus.execute(new
|
|
62
|
+
await trx.commandBus.execute(new SavePersonTokenCommand(person.id, passwordResetTokenHash, "password_reset", await this.getInviteExpiration(project.slug)));
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
for (const membershipUpdate of createAppendMembershipVariables(memberships)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InviteManager.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/InviteManager.ts"],"sourcesContent":["import {\n\tCreateIdentityCommand,\n\tCreateOrUpdateProjectMembershipCommand,\n\
|
|
1
|
+
{"version":3,"file":"InviteManager.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/InviteManager.ts"],"sourcesContent":["import {\n\tCreateIdentityCommand,\n\tCreateOrUpdateProjectMembershipCommand,\n\tCreatePersonCommand,\n\tCreatePersonTokenCommand,\n\tSavePersonTokenCommand,\n} from '../commands'\nimport { Providers } from '../providers'\nimport { PersonQuery, PersonRow } from '../queries'\nimport { Project, ProjectSchemaResolver } from '../type'\nimport { InviteErrorCode, InviteMethod } from '../../schema'\nimport { TenantRole } from '../authorization'\nimport { UserMailer } from '../mailing'\nimport { createAppendMembershipVariables } from './membershipUtils'\nimport { Response, ResponseError, ResponseOk } from '../utils/Response'\nimport { DatabaseContext, TokenHash } from '../utils'\nimport { NoPassword, PasswordPlain } from '../dtos'\nimport { Acl } from '@contember/schema'\nimport { validateEmail } from '../utils/email'\nimport { INVITATION_RESET_TOKEN_EXPIRATION_MINUTES } from '../consts/expirations'\n\nexport interface InviteData {\n\temail: string\n\tname?: string\n\tproject: Project\n\tmemberships: readonly Acl.Membership[]\n\tnoEmail?: boolean\n\tpassword?: string\n\temailVariant?: string\n\tmethod?: InviteMethod\n\tpasswordResetTokenHash?: TokenHash\n}\n\nexport class InviteManager {\n\tconstructor(\n\t\tprivate readonly providers: Providers,\n\t\tprivate readonly mailer: UserMailer,\n\t\tprivate readonly projectSchemaResolver: ProjectSchemaResolver,\n\t) { }\n\n\tasync invite(\n\t\tdbContext: DatabaseContext,\n\t\t{\n\t\t\temail,\n\t\t\tproject,\n\t\t\tname,\n\t\t\tmemberships,\n\t\t\tmethod,\n\t\t\temailVariant,\n\t\t\tnoEmail = false,\n\t\t\tpassword,\n\t\t\tpasswordResetTokenHash,\n\t\t}: InviteData,\n\t): Promise<InviteResponse> {\n\t\tif (!validateEmail(email.trim())) {\n\t\t\treturn new ResponseError('INVALID_EMAIL_FORMAT', 'E-mail address is not in a valid format')\n\t\t}\n\n\t\treturn await dbContext.transaction(async trx => {\n\t\t\tlet person: Omit<PersonRow, 'roles'> | null = await trx.queryHandler.fetch(PersonQuery.byEmail(email))\n\t\t\tconst isNew = !person\n\t\t\tlet generatedPassword: string | null = null\n\t\t\tlet resetToken: string | null = null\n\t\t\tif (!person) {\n\t\t\t\tconst identityId = await trx.commandBus.execute(new CreateIdentityCommand([TenantRole.PERSON]))\n\n\t\t\t\tgeneratedPassword = password ??\n\t\t\t\t\t(method === 'CREATE_PASSWORD' ? (await this.providers.randomBytes(9)).toString('base64') : null)\n\t\t\t\tconst passwordWrapper = generatedPassword !== null ? new PasswordPlain(generatedPassword) : NoPassword\n\n\t\t\t\tperson = await trx.commandBus.execute(new CreatePersonCommand({\n\t\t\t\t\tidentityId,\n\t\t\t\t\temail,\n\t\t\t\t\tname,\n\t\t\t\t\tpassword: passwordWrapper,\n\t\t\t\t}))\n\t\t\t\tif (method === 'RESET_PASSWORD') {\n\t\t\t\t\tconst result = await trx.commandBus.execute(CreatePersonTokenCommand.createPasswordResetRequest(person.id, await this.getInviteExpiration(project.slug)))\n\t\t\t\t\tresetToken = result.token\n\t\t\t\t}\n\t\t\t\tif (passwordResetTokenHash) {\n\t\t\t\t\tawait trx.commandBus.execute(new SavePersonTokenCommand(person.id, passwordResetTokenHash, 'password_reset', await this.getInviteExpiration(project.slug)))\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const membershipUpdate of createAppendMembershipVariables(memberships)) {\n\t\t\t\tawait trx.commandBus.execute(new CreateOrUpdateProjectMembershipCommand(project.id, person.identity_id, membershipUpdate))\n\t\t\t}\n\t\t\tif (!noEmail) {\n\t\t\t\tconst customMailOptions = {\n\t\t\t\t\tprojectId: project.id,\n\t\t\t\t\tvariant: emailVariant ?? '',\n\t\t\t\t}\n\t\t\t\tif (isNew) {\n\t\t\t\t\tawait this.mailer.sendNewUserInvitedMail(\n\t\t\t\t\t\ttrx,\n\t\t\t\t\t\t{ email, project: project.name, projectSlug: project.slug, password: generatedPassword, token: resetToken },\n\t\t\t\t\t\tcustomMailOptions,\n\t\t\t\t\t)\n\t\t\t\t} else {\n\t\t\t\t\tawait this.mailer.sendExistingUserInvitedEmail(trx, { email, project: project.name, projectSlug: project.slug }, customMailOptions)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn new ResponseOk(new InviteResult(person, isNew))\n\t\t})\n\t}\n\n\tprivate async getInviteExpiration(projectSlug: string): Promise<number> {\n\t\tconst schema = await this.projectSchemaResolver.getSchema(projectSlug)\n\n\t\treturn schema?.settings.tenant?.inviteExpirationMinutes ?? INVITATION_RESET_TOKEN_EXPIRATION_MINUTES\n\t}\n}\n\nexport type InviteResponse = Response<InviteResult, InviteErrorCode>\n\nexport class InviteResult {\n\tconstructor(public readonly person: Omit<PersonRow, 'roles'>, public readonly isNew: boolean) { }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCO,MAAM,cAAc;AAAA,EAC1B,YACkB,WACA,QACA,uBAChB;AAHgB,SAAA,YAAA;AACA,SAAA,SAAA;AACA,SAAA,wBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,OACL,WACA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,EAAA,GAEyB;AAC1B,QAAI,CAAC,cAAc,MAAM,KAAM,CAAA,GAAG;AAC1B,aAAA,IAAI,cAAc,wBAAwB,yCAAyC;AAAA,IAAA;AAG3F,WAAO,MAAM,UAAU,YAAY,OAAM,QAAO;AAC3C,UAAA,SAA0C,MAAM,IAAI,aAAa,MAAM,YAAY,QAAQ,KAAK,CAAC;AACrG,YAAM,QAAQ,CAAC;AACf,UAAI,oBAAmC;AACvC,UAAI,aAA4B;AAChC,UAAI,CAAC,QAAQ;AACN,cAAA,aAAa,MAAM,IAAI,WAAW,QAAQ,IAAI,sBAAsB,CAAC,WAAW,MAAM,CAAC,CAAC;AAE1E,4BAAA,aAClB,WAAW,qBAAqB,MAAM,KAAK,UAAU,YAAY,CAAC,GAAG,SAAS,QAAQ,IAAI;AAC5F,cAAM,kBAAkB,sBAAsB,OAAO,IAAI,cAAc,iBAAiB,IAAI;AAE5F,iBAAS,MAAM,IAAI,WAAW,QAAQ,IAAI,oBAAoB;AAAA,UAC7D;AAAA,UACA;AAAA,UACA;AAAA,UACA,UAAU;AAAA,QAAA,CACV,CAAC;AACF,YAAI,WAAW,kBAAkB;AAChC,gBAAM,SAAS,MAAM,IAAI,WAAW,QAAQ,yBAAyB,2BAA2B,OAAO,IAAI,MAAM,KAAK,oBAAoB,QAAQ,IAAI,CAAC,CAAC;AACxJ,uBAAa,OAAO;AAAA,QAAA;AAErB,YAAI,wBAAwB;AAC3B,gBAAM,IAAI,WAAW,QAAQ,IAAI,uBAAuB,OAAO,IAAI,wBAAwB,kBAAkB,MAAM,KAAK,oBAAoB,QAAQ,IAAI,CAAC,CAAC;AAAA,QAAA;AAAA,MAC3J;AAEU,iBAAA,oBAAoB,gCAAgC,WAAW,GAAG;AACtE,cAAA,IAAI,WAAW,QAAQ,IAAI,uCAAuC,QAAQ,IAAI,OAAO,aAAa,gBAAgB,CAAC;AAAA,MAAA;AAE1H,UAAI,CAAC,SAAS;AACb,cAAM,oBAAoB;AAAA,UACzB,WAAW,QAAQ;AAAA,UACnB,SAAS,gBAAgB;AAAA,QAC1B;AACA,YAAI,OAAO;AACV,gBAAM,KAAK,OAAO;AAAA,YACjB;AAAA,YACA,EAAE,OAAO,SAAS,QAAQ,MAAM,aAAa,QAAQ,MAAM,UAAU,mBAAmB,OAAO,WAAW;AAAA,YAC1G;AAAA,UACD;AAAA,QAAA,OACM;AACN,gBAAM,KAAK,OAAO,6BAA6B,KAAK,EAAE,OAAO,SAAS,QAAQ,MAAM,aAAa,QAAQ,KAAA,GAAQ,iBAAiB;AAAA,QAAA;AAAA,MACnI;AAED,aAAO,IAAI,WAAW,IAAI,aAAa,QAAQ,KAAK,CAAC;AAAA,IAAA,CACrD;AAAA,EAAA;AAAA,EAGF,MAAc,oBAAoB,aAAsC;AACvE,UAAM,SAAS,MAAM,KAAK,sBAAsB,UAAU,WAAW;AAE9D,WAAA,QAAQ,SAAS,QAAQ,2BAA2B;AAAA,EAAA;AAE7D;AAIO,MAAM,aAAa;AAAA,EACzB,YAA4B,QAAkD,OAAgB;AAAlE,SAAA,SAAA;AAAkD,SAAA,QAAA;AAAA,EAAA;AAC/E;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailTemplateManager.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MailTemplateManager.ts"],"sourcesContent":["import { AddMailTemplateCommand, RemoveMailTemplateCommand } from '../commands'\nimport { MailTemplate, MailTemplateIdentifier } from '../mailing'\nimport { DatabaseContext } from '../utils'\n\nexport class MailTemplateManager {\n\tpublic async addMailTemplate(dbContext: DatabaseContext, mailTemplate: MailTemplate): Promise<void> {\n\t\tawait dbContext.commandBus.execute(new AddMailTemplateCommand(mailTemplate))\n\t}\n\n\tpublic async removeMailTemplate(dbContext: DatabaseContext, mailTemplateId: MailTemplateIdentifier): Promise<boolean> {\n\t\treturn await dbContext.commandBus.execute(new RemoveMailTemplateCommand(mailTemplateId))\n\t}\n}\n"],"names":["AddMailTemplateCommand","RemoveMailTemplateCommand"],"mappings":";;;;;;;AAIO,MAAM,oBAAoB;AAAA,EAChC,MAAa,gBAAgB,WAA4B,cAA2C;AACnG,UAAM,UAAU,WAAW,QAAQ,IAAIA,uBAAA,uBAAuB,YAAY,CAAC;AAAA,
|
|
1
|
+
{"version":3,"file":"MailTemplateManager.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MailTemplateManager.ts"],"sourcesContent":["import { AddMailTemplateCommand, RemoveMailTemplateCommand } from '../commands'\nimport { MailTemplate, MailTemplateIdentifier } from '../mailing'\nimport { DatabaseContext } from '../utils'\n\nexport class MailTemplateManager {\n\tpublic async addMailTemplate(dbContext: DatabaseContext, mailTemplate: MailTemplate): Promise<void> {\n\t\tawait dbContext.commandBus.execute(new AddMailTemplateCommand(mailTemplate))\n\t}\n\n\tpublic async removeMailTemplate(dbContext: DatabaseContext, mailTemplateId: MailTemplateIdentifier): Promise<boolean> {\n\t\treturn await dbContext.commandBus.execute(new RemoveMailTemplateCommand(mailTemplateId))\n\t}\n}\n"],"names":["AddMailTemplateCommand","RemoveMailTemplateCommand"],"mappings":";;;;;;;AAIO,MAAM,oBAAoB;AAAA,EAChC,MAAa,gBAAgB,WAA4B,cAA2C;AACnG,UAAM,UAAU,WAAW,QAAQ,IAAIA,uBAAA,uBAAuB,YAAY,CAAC;AAAA,EAAA;AAAA,EAG5E,MAAa,mBAAmB,WAA4B,gBAA0D;AACrH,WAAO,MAAM,UAAU,WAAW,QAAQ,IAAIC,0BAAAA,0BAA0B,cAAc,CAAC;AAAA,EAAA;AAEzF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailTemplateManager.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MailTemplateManager.ts"],"sourcesContent":["import { AddMailTemplateCommand, RemoveMailTemplateCommand } from '../commands'\nimport { MailTemplate, MailTemplateIdentifier } from '../mailing'\nimport { DatabaseContext } from '../utils'\n\nexport class MailTemplateManager {\n\tpublic async addMailTemplate(dbContext: DatabaseContext, mailTemplate: MailTemplate): Promise<void> {\n\t\tawait dbContext.commandBus.execute(new AddMailTemplateCommand(mailTemplate))\n\t}\n\n\tpublic async removeMailTemplate(dbContext: DatabaseContext, mailTemplateId: MailTemplateIdentifier): Promise<boolean> {\n\t\treturn await dbContext.commandBus.execute(new RemoveMailTemplateCommand(mailTemplateId))\n\t}\n}\n"],"names":[],"mappings":";;;;;AAIO,MAAM,oBAAoB;AAAA,EAChC,MAAa,gBAAgB,WAA4B,cAA2C;AACnG,UAAM,UAAU,WAAW,QAAQ,IAAI,uBAAuB,YAAY,CAAC;AAAA,
|
|
1
|
+
{"version":3,"file":"MailTemplateManager.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MailTemplateManager.ts"],"sourcesContent":["import { AddMailTemplateCommand, RemoveMailTemplateCommand } from '../commands'\nimport { MailTemplate, MailTemplateIdentifier } from '../mailing'\nimport { DatabaseContext } from '../utils'\n\nexport class MailTemplateManager {\n\tpublic async addMailTemplate(dbContext: DatabaseContext, mailTemplate: MailTemplate): Promise<void> {\n\t\tawait dbContext.commandBus.execute(new AddMailTemplateCommand(mailTemplate))\n\t}\n\n\tpublic async removeMailTemplate(dbContext: DatabaseContext, mailTemplateId: MailTemplateIdentifier): Promise<boolean> {\n\t\treturn await dbContext.commandBus.execute(new RemoveMailTemplateCommand(mailTemplateId))\n\t}\n}\n"],"names":[],"mappings":";;;;;AAIO,MAAM,oBAAoB;AAAA,EAChC,MAAa,gBAAgB,WAA4B,cAA2C;AACnG,UAAM,UAAU,WAAW,QAAQ,IAAI,uBAAuB,YAAY,CAAC;AAAA,EAAA;AAAA,EAG5E,MAAa,mBAAmB,WAA4B,gBAA0D;AACrH,WAAO,MAAM,UAAU,WAAW,QAAQ,IAAI,0BAA0B,cAAc,CAAC;AAAA,EAAA;AAEzF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MembershipValidator.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MembershipValidator.ts"],"sourcesContent":["import { ProjectSchemaResolver } from '../type'\nimport { MembershipValidationError, MembershipValidationErrorType, MembershipResolver } from '@contember/schema-utils'\nimport { Acl } from '@contember/schema'\n\nexport class MembershipValidator {\n\tconstructor(\n\t\tprivate readonly schemaResolver: ProjectSchemaResolver,\n\t\tprivate readonly resolver: MembershipResolver = new MembershipResolver(),\n\t) {}\n\n\tasync validate(project: string, memberships: readonly Acl.Membership[]): Promise<MembershipValidationError[]> {\n\t\tconst schema = await this.schemaResolver.getSchema(project)\n\t\tif (!schema) {\n\t\t\tthrow new Error()\n\t\t}\n\t\treturn this.resolver.resolve(schema.acl, memberships, MembershipResolver.UnknownIdentity).errors\n\t}\n}\n\nexport { MembershipValidationError, MembershipValidationErrorType }\n"],"names":["MembershipResolver"],"mappings":";;;AAIO,MAAM,oBAAoB;AAAA,EAChC,YACkB,gBACA,WAA+B,IAAIA,kCACnD;AAFgB,SAAA,iBAAA;AACA,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"MembershipValidator.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MembershipValidator.ts"],"sourcesContent":["import { ProjectSchemaResolver } from '../type'\nimport { MembershipValidationError, MembershipValidationErrorType, MembershipResolver } from '@contember/schema-utils'\nimport { Acl } from '@contember/schema'\n\nexport class MembershipValidator {\n\tconstructor(\n\t\tprivate readonly schemaResolver: ProjectSchemaResolver,\n\t\tprivate readonly resolver: MembershipResolver = new MembershipResolver(),\n\t) {}\n\n\tasync validate(project: string, memberships: readonly Acl.Membership[]): Promise<MembershipValidationError[]> {\n\t\tconst schema = await this.schemaResolver.getSchema(project)\n\t\tif (!schema) {\n\t\t\tthrow new Error()\n\t\t}\n\t\treturn this.resolver.resolve(schema.acl, memberships, MembershipResolver.UnknownIdentity).errors\n\t}\n}\n\nexport { MembershipValidationError, MembershipValidationErrorType }\n"],"names":["MembershipResolver"],"mappings":";;;AAIO,MAAM,oBAAoB;AAAA,EAChC,YACkB,gBACA,WAA+B,IAAIA,kCACnD;AAFgB,SAAA,iBAAA;AACA,SAAA,WAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,SAAS,SAAiB,aAA8E;AAC7G,UAAM,SAAS,MAAM,KAAK,eAAe,UAAU,OAAO;AAC1D,QAAI,CAAC,QAAQ;AACZ,YAAM,IAAI,MAAM;AAAA,IAAA;AAEV,WAAA,KAAK,SAAS,QAAQ,OAAO,KAAK,aAAaA,YAAAA,mBAAmB,eAAe,EAAE;AAAA,EAAA;AAE5F;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MembershipValidator.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MembershipValidator.ts"],"sourcesContent":["import { ProjectSchemaResolver } from '../type'\nimport { MembershipValidationError, MembershipValidationErrorType, MembershipResolver } from '@contember/schema-utils'\nimport { Acl } from '@contember/schema'\n\nexport class MembershipValidator {\n\tconstructor(\n\t\tprivate readonly schemaResolver: ProjectSchemaResolver,\n\t\tprivate readonly resolver: MembershipResolver = new MembershipResolver(),\n\t) {}\n\n\tasync validate(project: string, memberships: readonly Acl.Membership[]): Promise<MembershipValidationError[]> {\n\t\tconst schema = await this.schemaResolver.getSchema(project)\n\t\tif (!schema) {\n\t\t\tthrow new Error()\n\t\t}\n\t\treturn this.resolver.resolve(schema.acl, memberships, MembershipResolver.UnknownIdentity).errors\n\t}\n}\n\nexport { MembershipValidationError, MembershipValidationErrorType }\n"],"names":[],"mappings":";;AAIO,MAAM,oBAAoB;AAAA,EAChC,YACkB,gBACA,WAA+B,IAAI,sBACnD;AAFgB,SAAA,iBAAA;AACA,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"MembershipValidator.js","sources":["../../../../../../packages/engine-tenant-api/src/model/service/MembershipValidator.ts"],"sourcesContent":["import { ProjectSchemaResolver } from '../type'\nimport { MembershipValidationError, MembershipValidationErrorType, MembershipResolver } from '@contember/schema-utils'\nimport { Acl } from '@contember/schema'\n\nexport class MembershipValidator {\n\tconstructor(\n\t\tprivate readonly schemaResolver: ProjectSchemaResolver,\n\t\tprivate readonly resolver: MembershipResolver = new MembershipResolver(),\n\t) {}\n\n\tasync validate(project: string, memberships: readonly Acl.Membership[]): Promise<MembershipValidationError[]> {\n\t\tconst schema = await this.schemaResolver.getSchema(project)\n\t\tif (!schema) {\n\t\t\tthrow new Error()\n\t\t}\n\t\treturn this.resolver.resolve(schema.acl, memberships, MembershipResolver.UnknownIdentity).errors\n\t}\n}\n\nexport { MembershipValidationError, MembershipValidationErrorType }\n"],"names":[],"mappings":";;AAIO,MAAM,oBAAoB;AAAA,EAChC,YACkB,gBACA,WAA+B,IAAI,sBACnD;AAFgB,SAAA,iBAAA;AACA,SAAA,WAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,SAAS,SAAiB,aAA8E;AAC7G,UAAM,SAAS,MAAM,KAAK,eAAe,UAAU,OAAO;AAC1D,QAAI,CAAC,QAAQ;AACZ,YAAM,IAAI,MAAM;AAAA,IAAA;AAEV,WAAA,KAAK,SAAS,QAAQ,OAAO,KAAK,aAAa,mBAAmB,eAAe,EAAE;AAAA,EAAA;AAE5F;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpAuthenticator.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/OtpAuthenticator.ts"],"sourcesContent":["import { Providers } from '../providers'\nimport { Secret, TOTP, URI } from 'otpauth'\n\nexport interface OtpData {\n\tsecret: string\n\turi: string\n}\n\nconst digits = 6\n\nexport class OtpAuthenticator {\n\tconstructor(\n\t\tprivate readonly providers: Pick<Providers, 'now' | 'randomBytes'>,\n\t) {\n\t}\n\n\tpublic validate(secret: SecretLike, token: string): boolean {\n\t\tconst result = TOTP.validate({\n\t\t\ttoken,\n\t\t\tdigits,\n\t\t\tsecret: getSecret(secret),\n\t\t\ttimestamp: this.providers.now().getTime(),\n\t\t})\n\t\treturn result !== null\n\t}\n\n\tpublic generate(secret: SecretLike): string {\n\t\treturn TOTP.generate({\n\t\t\tsecret: getSecret(secret),\n\t\t\tdigits,\n\t\t\ttimestamp: this.providers.now().getTime(),\n\t\t})\n\t}\n\n\tpublic async create(user: string, label: string): Promise<OtpData> {\n\t\tconst secret = new Secret({ buffer: await this.providers.randomBytes(20) })\n\t\tconst totp = new TOTP({\n\t\t\tlabel: user,\n\t\t\tissuer: label,\n\t\t\tsecret,\n\t\t})\n\t\treturn {\n\t\t\tsecret: secret.base32,\n\t\t\turi: totp.toString(),\n\t\t}\n\t}\n}\n\ntype SecretLike = { uri: string } | { secret: string }\nconst getSecret = function (otp: SecretLike): Secret {\n\treturn 'uri' in otp ? (URI.parse(otp.uri).secret) : Secret.fromBase32(otp.secret)\n}\n"],"names":["TOTP","Secret","URI"],"mappings":";;;AAQA,MAAM,SAAS;AAER,MAAM,iBAAiB;AAAA,EAC7B,YACkB,WAChB;AADgB,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"OtpAuthenticator.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/service/OtpAuthenticator.ts"],"sourcesContent":["import { Providers } from '../providers'\nimport { Secret, TOTP, URI } from 'otpauth'\n\nexport interface OtpData {\n\tsecret: string\n\turi: string\n}\n\nconst digits = 6\n\nexport class OtpAuthenticator {\n\tconstructor(\n\t\tprivate readonly providers: Pick<Providers, 'now' | 'randomBytes'>,\n\t) {\n\t}\n\n\tpublic validate(secret: SecretLike, token: string): boolean {\n\t\tconst result = TOTP.validate({\n\t\t\ttoken,\n\t\t\tdigits,\n\t\t\tsecret: getSecret(secret),\n\t\t\ttimestamp: this.providers.now().getTime(),\n\t\t})\n\t\treturn result !== null\n\t}\n\n\tpublic generate(secret: SecretLike): string {\n\t\treturn TOTP.generate({\n\t\t\tsecret: getSecret(secret),\n\t\t\tdigits,\n\t\t\ttimestamp: this.providers.now().getTime(),\n\t\t})\n\t}\n\n\tpublic async create(user: string, label: string): Promise<OtpData> {\n\t\tconst secret = new Secret({ buffer: (await this.providers.randomBytes(20)) as any })\n\t\tconst totp = new TOTP({\n\t\t\tlabel: user,\n\t\t\tissuer: label,\n\t\t\tsecret,\n\t\t})\n\t\treturn {\n\t\t\tsecret: secret.base32,\n\t\t\turi: totp.toString(),\n\t\t}\n\t}\n}\n\ntype SecretLike = { uri: string } | { secret: string }\nconst getSecret = function (otp: SecretLike): Secret {\n\treturn 'uri' in otp ? (URI.parse(otp.uri).secret) : Secret.fromBase32(otp.secret)\n}\n"],"names":["TOTP","Secret","URI"],"mappings":";;;AAQA,MAAM,SAAS;AAER,MAAM,iBAAiB;AAAA,EAC7B,YACkB,WAChB;AADgB,SAAA,YAAA;AAAA,EAAA;AAAA,EAIX,SAAS,QAAoB,OAAwB;AACrD,UAAA,SAASA,aAAK,SAAS;AAAA,MAC5B;AAAA,MACA;AAAA,MACA,QAAQ,UAAU,MAAM;AAAA,MACxB,WAAW,KAAK,UAAU,MAAM,QAAQ;AAAA,IAAA,CACxC;AACD,WAAO,WAAW;AAAA,EAAA;AAAA,EAGZ,SAAS,QAA4B;AAC3C,WAAOA,QAAAA,KAAK,SAAS;AAAA,MACpB,QAAQ,UAAU,MAAM;AAAA,MACxB;AAAA,MACA,WAAW,KAAK,UAAU,MAAM,QAAQ;AAAA,IAAA,CACxC;AAAA,EAAA;AAAA,EAGF,MAAa,OAAO,MAAc,OAAiC;AAC5D,UAAA,SAAS,IAAIC,QAAA,OAAO,EAAE,QAAS,MAAM,KAAK,UAAU,YAAY,EAAE,GAAW;AAC7E,UAAA,OAAO,IAAID,aAAK;AAAA,MACrB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,IAAA,CACA;AACM,WAAA;AAAA,MACN,QAAQ,OAAO;AAAA,MACf,KAAK,KAAK,SAAS;AAAA,IACpB;AAAA,EAAA;AAEF;AAGA,MAAM,YAAY,SAAU,KAAyB;AAC7C,SAAA,SAAS,MAAOE,QAAA,IAAI,MAAM,IAAI,GAAG,EAAE,SAAUD,QAAA,OAAO,WAAW,IAAI,MAAM;AACjF;;"}
|