@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause =>\n\t\tjoinClause.compareColumns(['api_key', 'identity_id'], Operator.eq, ['identity', 'id']),\n\t)\n\t.leftJoin(\n\t\t'person', 'person', on => on.compareColumns(\n\t\t\t['person', 'identity_id'], Operator.eq, ['identity', 'id'],\n\t\t),\n\t)\n"],"names":["DatabaseQuery","Operator","computeTokenHash","SelectBuilder"],"mappings":";;;;;AAIO,MAAM,wBAAwBA,SAAAA,cAAgC;AAAA,EACpE,YAA6B,UAAkB;AACxC;AADsB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ApiKeyQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause =>\n\t\tjoinClause.compareColumns(['api_key', 'identity_id'], Operator.eq, ['identity', 'id']),\n\t)\n\t.leftJoin(\n\t\t'person', 'person', on => on.compareColumns(\n\t\t\t['person', 'identity_id'], Operator.eq, ['identity', 'id'],\n\t\t),\n\t)\n"],"names":["DatabaseQuery","Operator","computeTokenHash","SelectBuilder"],"mappings":";;;;;AAIO,MAAM,wBAAwBA,SAAAA,cAAgC;AAAA,EACpE,YAA6B,UAAkB;AACxC,UAAA;AADsB,SAAA,WAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAAoD;AAC3D,UAAA,OAAO,MAAM,gBACjB;AAAA,MACA,CAAA,UAAS,MAAM,QAAQ,CAAC,WAAW,IAAI,GAAGC,SAAA,SAAS,IAAI,KAAK,QAAQ;AAAA,IAAA,EAEpE,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;AAEO,MAAM,2BAA2BD,SAAAA,cAAgC;AAAA,EACvE,YAA6B,OAAe;AACrC,UAAA;AADsB,SAAA,QAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAAoD;AAC3D,UAAA,YAAYE,WAAAA,iBAAiB,KAAK,KAAK;AACvC,UAAA,OAAO,MAAM,gBACjB,MAAM,EAAE,YAAY,UAAW,CAAA,EAC/B,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;AAaA,MAAM,kBAAkBC,SAAAA,cAAc,OAAA,EACpC,OAAO,CAAC,WAAW,IAAI,CAAC,EACxB,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,UAAU,IAAI,GAAG,WAAW,EACpC,KAAK,SAAS,EACd;AAAA,EAAK;AAAA,EAAY;AAAA,EAAY,CAC7B,eAAA,WAAW,eAAe,CAAC,WAAW,aAAa,GAAGF,kBAAS,IAAI,CAAC,YAAY,IAAI,CAAC;AACtF,EACC;AAAA,EACA;AAAA,EAAU;AAAA,EAAU,QAAM,GAAG;AAAA,IAC5B,CAAC,UAAU,aAAa;AAAA,IAAGA,SAAAA,SAAS;AAAA,IAAI,CAAC,YAAY,IAAI;AAAA,EAAA;AAE3D;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause =>\n\t\tjoinClause.compareColumns(['api_key', 'identity_id'], Operator.eq, ['identity', 'id']),\n\t)\n\t.leftJoin(\n\t\t'person', 'person', on => on.compareColumns(\n\t\t\t['person', 'identity_id'], Operator.eq, ['identity', 'id'],\n\t\t),\n\t)\n"],"names":[],"mappings":";;;AAIO,MAAM,wBAAwB,cAAgC;AAAA,EACpE,YAA6B,UAAkB;AACxC;AADsB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ApiKeyQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/apiKey/ApiKeyQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Operator, SelectBuilder } from '@contember/database'\nimport { ApiKey } from '../../type'\nimport { computeTokenHash } from '../../utils'\n\nexport class ApiKeyByIdQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly apiKeyId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where(\n\t\t\t\twhere => where.compare(['api_key', 'id'], Operator.eq, this.apiKeyId),\n\t\t\t)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport class ApiKeyByTokenQuery extends DatabaseQuery<null | ApiKeyRow> {\n\tconstructor(private readonly token: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<null | ApiKeyRow> {\n\t\tconst tokenHash = computeTokenHash(this.token)\n\t\tconst rows = await apiKeyBaseQuery\n\t\t\t.where({ token_hash: tokenHash })\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport type ApiKeyRow = {\n\treadonly id: string\n\treadonly type: ApiKey.Type\n\treadonly identity_id: string\n\treadonly disabled_at: Date | null\n\treadonly expires_at: Date | null\n\treadonly expiration: number | null\n\treadonly roles: string[]\n\treadonly person_id: string | null\n}\n\nconst apiKeyBaseQuery = SelectBuilder.create<null | ApiKeyRow>()\n\t.select(['api_key', 'id'])\n\t.select(['api_key', 'type'])\n\t.select(['api_key', 'identity_id'])\n\t.select(['api_key', 'disabled_at'])\n\t.select(['api_key', 'expires_at'])\n\t.select(['identity', 'roles'])\n\t.select(['api_key', 'expiration'])\n\t.select(['person', 'id'], 'person_id')\n\t.from('api_key')\n\t.join('identity', 'identity', joinClause =>\n\t\tjoinClause.compareColumns(['api_key', 'identity_id'], Operator.eq, ['identity', 'id']),\n\t)\n\t.leftJoin(\n\t\t'person', 'person', on => on.compareColumns(\n\t\t\t['person', 'identity_id'], Operator.eq, ['identity', 'id'],\n\t\t),\n\t)\n"],"names":[],"mappings":";;;AAIO,MAAM,wBAAwB,cAAgC;AAAA,EACpE,YAA6B,UAAkB;AACxC,UAAA;AADsB,SAAA,WAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAAoD;AAC3D,UAAA,OAAO,MAAM,gBACjB;AAAA,MACA,CAAA,UAAS,MAAM,QAAQ,CAAC,WAAW,IAAI,GAAG,SAAS,IAAI,KAAK,QAAQ;AAAA,IAAA,EAEpE,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;AAEO,MAAM,2BAA2B,cAAgC;AAAA,EACvE,YAA6B,OAAe;AACrC,UAAA;AADsB,SAAA,QAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAAoD;AAC3D,UAAA,YAAY,iBAAiB,KAAK,KAAK;AACvC,UAAA,OAAO,MAAM,gBACjB,MAAM,EAAE,YAAY,UAAW,CAAA,EAC/B,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;AAaA,MAAM,kBAAkB,cAAc,OAAA,EACpC,OAAO,CAAC,WAAW,IAAI,CAAC,EACxB,OAAO,CAAC,WAAW,MAAM,CAAC,EAC1B,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,aAAa,CAAC,EACjC,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,OAAO,CAAC,WAAW,YAAY,CAAC,EAChC,OAAO,CAAC,UAAU,IAAI,GAAG,WAAW,EACpC,KAAK,SAAS,EACd;AAAA,EAAK;AAAA,EAAY;AAAA,EAAY,CAC7B,eAAA,WAAW,eAAe,CAAC,WAAW,aAAa,GAAG,SAAS,IAAI,CAAC,YAAY,IAAI,CAAC;AACtF,EACC;AAAA,EACA;AAAA,EAAU;AAAA,EAAU,QAAM,GAAG;AAAA,IAC5B,CAAC,UAAU,aAAa;AAAA,IAAG,SAAS;AAAA,IAAI,CAAC,YAAY,IAAI;AAAA,EAAA;AAE3D;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
class ConfigurationQuery extends Database.DatabaseQuery {
|
|
5
|
+
async fetch({ db }) {
|
|
6
|
+
const rows = await Database.SelectBuilder.create().from("config").select(new Database.Literal("*")).getResult(db);
|
|
7
|
+
const result = this.fetchOneOrNull(rows);
|
|
8
|
+
if (!result) {
|
|
9
|
+
throw new Error("Configuration not found");
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
passwordless: {
|
|
13
|
+
enabled: result.passwordless_enabled,
|
|
14
|
+
url: result.passwordless_url,
|
|
15
|
+
expirationMinutes: result.passwordless_expiration_minutes
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.ConfigurationQuery = ConfigurationQuery;
|
|
21
|
+
//# sourceMappingURL=ConfigurationQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/configuration/ConfigurationQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, SelectBuilder } from '@contember/database'\nimport { Config, ConfigPolicy } from '../../../schema'\n\nexport class ConfigurationQuery extends DatabaseQuery<Config> {\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Config> {\n\t\tconst rows = await SelectBuilder.create<ConfigurationRow>()\n\t\t\t.from('config')\n\t\t\t.select(new Literal('*'))\n\t\t\t.getResult(db)\n\t\tconst result = this.fetchOneOrNull(rows)\n\t\tif (!result) {\n\t\t\tthrow new Error('Configuration not found')\n\t\t}\n\n\t\treturn {\n\t\t\tpasswordless: {\n\t\t\t\tenabled: result.passwordless_enabled,\n\t\t\t\turl: result.passwordless_url,\n\t\t\t\texpirationMinutes: result.passwordless_expiration_minutes,\n\t\t\t},\n\t\t}\n\t}\n}\n\ninterface ConfigurationRow {\n\tpasswordless_enabled: ConfigPolicy\n\tpasswordless_url: string | null\n\tpasswordless_expiration_minutes: number\n}\n"],"names":["DatabaseQuery","SelectBuilder","Literal"],"mappings":";;;AAGO,MAAM,2BAA2BA,SAAAA,cAAsB;AAAA,EAE7D,MAAM,MAAM,EAAE,MAA0C;AACvD,UAAM,OAAO,MAAMC,SAAAA,cAAc,SAC/B,KAAK,QAAQ,EACb,OAAO,IAAIC,SAAAA,QAAQ,GAAG,CAAC,EACvB,UAAU,EAAE;AACR,UAAA,SAAS,KAAK,eAAe,IAAI;AACvC,QAAI,CAAC,QAAQ;AACN,YAAA,IAAI,MAAM,yBAAyB;AAAA,IAAA;AAGnC,WAAA;AAAA,MACN,cAAc;AAAA,QACb,SAAS,OAAO;AAAA,QAChB,KAAK,OAAO;AAAA,QACZ,mBAAmB,OAAO;AAAA,MAAA;AAAA,IAE5B;AAAA,EAAA;AAEF;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DatabaseQuery, SelectBuilder, Literal } from "@contember/database";
|
|
2
|
+
class ConfigurationQuery extends DatabaseQuery {
|
|
3
|
+
async fetch({ db }) {
|
|
4
|
+
const rows = await SelectBuilder.create().from("config").select(new Literal("*")).getResult(db);
|
|
5
|
+
const result = this.fetchOneOrNull(rows);
|
|
6
|
+
if (!result) {
|
|
7
|
+
throw new Error("Configuration not found");
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
passwordless: {
|
|
11
|
+
enabled: result.passwordless_enabled,
|
|
12
|
+
url: result.passwordless_url,
|
|
13
|
+
expirationMinutes: result.passwordless_expiration_minutes
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
ConfigurationQuery
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=ConfigurationQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/configuration/ConfigurationQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, SelectBuilder } from '@contember/database'\nimport { Config, ConfigPolicy } from '../../../schema'\n\nexport class ConfigurationQuery extends DatabaseQuery<Config> {\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<Config> {\n\t\tconst rows = await SelectBuilder.create<ConfigurationRow>()\n\t\t\t.from('config')\n\t\t\t.select(new Literal('*'))\n\t\t\t.getResult(db)\n\t\tconst result = this.fetchOneOrNull(rows)\n\t\tif (!result) {\n\t\t\tthrow new Error('Configuration not found')\n\t\t}\n\n\t\treturn {\n\t\t\tpasswordless: {\n\t\t\t\tenabled: result.passwordless_enabled,\n\t\t\t\turl: result.passwordless_url,\n\t\t\t\texpirationMinutes: result.passwordless_expiration_minutes,\n\t\t\t},\n\t\t}\n\t}\n}\n\ninterface ConfigurationRow {\n\tpasswordless_enabled: ConfigPolicy\n\tpasswordless_url: string | null\n\tpasswordless_expiration_minutes: number\n}\n"],"names":[],"mappings":";AAGO,MAAM,2BAA2B,cAAsB;AAAA,EAE7D,MAAM,MAAM,EAAE,MAA0C;AACvD,UAAM,OAAO,MAAM,cAAc,SAC/B,KAAK,QAAQ,EACb,OAAO,IAAI,QAAQ,GAAG,CAAC,EACvB,UAAU,EAAE;AACR,UAAA,SAAS,KAAK,eAAe,IAAI;AACvC,QAAI,CAAC,QAAQ;AACN,YAAA,IAAI,MAAM,yBAAyB;AAAA,IAAA;AAGnC,WAAA;AAAA,MACN,cAAc;AAAA,QACb,SAAS,OAAO;AAAA,QAChB,KAAK,OAAO;AAAA,QACZ,mBAAmB,OAAO;AAAA,MAAA;AAAA,IAE5B;AAAA,EAAA;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/identity/IdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class IdentityQuery extends DatabaseQuery<IdentityQueryResult[]> {\n\tconstructor(private readonly ids: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<IdentityQueryResult[]> {\n\t\tconst qb = await SelectBuilder.create<{ id: string; description: string | null; roles: string[] }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.select('roles')\n\t\t\t.from('identity')\n\t\t\t.where(expr => expr.in('id', this.ids))\n\t\t\t.getResult(queryable.db)\n\n\t\treturn qb.map(it => ({ ...it, description: it.description || '' }))\n\t}\n}\n\nexport interface IdentityQueryResult {\n\tid: string\n\tdescription: string\n\troles: string[]\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAEO,MAAM,sBAAsBA,SAAAA,cAAqC;AAAA,EACvE,YAA6B,KAAe;AACrC;AADsB,SAAA,MAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/identity/IdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class IdentityQuery extends DatabaseQuery<IdentityQueryResult[]> {\n\tconstructor(private readonly ids: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<IdentityQueryResult[]> {\n\t\tconst qb = await SelectBuilder.create<{ id: string; description: string | null; roles: string[] }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.select('roles')\n\t\t\t.from('identity')\n\t\t\t.where(expr => expr.in('id', this.ids))\n\t\t\t.getResult(queryable.db)\n\n\t\treturn qb.map(it => ({ ...it, description: it.description || '' }))\n\t}\n}\n\nexport interface IdentityQueryResult {\n\tid: string\n\tdescription: string\n\troles: string[]\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAEO,MAAM,sBAAsBA,SAAAA,cAAqC;AAAA,EACvE,YAA6B,KAAe;AACrC,UAAA;AADsB,SAAA,MAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,WAA8D;AACzE,UAAM,KAAK,MAAMC,uBAAc,OAC7B,EAAA,OAAO,IAAI,EACX,OAAO,aAAa,EACpB,OAAO,OAAO,EACd,KAAK,UAAU,EACf,MAAM,CAAQ,SAAA,KAAK,GAAG,MAAM,KAAK,GAAG,CAAC,EACrC,UAAU,UAAU,EAAE;AAEjB,WAAA,GAAG,IAAI,CAAA,QAAO,EAAE,GAAG,IAAI,aAAa,GAAG,eAAe,GAAK,EAAA;AAAA,EAAA;AAEpE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/identity/IdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class IdentityQuery extends DatabaseQuery<IdentityQueryResult[]> {\n\tconstructor(private readonly ids: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<IdentityQueryResult[]> {\n\t\tconst qb = await SelectBuilder.create<{ id: string; description: string | null; roles: string[] }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.select('roles')\n\t\t\t.from('identity')\n\t\t\t.where(expr => expr.in('id', this.ids))\n\t\t\t.getResult(queryable.db)\n\n\t\treturn qb.map(it => ({ ...it, description: it.description || '' }))\n\t}\n}\n\nexport interface IdentityQueryResult {\n\tid: string\n\tdescription: string\n\troles: string[]\n}\n"],"names":[],"mappings":";AAEO,MAAM,sBAAsB,cAAqC;AAAA,EACvE,YAA6B,KAAe;AACrC;AADsB,SAAA,MAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/identity/IdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\n\nexport class IdentityQuery extends DatabaseQuery<IdentityQueryResult[]> {\n\tconstructor(private readonly ids: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<IdentityQueryResult[]> {\n\t\tconst qb = await SelectBuilder.create<{ id: string; description: string | null; roles: string[] }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.select('roles')\n\t\t\t.from('identity')\n\t\t\t.where(expr => expr.in('id', this.ids))\n\t\t\t.getResult(queryable.db)\n\n\t\treturn qb.map(it => ({ ...it, description: it.description || '' }))\n\t}\n}\n\nexport interface IdentityQueryResult {\n\tid: string\n\tdescription: string\n\troles: string[]\n}\n"],"names":[],"mappings":";AAEO,MAAM,sBAAsB,cAAqC;AAAA,EACvE,YAA6B,KAAe;AACrC,UAAA;AADsB,SAAA,MAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,WAA8D;AACzE,UAAM,KAAK,MAAM,cAAc,OAC7B,EAAA,OAAO,IAAI,EACX,OAAO,aAAa,EACpB,OAAO,OAAO,EACd,KAAK,UAAU,EACf,MAAM,CAAQ,SAAA,KAAK,GAAG,MAAM,KAAK,GAAG,CAAC,EACrC,UAAU,UAAU,EAAE;AAEjB,WAAA,GAAG,IAAI,CAAA,QAAO,EAAE,GAAG,IAAI,aAAa,GAAG,eAAe,GAAK,EAAA;AAAA,EAAA;AAEpE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityProviderBySlugQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProviderBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery } from './helpers'\nimport { IdentityProviderRow } from './types'\n\nexport class IdentityProviderBySlugQuery extends DatabaseQuery<IdentityProviderRow | null> {\n\tconstructor(private readonly slug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderRow | null> {\n\t\tconst rows = await createBaseIdpQuery()\n\t\t\t.where({\n\t\t\t\tslug: this.slug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":["DatabaseQuery","createBaseIdpQuery"],"mappings":";;;;AAIO,MAAM,oCAAoCA,SAAAA,cAA0C;AAAA,EAC1F,YAA6B,MAAc;AACpC;AADsB,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IdentityProviderBySlugQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProviderBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery } from './helpers'\nimport { IdentityProviderRow } from './types'\n\nexport class IdentityProviderBySlugQuery extends DatabaseQuery<IdentityProviderRow | null> {\n\tconstructor(private readonly slug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderRow | null> {\n\t\tconst rows = await createBaseIdpQuery()\n\t\t\t.where({\n\t\t\t\tslug: this.slug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":["DatabaseQuery","createBaseIdpQuery"],"mappings":";;;;AAIO,MAAM,oCAAoCA,SAAAA,cAA0C;AAAA,EAC1F,YAA6B,MAAc;AACpC,UAAA;AADsB,SAAA,OAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAA8D;AAC3E,UAAM,OAAO,MAAMC,2BAAmB,EACpC,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IAAA,CACX,EACA,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityProviderBySlugQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProviderBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery } from './helpers'\nimport { IdentityProviderRow } from './types'\n\nexport class IdentityProviderBySlugQuery extends DatabaseQuery<IdentityProviderRow | null> {\n\tconstructor(private readonly slug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderRow | null> {\n\t\tconst rows = await createBaseIdpQuery()\n\t\t\t.where({\n\t\t\t\tslug: this.slug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,oCAAoC,cAA0C;AAAA,EAC1F,YAA6B,MAAc;AACpC;AADsB,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IdentityProviderBySlugQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProviderBySlugQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery } from './helpers'\nimport { IdentityProviderRow } from './types'\n\nexport class IdentityProviderBySlugQuery extends DatabaseQuery<IdentityProviderRow | null> {\n\tconstructor(private readonly slug: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderRow | null> {\n\t\tconst rows = await createBaseIdpQuery()\n\t\t\t.where({\n\t\t\t\tslug: this.slug,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,oCAAoC,cAA0C;AAAA,EAC1F,YAA6B,MAAc;AACpC,UAAA;AADsB,SAAA,OAAA;AAAA,EAAA;AAAA,EAI7B,MAAM,MAAM,EAAE,MAA8D;AAC3E,UAAM,OAAO,MAAM,mBAAmB,EACpC,MAAM;AAAA,MACN,MAAM,KAAK;AAAA,IAAA,CACX,EACA,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityProvidersQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProvidersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery, createIdpDto } from './helpers'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport class IdentityProvidersQuery extends DatabaseQuery<IdentityProviderDto[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderDto[]> {\n\t\treturn (await createBaseIdpQuery()\n\t\t\t.getResult(db))\n\t\t\t.map(createIdpDto)\n\t}\n}\n"],"names":["DatabaseQuery","createBaseIdpQuery","createIdpDto"],"mappings":";;;;AAIO,MAAM,+BAA+BA,SAAAA,cAAqC;AAAA,EAChF,MAAM,MAAM,EAAE,MAAyD;AACtE,YAAQ,MAAMC,QAAAA,qBACZ,UAAU,EAAE,GACZ,IAAIC,
|
|
1
|
+
{"version":3,"file":"IdentityProvidersQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProvidersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery, createIdpDto } from './helpers'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport class IdentityProvidersQuery extends DatabaseQuery<IdentityProviderDto[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderDto[]> {\n\t\treturn (await createBaseIdpQuery()\n\t\t\t.getResult(db))\n\t\t\t.map(createIdpDto)\n\t}\n}\n"],"names":["DatabaseQuery","createBaseIdpQuery","createIdpDto"],"mappings":";;;;AAIO,MAAM,+BAA+BA,SAAAA,cAAqC;AAAA,EAChF,MAAM,MAAM,EAAE,MAAyD;AACtE,YAAQ,MAAMC,QAAAA,qBACZ,UAAU,EAAE,GACZ,IAAIC,oBAAY;AAAA,EAAA;AAEpB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityProvidersQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProvidersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery, createIdpDto } from './helpers'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport class IdentityProvidersQuery extends DatabaseQuery<IdentityProviderDto[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderDto[]> {\n\t\treturn (await createBaseIdpQuery()\n\t\t\t.getResult(db))\n\t\t\t.map(createIdpDto)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,+BAA+B,cAAqC;AAAA,EAChF,MAAM,MAAM,EAAE,MAAyD;AACtE,YAAQ,MAAM,qBACZ,UAAU,EAAE,GACZ,IAAI,YAAY;AAAA,
|
|
1
|
+
{"version":3,"file":"IdentityProvidersQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/IdentityProvidersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createBaseIdpQuery, createIdpDto } from './helpers'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport class IdentityProvidersQuery extends DatabaseQuery<IdentityProviderDto[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<IdentityProviderDto[]> {\n\t\treturn (await createBaseIdpQuery()\n\t\t\t.getResult(db))\n\t\t\t.map(createIdpDto)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,+BAA+B,cAAqC;AAAA,EAChF,MAAM,MAAM,EAAE,MAAyD;AACtE,YAAQ,MAAM,qBACZ,UAAU,EAAE,GACZ,IAAI,YAAY;AAAA,EAAA;AAEpB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/helpers.ts"],"sourcesContent":["import { SelectBuilder } from '@contember/database'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport const createBaseIdpQuery = () =>\n\tSelectBuilder.create<IdentityProviderRow>()\n\t\t.select('id')\n\t\t.select('slug')\n\t\t.select('type')\n\t\t.select('configuration')\n\t\t.select('disabled_at', 'disabledAt')\n\t\t.select('auto_sign_up', 'autoSignUp')\n\t\t.select('exclusive')\n\t\t.select('init_returns_config', 'initReturnsConfig')\n\t\t.from('identity_provider')\n\nexport const createIdpDto = ({ exclusive, autoSignUp, initReturnsConfig, ...row }: IdentityProviderRow): IdentityProviderDto => {\n\treturn {\n\t\t...row,\n\t\toptions: { autoSignUp, exclusive, initReturnsConfig },\n\t}\n}\n"],"names":["SelectBuilder"],"mappings":";;;AAGO,MAAM,qBAAqB,MACjCA,SAAc,cAAA,OAAA,EACZ,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,eAAe,EACtB,OAAO,eAAe,YAAY,EAClC,OAAO,gBAAgB,YAAY,EACnC,OAAO,WAAW,EAClB,OAAO,uBAAuB,mBAAmB,EACjD,KAAK,mBAAmB;AAEd,MAAA,eAAe,CAAC,EAAE,WAAW,YAAY,mBAAmB,GAAG,UAAoD;AACxH,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,EAAE,YAAY,WAAW,kBAAkB;AAAA,
|
|
1
|
+
{"version":3,"file":"helpers.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/helpers.ts"],"sourcesContent":["import { SelectBuilder } from '@contember/database'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport const createBaseIdpQuery = () =>\n\tSelectBuilder.create<IdentityProviderRow>()\n\t\t.select('id')\n\t\t.select('slug')\n\t\t.select('type')\n\t\t.select('configuration')\n\t\t.select('disabled_at', 'disabledAt')\n\t\t.select('auto_sign_up', 'autoSignUp')\n\t\t.select('exclusive')\n\t\t.select('init_returns_config', 'initReturnsConfig')\n\t\t.from('identity_provider')\n\nexport const createIdpDto = ({ exclusive, autoSignUp, initReturnsConfig, ...row }: IdentityProviderRow): IdentityProviderDto => {\n\treturn {\n\t\t...row,\n\t\toptions: { autoSignUp, exclusive, initReturnsConfig },\n\t}\n}\n"],"names":["SelectBuilder"],"mappings":";;;AAGO,MAAM,qBAAqB,MACjCA,SAAc,cAAA,OAAA,EACZ,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,eAAe,EACtB,OAAO,eAAe,YAAY,EAClC,OAAO,gBAAgB,YAAY,EACnC,OAAO,WAAW,EAClB,OAAO,uBAAuB,mBAAmB,EACjD,KAAK,mBAAmB;AAEd,MAAA,eAAe,CAAC,EAAE,WAAW,YAAY,mBAAmB,GAAG,UAAoD;AACxH,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,EAAE,YAAY,WAAW,kBAAkB;AAAA,EACrD;AACD;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/helpers.ts"],"sourcesContent":["import { SelectBuilder } from '@contember/database'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport const createBaseIdpQuery = () =>\n\tSelectBuilder.create<IdentityProviderRow>()\n\t\t.select('id')\n\t\t.select('slug')\n\t\t.select('type')\n\t\t.select('configuration')\n\t\t.select('disabled_at', 'disabledAt')\n\t\t.select('auto_sign_up', 'autoSignUp')\n\t\t.select('exclusive')\n\t\t.select('init_returns_config', 'initReturnsConfig')\n\t\t.from('identity_provider')\n\nexport const createIdpDto = ({ exclusive, autoSignUp, initReturnsConfig, ...row }: IdentityProviderRow): IdentityProviderDto => {\n\treturn {\n\t\t...row,\n\t\toptions: { autoSignUp, exclusive, initReturnsConfig },\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,qBAAqB,MACjC,cAAc,OAAA,EACZ,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,eAAe,EACtB,OAAO,eAAe,YAAY,EAClC,OAAO,gBAAgB,YAAY,EACnC,OAAO,WAAW,EAClB,OAAO,uBAAuB,mBAAmB,EACjD,KAAK,mBAAmB;AAEd,MAAA,eAAe,CAAC,EAAE,WAAW,YAAY,mBAAmB,GAAG,UAAoD;AACxH,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,EAAE,YAAY,WAAW,kBAAkB;AAAA,
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/idp/helpers.ts"],"sourcesContent":["import { SelectBuilder } from '@contember/database'\nimport { IdentityProviderDto, IdentityProviderRow } from './types'\n\nexport const createBaseIdpQuery = () =>\n\tSelectBuilder.create<IdentityProviderRow>()\n\t\t.select('id')\n\t\t.select('slug')\n\t\t.select('type')\n\t\t.select('configuration')\n\t\t.select('disabled_at', 'disabledAt')\n\t\t.select('auto_sign_up', 'autoSignUp')\n\t\t.select('exclusive')\n\t\t.select('init_returns_config', 'initReturnsConfig')\n\t\t.from('identity_provider')\n\nexport const createIdpDto = ({ exclusive, autoSignUp, initReturnsConfig, ...row }: IdentityProviderRow): IdentityProviderDto => {\n\treturn {\n\t\t...row,\n\t\toptions: { autoSignUp, exclusive, initReturnsConfig },\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,qBAAqB,MACjC,cAAc,OAAA,EACZ,OAAO,IAAI,EACX,OAAO,MAAM,EACb,OAAO,MAAM,EACb,OAAO,eAAe,EACtB,OAAO,eAAe,YAAY,EAClC,OAAO,gBAAgB,YAAY,EACnC,OAAO,WAAW,EAClB,OAAO,uBAAuB,mBAAmB,EACjD,KAAK,mBAAmB;AAEd,MAAA,eAAe,CAAC,EAAE,WAAW,YAAY,mBAAmB,GAAG,UAAoD;AACxH,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,EAAE,YAAY,WAAW,kBAAkB;AAAA,EACrD;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailTemplateListQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateListQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport type MailTemplateListRow =\n\t& MailTemplateRow\n\t& {\n\t\tprojectSlug: string | null\n\t}\nexport class MailTemplateListQuery extends DatabaseQuery<MailTemplateListRow[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateListRow[]> {\n\t\treturn await createMailTemplateQuery<MailTemplateListRow>()\n\t\t\t.leftJoin('project', undefined, expr => expr.columnsEq(['project', 'id'], ['mail_template', 'project_id']))\n\t\t\t.select(['project', 'slug'], 'projectSlug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":["DatabaseQuery","createMailTemplateQuery"],"mappings":";;;;AAQO,MAAM,8BAA8BA,SAAAA,cAAqC;AAAA,EAC/E,MAAM,MAAM,EAAE,MAAyD;AAC/D,WAAA,MAAMC,QAA6C,wBAAA,EACxD,SAAS,WAAW,QAAW,CAAA,SAAQ,KAAK,UAAU,CAAC,WAAW,IAAI,GAAG,CAAC,iBAAiB,YAAY,CAAC,CAAC,EACzG,OAAO,CAAC,WAAW,MAAM,GAAG,aAAa,EACzC,UAAU,EAAE;AAAA,
|
|
1
|
+
{"version":3,"file":"MailTemplateListQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateListQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport type MailTemplateListRow =\n\t& MailTemplateRow\n\t& {\n\t\tprojectSlug: string | null\n\t}\nexport class MailTemplateListQuery extends DatabaseQuery<MailTemplateListRow[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateListRow[]> {\n\t\treturn await createMailTemplateQuery<MailTemplateListRow>()\n\t\t\t.leftJoin('project', undefined, expr => expr.columnsEq(['project', 'id'], ['mail_template', 'project_id']))\n\t\t\t.select(['project', 'slug'], 'projectSlug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":["DatabaseQuery","createMailTemplateQuery"],"mappings":";;;;AAQO,MAAM,8BAA8BA,SAAAA,cAAqC;AAAA,EAC/E,MAAM,MAAM,EAAE,MAAyD;AAC/D,WAAA,MAAMC,QAA6C,wBAAA,EACxD,SAAS,WAAW,QAAW,CAAA,SAAQ,KAAK,UAAU,CAAC,WAAW,IAAI,GAAG,CAAC,iBAAiB,YAAY,CAAC,CAAC,EACzG,OAAO,CAAC,WAAW,MAAM,GAAG,aAAa,EACzC,UAAU,EAAE;AAAA,EAAA;AAEhB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailTemplateListQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateListQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport type MailTemplateListRow =\n\t& MailTemplateRow\n\t& {\n\t\tprojectSlug: string | null\n\t}\nexport class MailTemplateListQuery extends DatabaseQuery<MailTemplateListRow[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateListRow[]> {\n\t\treturn await createMailTemplateQuery<MailTemplateListRow>()\n\t\t\t.leftJoin('project', undefined, expr => expr.columnsEq(['project', 'id'], ['mail_template', 'project_id']))\n\t\t\t.select(['project', 'slug'], 'projectSlug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":[],"mappings":";;AAQO,MAAM,8BAA8B,cAAqC;AAAA,EAC/E,MAAM,MAAM,EAAE,MAAyD;AAC/D,WAAA,MAAM,wBAA6C,EACxD,SAAS,WAAW,QAAW,CAAA,SAAQ,KAAK,UAAU,CAAC,WAAW,IAAI,GAAG,CAAC,iBAAiB,YAAY,CAAC,CAAC,EACzG,OAAO,CAAC,WAAW,MAAM,GAAG,aAAa,EACzC,UAAU,EAAE;AAAA,
|
|
1
|
+
{"version":3,"file":"MailTemplateListQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateListQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport type MailTemplateListRow =\n\t& MailTemplateRow\n\t& {\n\t\tprojectSlug: string | null\n\t}\nexport class MailTemplateListQuery extends DatabaseQuery<MailTemplateListRow[]> {\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateListRow[]> {\n\t\treturn await createMailTemplateQuery<MailTemplateListRow>()\n\t\t\t.leftJoin('project', undefined, expr => expr.columnsEq(['project', 'id'], ['mail_template', 'project_id']))\n\t\t\t.select(['project', 'slug'], 'projectSlug')\n\t\t\t.getResult(db)\n\t}\n}\n"],"names":[],"mappings":";;AAQO,MAAM,8BAA8B,cAAqC;AAAA,EAC/E,MAAM,MAAM,EAAE,MAAyD;AAC/D,WAAA,MAAM,wBAA6C,EACxD,SAAS,WAAW,QAAW,CAAA,SAAQ,KAAK,UAAU,CAAC,WAAW,IAAI,GAAG,CAAC,iBAAiB,YAAY,CAAC,CAAC,EACzG,OAAO,CAAC,WAAW,MAAM,GAAG,aAAa,EACzC,UAAU,EAAE;AAAA,EAAA;AAEhB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailTemplateQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MailTemplateIdentifier } from '../../mailing'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport class MailTemplateQuery extends DatabaseQuery<MailTemplateRow | null> {\n\tconstructor(\n\t\tprivate mailTemplateIdentifier: MailTemplateIdentifier,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateRow | null> {\n\t\tconst rows = await createMailTemplateQuery()\n\t\t\t.where({\n\t\t\t\tproject_id: this.mailTemplateIdentifier.projectId,\n\t\t\t\tmail_type: this.mailTemplateIdentifier.type,\n\t\t\t\tvariant: this.mailTemplateIdentifier.variant,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":["DatabaseQuery","createMailTemplateQuery"],"mappings":";;;;AAIO,MAAM,0BAA0BA,SAAAA,cAAsC;AAAA,EAC5E,YACS,wBACP;AACK;AAFE,SAAA,yBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"MailTemplateQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MailTemplateIdentifier } from '../../mailing'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport class MailTemplateQuery extends DatabaseQuery<MailTemplateRow | null> {\n\tconstructor(\n\t\tprivate mailTemplateIdentifier: MailTemplateIdentifier,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateRow | null> {\n\t\tconst rows = await createMailTemplateQuery()\n\t\t\t.where({\n\t\t\t\tproject_id: this.mailTemplateIdentifier.projectId,\n\t\t\t\tmail_type: this.mailTemplateIdentifier.type,\n\t\t\t\tvariant: this.mailTemplateIdentifier.variant,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":["DatabaseQuery","createMailTemplateQuery"],"mappings":";;;;AAIO,MAAM,0BAA0BA,SAAAA,cAAsC;AAAA,EAC5E,YACS,wBACP;AACK,UAAA;AAFE,SAAA,yBAAA;AAAA,EAAA;AAAA,EAKT,MAAM,MAAM,EAAE,MAA0D;AACvE,UAAM,OAAO,MAAMC,gCAAwB,EACzC,MAAM;AAAA,MACN,YAAY,KAAK,uBAAuB;AAAA,MACxC,WAAW,KAAK,uBAAuB;AAAA,MACvC,SAAS,KAAK,uBAAuB;AAAA,IAAA,CACrC,EACA,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailTemplateQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MailTemplateIdentifier } from '../../mailing'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport class MailTemplateQuery extends DatabaseQuery<MailTemplateRow | null> {\n\tconstructor(\n\t\tprivate mailTemplateIdentifier: MailTemplateIdentifier,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateRow | null> {\n\t\tconst rows = await createMailTemplateQuery()\n\t\t\t.where({\n\t\t\t\tproject_id: this.mailTemplateIdentifier.projectId,\n\t\t\t\tmail_type: this.mailTemplateIdentifier.type,\n\t\t\t\tvariant: this.mailTemplateIdentifier.variant,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,0BAA0B,cAAsC;AAAA,EAC5E,YACS,wBACP;AACK;AAFE,SAAA,yBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"MailTemplateQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/mailTemplate/MailTemplateQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MailTemplateIdentifier } from '../../mailing'\nimport { createMailTemplateQuery, MailTemplateRow } from './helpers'\n\nexport class MailTemplateQuery extends DatabaseQuery<MailTemplateRow | null> {\n\tconstructor(\n\t\tprivate mailTemplateIdentifier: MailTemplateIdentifier,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MailTemplateRow | null> {\n\t\tconst rows = await createMailTemplateQuery()\n\t\t\t.where({\n\t\t\t\tproject_id: this.mailTemplateIdentifier.projectId,\n\t\t\t\tmail_type: this.mailTemplateIdentifier.type,\n\t\t\t\tvariant: this.mailTemplateIdentifier.variant,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,0BAA0B,cAAsC;AAAA,EAC5E,YACS,wBACP;AACK,UAAA;AAFE,SAAA,yBAAA;AAAA,EAAA;AAAA,EAKT,MAAM,MAAM,EAAE,MAA0D;AACvE,UAAM,OAAO,MAAM,wBAAwB,EACzC,MAAM;AAAA,MACN,YAAY,KAAK,uBAAuB;AAAA,MACxC,WAAW,KAAK,uBAAuB;AAAA,MACvC,SAAS,KAAK,uBAAuB;AAAA,IAAA,CACrC,EACA,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMembersQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { MemberType, ProjectMembersInput } from '../../../schema'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ProjectMembersQuery extends DatabaseQuery<ProjectMembersQueryResult> {\n\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly projectMemberInput: ProjectMembersInput,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembersQueryResult> {\n\t\treturn await SelectBuilder.create<{ id: string; description: string }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.from('identity')\n\t\t\t.where(it => it.exists(\n\t\t\t\tbuilder => builder\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.where(expr => expr.columnsEq(['project_membership', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.where({ project_id: this.projectId }),\n\t\t\t))\n\t\t\t.match(qb => {\n\t\t\t\tconst identityId = this.projectMemberInput.filter?.identityId\n\t\t\t\treturn identityId ? qb.where(it => it.in(['identity', 'id'], identityId)) : qb\n\t\t\t})\n\t\t\t.match(qb => {\n\t\t\t\tconst { email, memberType, personId } = this.projectMemberInput.filter ?? {}\n\t\t\t\tif ((email || personId) && memberType === 'API_KEY') {\n\t\t\t\t\tthrow new ImplementationException()\n\t\t\t\t}\n\n\t\t\t\tconst personQuery = SelectBuilder.create()\n\t\t\t\t\t.from('person')\n\t\t\t\t\t.where(expr => expr.columnsEq(['person', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.match(qb => email ? qb.where(it => it.in('email', email)) : qb)\n\t\t\t\t\t.match(qb => personId ? qb.where(it => it.in(['person', 'id'], personId)) : qb)\n\n\n\t\t\t\tif (email || personId || memberType === 'PERSON') {\n\t\t\t\t\treturn qb.where(it => it.exists(personQuery))\n\t\t\t\t}\n\n\t\t\t\tif (memberType === 'API_KEY') {\n\t\t\t\t\treturn qb.where(it => it.not(it => it.exists(personQuery)))\n\t\t\t\t}\n\n\t\t\t\treturn qb\n\t\t\t})\n\t\t\t.limit(this.projectMemberInput.limit ?? undefined, this.projectMemberInput.offset ?? undefined)\n\t\t\t.getResult(db)\n\t}\n}\n\nexport interface ProjectMembersQueryRow {\n\tid: string\n\tdescription: string\n}\n\nexport type ProjectMembersQueryResult = ProjectMembersQueryRow[]\n"],"names":["DatabaseQuery","SelectBuilder","ImplementationException","qb","it"],"mappings":";;;;AAIO,MAAM,4BAA4BA,SAAAA,cAAyC;AAAA,EAEjF,YACkB,WACA,oBAChB;AACK;AAHW,SAAA,YAAA;AACA,SAAA,qBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectMembersQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { MemberType, ProjectMembersInput } from '../../../schema'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ProjectMembersQuery extends DatabaseQuery<ProjectMembersQueryResult> {\n\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly projectMemberInput: ProjectMembersInput,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembersQueryResult> {\n\t\treturn await SelectBuilder.create<{ id: string; description: string }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.from('identity')\n\t\t\t.where(it => it.exists(\n\t\t\t\tbuilder => builder\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.where(expr => expr.columnsEq(['project_membership', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.where({ project_id: this.projectId }),\n\t\t\t))\n\t\t\t.match(qb => {\n\t\t\t\tconst identityId = this.projectMemberInput.filter?.identityId\n\t\t\t\treturn identityId ? qb.where(it => it.in(['identity', 'id'], identityId)) : qb\n\t\t\t})\n\t\t\t.match(qb => {\n\t\t\t\tconst { email, memberType, personId } = this.projectMemberInput.filter ?? {}\n\t\t\t\tif ((email || personId) && memberType === 'API_KEY') {\n\t\t\t\t\tthrow new ImplementationException()\n\t\t\t\t}\n\n\t\t\t\tconst personQuery = SelectBuilder.create()\n\t\t\t\t\t.from('person')\n\t\t\t\t\t.where(expr => expr.columnsEq(['person', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.match(qb => email ? qb.where(it => it.in('email', email)) : qb)\n\t\t\t\t\t.match(qb => personId ? qb.where(it => it.in(['person', 'id'], personId)) : qb)\n\n\n\t\t\t\tif (email || personId || memberType === 'PERSON') {\n\t\t\t\t\treturn qb.where(it => it.exists(personQuery))\n\t\t\t\t}\n\n\t\t\t\tif (memberType === 'API_KEY') {\n\t\t\t\t\treturn qb.where(it => it.not(it => it.exists(personQuery)))\n\t\t\t\t}\n\n\t\t\t\treturn qb\n\t\t\t})\n\t\t\t.limit(this.projectMemberInput.limit ?? undefined, this.projectMemberInput.offset ?? undefined)\n\t\t\t.getResult(db)\n\t}\n}\n\nexport interface ProjectMembersQueryRow {\n\tid: string\n\tdescription: string\n}\n\nexport type ProjectMembersQueryResult = ProjectMembersQueryRow[]\n"],"names":["DatabaseQuery","SelectBuilder","ImplementationException","qb","it"],"mappings":";;;;AAIO,MAAM,4BAA4BA,SAAAA,cAAyC;AAAA,EAEjF,YACkB,WACA,oBAChB;AACK,UAAA;AAHW,SAAA,YAAA;AACA,SAAA,qBAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,EAAE,MAA6D;AAC1E,WAAO,MAAMC,SAAA,cAAc,OAA4C,EACrE,OAAO,IAAI,EACX,OAAO,aAAa,EACpB,KAAK,UAAU,EACf,MAAM,QAAM,GAAG;AAAA,MACf,CAAA,YAAW,QACT,KAAK,oBAAoB,EACzB,MAAM,CAAQ,SAAA,KAAK,UAAU,CAAC,sBAAsB,aAAa,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,EACvF,MAAM,EAAE,YAAY,KAAK,UAAW,CAAA;AAAA,IAAA,CACtC,EACA,MAAM,CAAM,OAAA;AACN,YAAA,aAAa,KAAK,mBAAmB,QAAQ;AACnD,aAAO,aAAa,GAAG,MAAM,CAAA,OAAM,GAAG,GAAG,CAAC,YAAY,IAAI,GAAG,UAAU,CAAC,IAAI;AAAA,IAAA,CAC5E,EACA,MAAM,CAAM,OAAA;AACN,YAAA,EAAE,OAAO,YAAY,aAAa,KAAK,mBAAmB,UAAU,CAAC;AACtE,WAAA,SAAS,aAAa,eAAe,WAAW;AACpD,cAAM,IAAIC,WAAAA,wBAAwB;AAAA,MAAA;AAG7B,YAAA,cAAcD,SAAAA,cAAc,OAAA,EAChC,KAAK,QAAQ,EACb,MAAM,CAAQ,SAAA,KAAK,UAAU,CAAC,UAAU,aAAa,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,EAC3E,MAAM,CAAAE,QAAM,QAAQA,IAAG,MAAM,CAAM,OAAA,GAAG,GAAG,SAAS,KAAK,CAAC,IAAIA,GAAE,EAC9D,MAAM,CAAAA,QAAM,WAAWA,IAAG,MAAM,CAAA,OAAM,GAAG,GAAG,CAAC,UAAU,IAAI,GAAG,QAAQ,CAAC,IAAIA,GAAE;AAG3E,UAAA,SAAS,YAAY,eAAe,UAAU;AACjD,eAAO,GAAG,MAAM,CAAA,OAAM,GAAG,OAAO,WAAW,CAAC;AAAA,MAAA;AAG7C,UAAI,eAAe,WAAW;AACtB,eAAA,GAAG,MAAM,CAAA,OAAM,GAAG,IAAI,CAAAC,QAAMA,IAAG,OAAO,WAAW,CAAC,CAAC;AAAA,MAAA;AAGpD,aAAA;AAAA,IACP,CAAA,EACA,MAAM,KAAK,mBAAmB,SAAS,QAAW,KAAK,mBAAmB,UAAU,MAAS,EAC7F,UAAU,EAAE;AAAA,EAAA;AAEhB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMembersQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { MemberType, ProjectMembersInput } from '../../../schema'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ProjectMembersQuery extends DatabaseQuery<ProjectMembersQueryResult> {\n\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly projectMemberInput: ProjectMembersInput,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembersQueryResult> {\n\t\treturn await SelectBuilder.create<{ id: string; description: string }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.from('identity')\n\t\t\t.where(it => it.exists(\n\t\t\t\tbuilder => builder\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.where(expr => expr.columnsEq(['project_membership', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.where({ project_id: this.projectId }),\n\t\t\t))\n\t\t\t.match(qb => {\n\t\t\t\tconst identityId = this.projectMemberInput.filter?.identityId\n\t\t\t\treturn identityId ? qb.where(it => it.in(['identity', 'id'], identityId)) : qb\n\t\t\t})\n\t\t\t.match(qb => {\n\t\t\t\tconst { email, memberType, personId } = this.projectMemberInput.filter ?? {}\n\t\t\t\tif ((email || personId) && memberType === 'API_KEY') {\n\t\t\t\t\tthrow new ImplementationException()\n\t\t\t\t}\n\n\t\t\t\tconst personQuery = SelectBuilder.create()\n\t\t\t\t\t.from('person')\n\t\t\t\t\t.where(expr => expr.columnsEq(['person', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.match(qb => email ? qb.where(it => it.in('email', email)) : qb)\n\t\t\t\t\t.match(qb => personId ? qb.where(it => it.in(['person', 'id'], personId)) : qb)\n\n\n\t\t\t\tif (email || personId || memberType === 'PERSON') {\n\t\t\t\t\treturn qb.where(it => it.exists(personQuery))\n\t\t\t\t}\n\n\t\t\t\tif (memberType === 'API_KEY') {\n\t\t\t\t\treturn qb.where(it => it.not(it => it.exists(personQuery)))\n\t\t\t\t}\n\n\t\t\t\treturn qb\n\t\t\t})\n\t\t\t.limit(this.projectMemberInput.limit ?? undefined, this.projectMemberInput.offset ?? undefined)\n\t\t\t.getResult(db)\n\t}\n}\n\nexport interface ProjectMembersQueryRow {\n\tid: string\n\tdescription: string\n}\n\nexport type ProjectMembersQueryResult = ProjectMembersQueryRow[]\n"],"names":["qb","it"],"mappings":";;AAIO,MAAM,4BAA4B,cAAyC;AAAA,EAEjF,YACkB,WACA,oBAChB;AACK;AAHW,SAAA,YAAA;AACA,SAAA,qBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectMembersQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembersQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { MemberType, ProjectMembersInput } from '../../../schema'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ProjectMembersQuery extends DatabaseQuery<ProjectMembersQueryResult> {\n\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly projectMemberInput: ProjectMembersInput,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembersQueryResult> {\n\t\treturn await SelectBuilder.create<{ id: string; description: string }>()\n\t\t\t.select('id')\n\t\t\t.select('description')\n\t\t\t.from('identity')\n\t\t\t.where(it => it.exists(\n\t\t\t\tbuilder => builder\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.where(expr => expr.columnsEq(['project_membership', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.where({ project_id: this.projectId }),\n\t\t\t))\n\t\t\t.match(qb => {\n\t\t\t\tconst identityId = this.projectMemberInput.filter?.identityId\n\t\t\t\treturn identityId ? qb.where(it => it.in(['identity', 'id'], identityId)) : qb\n\t\t\t})\n\t\t\t.match(qb => {\n\t\t\t\tconst { email, memberType, personId } = this.projectMemberInput.filter ?? {}\n\t\t\t\tif ((email || personId) && memberType === 'API_KEY') {\n\t\t\t\t\tthrow new ImplementationException()\n\t\t\t\t}\n\n\t\t\t\tconst personQuery = SelectBuilder.create()\n\t\t\t\t\t.from('person')\n\t\t\t\t\t.where(expr => expr.columnsEq(['person', 'identity_id'], ['identity', 'id']))\n\t\t\t\t\t.match(qb => email ? qb.where(it => it.in('email', email)) : qb)\n\t\t\t\t\t.match(qb => personId ? qb.where(it => it.in(['person', 'id'], personId)) : qb)\n\n\n\t\t\t\tif (email || personId || memberType === 'PERSON') {\n\t\t\t\t\treturn qb.where(it => it.exists(personQuery))\n\t\t\t\t}\n\n\t\t\t\tif (memberType === 'API_KEY') {\n\t\t\t\t\treturn qb.where(it => it.not(it => it.exists(personQuery)))\n\t\t\t\t}\n\n\t\t\t\treturn qb\n\t\t\t})\n\t\t\t.limit(this.projectMemberInput.limit ?? undefined, this.projectMemberInput.offset ?? undefined)\n\t\t\t.getResult(db)\n\t}\n}\n\nexport interface ProjectMembersQueryRow {\n\tid: string\n\tdescription: string\n}\n\nexport type ProjectMembersQueryResult = ProjectMembersQueryRow[]\n"],"names":["qb","it"],"mappings":";;AAIO,MAAM,4BAA4B,cAAyC;AAAA,EAEjF,YACkB,WACA,oBAChB;AACK,UAAA;AAHW,SAAA,YAAA;AACA,SAAA,qBAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,EAAE,MAA6D;AAC1E,WAAO,MAAM,cAAc,OAA4C,EACrE,OAAO,IAAI,EACX,OAAO,aAAa,EACpB,KAAK,UAAU,EACf,MAAM,QAAM,GAAG;AAAA,MACf,CAAA,YAAW,QACT,KAAK,oBAAoB,EACzB,MAAM,CAAQ,SAAA,KAAK,UAAU,CAAC,sBAAsB,aAAa,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,EACvF,MAAM,EAAE,YAAY,KAAK,UAAW,CAAA;AAAA,IAAA,CACtC,EACA,MAAM,CAAM,OAAA;AACN,YAAA,aAAa,KAAK,mBAAmB,QAAQ;AACnD,aAAO,aAAa,GAAG,MAAM,CAAA,OAAM,GAAG,GAAG,CAAC,YAAY,IAAI,GAAG,UAAU,CAAC,IAAI;AAAA,IAAA,CAC5E,EACA,MAAM,CAAM,OAAA;AACN,YAAA,EAAE,OAAO,YAAY,aAAa,KAAK,mBAAmB,UAAU,CAAC;AACtE,WAAA,SAAS,aAAa,eAAe,WAAW;AACpD,cAAM,IAAI,wBAAwB;AAAA,MAAA;AAG7B,YAAA,cAAc,cAAc,OAAA,EAChC,KAAK,QAAQ,EACb,MAAM,CAAQ,SAAA,KAAK,UAAU,CAAC,UAAU,aAAa,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,EAC3E,MAAM,CAAAA,QAAM,QAAQA,IAAG,MAAM,CAAM,OAAA,GAAG,GAAG,SAAS,KAAK,CAAC,IAAIA,GAAE,EAC9D,MAAM,CAAAA,QAAM,WAAWA,IAAG,MAAM,CAAA,OAAM,GAAG,GAAG,CAAC,UAAU,IAAI,GAAG,QAAQ,CAAC,IAAIA,GAAE;AAG3E,UAAA,SAAS,YAAY,eAAe,UAAU;AACjD,eAAO,GAAG,MAAM,CAAA,OAAM,GAAG,OAAO,WAAW,CAAC;AAAA,MAAA;AAG7C,UAAI,eAAe,WAAW;AACtB,eAAA,GAAG,MAAM,CAAA,OAAM,GAAG,IAAI,CAAAC,QAAMA,IAAG,OAAO,WAAW,CAAC,CAAC;AAAA,MAAA;AAGpD,aAAA;AAAA,IACP,CAAA,EACA,MAAM,KAAK,mBAAmB,SAAS,QAAW,KAAK,mBAAmB,UAAU,MAAS,EAC7F,UAAU,EAAE;AAAA,EAAA;AAEhB;"}
|
package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMembershipByIdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembershipByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\nimport { Acl } from '@contember/schema'\n\nclass ProjectMembershipByIdentityQuery extends DatabaseQuery<ProjectMembershipByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembershipByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<ProjectMembershipByIdentityQuery.Row>()\n\t\tqb = qb\n\t\t\t.with('memberships', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['project_membership', 'id'])\n\t\t\t\t\t.select(['project_membership', 'role'])\n\t\t\t\t\t.select(['project_membership', 'identity_id'])\n\t\t\t\t\t.where(expr => expr.in('identity_id', this.identityId))\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.match(qb =>\n\t\t\t\t\t\t'id' in this.project\n\t\t\t\t\t\t\t? qb.where({\n\t\t\t\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: qb.match(byProjectSlug(this.project.slug)),\n\t\t\t\t\t),\n\t\t\t)\n\t\t\t.with('variables', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select('membership_id')\n\t\t\t\t\t.select(cb => cb.raw(\"json_agg(json_build_object('name', variable, 'values', value))\"), 'variables')\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.join('memberships', undefined, expr =>\n\t\t\t\t\t\texpr.columnsEq(['project_membership_variable', 'membership_id'], ['memberships', 'id']),\n\t\t\t\t\t)\n\t\t\t\t\t.groupBy('membership_id'),\n\t\t\t)\n\t\t\t.select('role')\n\t\t\t.select(expr => expr.raw(\"coalesce(variables, '[]'::json)\"), 'variables')\n\t\t\t.select('identity_id', 'identityId')\n\t\t\t.from('memberships')\n\t\t\t.leftJoin('variables', undefined, expr => expr.columnsEq(['memberships', 'id'], ['variables', 'membership_id']))\n\n\t\treturn await qb.getResult(db)\n\t}\n}\n\nnamespace ProjectMembershipByIdentityQuery {\n\texport type Row = Acl.Membership & { identityId: string }\n\texport type Result = readonly Row[]\n}\n\nexport { ProjectMembershipByIdentityQuery }\n"],"names":["DatabaseQuery","SelectBuilder","qb","byProjectSlug"],"mappings":";;;;AAIA,MAAM,yCAAyCA,SAAAA,cAAuD;AAAA,EACrG,YAA6B,SAA6D,YAAsB;AACzG;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectMembershipByIdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembershipByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\nimport { Acl } from '@contember/schema'\n\nclass ProjectMembershipByIdentityQuery extends DatabaseQuery<ProjectMembershipByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembershipByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<ProjectMembershipByIdentityQuery.Row>()\n\t\tqb = qb\n\t\t\t.with('memberships', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['project_membership', 'id'])\n\t\t\t\t\t.select(['project_membership', 'role'])\n\t\t\t\t\t.select(['project_membership', 'identity_id'])\n\t\t\t\t\t.where(expr => expr.in('identity_id', this.identityId))\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.match(qb =>\n\t\t\t\t\t\t'id' in this.project\n\t\t\t\t\t\t\t? qb.where({\n\t\t\t\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: qb.match(byProjectSlug(this.project.slug)),\n\t\t\t\t\t),\n\t\t\t)\n\t\t\t.with('variables', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select('membership_id')\n\t\t\t\t\t.select(cb => cb.raw(\"json_agg(json_build_object('name', variable, 'values', value))\"), 'variables')\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.join('memberships', undefined, expr =>\n\t\t\t\t\t\texpr.columnsEq(['project_membership_variable', 'membership_id'], ['memberships', 'id']),\n\t\t\t\t\t)\n\t\t\t\t\t.groupBy('membership_id'),\n\t\t\t)\n\t\t\t.select('role')\n\t\t\t.select(expr => expr.raw(\"coalesce(variables, '[]'::json)\"), 'variables')\n\t\t\t.select('identity_id', 'identityId')\n\t\t\t.from('memberships')\n\t\t\t.leftJoin('variables', undefined, expr => expr.columnsEq(['memberships', 'id'], ['variables', 'membership_id']))\n\n\t\treturn await qb.getResult(db)\n\t}\n}\n\nnamespace ProjectMembershipByIdentityQuery {\n\texport type Row = Acl.Membership & { identityId: string }\n\texport type Result = readonly Row[]\n}\n\nexport { ProjectMembershipByIdentityQuery }\n"],"names":["DatabaseQuery","SelectBuilder","qb","byProjectSlug"],"mappings":";;;;AAIA,MAAM,yCAAyCA,SAAAA,cAAuD;AAAA,EACrG,YAA6B,SAA6D,YAAsB;AACzG,UAAA;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,EAAA;AAAA,EAI1F,MAAM,MAAM,EAAE,MAA2E;AACpF,QAAA,KAAKC,uBAAc,OAA6C;AACpE,SAAK,GACH;AAAA,MAAK;AAAA,MAAe,CAAAC,QACpBA,IACE,OAAO,CAAC,sBAAsB,IAAI,CAAC,EACnC,OAAO,CAAC,sBAAsB,MAAM,CAAC,EACrC,OAAO,CAAC,sBAAsB,aAAa,CAAC,EAC5C,MAAM,UAAQ,KAAK,GAAG,eAAe,KAAK,UAAU,CAAC,EACrD,KAAK,oBAAoB,EACzB;AAAA,QAAM,CAAAA,QACN,QAAQ,KAAK,UACVA,IAAG,MAAM;AAAA,UACV,YAAY,KAAK,QAAQ;AAAA,QAAA,CACvB,IACDA,IAAG,MAAMC,uCAAc,KAAK,QAAQ,IAAI,CAAC;AAAA,MAAA;AAAA,IAC7C,EAED;AAAA,MAAK;AAAA,MAAa,CAAAD,QAClBA,IACE,OAAO,eAAe,EACtB,OAAO,CAAA,OAAM,GAAG,IAAI,gEAAgE,GAAG,WAAW,EAClG,KAAK,6BAA6B,EAClC;AAAA,QAAK;AAAA,QAAe;AAAA,QAAW,CAAA,SAC/B,KAAK,UAAU,CAAC,+BAA+B,eAAe,GAAG,CAAC,eAAe,IAAI,CAAC;AAAA,MACvF,EACC,QAAQ,eAAe;AAAA,IAEzB,EAAA,OAAO,MAAM,EACb,OAAO,CAAQ,SAAA,KAAK,IAAI,iCAAiC,GAAG,WAAW,EACvE,OAAO,eAAe,YAAY,EAClC,KAAK,aAAa,EAClB,SAAS,aAAa,QAAW,UAAQ,KAAK,UAAU,CAAC,eAAe,IAAI,GAAG,CAAC,aAAa,eAAe,CAAC,CAAC;AAEzG,WAAA,MAAM,GAAG,UAAU,EAAE;AAAA,EAAA;AAE9B;;"}
|
package/dist/production/src/model/queries/membership/ProjectMembershipByIdentityQuery.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMembershipByIdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembershipByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\nimport { Acl } from '@contember/schema'\n\nclass ProjectMembershipByIdentityQuery extends DatabaseQuery<ProjectMembershipByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembershipByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<ProjectMembershipByIdentityQuery.Row>()\n\t\tqb = qb\n\t\t\t.with('memberships', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['project_membership', 'id'])\n\t\t\t\t\t.select(['project_membership', 'role'])\n\t\t\t\t\t.select(['project_membership', 'identity_id'])\n\t\t\t\t\t.where(expr => expr.in('identity_id', this.identityId))\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.match(qb =>\n\t\t\t\t\t\t'id' in this.project\n\t\t\t\t\t\t\t? qb.where({\n\t\t\t\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: qb.match(byProjectSlug(this.project.slug)),\n\t\t\t\t\t),\n\t\t\t)\n\t\t\t.with('variables', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select('membership_id')\n\t\t\t\t\t.select(cb => cb.raw(\"json_agg(json_build_object('name', variable, 'values', value))\"), 'variables')\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.join('memberships', undefined, expr =>\n\t\t\t\t\t\texpr.columnsEq(['project_membership_variable', 'membership_id'], ['memberships', 'id']),\n\t\t\t\t\t)\n\t\t\t\t\t.groupBy('membership_id'),\n\t\t\t)\n\t\t\t.select('role')\n\t\t\t.select(expr => expr.raw(\"coalesce(variables, '[]'::json)\"), 'variables')\n\t\t\t.select('identity_id', 'identityId')\n\t\t\t.from('memberships')\n\t\t\t.leftJoin('variables', undefined, expr => expr.columnsEq(['memberships', 'id'], ['variables', 'membership_id']))\n\n\t\treturn await qb.getResult(db)\n\t}\n}\n\nnamespace ProjectMembershipByIdentityQuery {\n\texport type Row = Acl.Membership & { identityId: string }\n\texport type Result = readonly Row[]\n}\n\nexport { ProjectMembershipByIdentityQuery }\n"],"names":["qb"],"mappings":";;AAIA,MAAM,yCAAyC,cAAuD;AAAA,EACrG,YAA6B,SAA6D,YAAsB;AACzG;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectMembershipByIdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectMembershipByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\nimport { Acl } from '@contember/schema'\n\nclass ProjectMembershipByIdentityQuery extends DatabaseQuery<ProjectMembershipByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectMembershipByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<ProjectMembershipByIdentityQuery.Row>()\n\t\tqb = qb\n\t\t\t.with('memberships', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['project_membership', 'id'])\n\t\t\t\t\t.select(['project_membership', 'role'])\n\t\t\t\t\t.select(['project_membership', 'identity_id'])\n\t\t\t\t\t.where(expr => expr.in('identity_id', this.identityId))\n\t\t\t\t\t.from('project_membership')\n\t\t\t\t\t.match(qb =>\n\t\t\t\t\t\t'id' in this.project\n\t\t\t\t\t\t\t? qb.where({\n\t\t\t\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: qb.match(byProjectSlug(this.project.slug)),\n\t\t\t\t\t),\n\t\t\t)\n\t\t\t.with('variables', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select('membership_id')\n\t\t\t\t\t.select(cb => cb.raw(\"json_agg(json_build_object('name', variable, 'values', value))\"), 'variables')\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.join('memberships', undefined, expr =>\n\t\t\t\t\t\texpr.columnsEq(['project_membership_variable', 'membership_id'], ['memberships', 'id']),\n\t\t\t\t\t)\n\t\t\t\t\t.groupBy('membership_id'),\n\t\t\t)\n\t\t\t.select('role')\n\t\t\t.select(expr => expr.raw(\"coalesce(variables, '[]'::json)\"), 'variables')\n\t\t\t.select('identity_id', 'identityId')\n\t\t\t.from('memberships')\n\t\t\t.leftJoin('variables', undefined, expr => expr.columnsEq(['memberships', 'id'], ['variables', 'membership_id']))\n\n\t\treturn await qb.getResult(db)\n\t}\n}\n\nnamespace ProjectMembershipByIdentityQuery {\n\texport type Row = Acl.Membership & { identityId: string }\n\texport type Result = readonly Row[]\n}\n\nexport { ProjectMembershipByIdentityQuery }\n"],"names":["qb"],"mappings":";;AAIA,MAAM,yCAAyC,cAAuD;AAAA,EACrG,YAA6B,SAA6D,YAAsB;AACzG,UAAA;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,EAAA;AAAA,EAI1F,MAAM,MAAM,EAAE,MAA2E;AACpF,QAAA,KAAK,cAAc,OAA6C;AACpE,SAAK,GACH;AAAA,MAAK;AAAA,MAAe,CAAAA,QACpBA,IACE,OAAO,CAAC,sBAAsB,IAAI,CAAC,EACnC,OAAO,CAAC,sBAAsB,MAAM,CAAC,EACrC,OAAO,CAAC,sBAAsB,aAAa,CAAC,EAC5C,MAAM,UAAQ,KAAK,GAAG,eAAe,KAAK,UAAU,CAAC,EACrD,KAAK,oBAAoB,EACzB;AAAA,QAAM,CAAAA,QACN,QAAQ,KAAK,UACVA,IAAG,MAAM;AAAA,UACV,YAAY,KAAK,QAAQ;AAAA,QAAA,CACvB,IACDA,IAAG,MAAM,cAAc,KAAK,QAAQ,IAAI,CAAC;AAAA,MAAA;AAAA,IAC7C,EAED;AAAA,MAAK;AAAA,MAAa,CAAAA,QAClBA,IACE,OAAO,eAAe,EACtB,OAAO,CAAA,OAAM,GAAG,IAAI,gEAAgE,GAAG,WAAW,EAClG,KAAK,6BAA6B,EAClC;AAAA,QAAK;AAAA,QAAe;AAAA,QAAW,CAAA,SAC/B,KAAK,UAAU,CAAC,+BAA+B,eAAe,GAAG,CAAC,eAAe,IAAI,CAAC;AAAA,MACvF,EACC,QAAQ,eAAe;AAAA,IAEzB,EAAA,OAAO,MAAM,EACb,OAAO,CAAQ,SAAA,KAAK,IAAI,iCAAiC,GAAG,WAAW,EACvE,OAAO,eAAe,YAAY,EAClC,KAAK,aAAa,EAClB,SAAS,aAAa,QAAW,UAAQ,KAAK,UAAU,CAAC,eAAe,IAAI,GAAG,CAAC,aAAa,eAAe,CAAC,CAAC;AAEzG,WAAA,MAAM,GAAG,UAAU,EAAE;AAAA,EAAA;AAE9B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectRolesByIdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectRolesByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\n\nclass ProjectRolesByIdentityQuery extends DatabaseQuery<ProjectRolesByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectRolesByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<{ role: string }>() //\n\t\t\t.select('role')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\tconst qbWithProjectWhere =\n\t\t\t'id' in this.project\n\t\t\t\t? qb.where({\n\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t })\n\t\t\t\t: qb.match(byProjectSlug(this.project.slug))\n\t\tconst result = await qbWithProjectWhere.getResult(db)\n\n\t\treturn { roles: result.map(it => it.role) }\n\t}\n}\n\nnamespace ProjectRolesByIdentityQuery {\n\texport type Result = {\n\t\troles: string[]\n\t}\n}\n\nexport { ProjectRolesByIdentityQuery }\n"],"names":["DatabaseQuery","SelectBuilder","byProjectSlug"],"mappings":";;;;AAGA,MAAM,oCAAoCA,SAAAA,cAAkD;AAAA,EAC3F,YAA6B,SAA6D,YAAoB;AACvG;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectRolesByIdentityQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectRolesByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\n\nclass ProjectRolesByIdentityQuery extends DatabaseQuery<ProjectRolesByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectRolesByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<{ role: string }>() //\n\t\t\t.select('role')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\tconst qbWithProjectWhere =\n\t\t\t'id' in this.project\n\t\t\t\t? qb.where({\n\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t })\n\t\t\t\t: qb.match(byProjectSlug(this.project.slug))\n\t\tconst result = await qbWithProjectWhere.getResult(db)\n\n\t\treturn { roles: result.map(it => it.role) }\n\t}\n}\n\nnamespace ProjectRolesByIdentityQuery {\n\texport type Result = {\n\t\troles: string[]\n\t}\n}\n\nexport { ProjectRolesByIdentityQuery }\n"],"names":["DatabaseQuery","SelectBuilder","byProjectSlug"],"mappings":";;;;AAGA,MAAM,oCAAoCA,SAAAA,cAAkD;AAAA,EAC3F,YAA6B,SAA6D,YAAoB;AACvG,UAAA;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,EAAA;AAAA,EAI1F,MAAM,MAAM,EAAE,MAAsE;AAC/E,QAAA,KAAKC,uBAAc,SACrB,OAAO,MAAM,EACb,KAAK,oBAAoB,EACzB,MAAM;AAAA,MACN,aAAa,KAAK;AAAA,IAAA,CAClB;AACF,UAAM,qBACL,QAAQ,KAAK,UACV,GAAG,MAAM;AAAA,MACV,YAAY,KAAK,QAAQ;AAAA,IAAA,CACvB,IACD,GAAG,MAAMC,yBAAAA,cAAc,KAAK,QAAQ,IAAI,CAAC;AAC7C,UAAM,SAAS,MAAM,mBAAmB,UAAU,EAAE;AAEpD,WAAO,EAAE,OAAO,OAAO,IAAI,CAAM,OAAA,GAAG,IAAI,EAAE;AAAA,EAAA;AAE5C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectRolesByIdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectRolesByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\n\nclass ProjectRolesByIdentityQuery extends DatabaseQuery<ProjectRolesByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectRolesByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<{ role: string }>() //\n\t\t\t.select('role')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\tconst qbWithProjectWhere =\n\t\t\t'id' in this.project\n\t\t\t\t? qb.where({\n\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t })\n\t\t\t\t: qb.match(byProjectSlug(this.project.slug))\n\t\tconst result = await qbWithProjectWhere.getResult(db)\n\n\t\treturn { roles: result.map(it => it.role) }\n\t}\n}\n\nnamespace ProjectRolesByIdentityQuery {\n\texport type Result = {\n\t\troles: string[]\n\t}\n}\n\nexport { ProjectRolesByIdentityQuery }\n"],"names":[],"mappings":";;AAGA,MAAM,oCAAoC,cAAkD;AAAA,EAC3F,YAA6B,SAA6D,YAAoB;AACvG;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ProjectRolesByIdentityQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectRolesByIdentityQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { byProjectSlug } from './ProjectSlugSpecification'\n\nclass ProjectRolesByIdentityQuery extends DatabaseQuery<ProjectRolesByIdentityQuery.Result> {\n\tconstructor(private readonly project: { id: string } | { slug: string }, private readonly identityId: string) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<ProjectRolesByIdentityQuery.Result> {\n\t\tlet qb = SelectBuilder.create<{ role: string }>() //\n\t\t\t.select('role')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\tconst qbWithProjectWhere =\n\t\t\t'id' in this.project\n\t\t\t\t? qb.where({\n\t\t\t\t\tproject_id: this.project.id,\n\t\t\t\t })\n\t\t\t\t: qb.match(byProjectSlug(this.project.slug))\n\t\tconst result = await qbWithProjectWhere.getResult(db)\n\n\t\treturn { roles: result.map(it => it.role) }\n\t}\n}\n\nnamespace ProjectRolesByIdentityQuery {\n\texport type Result = {\n\t\troles: string[]\n\t}\n}\n\nexport { ProjectRolesByIdentityQuery }\n"],"names":[],"mappings":";;AAGA,MAAM,oCAAoC,cAAkD;AAAA,EAC3F,YAA6B,SAA6D,YAAoB;AACvG,UAAA;AADsB,SAAA,UAAA;AAA6D,SAAA,aAAA;AAAA,EAAA;AAAA,EAI1F,MAAM,MAAM,EAAE,MAAsE;AAC/E,QAAA,KAAK,cAAc,SACrB,OAAO,MAAM,EACb,KAAK,oBAAoB,EACzB,MAAM;AAAA,MACN,aAAa,KAAK;AAAA,IAAA,CAClB;AACF,UAAM,qBACL,QAAQ,KAAK,UACV,GAAG,MAAM;AAAA,MACV,YAAY,KAAK,QAAQ;AAAA,IAAA,CACvB,IACD,GAAG,MAAM,cAAc,KAAK,QAAQ,IAAI,CAAC;AAC7C,UAAM,SAAS,MAAM,mBAAmB,UAAU,EAAE;AAEpD,WAAO,EAAE,OAAO,OAAO,IAAI,CAAM,OAAA,GAAG,IAAI,EAAE;AAAA,EAAA;AAE5C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSlugSpecification.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectSlugSpecification.ts"],"sourcesContent":["import { ConditionBuilder, SelectBuilderSpecification } from '@contember/database'\n\nexport const byProjectSlug =\n\t(slug: string): SelectBuilderSpecification =>\n\t\tqb =>\n\t\t\tqb\n\t\t\t\t.where((expr: ConditionBuilder) => expr.columnsEq('project_id', ['project', 'id']))\n\t\t\t\t.with('project', qb =>\n\t\t\t\t\tqb //\n\t\t\t\t\t\t.from('project')\n\t\t\t\t\t\t.select('id')\n\t\t\t\t\t\t.where({ slug: slug }),\n\t\t\t\t)\n\t\t\t\t.join('project', 'project', (cond: ConditionBuilder) => cond.columnsEq(['project', 'id'], 'project_id'))\n"],"names":["qb"],"mappings":";;AAEO,MAAM,gBACZ,CAAC,SACA,CACC,OAAA,GACE,MAAM,CAAC,SAA2B,KAAK,UAAU,cAAc,CAAC,WAAW,IAAI,CAAC,CAAC,EACjF;AAAA,EAAK;AAAA,EAAW,CAAAA,QAChBA,IACE,KAAK,SAAS,EACd,OAAO,IAAI,EACX,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"ProjectSlugSpecification.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectSlugSpecification.ts"],"sourcesContent":["import { ConditionBuilder, SelectBuilderSpecification } from '@contember/database'\n\nexport const byProjectSlug =\n\t(slug: string): SelectBuilderSpecification =>\n\t\tqb =>\n\t\t\tqb\n\t\t\t\t.where((expr: ConditionBuilder) => expr.columnsEq('project_id', ['project', 'id']))\n\t\t\t\t.with('project', qb =>\n\t\t\t\t\tqb //\n\t\t\t\t\t\t.from('project')\n\t\t\t\t\t\t.select('id')\n\t\t\t\t\t\t.where({ slug: slug }),\n\t\t\t\t)\n\t\t\t\t.join('project', 'project', (cond: ConditionBuilder) => cond.columnsEq(['project', 'id'], 'project_id'))\n"],"names":["qb"],"mappings":";;AAEO,MAAM,gBACZ,CAAC,SACA,CACC,OAAA,GACE,MAAM,CAAC,SAA2B,KAAK,UAAU,cAAc,CAAC,WAAW,IAAI,CAAC,CAAC,EACjF;AAAA,EAAK;AAAA,EAAW,CAAAA,QAChBA,IACE,KAAK,SAAS,EACd,OAAO,IAAI,EACX,MAAM,EAAE,KAAY,CAAA;AACvB,EACC,KAAK,WAAW,WAAW,CAAC,SAA2B,KAAK,UAAU,CAAC,WAAW,IAAI,GAAG,YAAY,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSlugSpecification.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectSlugSpecification.ts"],"sourcesContent":["import { ConditionBuilder, SelectBuilderSpecification } from '@contember/database'\n\nexport const byProjectSlug =\n\t(slug: string): SelectBuilderSpecification =>\n\t\tqb =>\n\t\t\tqb\n\t\t\t\t.where((expr: ConditionBuilder) => expr.columnsEq('project_id', ['project', 'id']))\n\t\t\t\t.with('project', qb =>\n\t\t\t\t\tqb //\n\t\t\t\t\t\t.from('project')\n\t\t\t\t\t\t.select('id')\n\t\t\t\t\t\t.where({ slug: slug }),\n\t\t\t\t)\n\t\t\t\t.join('project', 'project', (cond: ConditionBuilder) => cond.columnsEq(['project', 'id'], 'project_id'))\n"],"names":["qb"],"mappings":"AAEO,MAAM,gBACZ,CAAC,SACA,CACC,OAAA,GACE,MAAM,CAAC,SAA2B,KAAK,UAAU,cAAc,CAAC,WAAW,IAAI,CAAC,CAAC,EACjF;AAAA,EAAK;AAAA,EAAW,CAAAA,QAChBA,IACE,KAAK,SAAS,EACd,OAAO,IAAI,EACX,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"ProjectSlugSpecification.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/membership/ProjectSlugSpecification.ts"],"sourcesContent":["import { ConditionBuilder, SelectBuilderSpecification } from '@contember/database'\n\nexport const byProjectSlug =\n\t(slug: string): SelectBuilderSpecification =>\n\t\tqb =>\n\t\t\tqb\n\t\t\t\t.where((expr: ConditionBuilder) => expr.columnsEq('project_id', ['project', 'id']))\n\t\t\t\t.with('project', qb =>\n\t\t\t\t\tqb //\n\t\t\t\t\t\t.from('project')\n\t\t\t\t\t\t.select('id')\n\t\t\t\t\t\t.where({ slug: slug }),\n\t\t\t\t)\n\t\t\t\t.join('project', 'project', (cond: ConditionBuilder) => cond.columnsEq(['project', 'id'], 'project_id'))\n"],"names":["qb"],"mappings":"AAEO,MAAM,gBACZ,CAAC,SACA,CACC,OAAA,GACE,MAAM,CAAC,SAA2B,KAAK,UAAU,cAAc,CAAC,WAAW,IAAI,CAAC,CAAC,EACjF;AAAA,EAAK;AAAA,EAAW,CAAAA,QAChBA,IACE,KAAK,SAAS,EACd,OAAO,IAAI,EACX,MAAM,EAAE,KAAY,CAAA;AACvB,EACC,KAAK,WAAW,WAAW,CAAC,SAA2B,KAAK,UAAU,CAAC,WAAW,IAAI,GAAG,YAAY,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonByIdPQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdPQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nclass PersonByIdPQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.join('person_identity_provider', 'idp', it => it.columnsEq(['idp', 'person_id'], ['person', 'id']))\n\t\t\t.where({\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport { PersonByIdPQuery }\n"],"names":["DatabaseQuery","PersonQueryBuilderFactory"],"mappings":";;;;AAIA,MAAM,yBAAyBA,SAAAA,cAA8B;AAAA,EAC5D,YACkB,oBACA,oBAChB;AACK;AAHW,SAAA,qBAAA;AACA,SAAA,qBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PersonByIdPQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdPQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nclass PersonByIdPQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.join('person_identity_provider', 'idp', it => it.columnsEq(['idp', 'person_id'], ['person', 'id']))\n\t\t\t.where({\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport { PersonByIdPQuery }\n"],"names":["DatabaseQuery","PersonQueryBuilderFactory"],"mappings":";;;;AAIA,MAAM,yBAAyBA,SAAAA,cAA8B;AAAA,EAC5D,YACkB,oBACA,oBAChB;AACK,UAAA;AAHW,SAAA,qBAAA;AACA,SAAA,qBAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,EAAE,MAAkD;AACzD,UAAA,OAAO,MAAMC,0BAAAA,0BAA0B,yBAAA,EAC3C,KAAK,4BAA4B,OAAO,CAAM,OAAA,GAAG,UAAU,CAAC,OAAO,WAAW,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,EAClG,MAAM;AAAA,MACN,sBAAsB,KAAK;AAAA,MAC3B,qBAAqB,KAAK;AAAA,IAAA,CAC1B,EACA,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonByIdPQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdPQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nclass PersonByIdPQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.join('person_identity_provider', 'idp', it => it.columnsEq(['idp', 'person_id'], ['person', 'id']))\n\t\t\t.where({\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport { PersonByIdPQuery }\n"],"names":[],"mappings":";;AAIA,MAAM,yBAAyB,cAA8B;AAAA,EAC5D,YACkB,oBACA,oBAChB;AACK;AAHW,SAAA,qBAAA;AACA,SAAA,qBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PersonByIdPQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdPQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nclass PersonByIdPQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.join('person_identity_provider', 'idp', it => it.columnsEq(['idp', 'person_id'], ['person', 'id']))\n\t\t\t.where({\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nexport { PersonByIdPQuery }\n"],"names":[],"mappings":";;AAIA,MAAM,yBAAyB,cAA8B;AAAA,EAC5D,YACkB,oBACA,oBAChB;AACK,UAAA;AAHW,SAAA,qBAAA;AACA,SAAA,qBAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,EAAE,MAAkD;AACzD,UAAA,OAAO,MAAM,0BAA0B,yBAAA,EAC3C,KAAK,4BAA4B,OAAO,CAAM,OAAA,GAAG,UAAU,CAAC,OAAO,WAAW,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,EAClG,MAAM;AAAA,MACN,sBAAsB,KAAK;AAAA,MAC3B,qBAAqB,KAAK;AAAA,IAAA,CAC1B,EACA,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonByIdentityBatchQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdentityBatchQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { PersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nexport class PersonByIdentityBatchQuery extends DatabaseQuery<PersonRow[]> {\n\tconstructor(private identityIds: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<PersonRow[]> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.where(expr => expr.in(['person', 'identity_id'], this.identityIds))\n\t\t\t.getResult(db)\n\n\t\treturn rows\n\t}\n}\n"],"names":["DatabaseQuery","PersonQueryBuilderFactory"],"mappings":";;;;AAIO,MAAM,mCAAmCA,SAAAA,cAA2B;AAAA,EAC1E,YAAoB,aAAuB;AACpC;AADa,SAAA,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PersonByIdentityBatchQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdentityBatchQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { PersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nexport class PersonByIdentityBatchQuery extends DatabaseQuery<PersonRow[]> {\n\tconstructor(private identityIds: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<PersonRow[]> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.where(expr => expr.in(['person', 'identity_id'], this.identityIds))\n\t\t\t.getResult(db)\n\n\t\treturn rows\n\t}\n}\n"],"names":["DatabaseQuery","PersonQueryBuilderFactory"],"mappings":";;;;AAIO,MAAM,mCAAmCA,SAAAA,cAA2B;AAAA,EAC1E,YAAoB,aAAuB;AACpC,UAAA;AADa,SAAA,cAAA;AAAA,EAAA;AAAA,EAIpB,MAAM,MAAM,EAAE,MAA+C;AAC5D,UAAM,OAAO,MAAMC,oDAA0B,yBAC3C,EAAA,MAAM,UAAQ,KAAK,GAAG,CAAC,UAAU,aAAa,GAAG,KAAK,WAAW,CAAC,EAClE,UAAU,EAAE;AAEP,WAAA;AAAA,EAAA;AAET;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonByIdentityBatchQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdentityBatchQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { PersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nexport class PersonByIdentityBatchQuery extends DatabaseQuery<PersonRow[]> {\n\tconstructor(private identityIds: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<PersonRow[]> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.where(expr => expr.in(['person', 'identity_id'], this.identityIds))\n\t\t\t.getResult(db)\n\n\t\treturn rows\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,mCAAmC,cAA2B;AAAA,EAC1E,YAAoB,aAAuB;AACpC;AADa,SAAA,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PersonByIdentityBatchQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonByIdentityBatchQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable } from '@contember/database'\nimport { PersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\n\nexport class PersonByIdentityBatchQuery extends DatabaseQuery<PersonRow[]> {\n\tconstructor(private identityIds: string[]) {\n\t\tsuper()\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<PersonRow[]> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.where(expr => expr.in(['person', 'identity_id'], this.identityIds))\n\t\t\t.getResult(db)\n\n\t\treturn rows\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,mCAAmC,cAA2B;AAAA,EAC1E,YAAoB,aAAuB;AACpC,UAAA;AADa,SAAA,cAAA;AAAA,EAAA;AAAA,EAIpB,MAAM,MAAM,EAAE,MAA+C;AAC5D,UAAM,OAAO,MAAM,0BAA0B,yBAC3C,EAAA,MAAM,UAAQ,KAAK,GAAG,CAAC,UAAU,aAAa,GAAG,KAAK,WAAW,CAAC,EAClE,UAAU,EAAE;AAEP,WAAA;AAAA,EAAA;AAET;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, Operator, SelectBuilderSpecification } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\nimport { normalizeEmail } from '../../utils/email'\n\nexport type PersonUniqueIdentifier =\n\t| { type: 'id'; id: string }\n\t| { type: 'identity'; id: string }\n\t| { type: 'email'; email: string }\n\nclass PersonQuery extends DatabaseQuery<MaybePersonRow> {\n\tprivate constructor(private readonly spec: SelectBuilderSpecification) {\n\t\tsuper()\n\t}\n\n\tstatic byUniqueIdentifier(identifier: PersonUniqueIdentifier): DatabaseQuery<MaybePersonRow> {\n\t\tswitch (identifier.type) {\n\t\t\tcase 'email':\n\t\t\t\treturn PersonQuery.byEmail(identifier.email)\n\t\t\tcase 'id':\n\t\t\t\treturn PersonQuery.byId(identifier.id)\n\t\t\tcase 'identity':\n\t\t\t\treturn PersonQuery.byIdentity(identifier.id)\n\t\t}\n\t}\n\n\tstatic byId(id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'id'], Operator.eq, id)))\n\t}\n\n\tstatic byEmail(email: string): DatabaseQuery<MaybePersonRow> {\n\t\treturn new PersonByEmailFallbackQuery(email)\n\t}\n\n\tstatic byExactEmail(email: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'email'], Operator.eq, email)))\n\t}\n\n\tstatic byIdentity(identity_id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'identity_id'], Operator.eq, identity_id)))\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.match(this.spec)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nclass PersonByEmailFallbackQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly email: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(ctx: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst handler = ctx.getHandler()\n\t\tconst exact = await handler.fetch(PersonQuery.byExactEmail(this.email))\n\t\tif (exact) {\n\t\t\treturn exact\n\t\t}\n\t\tconst normalizedEmail = normalizeEmail(this.email)\n\t\tif (normalizedEmail === this.email) {\n\t\t\treturn null\n\t\t}\n\t\treturn await handler.fetch(PersonQuery.byExactEmail(normalizedEmail))\n\t}\n\n}\n\nexport { PersonQuery }\n"],"names":["DatabaseQuery","Operator","email","PersonQueryBuilderFactory","normalizeEmail"],"mappings":";;;;;AAUA,MAAM,oBAAoBA,SAAAA,cAA8B;AAAA,EAC/C,YAA6B,MAAkC;AAChE;AAD8B,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PersonQuery.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, Operator, SelectBuilderSpecification } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\nimport { normalizeEmail } from '../../utils/email'\n\nexport type PersonUniqueIdentifier =\n\t| { type: 'id'; id: string }\n\t| { type: 'identity'; id: string }\n\t| { type: 'email'; email: string }\n\nclass PersonQuery extends DatabaseQuery<MaybePersonRow> {\n\tprivate constructor(private readonly spec: SelectBuilderSpecification) {\n\t\tsuper()\n\t}\n\n\tstatic byUniqueIdentifier(identifier: PersonUniqueIdentifier): DatabaseQuery<MaybePersonRow> {\n\t\tswitch (identifier.type) {\n\t\t\tcase 'email':\n\t\t\t\treturn PersonQuery.byEmail(identifier.email)\n\t\t\tcase 'id':\n\t\t\t\treturn PersonQuery.byId(identifier.id)\n\t\t\tcase 'identity':\n\t\t\t\treturn PersonQuery.byIdentity(identifier.id)\n\t\t}\n\t}\n\n\tstatic byId(id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'id'], Operator.eq, id)))\n\t}\n\n\tstatic byEmail(email: string): DatabaseQuery<MaybePersonRow> {\n\t\treturn new PersonByEmailFallbackQuery(email)\n\t}\n\n\tstatic byExactEmail(email: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'email'], Operator.eq, email)))\n\t}\n\n\tstatic byIdentity(identity_id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'identity_id'], Operator.eq, identity_id)))\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.match(this.spec)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nclass PersonByEmailFallbackQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly email: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(ctx: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst handler = ctx.getHandler()\n\t\tconst exact = await handler.fetch(PersonQuery.byExactEmail(this.email))\n\t\tif (exact) {\n\t\t\treturn exact\n\t\t}\n\t\tconst normalizedEmail = normalizeEmail(this.email)\n\t\tif (normalizedEmail === this.email) {\n\t\t\treturn null\n\t\t}\n\t\treturn await handler.fetch(PersonQuery.byExactEmail(normalizedEmail))\n\t}\n\n}\n\nexport { PersonQuery }\n"],"names":["DatabaseQuery","Operator","email","PersonQueryBuilderFactory","normalizeEmail"],"mappings":";;;;;AAUA,MAAM,oBAAoBA,SAAAA,cAA8B;AAAA,EAC/C,YAA6B,MAAkC;AAChE,UAAA;AAD8B,SAAA,OAAA;AAAA,EAAA;AAAA,EAIrC,OAAO,mBAAmB,YAAmE;AAC5F,YAAQ,WAAW,MAAM;AAAA,MACxB,KAAK;AACG,eAAA,YAAY,QAAQ,WAAW,KAAK;AAAA,MAC5C,KAAK;AACG,eAAA,YAAY,KAAK,WAAW,EAAE;AAAA,MACtC,KAAK;AACG,eAAA,YAAY,WAAW,WAAW,EAAE;AAAA,IAAA;AAAA,EAC7C;AAAA,EAGD,OAAO,KAAK,IAAyB;AACpC,WAAO,IAAI,YAAY,CAAA,OAAM,GAAG,MAAM,QAAM,GAAG,QAAQ,CAAC,UAAU,IAAI,GAAGC,SAAA,SAAS,IAAI,EAAE,CAAC,CAAC;AAAA,EAAA;AAAA,EAG3F,OAAO,QAAQC,QAA8C;AACrD,WAAA,IAAI,2BAA2BA,MAAK;AAAA,EAAA;AAAA,EAG5C,OAAO,aAAaA,QAA4B;AAC/C,WAAO,IAAI,YAAY,CAAA,OAAM,GAAG,MAAM,QAAM,GAAG,QAAQ,CAAC,UAAU,OAAO,GAAGD,SAAA,SAAS,IAAIC,MAAK,CAAC,CAAC;AAAA,EAAA;AAAA,EAGjG,OAAO,WAAW,aAAkC;AACnD,WAAO,IAAI,YAAY,CAAA,OAAM,GAAG,MAAM,QAAM,GAAG,QAAQ,CAAC,UAAU,aAAa,GAAGD,SAAA,SAAS,IAAI,WAAW,CAAC,CAAC;AAAA,EAAA;AAAA,EAG7G,MAAM,MAAM,EAAE,MAAkD;AACzD,UAAA,OAAO,MAAME,0BAAA,0BAA0B,yBAAyB,EACpE,MAAM,KAAK,IAAI,EACf,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;AAEA,MAAM,mCAAmCH,SAAAA,cAA8B;AAAA,EACtE,YACkBE,QAChB;AACK,UAAA;AAFW,SAAA,QAAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,KAAiD;AACtD,UAAA,UAAU,IAAI,WAAW;AACzB,UAAA,QAAQ,MAAM,QAAQ,MAAM,YAAY,aAAa,KAAK,KAAK,CAAC;AACtE,QAAI,OAAO;AACH,aAAA;AAAA,IAAA;AAEF,UAAA,kBAAkBE,MAAAA,eAAe,KAAK,KAAK;AAC7C,QAAA,oBAAoB,KAAK,OAAO;AAC5B,aAAA;AAAA,IAAA;AAER,WAAO,MAAM,QAAQ,MAAM,YAAY,aAAa,eAAe,CAAC;AAAA,EAAA;AAGtE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, Operator, SelectBuilderSpecification } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\nimport { normalizeEmail } from '../../utils/email'\n\nexport type PersonUniqueIdentifier =\n\t| { type: 'id'; id: string }\n\t| { type: 'identity'; id: string }\n\t| { type: 'email'; email: string }\n\nclass PersonQuery extends DatabaseQuery<MaybePersonRow> {\n\tprivate constructor(private readonly spec: SelectBuilderSpecification) {\n\t\tsuper()\n\t}\n\n\tstatic byUniqueIdentifier(identifier: PersonUniqueIdentifier): DatabaseQuery<MaybePersonRow> {\n\t\tswitch (identifier.type) {\n\t\t\tcase 'email':\n\t\t\t\treturn PersonQuery.byEmail(identifier.email)\n\t\t\tcase 'id':\n\t\t\t\treturn PersonQuery.byId(identifier.id)\n\t\t\tcase 'identity':\n\t\t\t\treturn PersonQuery.byIdentity(identifier.id)\n\t\t}\n\t}\n\n\tstatic byId(id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'id'], Operator.eq, id)))\n\t}\n\n\tstatic byEmail(email: string): DatabaseQuery<MaybePersonRow> {\n\t\treturn new PersonByEmailFallbackQuery(email)\n\t}\n\n\tstatic byExactEmail(email: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'email'], Operator.eq, email)))\n\t}\n\n\tstatic byIdentity(identity_id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'identity_id'], Operator.eq, identity_id)))\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.match(this.spec)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nclass PersonByEmailFallbackQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly email: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(ctx: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst handler = ctx.getHandler()\n\t\tconst exact = await handler.fetch(PersonQuery.byExactEmail(this.email))\n\t\tif (exact) {\n\t\t\treturn exact\n\t\t}\n\t\tconst normalizedEmail = normalizeEmail(this.email)\n\t\tif (normalizedEmail === this.email) {\n\t\t\treturn null\n\t\t}\n\t\treturn await handler.fetch(PersonQuery.byExactEmail(normalizedEmail))\n\t}\n\n}\n\nexport { PersonQuery }\n"],"names":[],"mappings":";;;AAUA,MAAM,oBAAoB,cAA8B;AAAA,EAC/C,YAA6B,MAAkC;AAChE;AAD8B,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PersonQuery.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, Literal, Operator, SelectBuilderSpecification } from '@contember/database'\nimport { MaybePersonRow } from './types'\nimport { PersonQueryBuilderFactory } from './PersonQueryBuilderFactory'\nimport { normalizeEmail } from '../../utils/email'\n\nexport type PersonUniqueIdentifier =\n\t| { type: 'id'; id: string }\n\t| { type: 'identity'; id: string }\n\t| { type: 'email'; email: string }\n\nclass PersonQuery extends DatabaseQuery<MaybePersonRow> {\n\tprivate constructor(private readonly spec: SelectBuilderSpecification) {\n\t\tsuper()\n\t}\n\n\tstatic byUniqueIdentifier(identifier: PersonUniqueIdentifier): DatabaseQuery<MaybePersonRow> {\n\t\tswitch (identifier.type) {\n\t\t\tcase 'email':\n\t\t\t\treturn PersonQuery.byEmail(identifier.email)\n\t\t\tcase 'id':\n\t\t\t\treturn PersonQuery.byId(identifier.id)\n\t\t\tcase 'identity':\n\t\t\t\treturn PersonQuery.byIdentity(identifier.id)\n\t\t}\n\t}\n\n\tstatic byId(id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'id'], Operator.eq, id)))\n\t}\n\n\tstatic byEmail(email: string): DatabaseQuery<MaybePersonRow> {\n\t\treturn new PersonByEmailFallbackQuery(email)\n\t}\n\n\tstatic byExactEmail(email: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'email'], Operator.eq, email)))\n\t}\n\n\tstatic byIdentity(identity_id: string): PersonQuery {\n\t\treturn new PersonQuery(qb => qb.where(it => it.compare(['person', 'identity_id'], Operator.eq, identity_id)))\n\t}\n\n\tasync fetch({ db }: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst rows = await PersonQueryBuilderFactory.createPersonQueryBuilder()\n\t\t\t.match(this.spec)\n\t\t\t.getResult(db)\n\n\t\treturn this.fetchOneOrNull(rows)\n\t}\n}\n\nclass PersonByEmailFallbackQuery extends DatabaseQuery<MaybePersonRow> {\n\tconstructor(\n\t\tprivate readonly email: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(ctx: DatabaseQueryable): Promise<MaybePersonRow> {\n\t\tconst handler = ctx.getHandler()\n\t\tconst exact = await handler.fetch(PersonQuery.byExactEmail(this.email))\n\t\tif (exact) {\n\t\t\treturn exact\n\t\t}\n\t\tconst normalizedEmail = normalizeEmail(this.email)\n\t\tif (normalizedEmail === this.email) {\n\t\t\treturn null\n\t\t}\n\t\treturn await handler.fetch(PersonQuery.byExactEmail(normalizedEmail))\n\t}\n\n}\n\nexport { PersonQuery }\n"],"names":[],"mappings":";;;AAUA,MAAM,oBAAoB,cAA8B;AAAA,EAC/C,YAA6B,MAAkC;AAChE,UAAA;AAD8B,SAAA,OAAA;AAAA,EAAA;AAAA,EAIrC,OAAO,mBAAmB,YAAmE;AAC5F,YAAQ,WAAW,MAAM;AAAA,MACxB,KAAK;AACG,eAAA,YAAY,QAAQ,WAAW,KAAK;AAAA,MAC5C,KAAK;AACG,eAAA,YAAY,KAAK,WAAW,EAAE;AAAA,MACtC,KAAK;AACG,eAAA,YAAY,WAAW,WAAW,EAAE;AAAA,IAAA;AAAA,EAC7C;AAAA,EAGD,OAAO,KAAK,IAAyB;AACpC,WAAO,IAAI,YAAY,CAAA,OAAM,GAAG,MAAM,QAAM,GAAG,QAAQ,CAAC,UAAU,IAAI,GAAG,SAAS,IAAI,EAAE,CAAC,CAAC;AAAA,EAAA;AAAA,EAG3F,OAAO,QAAQ,OAA8C;AACrD,WAAA,IAAI,2BAA2B,KAAK;AAAA,EAAA;AAAA,EAG5C,OAAO,aAAa,OAA4B;AAC/C,WAAO,IAAI,YAAY,CAAA,OAAM,GAAG,MAAM,QAAM,GAAG,QAAQ,CAAC,UAAU,OAAO,GAAG,SAAS,IAAI,KAAK,CAAC,CAAC;AAAA,EAAA;AAAA,EAGjG,OAAO,WAAW,aAAkC;AACnD,WAAO,IAAI,YAAY,CAAA,OAAM,GAAG,MAAM,QAAM,GAAG,QAAQ,CAAC,UAAU,aAAa,GAAG,SAAS,IAAI,WAAW,CAAC,CAAC;AAAA,EAAA;AAAA,EAG7G,MAAM,MAAM,EAAE,MAAkD;AACzD,UAAA,OAAO,MAAM,0BAA0B,yBAAyB,EACpE,MAAM,KAAK,IAAI,EACf,UAAU,EAAE;AAEP,WAAA,KAAK,eAAe,IAAI;AAAA,EAAA;AAEjC;AAEA,MAAM,mCAAmC,cAA8B;AAAA,EACtE,YACkB,OAChB;AACK,UAAA;AAFW,SAAA,QAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,KAAiD;AACtD,UAAA,UAAU,IAAI,WAAW;AACzB,UAAA,QAAQ,MAAM,QAAQ,MAAM,YAAY,aAAa,KAAK,KAAK,CAAC;AACtE,QAAI,OAAO;AACH,aAAA;AAAA,IAAA;AAEF,UAAA,kBAAkB,eAAe,KAAK,KAAK;AAC7C,QAAA,oBAAoB,KAAK,OAAO;AAC5B,aAAA;AAAA,IAAA;AAER,WAAO,MAAM,QAAQ,MAAM,YAAY,aAAa,eAAe,CAAC;AAAA,EAAA;AAGtE;"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const Database = require("@contember/database");
|
|
4
4
|
class PersonQueryBuilderFactory {
|
|
5
5
|
static createPersonQueryBuilder() {
|
|
6
|
-
return Database.SelectBuilder.create().select(["person", "id"]).select(["person", "password_hash"]).select(["person", "otp_uri"]).select(["person", "otp_activated_at"]).select(["person", "identity_id"]).select(["person", "email"]).select(["person", "name"]).select(["person", "disabled_at"]).select(["identity", "roles"]).from("person").join("identity", "identity", (expr) => expr.columnsEq(["identity", "id"], ["person", "identity_id"]));
|
|
6
|
+
return Database.SelectBuilder.create().select(["person", "id"]).select(["person", "password_hash"]).select(["person", "otp_uri"]).select(["person", "otp_activated_at"]).select(["person", "identity_id"]).select(["person", "email"]).select(["person", "name"]).select(["person", "disabled_at"]).select(["person", "passwordless_enabled"]).select(["identity", "roles"]).from("person").join("identity", "identity", (expr) => expr.columnsEq(["identity", "id"], ["person", "identity_id"]));
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
exports.PersonQueryBuilderFactory = PersonQueryBuilderFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonQueryBuilderFactory.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQueryBuilderFactory.ts"],"sourcesContent":["import { PersonRow } from './types'\nimport { SelectBuilder } from '@contember/database'\n\nexport class PersonQueryBuilderFactory {\n\tpublic static createPersonQueryBuilder() {\n\t\treturn SelectBuilder.create<PersonRow>()\n\t\t\t.select(['person', 'id'])\n\t\t\t.select(['person', 'password_hash'])\n\t\t\t.select(['person', 'otp_uri'])\n\t\t\t.select(['person', 'otp_activated_at'])\n\t\t\t.select(['person', 'identity_id'])\n\t\t\t.select(['person', 'email'])\n\t\t\t.select(['person', 'name'])\n\t\t\t.select(['person', 'disabled_at'])\n\t\t\t.select(['identity', 'roles'])\n\t\t\t.from('person')\n\t\t\t.join('identity', 'identity', expr => expr.columnsEq(['identity', 'id'], ['person', 'identity_id']))\n\t}\n}\n"],"names":["SelectBuilder"],"mappings":";;;AAGO,MAAM,0BAA0B;AAAA,EACtC,OAAc,2BAA2B;AACxC,WAAOA,
|
|
1
|
+
{"version":3,"file":"PersonQueryBuilderFactory.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQueryBuilderFactory.ts"],"sourcesContent":["import { PersonRow } from './types'\nimport { SelectBuilder } from '@contember/database'\n\nexport class PersonQueryBuilderFactory {\n\tpublic static createPersonQueryBuilder() {\n\t\treturn SelectBuilder.create<PersonRow>()\n\t\t\t.select(['person', 'id'])\n\t\t\t.select(['person', 'password_hash'])\n\t\t\t.select(['person', 'otp_uri'])\n\t\t\t.select(['person', 'otp_activated_at'])\n\t\t\t.select(['person', 'identity_id'])\n\t\t\t.select(['person', 'email'])\n\t\t\t.select(['person', 'name'])\n\t\t\t.select(['person', 'disabled_at'])\n\t\t\t.select(['person', 'passwordless_enabled'])\n\t\t\t.select(['identity', 'roles'])\n\t\t\t.from('person')\n\t\t\t.join('identity', 'identity', expr => expr.columnsEq(['identity', 'id'], ['person', 'identity_id']))\n\t}\n}\n"],"names":["SelectBuilder"],"mappings":";;;AAGO,MAAM,0BAA0B;AAAA,EACtC,OAAc,2BAA2B;AACxC,WAAOA,SAAAA,cAAc,OAAkB,EACrC,OAAO,CAAC,UAAU,IAAI,CAAC,EACvB,OAAO,CAAC,UAAU,eAAe,CAAC,EAClC,OAAO,CAAC,UAAU,SAAS,CAAC,EAC5B,OAAO,CAAC,UAAU,kBAAkB,CAAC,EACrC,OAAO,CAAC,UAAU,aAAa,CAAC,EAChC,OAAO,CAAC,UAAU,OAAO,CAAC,EAC1B,OAAO,CAAC,UAAU,MAAM,CAAC,EACzB,OAAO,CAAC,UAAU,aAAa,CAAC,EAChC,OAAO,CAAC,UAAU,sBAAsB,CAAC,EACzC,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,KAAK,QAAQ,EACb,KAAK,YAAY,YAAY,CAAQ,SAAA,KAAK,UAAU,CAAC,YAAY,IAAI,GAAG,CAAC,UAAU,aAAa,CAAC,CAAC;AAAA,EAAA;AAEtG;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectBuilder } from "@contember/database";
|
|
2
2
|
class PersonQueryBuilderFactory {
|
|
3
3
|
static createPersonQueryBuilder() {
|
|
4
|
-
return SelectBuilder.create().select(["person", "id"]).select(["person", "password_hash"]).select(["person", "otp_uri"]).select(["person", "otp_activated_at"]).select(["person", "identity_id"]).select(["person", "email"]).select(["person", "name"]).select(["person", "disabled_at"]).select(["identity", "roles"]).from("person").join("identity", "identity", (expr) => expr.columnsEq(["identity", "id"], ["person", "identity_id"]));
|
|
4
|
+
return SelectBuilder.create().select(["person", "id"]).select(["person", "password_hash"]).select(["person", "otp_uri"]).select(["person", "otp_activated_at"]).select(["person", "identity_id"]).select(["person", "email"]).select(["person", "name"]).select(["person", "disabled_at"]).select(["person", "passwordless_enabled"]).select(["identity", "roles"]).from("person").join("identity", "identity", (expr) => expr.columnsEq(["identity", "id"], ["person", "identity_id"]));
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonQueryBuilderFactory.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQueryBuilderFactory.ts"],"sourcesContent":["import { PersonRow } from './types'\nimport { SelectBuilder } from '@contember/database'\n\nexport class PersonQueryBuilderFactory {\n\tpublic static createPersonQueryBuilder() {\n\t\treturn SelectBuilder.create<PersonRow>()\n\t\t\t.select(['person', 'id'])\n\t\t\t.select(['person', 'password_hash'])\n\t\t\t.select(['person', 'otp_uri'])\n\t\t\t.select(['person', 'otp_activated_at'])\n\t\t\t.select(['person', 'identity_id'])\n\t\t\t.select(['person', 'email'])\n\t\t\t.select(['person', 'name'])\n\t\t\t.select(['person', 'disabled_at'])\n\t\t\t.select(['identity', 'roles'])\n\t\t\t.from('person')\n\t\t\t.join('identity', 'identity', expr => expr.columnsEq(['identity', 'id'], ['person', 'identity_id']))\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,0BAA0B;AAAA,EACtC,OAAc,2BAA2B;AACxC,WAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"PersonQueryBuilderFactory.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/queries/person/PersonQueryBuilderFactory.ts"],"sourcesContent":["import { PersonRow } from './types'\nimport { SelectBuilder } from '@contember/database'\n\nexport class PersonQueryBuilderFactory {\n\tpublic static createPersonQueryBuilder() {\n\t\treturn SelectBuilder.create<PersonRow>()\n\t\t\t.select(['person', 'id'])\n\t\t\t.select(['person', 'password_hash'])\n\t\t\t.select(['person', 'otp_uri'])\n\t\t\t.select(['person', 'otp_activated_at'])\n\t\t\t.select(['person', 'identity_id'])\n\t\t\t.select(['person', 'email'])\n\t\t\t.select(['person', 'name'])\n\t\t\t.select(['person', 'disabled_at'])\n\t\t\t.select(['person', 'passwordless_enabled'])\n\t\t\t.select(['identity', 'roles'])\n\t\t\t.from('person')\n\t\t\t.join('identity', 'identity', expr => expr.columnsEq(['identity', 'id'], ['person', 'identity_id']))\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,0BAA0B;AAAA,EACtC,OAAc,2BAA2B;AACxC,WAAO,cAAc,OAAkB,EACrC,OAAO,CAAC,UAAU,IAAI,CAAC,EACvB,OAAO,CAAC,UAAU,eAAe,CAAC,EAClC,OAAO,CAAC,UAAU,SAAS,CAAC,EAC5B,OAAO,CAAC,UAAU,kBAAkB,CAAC,EACrC,OAAO,CAAC,UAAU,aAAa,CAAC,EAChC,OAAO,CAAC,UAAU,OAAO,CAAC,EAC1B,OAAO,CAAC,UAAU,MAAM,CAAC,EACzB,OAAO,CAAC,UAAU,aAAa,CAAC,EAChC,OAAO,CAAC,UAAU,sBAAsB,CAAC,EACzC,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,KAAK,QAAQ,EACb,KAAK,YAAY,YAAY,CAAQ,SAAA,KAAK,UAAU,CAAC,YAAY,IAAI,GAAG,CAAC,UAAU,aAAa,CAAC,CAAC;AAAA,EAAA;AAEtG;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Database = require("@contember/database");
|
|
4
|
+
require("../../type/ApiKey.cjs");
|
|
5
|
+
const tokenUtils = require("../../utils/tokenUtils.cjs");
|
|
6
|
+
class PersonTokenQuery extends Database.DatabaseQuery {
|
|
7
|
+
constructor(identifierType, identifier, type) {
|
|
8
|
+
super();
|
|
9
|
+
this.identifierType = identifierType;
|
|
10
|
+
this.identifier = identifier;
|
|
11
|
+
this.type = type;
|
|
12
|
+
}
|
|
13
|
+
static byId(id, type) {
|
|
14
|
+
return new PersonTokenQuery("id", id, type);
|
|
15
|
+
}
|
|
16
|
+
static byToken(token, type) {
|
|
17
|
+
const tokenHash = tokenUtils.computeTokenHash(token);
|
|
18
|
+
return new PersonTokenQuery("token_hash", tokenHash, type);
|
|
19
|
+
}
|
|
20
|
+
async fetch({ db }) {
|
|
21
|
+
const result = await Database.SelectBuilder.create().from("person_token").select(new Database.Literal("*")).where({
|
|
22
|
+
[this.identifierType]: this.identifier,
|
|
23
|
+
type: this.type
|
|
24
|
+
}).getResult(db);
|
|
25
|
+
return this.fetchOneOrNull(result);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.PersonTokenQuery = PersonTokenQuery;
|
|
29
|
+
//# sourceMappingURL=PersonTokenQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonTokenQuery.cjs","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":["DatabaseQuery","computeTokenHash","SelectBuilder","Literal"],"mappings":";;;;;AAIO,MAAM,yBAAyBA,SAAAA,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,YAAYC,4BAAiB,KAAK;AACxC,WAAO,IAAI,iBAAiB,cAAc,WAAW,IAAI;AAAA,EAAA;AAAA,EAG1D,MAAM,MAAM,EAAE,MAA0D;AACvE,UAAM,SAAS,MAAMC,SAAAA,cAAc,OAAA,EACjC,KAAK,cAAc,EACnB,OAAO,IAAIC,SAAA,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;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DatabaseQuery, SelectBuilder, Literal } from "@contember/database";
|
|
2
|
+
import "../../type/ApiKey.js";
|
|
3
|
+
import { computeTokenHash } from "../../utils/tokenUtils.js";
|
|
4
|
+
class PersonTokenQuery extends DatabaseQuery {
|
|
5
|
+
constructor(identifierType, identifier, type) {
|
|
6
|
+
super();
|
|
7
|
+
this.identifierType = identifierType;
|
|
8
|
+
this.identifier = identifier;
|
|
9
|
+
this.type = type;
|
|
10
|
+
}
|
|
11
|
+
static byId(id, type) {
|
|
12
|
+
return new PersonTokenQuery("id", id, type);
|
|
13
|
+
}
|
|
14
|
+
static byToken(token, type) {
|
|
15
|
+
const tokenHash = computeTokenHash(token);
|
|
16
|
+
return new PersonTokenQuery("token_hash", tokenHash, type);
|
|
17
|
+
}
|
|
18
|
+
async fetch({ db }) {
|
|
19
|
+
const result = await SelectBuilder.create().from("person_token").select(new Literal("*")).where({
|
|
20
|
+
[this.identifierType]: this.identifier,
|
|
21
|
+
type: this.type
|
|
22
|
+
}).getResult(db);
|
|
23
|
+
return this.fetchOneOrNull(result);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
PersonTokenQuery
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=PersonTokenQuery.js.map
|