@contember/engine-tenant-api 2.0.0-alpha.32 → 2.0.0-alpha.36
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/src/TenantContainer.cjs.map +1 -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/runner.cjs.map +1 -1
- package/dist/development/src/migrations/runner.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.map +1 -1
- package/dist/development/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionContext.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionContext.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- 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.map +1 -1
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -1
- package/dist/development/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.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.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/DisablePersonCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -1
- package/dist/development/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/CreateProjectCommand.js.map +1 -1
- package/dist/development/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
- package/dist/development/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
- package/dist/development/src/model/dtos/Password.cjs.map +1 -1
- package/dist/development/src/model/dtos/Password.js.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/development/src/model/mailing/templates/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.map +1 -1
- package/dist/development/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -1
- package/dist/development/src/model/mailing/type.cjs.map +1 -1
- package/dist/development/src/model/mailing/type.js.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js.map +1 -1
- package/dist/development/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
- package/dist/development/src/model/queries/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.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectSecretsQuery.cjs.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.map +1 -1
- package/dist/development/src/model/service/ConfigurationManager.js.map +1 -1
- package/dist/development/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/development/src/model/service/EmailValidator.js.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/development/src/model/service/InviteManager.cjs.map +1 -1
- 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.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordlessSignInManager.js.map +1 -1
- 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.map +1 -1
- package/dist/development/src/model/service/PersonManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectManager.cjs.map +1 -1
- package/dist/development/src/model/service/ProjectManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/development/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/development/src/model/service/RolesManager.js.map +1 -1
- package/dist/development/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/development/src/model/service/SecretsManager.js.map +1 -1
- package/dist/development/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignInManager.js.map +1 -1
- package/dist/development/src/model/service/SignUpManager.cjs.map +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.map +1 -1
- package/dist/development/src/model/service/helpers/getPreferredProject.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
- package/dist/development/src/model/service/idp/IDPManager.cjs.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.map +1 -1
- package/dist/development/src/model/service/idp/providers/AppleProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/helpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/helpers.js.map +1 -1
- package/dist/development/src/model/service/membershipUtils.cjs.map +1 -1
- package/dist/development/src/model/service/membershipUtils.js.map +1 -1
- package/dist/development/src/model/type/ApiKey.cjs.map +1 -1
- package/dist/development/src/model/type/ApiKey.js.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/development/src/model/utils/Response.cjs.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.map +1 -1
- package/dist/development/src/model/utils/tokenUtils.js.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -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.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -1
- 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.map +1 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -1
- 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.map +1 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -1
- 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.map +1 -1
- 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.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/src/TenantContainer.cjs.map +1 -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/runner.cjs.map +1 -1
- package/dist/production/src/migrations/runner.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.map +1 -1
- package/dist/production/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionContext.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionContext.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- 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.map +1 -1
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -1
- package/dist/production/src/model/commands/identity/CreateIdentityCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/identity/CreateIdentityCommand.js.map +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.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.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/DisablePersonCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/DisablePersonCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/TogglePersonPasswordlessCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/ActivateOtpCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/CreatePersonTokenCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/IncreaseOtpAttemptCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/InvalidateTokenCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -1
- package/dist/production/src/model/commands/project/CreateProjectCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/CreateProjectCommand.js.map +1 -1
- package/dist/production/src/model/commands/project/SetProjectSecretCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/SetProjectSecretCommand.js.map +1 -1
- package/dist/production/src/model/commands/project/UpdateProjectCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/project/UpdateProjectCommand.js.map +1 -1
- package/dist/production/src/model/dtos/Password.cjs.map +1 -1
- package/dist/production/src/model/dtos/Password.js.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/production/src/model/mailing/templates/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.map +1 -1
- package/dist/production/src/model/mailing/templates/PasswordlessSignIn.mustache.js.map +1 -1
- package/dist/production/src/model/mailing/type.cjs.map +1 -1
- package/dist/production/src/model/mailing/type.js.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js.map +1 -1
- package/dist/production/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProviderBySlugQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProvidersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/IdentityProvidersQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateListQuery.js.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/mailTemplate/MailTemplateQuery.js.map +1 -1
- package/dist/production/src/model/queries/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.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectBySlugQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectBySlugQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectSecretsQuery.cjs.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.map +1 -1
- package/dist/production/src/model/service/ConfigurationManager.js.map +1 -1
- package/dist/production/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/production/src/model/service/EmailValidator.js.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/production/src/model/service/InviteManager.cjs.map +1 -1
- 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.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordlessSignInManager.js.map +1 -1
- 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.map +1 -1
- package/dist/production/src/model/service/PersonManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectManager.cjs.map +1 -1
- package/dist/production/src/model/service/ProjectManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/production/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/production/src/model/service/RolesManager.js.map +1 -1
- package/dist/production/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/production/src/model/service/SecretsManager.js.map +1 -1
- package/dist/production/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignInManager.js.map +1 -1
- package/dist/production/src/model/service/SignUpManager.cjs.map +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.map +1 -1
- package/dist/production/src/model/service/helpers/getPreferredProject.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPHandlerRegistry.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPHandlerRegistry.js.map +1 -1
- package/dist/production/src/model/service/idp/IDPManager.cjs.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.map +1 -1
- package/dist/production/src/model/service/idp/providers/AppleProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/FacebookProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCTypes.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/helpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/helpers.js.map +1 -1
- package/dist/production/src/model/service/membershipUtils.cjs.map +1 -1
- package/dist/production/src/model/service/membershipUtils.js.map +1 -1
- package/dist/production/src/model/type/ApiKey.cjs.map +1 -1
- package/dist/production/src/model/type/ApiKey.js.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/production/src/model/utils/Response.cjs.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.map +1 -1
- package/dist/production/src/model/utils/tokenUtils.js.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -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.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -1
- 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.map +1 -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.map +1 -1
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -1
- 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.map +1 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -1
- 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.map +1 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -1
- 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.map +1 -1
- 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.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/src/mailer.d.ts.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/model/service/OtpAuthenticator.ts +1 -1
- 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 +1 -1
- 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/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/mailer.ts +3 -4
- package/tests/src/testGraphql.ts +2 -2
- package/dist/tests/src/testTenantDb.d.ts +0 -31
- package/dist/tests/src/testTenantDb.d.ts.map +0 -1
- package/tests/src/testTenantDb.ts +0 -202
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateProjectMemberCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/membership/UpdateProjectMemberCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateProjectMemberErrorCode } from '../../../schema'\nimport { CreateOrUpdateProjectMembershipCommand } from './CreateOrUpdateProjectMembershipCommand'\nimport { SelectBuilder } from '@contember/database'\nimport { MembershipUpdateInput } from './types'\nimport { RemoveProjectMembershipCommand } from './RemoveProjectMembershipsCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class UpdateProjectMemberCommand implements Command<UpdateProjectMemberResponse> {\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly identityId: string,\n\t\tprivate readonly memberships: readonly MembershipUpdateInput[],\n\t) {}\n\n\tasync execute({ db, bus, providers }: Command.Args): Promise<UpdateProjectMemberResponse> {\n\t\tconst result = await SelectBuilder.create()\n\t\t\t.select('id')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tif (result.length === 0) {\n\t\t\treturn new ResponseError('NOT_MEMBER', 'Not a project member')\n\t\t}\n\n\t\ttry {\n\t\t\tfor (const membershipUpdate of this.memberships) {\n\t\t\t\tif (membershipUpdate.operation === 'remove') {\n\t\t\t\t\tawait bus.execute(new RemoveProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate.role))\n\t\t\t\t} else {\n\t\t\t\t\tawait bus.execute(\n\t\t\t\t\t\tnew CreateOrUpdateProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new ResponseOk(null)\n\t\t} catch (e) {\n\t\t\tif (!(e instanceof Error)) {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tswitch ((e as any).constraint) {\n\t\t\t\tcase 'project_membership_project':\n\t\t\t\t\treturn new ResponseError('PROJECT_NOT_FOUND', 'Project not found')\n\t\t\t\tdefault:\n\t\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t}\n}\nexport type UpdateProjectMemberResponse = Response<null, UpdateProjectMemberErrorCode>\n"],"names":["SelectBuilder","ResponseError","RemoveProjectMembershipCommand","CreateOrUpdateProjectMembershipCommand","ResponseOk"],"mappings":";;;;;;AAQO,MAAM,2BAA2E;AAAA,EACvF,YACkB,WACA,YACA,aAChB;AAHgB,SAAA,YAAA;AACA,SAAA,aAAA;AACA,SAAA,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateProjectMemberCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/membership/UpdateProjectMemberCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateProjectMemberErrorCode } from '../../../schema'\nimport { CreateOrUpdateProjectMembershipCommand } from './CreateOrUpdateProjectMembershipCommand'\nimport { SelectBuilder } from '@contember/database'\nimport { MembershipUpdateInput } from './types'\nimport { RemoveProjectMembershipCommand } from './RemoveProjectMembershipsCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class UpdateProjectMemberCommand implements Command<UpdateProjectMemberResponse> {\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly identityId: string,\n\t\tprivate readonly memberships: readonly MembershipUpdateInput[],\n\t) {}\n\n\tasync execute({ db, bus, providers }: Command.Args): Promise<UpdateProjectMemberResponse> {\n\t\tconst result = await SelectBuilder.create()\n\t\t\t.select('id')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tif (result.length === 0) {\n\t\t\treturn new ResponseError('NOT_MEMBER', 'Not a project member')\n\t\t}\n\n\t\ttry {\n\t\t\tfor (const membershipUpdate of this.memberships) {\n\t\t\t\tif (membershipUpdate.operation === 'remove') {\n\t\t\t\t\tawait bus.execute(new RemoveProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate.role))\n\t\t\t\t} else {\n\t\t\t\t\tawait bus.execute(\n\t\t\t\t\t\tnew CreateOrUpdateProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new ResponseOk(null)\n\t\t} catch (e) {\n\t\t\tif (!(e instanceof Error)) {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tswitch ((e as any).constraint) {\n\t\t\t\tcase 'project_membership_project':\n\t\t\t\t\treturn new ResponseError('PROJECT_NOT_FOUND', 'Project not found')\n\t\t\t\tdefault:\n\t\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t}\n}\nexport type UpdateProjectMemberResponse = Response<null, UpdateProjectMemberErrorCode>\n"],"names":["SelectBuilder","ResponseError","RemoveProjectMembershipCommand","CreateOrUpdateProjectMembershipCommand","ResponseOk"],"mappings":";;;;;;AAQO,MAAM,2BAA2E;AAAA,EACvF,YACkB,WACA,YACA,aAChB;AAHgB,SAAA,YAAA;AACA,SAAA,aAAA;AACA,SAAA,cAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,KAAK,aAAiE;AACnF,UAAA,SAAS,MAAMA,uBAAc,SACjC,OAAO,IAAI,EACX,KAAK,oBAAoB,EACzB,MAAM;AAAA,MACN,YAAY,KAAK;AAAA,MACjB,aAAa,KAAK;AAAA,IAAA,CAClB,EACA,UAAU,EAAE;AACV,QAAA,OAAO,WAAW,GAAG;AACjB,aAAA,IAAIC,SAAAA,cAAc,cAAc,sBAAsB;AAAA,IAAA;AAG1D,QAAA;AACQ,iBAAA,oBAAoB,KAAK,aAAa;AAC5C,YAAA,iBAAiB,cAAc,UAAU;AACtC,gBAAA,IAAI,QAAQ,IAAIC,gCAAAA,+BAA+B,KAAK,WAAW,KAAK,YAAY,iBAAiB,IAAI,CAAC;AAAA,QAAA,OACtG;AACN,gBAAM,IAAI;AAAA,YACT,IAAIC,uCAAuC,uCAAA,KAAK,WAAW,KAAK,YAAY,gBAAgB;AAAA,UAC7F;AAAA,QAAA;AAAA,MACD;AAGM,aAAA,IAAIC,oBAAW,IAAI;AAAA,aAClB,GAAG;AACP,UAAA,EAAE,aAAa,QAAQ;AACpB,cAAA;AAAA,MAAA;AAEP,cAAS,EAAU,YAAY;AAAA,QAC9B,KAAK;AACG,iBAAA,IAAIH,SAAAA,cAAc,qBAAqB,mBAAmB;AAAA,QAClE;AACO,gBAAA;AAAA,MAAA;AAAA,IACR;AAAA,EACD;AAEF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateProjectMemberCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/membership/UpdateProjectMemberCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateProjectMemberErrorCode } from '../../../schema'\nimport { CreateOrUpdateProjectMembershipCommand } from './CreateOrUpdateProjectMembershipCommand'\nimport { SelectBuilder } from '@contember/database'\nimport { MembershipUpdateInput } from './types'\nimport { RemoveProjectMembershipCommand } from './RemoveProjectMembershipsCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class UpdateProjectMemberCommand implements Command<UpdateProjectMemberResponse> {\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly identityId: string,\n\t\tprivate readonly memberships: readonly MembershipUpdateInput[],\n\t) {}\n\n\tasync execute({ db, bus, providers }: Command.Args): Promise<UpdateProjectMemberResponse> {\n\t\tconst result = await SelectBuilder.create()\n\t\t\t.select('id')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tif (result.length === 0) {\n\t\t\treturn new ResponseError('NOT_MEMBER', 'Not a project member')\n\t\t}\n\n\t\ttry {\n\t\t\tfor (const membershipUpdate of this.memberships) {\n\t\t\t\tif (membershipUpdate.operation === 'remove') {\n\t\t\t\t\tawait bus.execute(new RemoveProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate.role))\n\t\t\t\t} else {\n\t\t\t\t\tawait bus.execute(\n\t\t\t\t\t\tnew CreateOrUpdateProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new ResponseOk(null)\n\t\t} catch (e) {\n\t\t\tif (!(e instanceof Error)) {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tswitch ((e as any).constraint) {\n\t\t\t\tcase 'project_membership_project':\n\t\t\t\t\treturn new ResponseError('PROJECT_NOT_FOUND', 'Project not found')\n\t\t\t\tdefault:\n\t\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t}\n}\nexport type UpdateProjectMemberResponse = Response<null, UpdateProjectMemberErrorCode>\n"],"names":[],"mappings":";;;;AAQO,MAAM,2BAA2E;AAAA,EACvF,YACkB,WACA,YACA,aAChB;AAHgB,SAAA,YAAA;AACA,SAAA,aAAA;AACA,SAAA,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateProjectMemberCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/membership/UpdateProjectMemberCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateProjectMemberErrorCode } from '../../../schema'\nimport { CreateOrUpdateProjectMembershipCommand } from './CreateOrUpdateProjectMembershipCommand'\nimport { SelectBuilder } from '@contember/database'\nimport { MembershipUpdateInput } from './types'\nimport { RemoveProjectMembershipCommand } from './RemoveProjectMembershipsCommand'\nimport { Response, ResponseError, ResponseOk } from '../../utils/Response'\n\nexport class UpdateProjectMemberCommand implements Command<UpdateProjectMemberResponse> {\n\tconstructor(\n\t\tprivate readonly projectId: string,\n\t\tprivate readonly identityId: string,\n\t\tprivate readonly memberships: readonly MembershipUpdateInput[],\n\t) {}\n\n\tasync execute({ db, bus, providers }: Command.Args): Promise<UpdateProjectMemberResponse> {\n\t\tconst result = await SelectBuilder.create()\n\t\t\t.select('id')\n\t\t\t.from('project_membership')\n\t\t\t.where({\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tidentity_id: this.identityId,\n\t\t\t})\n\t\t\t.getResult(db)\n\t\tif (result.length === 0) {\n\t\t\treturn new ResponseError('NOT_MEMBER', 'Not a project member')\n\t\t}\n\n\t\ttry {\n\t\t\tfor (const membershipUpdate of this.memberships) {\n\t\t\t\tif (membershipUpdate.operation === 'remove') {\n\t\t\t\t\tawait bus.execute(new RemoveProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate.role))\n\t\t\t\t} else {\n\t\t\t\t\tawait bus.execute(\n\t\t\t\t\t\tnew CreateOrUpdateProjectMembershipCommand(this.projectId, this.identityId, membershipUpdate),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new ResponseOk(null)\n\t\t} catch (e) {\n\t\t\tif (!(e instanceof Error)) {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tswitch ((e as any).constraint) {\n\t\t\t\tcase 'project_membership_project':\n\t\t\t\t\treturn new ResponseError('PROJECT_NOT_FOUND', 'Project not found')\n\t\t\t\tdefault:\n\t\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\t}\n}\nexport type UpdateProjectMemberResponse = Response<null, UpdateProjectMemberErrorCode>\n"],"names":[],"mappings":";;;;AAQO,MAAM,2BAA2E;AAAA,EACvF,YACkB,WACA,YACA,aAChB;AAHgB,SAAA,YAAA;AACA,SAAA,aAAA;AACA,SAAA,cAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,KAAK,aAAiE;AACnF,UAAA,SAAS,MAAM,cAAc,SACjC,OAAO,IAAI,EACX,KAAK,oBAAoB,EACzB,MAAM;AAAA,MACN,YAAY,KAAK;AAAA,MACjB,aAAa,KAAK;AAAA,IAAA,CAClB,EACA,UAAU,EAAE;AACV,QAAA,OAAO,WAAW,GAAG;AACjB,aAAA,IAAI,cAAc,cAAc,sBAAsB;AAAA,IAAA;AAG1D,QAAA;AACQ,iBAAA,oBAAoB,KAAK,aAAa;AAC5C,YAAA,iBAAiB,cAAc,UAAU;AACtC,gBAAA,IAAI,QAAQ,IAAI,+BAA+B,KAAK,WAAW,KAAK,YAAY,iBAAiB,IAAI,CAAC;AAAA,QAAA,OACtG;AACN,gBAAM,IAAI;AAAA,YACT,IAAI,uCAAuC,KAAK,WAAW,KAAK,YAAY,gBAAgB;AAAA,UAC7F;AAAA,QAAA;AAAA,MACD;AAGM,aAAA,IAAI,WAAW,IAAI;AAAA,aAClB,GAAG;AACP,UAAA,EAAE,aAAa,QAAQ;AACpB,cAAA;AAAA,MAAA;AAEP,cAAS,EAAU,YAAY;AAAA,QAC9B,KAAK;AACG,iBAAA,IAAI,cAAc,qBAAqB,mBAAmB;AAAA,QAClE;AACO,gBAAA;AAAA,MAAA;AAAA,IACR;AAAA,EACD;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchProjectMembershipVariableValuesCommand.cjs","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder, Literal } from '@contember/database'\n\nexport class PatchProjectMembershipVariableValuesCommand implements Command<string[]> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly remove: ReadonlyArray<string>,\n\t\tprivate readonly append: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<string[]> {\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.with('current', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.where({\n\t\t\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\t\t\tvariable: this.name,\n\t\t\t\t\t})\n\t\t\t\t\t.select(expr => expr.raw('jsonb_array_elements_text(value)'), 'value'),\n\t\t\t)\n\t\t\t.with('filtered', qb => qb.from('current').where(expr => expr.not(expr => expr.in('value', [...this.remove]))))\n\t\t\t.with('new_list', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['filtered', 'value'])\n\t\t\t\t\t.from('filtered')\n\t\t\t\t\t.unionDistinct(qb => qb.select(expr => expr.raw('*')).from(new Literal('unnest(?::text[])', [this.append]))),\n\t\t\t)\n\t\t\t.with('new', qb => qb.from('new_list').select(expr => expr.raw(`coalesce(jsonb_agg(value), ?::jsonb)`, '[]'), 'value'))\n\t\t\t.into('project_membership_variable')\n\t\t\t.from(qb => qb.from('new'))\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: expr => expr.select(['new', 'value']),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: expr => expr.select(['excluded', 'value']),\n\t\t\t})\n\t\t\t.returning('value')\n\t\t\t.execute(db)\n\t\treturn result.map(it => it.value) as string[]\n\t}\n}\n"],"names":["InsertBuilder","expr","qb","Literal","ConflictActionType"],"mappings":";;;AAGO,MAAM,4CAAyE;AAAA,EACrF,YACkB,cACA,MACA,QACA,QAChB;AAJgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AACA,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PatchProjectMembershipVariableValuesCommand.cjs","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder, Literal } from '@contember/database'\n\nexport class PatchProjectMembershipVariableValuesCommand implements Command<string[]> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly remove: ReadonlyArray<string>,\n\t\tprivate readonly append: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<string[]> {\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.with('current', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.where({\n\t\t\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\t\t\tvariable: this.name,\n\t\t\t\t\t})\n\t\t\t\t\t.select(expr => expr.raw('jsonb_array_elements_text(value)'), 'value'),\n\t\t\t)\n\t\t\t.with('filtered', qb => qb.from('current').where(expr => expr.not(expr => expr.in('value', [...this.remove]))))\n\t\t\t.with('new_list', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['filtered', 'value'])\n\t\t\t\t\t.from('filtered')\n\t\t\t\t\t.unionDistinct(qb => qb.select(expr => expr.raw('*')).from(new Literal('unnest(?::text[])', [this.append]))),\n\t\t\t)\n\t\t\t.with('new', qb => qb.from('new_list').select(expr => expr.raw(`coalesce(jsonb_agg(value), ?::jsonb)`, '[]'), 'value'))\n\t\t\t.into('project_membership_variable')\n\t\t\t.from(qb => qb.from('new'))\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: expr => expr.select(['new', 'value']),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: expr => expr.select(['excluded', 'value']),\n\t\t\t})\n\t\t\t.returning('value')\n\t\t\t.execute(db)\n\t\treturn result.map(it => it.value) as string[]\n\t}\n}\n"],"names":["InsertBuilder","expr","qb","Literal","ConflictActionType"],"mappings":";;;AAGO,MAAM,4CAAyE;AAAA,EACrF,YACkB,cACA,MACA,QACA,QAChB;AAJgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AACA,SAAA,SAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAwC;AACtE,UAAM,SAAS,MAAMA,uBAAc,OACjC,EAAA;AAAA,MAAK;AAAA,MAAW,CAChB,OAAA,GACE,KAAK,6BAA6B,EAClC,MAAM;AAAA,QACN,eAAe,KAAK;AAAA,QACpB,UAAU,KAAK;AAAA,MAAA,CACf,EACA,OAAO,CAAA,SAAQ,KAAK,IAAI,kCAAkC,GAAG,OAAO;AAAA,IACvE,EACC,KAAK,YAAY,CAAM,OAAA,GAAG,KAAK,SAAS,EAAE,MAAM,CAAA,SAAQ,KAAK,IAAI,CAAAC,UAAQA,MAAK,GAAG,SAAS,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,EAC7G;AAAA,MAAK;AAAA,MAAY,CACjB,OAAA,GACE,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,KAAK,UAAU,EACf,cAAc,CAAAC,QAAMA,IAAG,OAAO,CAAA,SAAQ,KAAK,IAAI,GAAG,CAAC,EAAE,KAAK,IAAIC,SAAAA,QAAQ,qBAAqB,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;AAAA,IAE5G,EAAA,KAAK,OAAO,CAAA,OAAM,GAAG,KAAK,UAAU,EAAE,OAAO,CAAA,SAAQ,KAAK,IAAI,wCAAwC,IAAI,GAAG,OAAO,CAAC,EACrH,KAAK,6BAA6B,EAClC,KAAK,CAAM,OAAA,GAAG,KAAK,KAAK,CAAC,EACzB,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,MACpB,UAAU,KAAK;AAAA,MACf,OAAO,CAAQ,SAAA,KAAK,OAAO,CAAC,OAAO,OAAO,CAAC;AAAA,IAAA,CAC3C,EACA,WAAWC,SAAA,mBAAmB,QAAQ,CAAC,iBAAiB,UAAU,GAAG;AAAA,MACrE,OAAO,CAAQ,SAAA,KAAK,OAAO,CAAC,YAAY,OAAO,CAAC;AAAA,IAChD,CAAA,EACA,UAAU,OAAO,EACjB,QAAQ,EAAE;AACZ,WAAO,OAAO,IAAI,CAAM,OAAA,GAAG,KAAK;AAAA,EAAA;AAElC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchProjectMembershipVariableValuesCommand.js","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder, Literal } from '@contember/database'\n\nexport class PatchProjectMembershipVariableValuesCommand implements Command<string[]> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly remove: ReadonlyArray<string>,\n\t\tprivate readonly append: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<string[]> {\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.with('current', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.where({\n\t\t\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\t\t\tvariable: this.name,\n\t\t\t\t\t})\n\t\t\t\t\t.select(expr => expr.raw('jsonb_array_elements_text(value)'), 'value'),\n\t\t\t)\n\t\t\t.with('filtered', qb => qb.from('current').where(expr => expr.not(expr => expr.in('value', [...this.remove]))))\n\t\t\t.with('new_list', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['filtered', 'value'])\n\t\t\t\t\t.from('filtered')\n\t\t\t\t\t.unionDistinct(qb => qb.select(expr => expr.raw('*')).from(new Literal('unnest(?::text[])', [this.append]))),\n\t\t\t)\n\t\t\t.with('new', qb => qb.from('new_list').select(expr => expr.raw(`coalesce(jsonb_agg(value), ?::jsonb)`, '[]'), 'value'))\n\t\t\t.into('project_membership_variable')\n\t\t\t.from(qb => qb.from('new'))\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: expr => expr.select(['new', 'value']),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: expr => expr.select(['excluded', 'value']),\n\t\t\t})\n\t\t\t.returning('value')\n\t\t\t.execute(db)\n\t\treturn result.map(it => it.value) as string[]\n\t}\n}\n"],"names":["InsertBuilder","expr","qb"],"mappings":";AAGO,MAAM,4CAAyE;AAAA,EACrF,YACkB,cACA,MACA,QACA,QAChB;AAJgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AACA,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PatchProjectMembershipVariableValuesCommand.js","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder, Literal } from '@contember/database'\n\nexport class PatchProjectMembershipVariableValuesCommand implements Command<string[]> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly remove: ReadonlyArray<string>,\n\t\tprivate readonly append: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<string[]> {\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.with('current', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.from('project_membership_variable')\n\t\t\t\t\t.where({\n\t\t\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\t\t\tvariable: this.name,\n\t\t\t\t\t})\n\t\t\t\t\t.select(expr => expr.raw('jsonb_array_elements_text(value)'), 'value'),\n\t\t\t)\n\t\t\t.with('filtered', qb => qb.from('current').where(expr => expr.not(expr => expr.in('value', [...this.remove]))))\n\t\t\t.with('new_list', qb =>\n\t\t\t\tqb\n\t\t\t\t\t.select(['filtered', 'value'])\n\t\t\t\t\t.from('filtered')\n\t\t\t\t\t.unionDistinct(qb => qb.select(expr => expr.raw('*')).from(new Literal('unnest(?::text[])', [this.append]))),\n\t\t\t)\n\t\t\t.with('new', qb => qb.from('new_list').select(expr => expr.raw(`coalesce(jsonb_agg(value), ?::jsonb)`, '[]'), 'value'))\n\t\t\t.into('project_membership_variable')\n\t\t\t.from(qb => qb.from('new'))\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: expr => expr.select(['new', 'value']),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: expr => expr.select(['excluded', 'value']),\n\t\t\t})\n\t\t\t.returning('value')\n\t\t\t.execute(db)\n\t\treturn result.map(it => it.value) as string[]\n\t}\n}\n"],"names":["InsertBuilder","expr","qb"],"mappings":";AAGO,MAAM,4CAAyE;AAAA,EACrF,YACkB,cACA,MACA,QACA,QAChB;AAJgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AACA,SAAA,SAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAwC;AACtE,UAAM,SAAS,MAAMA,gBAAc,OACjC,EAAA;AAAA,MAAK;AAAA,MAAW,CAChB,OAAA,GACE,KAAK,6BAA6B,EAClC,MAAM;AAAA,QACN,eAAe,KAAK;AAAA,QACpB,UAAU,KAAK;AAAA,MAAA,CACf,EACA,OAAO,CAAA,SAAQ,KAAK,IAAI,kCAAkC,GAAG,OAAO;AAAA,IACvE,EACC,KAAK,YAAY,CAAM,OAAA,GAAG,KAAK,SAAS,EAAE,MAAM,CAAA,SAAQ,KAAK,IAAI,CAAAC,UAAQA,MAAK,GAAG,SAAS,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,EAC7G;AAAA,MAAK;AAAA,MAAY,CACjB,OAAA,GACE,OAAO,CAAC,YAAY,OAAO,CAAC,EAC5B,KAAK,UAAU,EACf,cAAc,CAAAC,QAAMA,IAAG,OAAO,CAAA,SAAQ,KAAK,IAAI,GAAG,CAAC,EAAE,KAAK,IAAI,QAAQ,qBAAqB,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;AAAA,IAE5G,EAAA,KAAK,OAAO,CAAA,OAAM,GAAG,KAAK,UAAU,EAAE,OAAO,CAAA,SAAQ,KAAK,IAAI,wCAAwC,IAAI,GAAG,OAAO,CAAC,EACrH,KAAK,6BAA6B,EAClC,KAAK,CAAM,OAAA,GAAG,KAAK,KAAK,CAAC,EACzB,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,MACpB,UAAU,KAAK;AAAA,MACf,OAAO,CAAQ,SAAA,KAAK,OAAO,CAAC,OAAO,OAAO,CAAC;AAAA,IAAA,CAC3C,EACA,WAAW,mBAAmB,QAAQ,CAAC,iBAAiB,UAAU,GAAG;AAAA,MACrE,OAAO,CAAQ,SAAA,KAAK,OAAO,CAAC,YAAY,OAAO,CAAC;AAAA,IAChD,CAAA,EACA,UAAU,OAAO,EACjB,QAAQ,EAAE;AACZ,WAAO,OAAO,IAAI,CAAM,OAAA,GAAG,KAAK;AAAA,EAAA;AAElC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchProjectMembershipVariablesCommand.cjs","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { SetProjectMembershipVariableValuesCommand } from './SetProjectMembershipVariableValuesCommand'\nimport { PatchProjectMembershipVariableValuesCommand } from './PatchProjectMembershipVariableValuesCommand'\nimport { VariableUpdateInput } from '../types'\n\nexport class PatchProjectMembershipVariablesCommand implements Command<Record<string, string[]>> {\n\tconstructor(private readonly membershipId: string, private readonly variables: readonly VariableUpdateInput[]) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<Record<string, string[]>> {\n\t\tconst queries = this.variables.map(async update => {\n\t\t\tif ('set' in update) {\n\t\t\t\tawait bus.execute(new SetProjectMembershipVariableValuesCommand(this.membershipId, update.name, update.set))\n\t\t\t\treturn [update.name, update.set]\n\t\t\t}\n\t\t\tconst command = new PatchProjectMembershipVariableValuesCommand(\n\t\t\t\tthis.membershipId,\n\t\t\t\tupdate.name,\n\t\t\t\tupdate.remove,\n\t\t\t\tupdate.append,\n\t\t\t)\n\t\t\tconst result = await bus.execute(command)\n\t\t\treturn [update.name, result]\n\t\t})\n\t\tconst results = await Promise.all(queries)\n\n\t\treturn Object.fromEntries(results)\n\t}\n}\n"],"names":["SetProjectMembershipVariableValuesCommand","PatchProjectMembershipVariableValuesCommand"],"mappings":";;;;AAKO,MAAM,uCAAoF;AAAA,EAChG,YAA6B,cAAuC,WAA2C;AAAlF,SAAA,eAAA;AAAuC,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PatchProjectMembershipVariablesCommand.cjs","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { SetProjectMembershipVariableValuesCommand } from './SetProjectMembershipVariableValuesCommand'\nimport { PatchProjectMembershipVariableValuesCommand } from './PatchProjectMembershipVariableValuesCommand'\nimport { VariableUpdateInput } from '../types'\n\nexport class PatchProjectMembershipVariablesCommand implements Command<Record<string, string[]>> {\n\tconstructor(private readonly membershipId: string, private readonly variables: readonly VariableUpdateInput[]) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<Record<string, string[]>> {\n\t\tconst queries = this.variables.map(async update => {\n\t\t\tif ('set' in update) {\n\t\t\t\tawait bus.execute(new SetProjectMembershipVariableValuesCommand(this.membershipId, update.name, update.set))\n\t\t\t\treturn [update.name, update.set]\n\t\t\t}\n\t\t\tconst command = new PatchProjectMembershipVariableValuesCommand(\n\t\t\t\tthis.membershipId,\n\t\t\t\tupdate.name,\n\t\t\t\tupdate.remove,\n\t\t\t\tupdate.append,\n\t\t\t)\n\t\t\tconst result = await bus.execute(command)\n\t\t\treturn [update.name, result]\n\t\t})\n\t\tconst results = await Promise.all(queries)\n\n\t\treturn Object.fromEntries(results)\n\t}\n}\n"],"names":["SetProjectMembershipVariableValuesCommand","PatchProjectMembershipVariableValuesCommand"],"mappings":";;;;AAKO,MAAM,uCAAoF;AAAA,EAChG,YAA6B,cAAuC,WAA2C;AAAlF,SAAA,eAAA;AAAuC,SAAA,YAAA;AAAA,EAAA;AAAA,EAEpE,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAwD;AACtF,UAAM,UAAU,KAAK,UAAU,IAAI,OAAM,WAAU;AAClD,UAAI,SAAS,QAAQ;AACd,cAAA,IAAI,QAAQ,IAAIA,0CAAAA,0CAA0C,KAAK,cAAc,OAAO,MAAM,OAAO,GAAG,CAAC;AAC3G,eAAO,CAAC,OAAO,MAAM,OAAO,GAAG;AAAA,MAAA;AAEhC,YAAM,UAAU,IAAIC,4CAAA;AAAA,QACnB,KAAK;AAAA,QACL,OAAO;AAAA,QACP,OAAO;AAAA,QACP,OAAO;AAAA,MACR;AACA,YAAM,SAAS,MAAM,IAAI,QAAQ,OAAO;AACjC,aAAA,CAAC,OAAO,MAAM,MAAM;AAAA,IAAA,CAC3B;AACD,UAAM,UAAU,MAAM,QAAQ,IAAI,OAAO;AAElC,WAAA,OAAO,YAAY,OAAO;AAAA,EAAA;AAEnC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchProjectMembershipVariablesCommand.js","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { SetProjectMembershipVariableValuesCommand } from './SetProjectMembershipVariableValuesCommand'\nimport { PatchProjectMembershipVariableValuesCommand } from './PatchProjectMembershipVariableValuesCommand'\nimport { VariableUpdateInput } from '../types'\n\nexport class PatchProjectMembershipVariablesCommand implements Command<Record<string, string[]>> {\n\tconstructor(private readonly membershipId: string, private readonly variables: readonly VariableUpdateInput[]) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<Record<string, string[]>> {\n\t\tconst queries = this.variables.map(async update => {\n\t\t\tif ('set' in update) {\n\t\t\t\tawait bus.execute(new SetProjectMembershipVariableValuesCommand(this.membershipId, update.name, update.set))\n\t\t\t\treturn [update.name, update.set]\n\t\t\t}\n\t\t\tconst command = new PatchProjectMembershipVariableValuesCommand(\n\t\t\t\tthis.membershipId,\n\t\t\t\tupdate.name,\n\t\t\t\tupdate.remove,\n\t\t\t\tupdate.append,\n\t\t\t)\n\t\t\tconst result = await bus.execute(command)\n\t\t\treturn [update.name, result]\n\t\t})\n\t\tconst results = await Promise.all(queries)\n\n\t\treturn Object.fromEntries(results)\n\t}\n}\n"],"names":[],"mappings":";;AAKO,MAAM,uCAAoF;AAAA,EAChG,YAA6B,cAAuC,WAA2C;AAAlF,SAAA,eAAA;AAAuC,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PatchProjectMembershipVariablesCommand.js","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { SetProjectMembershipVariableValuesCommand } from './SetProjectMembershipVariableValuesCommand'\nimport { PatchProjectMembershipVariableValuesCommand } from './PatchProjectMembershipVariableValuesCommand'\nimport { VariableUpdateInput } from '../types'\n\nexport class PatchProjectMembershipVariablesCommand implements Command<Record<string, string[]>> {\n\tconstructor(private readonly membershipId: string, private readonly variables: readonly VariableUpdateInput[]) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<Record<string, string[]>> {\n\t\tconst queries = this.variables.map(async update => {\n\t\t\tif ('set' in update) {\n\t\t\t\tawait bus.execute(new SetProjectMembershipVariableValuesCommand(this.membershipId, update.name, update.set))\n\t\t\t\treturn [update.name, update.set]\n\t\t\t}\n\t\t\tconst command = new PatchProjectMembershipVariableValuesCommand(\n\t\t\t\tthis.membershipId,\n\t\t\t\tupdate.name,\n\t\t\t\tupdate.remove,\n\t\t\t\tupdate.append,\n\t\t\t)\n\t\t\tconst result = await bus.execute(command)\n\t\t\treturn [update.name, result]\n\t\t})\n\t\tconst results = await Promise.all(queries)\n\n\t\treturn Object.fromEntries(results)\n\t}\n}\n"],"names":[],"mappings":";;AAKO,MAAM,uCAAoF;AAAA,EAChG,YAA6B,cAAuC,WAA2C;AAAlF,SAAA,eAAA;AAAuC,SAAA,YAAA;AAAA,EAAA;AAAA,EAEpE,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAwD;AACtF,UAAM,UAAU,KAAK,UAAU,IAAI,OAAM,WAAU;AAClD,UAAI,SAAS,QAAQ;AACd,cAAA,IAAI,QAAQ,IAAI,0CAA0C,KAAK,cAAc,OAAO,MAAM,OAAO,GAAG,CAAC;AAC3G,eAAO,CAAC,OAAO,MAAM,OAAO,GAAG;AAAA,MAAA;AAEhC,YAAM,UAAU,IAAI;AAAA,QACnB,KAAK;AAAA,QACL,OAAO;AAAA,QACP,OAAO;AAAA,QACP,OAAO;AAAA,MACR;AACA,YAAM,SAAS,MAAM,IAAI,QAAQ,OAAO;AACjC,aAAA,CAAC,OAAO,MAAM,MAAM;AAAA,IAAA,CAC3B;AACD,UAAM,UAAU,MAAM,QAAQ,IAAI,OAAO;AAElC,WAAA,OAAO,YAAY,OAAO;AAAA,EAAA;AAEnC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetProjectMembershipVariableValuesCommand.cjs","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectMembershipVariableValuesCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly values: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('project_membership_variable')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAGO,MAAM,0CAAmE;AAAA,EAC/E,YACkB,cACA,MACA,QAChB;AAHgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SetProjectMembershipVariableValuesCommand.cjs","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectMembershipVariableValuesCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly values: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('project_membership_variable')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAGO,MAAM,0CAAmE;AAAA,EAC/E,YACkB,cACA,MACA,QAChB;AAHgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAoC;AAClE,UAAMA,SAAAA,cAAc,OAAO,EACzB,KAAK,6BAA6B,EAClC,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,MACpB,UAAU,KAAK;AAAA,MACf,OAAO,KAAK,UAAU,KAAK,MAAM;AAAA,IAAA,CACjC,EACA,WAAWC,SAAA,mBAAmB,QAAQ,CAAC,iBAAiB,UAAU,GAAG;AAAA,MACrE,OAAO,KAAK,UAAU,KAAK,MAAM;AAAA,IAAA,CACjC,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetProjectMembershipVariableValuesCommand.js","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectMembershipVariableValuesCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly values: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('project_membership_variable')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,0CAAmE;AAAA,EAC/E,YACkB,cACA,MACA,QAChB;AAHgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SetProjectMembershipVariableValuesCommand.js","sources":["../../../../../../../../packages/engine-tenant-api/src/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.ts"],"sourcesContent":["import { Command } from '../../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectMembershipVariableValuesCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly membershipId: string,\n\t\tprivate readonly name: string,\n\t\tprivate readonly values: ReadonlyArray<string>,\n\t) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('project_membership_variable')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tmembership_id: this.membershipId,\n\t\t\t\tvariable: this.name,\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['membership_id', 'variable'], {\n\t\t\t\tvalue: JSON.stringify(this.values),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,0CAAmE;AAAA,EAC/E,YACkB,cACA,MACA,QAChB;AAHgB,SAAA,eAAA;AACA,SAAA,OAAA;AACA,SAAA,SAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,WAAW,OAAoC;AAClE,UAAMA,gBAAc,OAAO,EACzB,KAAK,6BAA6B,EAClC,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,MACpB,UAAU,KAAK;AAAA,MACf,OAAO,KAAK,UAAU,KAAK,MAAM;AAAA,IAAA,CACjC,EACA,WAAW,mBAAmB,QAAQ,CAAC,iBAAiB,UAAU,GAAG;AAAA,MACrE,OAAO,KAAK,UAAU,KAAK,MAAM;AAAA,IAAA,CACjC,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/ConfirmOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ConfirmOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_activated_at: providers.now(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ConfirmOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/ConfirmOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ConfirmOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_activated_at: providers.now(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,kBAAkB,UAAU,IAAI;AAAA,IAChC,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/ConfirmOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ConfirmOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_activated_at: providers.now(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ConfirmOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/ConfirmOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ConfirmOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_activated_at: providers.now(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,kBAAkB,UAAU,IAAI;AAAA,IAChC,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisableOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/DisableOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisableOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: null,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"DisableOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/DisableOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisableOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: null,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,SAAS;AAAA,MACT,kBAAkB;AAAA,IAClB,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisableOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/DisableOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisableOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: null,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"DisableOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/DisableOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisableOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: null,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,SAAS;AAAA,MACT,kBAAkB;AAAA,IAClB,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrepareOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/PrepareOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class PrepareOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly otpUri: string) {}\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: this.otpUri,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAmC,QAAgB;AAAnD,SAAA,WAAA;AAAmC,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PrepareOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/PrepareOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class PrepareOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly otpUri: string) {}\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: this.otpUri,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAmC,QAAgB;AAAnD,SAAA,WAAA;AAAmC,SAAA,SAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,MAAmC;AAClD,UAAMA,SAAAA,cAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,SAAS,KAAK;AAAA,MACd,kBAAkB;AAAA,IAClB,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrepareOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/PrepareOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class PrepareOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly otpUri: string) {}\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: this.otpUri,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAmC,QAAgB;AAAnD,SAAA,WAAA;AAAmC,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"PrepareOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/otp/PrepareOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class PrepareOtpCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly otpUri: string) {}\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\totp_uri: this.otpUri,\n\t\t\t\totp_activated_at: null,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,kBAA2C;AAAA,EACvD,YAA6B,UAAmC,QAAgB;AAAnD,SAAA,WAAA;AAAmC,SAAA,SAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,MAAmC;AAClD,UAAMA,gBAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,SAAS,KAAK;AAAA,MACd,kBAAkB;AAAA,IAClB,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangePasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ChangePasswordCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly password: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpassword_hash: await providers.bcrypt(this.password),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,sBAA+C;AAAA,EAC3D,YAA6B,UAAmC,UAAkB;AAArD,SAAA,WAAA;AAAmC,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ChangePasswordCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangePasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ChangePasswordCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly password: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpassword_hash: await providers.bcrypt(this.password),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,sBAA+C;AAAA,EAC3D,YAA6B,UAAmC,UAAkB;AAArD,SAAA,WAAA;AAAmC,SAAA,WAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,eAAe,MAAM,UAAU,OAAO,KAAK,QAAQ;AAAA,IACnD,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangePasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ChangePasswordCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly password: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpassword_hash: await providers.bcrypt(this.password),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,sBAA+C;AAAA,EAC3D,YAA6B,UAAmC,UAAkB;AAArD,SAAA,WAAA;AAAmC,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ChangePasswordCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangePasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class ChangePasswordCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly password: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpassword_hash: await providers.bcrypt(this.password),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,sBAA+C;AAAA,EAC3D,YAA6B,UAAmC,UAAkB;AAArD,SAAA,WAAA;AAAmC,SAAA,WAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,eAAe,MAAM,UAAU,OAAO,KAAK,QAAQ;AAAA,IACnD,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangeProfileCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangeProfileCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport type ChangeProfileData = {\n\treadonly email?: string\n\treadonly name?: string | null\n}\n\nexport class ChangeProfileCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly data: ChangeProfileData) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values(this.data)\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAQO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAmC,MAAyB;AAA5D,SAAA,WAAA;AAAmC,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ChangeProfileCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangeProfileCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport type ChangeProfileData = {\n\treadonly email?: string\n\treadonly name?: string | null\n}\n\nexport class ChangeProfileCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly data: ChangeProfileData) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values(this.data)\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAQO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAmC,MAAyB;AAA5D,SAAA,WAAA;AAAmC,SAAA,OAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,MAAmC;AAC5C,UAAAA,SAAA,cAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO,KAAK,IAAI,EAChB,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangeProfileCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangeProfileCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport type ChangeProfileData = {\n\treadonly email?: string\n\treadonly name?: string | null\n}\n\nexport class ChangeProfileCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly data: ChangeProfileData) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values(this.data)\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAQO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAmC,MAAyB;AAA5D,SAAA,WAAA;AAAmC,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ChangeProfileCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/ChangeProfileCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport type ChangeProfileData = {\n\treadonly email?: string\n\treadonly name?: string | null\n}\n\nexport class ChangeProfileCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly data: ChangeProfileData) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values(this.data)\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAQO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAmC,MAAyB;AAA5D,SAAA,WAAA;AAAmC,SAAA,OAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,MAAmC;AAC5C,UAAAA,gBAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO,KAAK,IAAI,EAChB,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePersonCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { PersonRow } from '../../queries'\nimport { InsertBuilder, Literal } from '@contember/database'\nimport { MaybePassword } from '../../dtos/Password'\nimport { normalizeEmail } from '../../utils/email'\n\nexport class CreatePersonCommand implements Command<Omit<PersonRow, 'roles'>> {\n\tconstructor(private readonly data: {\n\t\tidentityId: string\n\t\temail?: string\n\t\tname?: string\n\t\tpassword: MaybePassword\n\t\tidpOnly?: boolean\n\t}) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<Omit<PersonRow, 'roles'>> {\n\t\tconst id = providers.uuid()\n\n\t\tconst password_hash = await this.data.password.getHash(providers)\n\t\tconst email = this.data.email ? normalizeEmail(this.data.email) : null\n\t\tconst name = this.data.name ?? this.data.email?.split('@')[0] ?? null\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\temail,\n\t\t\t\tname: name,\n\t\t\t\tpassword_hash,\n\t\t\t\tidentity_id: this.data.identityId,\n\t\t\t\tidp_only: this.data.idpOnly ?? false,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn {\n\t\t\tid,\n\t\t\temail,\n\t\t\tname,\n\t\t\tpassword_hash, identity_id:\n\t\t\tthis.data.identityId,\n\t\t\totp_uri: null,\n\t\t\totp_activated_at: null,\n\t\t\tdisabled_at: null,\n\t\t\tpasswordless_enabled: null,\n\t\t}\n\t}\n}\n"],"names":["email","normalizeEmail","InsertBuilder"],"mappings":";;;;AAMO,MAAM,oBAAiE;AAAA,EAC7E,YAA6B,MAM1B;AAN0B,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreatePersonCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { PersonRow } from '../../queries'\nimport { InsertBuilder, Literal } from '@contember/database'\nimport { MaybePassword } from '../../dtos/Password'\nimport { normalizeEmail } from '../../utils/email'\n\nexport class CreatePersonCommand implements Command<Omit<PersonRow, 'roles'>> {\n\tconstructor(private readonly data: {\n\t\tidentityId: string\n\t\temail?: string\n\t\tname?: string\n\t\tpassword: MaybePassword\n\t\tidpOnly?: boolean\n\t}) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<Omit<PersonRow, 'roles'>> {\n\t\tconst id = providers.uuid()\n\n\t\tconst password_hash = await this.data.password.getHash(providers)\n\t\tconst email = this.data.email ? normalizeEmail(this.data.email) : null\n\t\tconst name = this.data.name ?? this.data.email?.split('@')[0] ?? null\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\temail,\n\t\t\t\tname: name,\n\t\t\t\tpassword_hash,\n\t\t\t\tidentity_id: this.data.identityId,\n\t\t\t\tidp_only: this.data.idpOnly ?? false,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn {\n\t\t\tid,\n\t\t\temail,\n\t\t\tname,\n\t\t\tpassword_hash, identity_id:\n\t\t\tthis.data.identityId,\n\t\t\totp_uri: null,\n\t\t\totp_activated_at: null,\n\t\t\tdisabled_at: null,\n\t\t\tpasswordless_enabled: null,\n\t\t}\n\t}\n}\n"],"names":["email","normalizeEmail","InsertBuilder"],"mappings":";;;;AAMO,MAAM,oBAAiE;AAAA,EAC7E,YAA6B,MAM1B;AAN0B,SAAA,OAAA;AAAA,EAAA;AAAA,EAQ7B,MAAM,QAAQ,EAAE,IAAI,aAA8D;AAC3E,UAAA,KAAK,UAAU,KAAK;AAE1B,UAAM,gBAAgB,MAAM,KAAK,KAAK,SAAS,QAAQ,SAAS;AAC1D,UAAAA,UAAQ,KAAK,KAAK,QAAQC,qBAAe,KAAK,KAAK,KAAK,IAAI;AAC5D,UAAA,OAAO,KAAK,KAAK,QAAQ,KAAK,KAAK,OAAO,MAAM,GAAG,EAAE,CAAC,KAAK;AACjE,UAAMC,SAAAA,cAAc,OAAO,EACzB,KAAK,QAAQ,EACb,OAAO;AAAA,MACP;AAAA,MAAA,OACAF;AAAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,KAAK,KAAK;AAAA,MACvB,UAAU,KAAK,KAAK,WAAW;AAAA,IAAA,CAC/B,EACA,QAAQ,EAAE;AAEL,WAAA;AAAA,MACN;AAAA,MAAA,OACAA;AAAAA,MACA;AAAA,MACA;AAAA,MAAe,aACf,KAAK,KAAK;AAAA,MACV,SAAS;AAAA,MACT,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,sBAAsB;AAAA,IACvB;AAAA,EAAA;AAEF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePersonCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { PersonRow } from '../../queries'\nimport { InsertBuilder, Literal } from '@contember/database'\nimport { MaybePassword } from '../../dtos/Password'\nimport { normalizeEmail } from '../../utils/email'\n\nexport class CreatePersonCommand implements Command<Omit<PersonRow, 'roles'>> {\n\tconstructor(private readonly data: {\n\t\tidentityId: string\n\t\temail?: string\n\t\tname?: string\n\t\tpassword: MaybePassword\n\t\tidpOnly?: boolean\n\t}) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<Omit<PersonRow, 'roles'>> {\n\t\tconst id = providers.uuid()\n\n\t\tconst password_hash = await this.data.password.getHash(providers)\n\t\tconst email = this.data.email ? normalizeEmail(this.data.email) : null\n\t\tconst name = this.data.name ?? this.data.email?.split('@')[0] ?? null\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\temail,\n\t\t\t\tname: name,\n\t\t\t\tpassword_hash,\n\t\t\t\tidentity_id: this.data.identityId,\n\t\t\t\tidp_only: this.data.idpOnly ?? false,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn {\n\t\t\tid,\n\t\t\temail,\n\t\t\tname,\n\t\t\tpassword_hash, identity_id:\n\t\t\tthis.data.identityId,\n\t\t\totp_uri: null,\n\t\t\totp_activated_at: null,\n\t\t\tdisabled_at: null,\n\t\t\tpasswordless_enabled: null,\n\t\t}\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;AAMO,MAAM,oBAAiE;AAAA,EAC7E,YAA6B,MAM1B;AAN0B,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreatePersonCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { PersonRow } from '../../queries'\nimport { InsertBuilder, Literal } from '@contember/database'\nimport { MaybePassword } from '../../dtos/Password'\nimport { normalizeEmail } from '../../utils/email'\n\nexport class CreatePersonCommand implements Command<Omit<PersonRow, 'roles'>> {\n\tconstructor(private readonly data: {\n\t\tidentityId: string\n\t\temail?: string\n\t\tname?: string\n\t\tpassword: MaybePassword\n\t\tidpOnly?: boolean\n\t}) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<Omit<PersonRow, 'roles'>> {\n\t\tconst id = providers.uuid()\n\n\t\tconst password_hash = await this.data.password.getHash(providers)\n\t\tconst email = this.data.email ? normalizeEmail(this.data.email) : null\n\t\tconst name = this.data.name ?? this.data.email?.split('@')[0] ?? null\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\temail,\n\t\t\t\tname: name,\n\t\t\t\tpassword_hash,\n\t\t\t\tidentity_id: this.data.identityId,\n\t\t\t\tidp_only: this.data.idpOnly ?? false,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn {\n\t\t\tid,\n\t\t\temail,\n\t\t\tname,\n\t\t\tpassword_hash, identity_id:\n\t\t\tthis.data.identityId,\n\t\t\totp_uri: null,\n\t\t\totp_activated_at: null,\n\t\t\tdisabled_at: null,\n\t\t\tpasswordless_enabled: null,\n\t\t}\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;AAMO,MAAM,oBAAiE;AAAA,EAC7E,YAA6B,MAM1B;AAN0B,SAAA,OAAA;AAAA,EAAA;AAAA,EAQ7B,MAAM,QAAQ,EAAE,IAAI,aAA8D;AAC3E,UAAA,KAAK,UAAU,KAAK;AAE1B,UAAM,gBAAgB,MAAM,KAAK,KAAK,SAAS,QAAQ,SAAS;AAC1D,UAAA,QAAQ,KAAK,KAAK,QAAQ,eAAe,KAAK,KAAK,KAAK,IAAI;AAC5D,UAAA,OAAO,KAAK,KAAK,QAAQ,KAAK,KAAK,OAAO,MAAM,GAAG,EAAE,CAAC,KAAK;AACjE,UAAMA,gBAAc,OAAO,EACzB,KAAK,QAAQ,EACb,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,KAAK,KAAK;AAAA,MACvB,UAAU,KAAK,KAAK,WAAW;AAAA,IAAA,CAC/B,EACA,QAAQ,EAAE;AAEL,WAAA;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAAe,aACf,KAAK,KAAK;AAAA,MACV,SAAS;AAAA,MACT,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,sBAAsB;AAAA,IACvB;AAAA,EAAA;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePersonIdentityProviderIdentifierCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\n\nexport class CreatePersonIdentityProviderIdentifierCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly personId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_identity_provider')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;;AAGO,MAAM,8CAAuE;AAAA,EACnF,YACkB,oBACA,UACA,oBAChB;AAHgB,SAAA,qBAAA;AACA,SAAA,WAAA;AACA,SAAA,qBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreatePersonIdentityProviderIdentifierCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\n\nexport class CreatePersonIdentityProviderIdentifierCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly personId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_identity_provider')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;;AAGO,MAAM,8CAAuE;AAAA,EACnF,YACkB,oBACA,UACA,oBAChB;AAHgB,SAAA,qBAAA;AACA,SAAA,WAAA;AACA,SAAA,qBAAA;AAAA,EAAA;AAAA,EAIlB,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,KAAK,UAAU,KAAK;AAE1B,UAAMA,SAAAA,cAAc,OAAO,EACzB,KAAK,0BAA0B,EAC/B,OAAO;AAAA,MACP;AAAA,MACA,sBAAsB,KAAK;AAAA,MAC3B,WAAW,KAAK;AAAA,MAChB,qBAAqB,KAAK;AAAA,IAAA,CAC1B,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePersonIdentityProviderIdentifierCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\n\nexport class CreatePersonIdentityProviderIdentifierCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly personId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_identity_provider')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,8CAAuE;AAAA,EACnF,YACkB,oBACA,UACA,oBAChB;AAHgB,SAAA,qBAAA;AACA,SAAA,WAAA;AACA,SAAA,qBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreatePersonIdentityProviderIdentifierCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\n\nexport class CreatePersonIdentityProviderIdentifierCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly identityProviderId: string,\n\t\tprivate readonly personId: string,\n\t\tprivate readonly externalIdentifier: string,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_identity_provider')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tidentity_provider_id: this.identityProviderId,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texternal_identifier: this.externalIdentifier,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,8CAAuE;AAAA,EACnF,YACkB,oBACA,UACA,oBAChB;AAHgB,SAAA,qBAAA;AACA,SAAA,WAAA;AACA,SAAA,qBAAA;AAAA,EAAA;AAAA,EAIlB,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,KAAK,UAAU,KAAK;AAE1B,UAAMA,gBAAc,OAAO,EACzB,KAAK,0BAA0B,EAC/B,OAAO;AAAA,MACP;AAAA,MACA,sBAAsB,KAAK;AAAA,MAC3B,WAAW,KAAK;AAAA,MAChB,qBAAqB,KAAK;AAAA,IAAA,CAC1B,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisablePersonCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/DisablePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisablePersonCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tdisabled_at: new Date(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"DisablePersonCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/DisablePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisablePersonCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tdisabled_at: new Date(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,iCAAiB,KAAK;AAAA,IACtB,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisablePersonCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/DisablePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisablePersonCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tdisabled_at: new Date(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"DisablePersonCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/DisablePersonCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class DisablePersonCommand implements Command<void> {\n\tconstructor(private readonly personId: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tdisabled_at: new Date(),\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,qBAA8C;AAAA,EAC1D,YAA6B,UAAkB;AAAlB,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,iCAAiB,KAAK;AAAA,IACtB,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TogglePersonPasswordlessCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/TogglePersonPasswordlessCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class TogglePersonPasswordlessCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly value: boolean | null) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpasswordless_enabled: this.value,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,gCAAyD;AAAA,EACrE,YAA6B,UAAmC,OAAuB;AAA1D,SAAA,WAAA;AAAmC,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"TogglePersonPasswordlessCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/TogglePersonPasswordlessCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class TogglePersonPasswordlessCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly value: boolean | null) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpasswordless_enabled: this.value,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAGO,MAAM,gCAAyD;AAAA,EACrE,YAA6B,UAAmC,OAAuB;AAA1D,SAAA,WAAA;AAAmC,SAAA,QAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,MAAmC;AAClD,UAAMA,SAAAA,cAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,sBAAsB,KAAK;AAAA,IAC3B,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TogglePersonPasswordlessCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/TogglePersonPasswordlessCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class TogglePersonPasswordlessCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly value: boolean | null) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpasswordless_enabled: this.value,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,gCAAyD;AAAA,EACrE,YAA6B,UAAmC,OAAuB;AAA1D,SAAA,WAAA;AAAmC,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"TogglePersonPasswordlessCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/person/TogglePersonPasswordlessCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\n\nexport class TogglePersonPasswordlessCommand implements Command<void> {\n\tconstructor(private readonly personId: string, private readonly value: boolean | null) { }\n\n\tasync execute({ db }: Command.Args): Promise<void> {\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('person')\n\t\t\t.values({\n\t\t\t\tpasswordless_enabled: this.value,\n\t\t\t})\n\t\t\t.where({\n\t\t\t\tid: this.personId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAGO,MAAM,gCAAyD;AAAA,EACrE,YAA6B,UAAmC,OAAuB;AAA1D,SAAA,WAAA;AAAmC,SAAA,QAAA;AAAA,EAAA;AAAA,EAEhE,MAAM,QAAQ,EAAE,MAAmC;AAClD,UAAMA,gBAAc,OAAO,EACzB,MAAM,QAAQ,EACd,OAAO;AAAA,MACP,sBAAsB,KAAK;AAAA,IAC3B,CAAA,EACA,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivateOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ActivateOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ActivateOtpCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t\tprivate readonly otpHash: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_hash: this.otpHash,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","ImplementationException"],"mappings":";;;;AAIO,MAAM,mBAA4C;AAAA,EACxD,YACkB,IACA,SAChB;AAFgB,SAAA,KAAA;AACA,SAAA,UAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ActivateOtpCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ActivateOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ActivateOtpCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t\tprivate readonly otpHash: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_hash: this.otpHash,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","ImplementationException"],"mappings":";;;;AAIO,MAAM,mBAA4C;AAAA,EACxD,YACkB,IACA,SAChB;AAFgB,SAAA,KAAA;AACA,SAAA,UAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,QAAQ,MAAMA,SAAAA,cAAc,SAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAI,CAAA,EACrB,OAAO;AAAA,MACP,UAAU,KAAK;AAAA,IAAA,CACf,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAIC,WAAAA,wBAAwB;AAAA,IAAA;AAAA,EACnC;AAEF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivateOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ActivateOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ActivateOtpCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t\tprivate readonly otpHash: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_hash: this.otpHash,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,mBAA4C;AAAA,EACxD,YACkB,IACA,SAChB;AAFgB,SAAA,KAAA;AACA,SAAA,UAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ActivateOtpCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ActivateOtpCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class ActivateOtpCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t\tprivate readonly otpHash: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_hash: this.otpHash,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,mBAA4C;AAAA,EACxD,YACkB,IACA,SAChB;AAFgB,SAAA,KAAA;AACA,SAAA,UAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,QAAQ,MAAMA,gBAAc,SAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAI,CAAA,EACrB,OAAO;AAAA,MACP,UAAU,KAAK;AAAA,IAAA,CACf,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAI,wBAAwB;AAAA,IAAA;AAAA,EACnC;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePersonTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/CreatePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePersonTokenCommand } from './SavePersonTokenCommand'\nimport { PersonToken } from '../../type'\nimport { PASSWORD_RESET_EXPIRATION_MINUTES } from '../../consts/expirations'\n\nexport class CreatePersonTokenCommand implements Command<CreatePersonTokenCommand.Result> {\n\tprivate constructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tstatic createPasswordResetRequest(personId: string, expirationMinutes: number = PASSWORD_RESET_EXPIRATION_MINUTES): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'password_reset', expirationMinutes)\n\t}\n\n\tstatic createPasswordlessRequest(personId: string, expirationMinutes: number): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'passwordless', expirationMinutes)\n\t}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePersonTokenCommand.Result> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tconst result = await bus.execute(new SavePersonTokenCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.type,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn { ...result, token }\n\t}\n}\n\nnamespace CreatePersonTokenCommand {\n\texport interface Result {\n\t\treadonly id: string\n\t\treadonly token: string\n\t\treadonly expiresAt: Date\n\t}\n}\n"],"names":["PASSWORD_RESET_EXPIRATION_MINUTES","generateToken","computeTokenHash","SavePersonTokenCommand"],"mappings":";;;;;;;AAMO,MAAM,yBAA6E;AAAA,EACjF,YACU,UACA,MACA,mBAChB;AAHgB,SAAA,WAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreatePersonTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/CreatePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePersonTokenCommand } from './SavePersonTokenCommand'\nimport { PersonToken } from '../../type'\nimport { PASSWORD_RESET_EXPIRATION_MINUTES } from '../../consts/expirations'\n\nexport class CreatePersonTokenCommand implements Command<CreatePersonTokenCommand.Result> {\n\tprivate constructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tstatic createPasswordResetRequest(personId: string, expirationMinutes: number = PASSWORD_RESET_EXPIRATION_MINUTES): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'password_reset', expirationMinutes)\n\t}\n\n\tstatic createPasswordlessRequest(personId: string, expirationMinutes: number): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'passwordless', expirationMinutes)\n\t}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePersonTokenCommand.Result> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tconst result = await bus.execute(new SavePersonTokenCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.type,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn { ...result, token }\n\t}\n}\n\nnamespace CreatePersonTokenCommand {\n\texport interface Result {\n\t\treadonly id: string\n\t\treadonly token: string\n\t\treadonly expiresAt: Date\n\t}\n}\n"],"names":["PASSWORD_RESET_EXPIRATION_MINUTES","generateToken","computeTokenHash","SavePersonTokenCommand"],"mappings":";;;;;;;AAMO,MAAM,yBAA6E;AAAA,EACjF,YACU,UACA,MACA,mBAChB;AAHgB,SAAA,WAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,EAAA;AAAA,EAGlB,OAAO,2BAA2B,UAAkB,oBAA4BA,+CAA6D;AAC5I,WAAO,IAAI,yBAAyB,UAAU,kBAAkB,iBAAiB;AAAA,EAAA;AAAA,EAGlF,OAAO,0BAA0B,UAAkB,mBAAqD;AACvG,WAAO,IAAI,yBAAyB,UAAU,gBAAgB,iBAAiB;AAAA,EAAA;AAAA,EAGhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA+D;AACvF,UAAA,QAAQ,MAAMC,WAAA,cAAc,SAAS;AACrC,UAAA,YAAYC,4BAAiB,KAAK;AACxC,UAAM,SAAS,MAAM,IAAI,QAAQ,IAAIC,uBAAA;AAAA,MACpC,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IAAA,CACL;AAEM,WAAA,EAAE,GAAG,QAAQ,MAAM;AAAA,EAAA;AAE5B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePersonTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/CreatePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePersonTokenCommand } from './SavePersonTokenCommand'\nimport { PersonToken } from '../../type'\nimport { PASSWORD_RESET_EXPIRATION_MINUTES } from '../../consts/expirations'\n\nexport class CreatePersonTokenCommand implements Command<CreatePersonTokenCommand.Result> {\n\tprivate constructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tstatic createPasswordResetRequest(personId: string, expirationMinutes: number = PASSWORD_RESET_EXPIRATION_MINUTES): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'password_reset', expirationMinutes)\n\t}\n\n\tstatic createPasswordlessRequest(personId: string, expirationMinutes: number): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'passwordless', expirationMinutes)\n\t}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePersonTokenCommand.Result> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tconst result = await bus.execute(new SavePersonTokenCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.type,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn { ...result, token }\n\t}\n}\n\nnamespace CreatePersonTokenCommand {\n\texport interface Result {\n\t\treadonly id: string\n\t\treadonly token: string\n\t\treadonly expiresAt: Date\n\t}\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,yBAA6E;AAAA,EACjF,YACU,UACA,MACA,mBAChB;AAHgB,SAAA,WAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreatePersonTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/CreatePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { computeTokenHash, generateToken } from '../../utils'\nimport { SavePersonTokenCommand } from './SavePersonTokenCommand'\nimport { PersonToken } from '../../type'\nimport { PASSWORD_RESET_EXPIRATION_MINUTES } from '../../consts/expirations'\n\nexport class CreatePersonTokenCommand implements Command<CreatePersonTokenCommand.Result> {\n\tprivate constructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tstatic createPasswordResetRequest(personId: string, expirationMinutes: number = PASSWORD_RESET_EXPIRATION_MINUTES): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'password_reset', expirationMinutes)\n\t}\n\n\tstatic createPasswordlessRequest(personId: string, expirationMinutes: number): CreatePersonTokenCommand {\n\t\treturn new CreatePersonTokenCommand(personId, 'passwordless', expirationMinutes)\n\t}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<CreatePersonTokenCommand.Result> {\n\t\tconst token = await generateToken(providers)\n\t\tconst tokenHash = computeTokenHash(token)\n\t\tconst result = await bus.execute(new SavePersonTokenCommand(\n\t\t\tthis.personId,\n\t\t\ttokenHash,\n\t\t\tthis.type,\n\t\t\tthis.expirationMinutes,\n\t\t))\n\n\t\treturn { ...result, token }\n\t}\n}\n\nnamespace CreatePersonTokenCommand {\n\texport interface Result {\n\t\treadonly id: string\n\t\treadonly token: string\n\t\treadonly expiresAt: Date\n\t}\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,yBAA6E;AAAA,EACjF,YACU,UACA,MACA,mBAChB;AAHgB,SAAA,WAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,EAAA;AAAA,EAGlB,OAAO,2BAA2B,UAAkB,oBAA4B,mCAA6D;AAC5I,WAAO,IAAI,yBAAyB,UAAU,kBAAkB,iBAAiB;AAAA,EAAA;AAAA,EAGlF,OAAO,0BAA0B,UAAkB,mBAAqD;AACvG,WAAO,IAAI,yBAAyB,UAAU,gBAAgB,iBAAiB;AAAA,EAAA;AAAA,EAGhF,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA+D;AACvF,UAAA,QAAQ,MAAM,cAAc,SAAS;AACrC,UAAA,YAAY,iBAAiB,KAAK;AACxC,UAAM,SAAS,MAAM,IAAI,QAAQ,IAAI;AAAA,MACpC,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IAAA,CACL;AAEM,WAAA,EAAE,GAAG,QAAQ,MAAM;AAAA,EAAA;AAE5B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncreaseOtpAttemptCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { Literal, UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class IncreaseOtpAttemptCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_attempts: new Literal('otp_attempts + 1'),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","Literal","ImplementationException"],"mappings":";;;;AAIO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,IAChB;AADgB,SAAA,KAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IncreaseOtpAttemptCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { Literal, UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class IncreaseOtpAttemptCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_attempts: new Literal('otp_attempts + 1'),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","Literal","ImplementationException"],"mappings":";;;;AAIO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,IAChB;AADgB,SAAA,KAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,QAAQ,MAAMA,SAAAA,cAAc,SAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAI,CAAA,EACrB,OAAO;AAAA,MACP,cAAc,IAAIC,SAAAA,QAAQ,kBAAkB;AAAA,IAAA,CAC5C,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAIC,WAAAA,wBAAwB;AAAA,IAAA;AAAA,EACnC;AAEF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncreaseOtpAttemptCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { Literal, UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class IncreaseOtpAttemptCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_attempts: new Literal('otp_attempts + 1'),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,IAChB;AADgB,SAAA,KAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IncreaseOtpAttemptCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/IncreaseOtpAttemptCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { Literal, UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class IncreaseOtpAttemptCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.values({\n\t\t\t\totp_attempts: new Literal('otp_attempts + 1'),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,IAChB;AADgB,SAAA,KAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,QAAQ,MAAMA,gBAAc,SAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAI,CAAA,EACrB,OAAO;AAAA,MACP,cAAc,IAAI,QAAQ,kBAAkB;AAAA,IAAA,CAC5C,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAI,wBAAwB;AAAA,IAAA;AAAA,EACnC;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidateTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","ImplementationException"],"mappings":";;;;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"InvalidateTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder","ImplementationException"],"mappings":";;;;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,QAAQ,MAAMA,SAAAA,cAAc,OAAA,EAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAI,CAAA,EACrB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS,UAAU,IAAI;AAAA,IAAA,CACvB,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAIC,WAAAA,wBAAwB;AAAA,IAAA;AAAA,EACnC;AAEF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidateTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"InvalidateTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/InvalidateTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { UpdateBuilder } from '@contember/database'\nimport { ImplementationException } from '../../../exceptions'\n\nexport class InvalidateTokenCommand implements Command<void> {\n\tconstructor(private readonly id: string) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst count = await UpdateBuilder.create()\n\t\t\t.table('person_token')\n\t\t\t.where({ id: this.id })\n\t\t\t.where(expr => expr.isNull('used_at'))\n\t\t\t.values({\n\t\t\t\tused_at: providers.now(),\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tif (count === 0) {\n\t\t\tthrow new ImplementationException()\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAIO,MAAM,uBAAgD;AAAA,EAC5D,YAA6B,IAAY;AAAZ,SAAA,KAAA;AAAA,EAAA;AAAA,EAE7B,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,QAAQ,MAAMA,gBAAc,OAAA,EAChC,MAAM,cAAc,EACpB,MAAM,EAAE,IAAI,KAAK,GAAI,CAAA,EACrB,MAAM,CAAA,SAAQ,KAAK,OAAO,SAAS,CAAC,EACpC,OAAO;AAAA,MACP,SAAS,UAAU,IAAI;AAAA,IAAA,CACvB,EACA,QAAQ,EAAE;AAEZ,QAAI,UAAU,GAAG;AAChB,YAAM,IAAI,wBAAwB;AAAA,IAAA;AAAA,EACnC;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseOk } from '../../utils/Response'\nimport { PersonTokenQuery } from '../../queries/personToken/PersonTokenQuery'\nimport { InvalidateTokenCommand } from './InvalidateTokenCommand'\nimport { validateToken } from '../../utils'\nimport { PersonToken } from '../../type'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst now = providers.now()\n\t\tconst token = await db.createQueryHandler().fetch(PersonTokenQuery.byToken(this.token, 'password_reset'))\n\t\tconst tokenValidationResult = validateToken({ entry: token, token: this.token, now, validationType: 'token' })\n\t\tif (!tokenValidationResult.ok) {\n\t\t\treturn tokenValidationResult\n\t\t}\n\t\tawait bus.execute(new InvalidateTokenCommand(tokenValidationResult.result.id))\n\t\tawait bus.execute(new ChangePasswordCommand(tokenValidationResult.result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| PersonToken.TokenValidationError\n\nexport type ResetPasswordCommandResponse = Response<null, PersonToken.TokenValidationError>\n"],"names":["PersonTokenQuery","validateToken","InvalidateTokenCommand","ChangePasswordCommand","ResponseOk"],"mappings":";;;;;;;;;AAQO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ResetPasswordCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseOk } from '../../utils/Response'\nimport { PersonTokenQuery } from '../../queries/personToken/PersonTokenQuery'\nimport { InvalidateTokenCommand } from './InvalidateTokenCommand'\nimport { validateToken } from '../../utils'\nimport { PersonToken } from '../../type'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst now = providers.now()\n\t\tconst token = await db.createQueryHandler().fetch(PersonTokenQuery.byToken(this.token, 'password_reset'))\n\t\tconst tokenValidationResult = validateToken({ entry: token, token: this.token, now, validationType: 'token' })\n\t\tif (!tokenValidationResult.ok) {\n\t\t\treturn tokenValidationResult\n\t\t}\n\t\tawait bus.execute(new InvalidateTokenCommand(tokenValidationResult.result.id))\n\t\tawait bus.execute(new ChangePasswordCommand(tokenValidationResult.result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| PersonToken.TokenValidationError\n\nexport type ResetPasswordCommandResponse = Response<null, PersonToken.TokenValidationError>\n"],"names":["PersonTokenQuery","validateToken","InvalidateTokenCommand","ChangePasswordCommand","ResponseOk"],"mappings":";;;;;;;;;AAQO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7D,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,MAAM,UAAU,IAAI;AACpB,UAAA,QAAQ,MAAM,GAAG,qBAAqB,MAAMA,iBAAA,iBAAiB,QAAQ,KAAK,OAAO,gBAAgB,CAAC;AAClG,UAAA,wBAAwBC,WAAAA,cAAc,EAAE,OAAO,OAAO,OAAO,KAAK,OAAO,KAAK,gBAAgB,QAAA,CAAS;AACzG,QAAA,CAAC,sBAAsB,IAAI;AACvB,aAAA;AAAA,IAAA;AAER,UAAM,IAAI,QAAQ,IAAIC,uBAAAA,uBAAuB,sBAAsB,OAAO,EAAE,CAAC;AACvE,UAAA,IAAI,QAAQ,IAAIC,4CAAsB,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAE3F,WAAA,IAAIC,oBAAW,IAAI;AAAA,EAAA;AAE5B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseOk } from '../../utils/Response'\nimport { PersonTokenQuery } from '../../queries/personToken/PersonTokenQuery'\nimport { InvalidateTokenCommand } from './InvalidateTokenCommand'\nimport { validateToken } from '../../utils'\nimport { PersonToken } from '../../type'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst now = providers.now()\n\t\tconst token = await db.createQueryHandler().fetch(PersonTokenQuery.byToken(this.token, 'password_reset'))\n\t\tconst tokenValidationResult = validateToken({ entry: token, token: this.token, now, validationType: 'token' })\n\t\tif (!tokenValidationResult.ok) {\n\t\t\treturn tokenValidationResult\n\t\t}\n\t\tawait bus.execute(new InvalidateTokenCommand(tokenValidationResult.result.id))\n\t\tawait bus.execute(new ChangePasswordCommand(tokenValidationResult.result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| PersonToken.TokenValidationError\n\nexport type ResetPasswordCommandResponse = Response<null, PersonToken.TokenValidationError>\n"],"names":[],"mappings":";;;;;;;AAQO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ResetPasswordCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/ResetPasswordCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ChangePasswordCommand } from '../person/ChangePasswordCommand'\nimport { Response, ResponseOk } from '../../utils/Response'\nimport { PersonTokenQuery } from '../../queries/personToken/PersonTokenQuery'\nimport { InvalidateTokenCommand } from './InvalidateTokenCommand'\nimport { validateToken } from '../../utils'\nimport { PersonToken } from '../../type'\n\nexport class ResetPasswordCommand implements Command<ResetPasswordCommandResponse> {\n\tconstructor(private readonly token: string, private readonly password: string) {}\n\n\tasync execute({ db, providers, bus }: Command.Args): Promise<ResetPasswordCommandResponse> {\n\t\tconst now = providers.now()\n\t\tconst token = await db.createQueryHandler().fetch(PersonTokenQuery.byToken(this.token, 'password_reset'))\n\t\tconst tokenValidationResult = validateToken({ entry: token, token: this.token, now, validationType: 'token' })\n\t\tif (!tokenValidationResult.ok) {\n\t\t\treturn tokenValidationResult\n\t\t}\n\t\tawait bus.execute(new InvalidateTokenCommand(tokenValidationResult.result.id))\n\t\tawait bus.execute(new ChangePasswordCommand(tokenValidationResult.result.person_id, this.password))\n\n\t\treturn new ResponseOk(null)\n\t}\n}\nexport type ResetPasswordCommandErrorCode =\n\t| PersonToken.TokenValidationError\n\nexport type ResetPasswordCommandResponse = Response<null, PersonToken.TokenValidationError>\n"],"names":[],"mappings":";;;;;;;AAQO,MAAM,qBAAsE;AAAA,EAClF,YAA6B,OAAgC,UAAkB;AAAlD,SAAA,QAAA;AAAgC,SAAA,WAAA;AAAA,EAAA;AAAA,EAE7D,MAAM,QAAQ,EAAE,IAAI,WAAW,OAA4D;AACpF,UAAA,MAAM,UAAU,IAAI;AACpB,UAAA,QAAQ,MAAM,GAAG,qBAAqB,MAAM,iBAAiB,QAAQ,KAAK,OAAO,gBAAgB,CAAC;AAClG,UAAA,wBAAwB,cAAc,EAAE,OAAO,OAAO,OAAO,KAAK,OAAO,KAAK,gBAAgB,QAAA,CAAS;AACzG,QAAA,CAAC,sBAAsB,IAAI;AACvB,aAAA;AAAA,IAAA;AAER,UAAM,IAAI,QAAQ,IAAI,uBAAuB,sBAAsB,OAAO,EAAE,CAAC;AACvE,UAAA,IAAI,QAAQ,IAAI,sBAAsB,sBAAsB,OAAO,WAAW,KAAK,QAAQ,CAAC;AAE3F,WAAA,IAAI,WAAW,IAAI;AAAA,EAAA;AAE5B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavePersonTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/SavePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\nimport { PersonToken } from '../../type'\n\nclass SavePersonTokenCommand implements Command<SavePersonTokenCommand.Result> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<SavePersonTokenCommand.Result> {\n\t\tconst id = providers.uuid()\n\t\tconst expiresAt = plusMinutes(providers.now(), this.expirationMinutes)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_token')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: expiresAt,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t\ttype: this.type,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn { id, expiresAt }\n\t}\n}\n\nnamespace SavePersonTokenCommand {\n\texport interface Result {\n\t\tid: string\n\t\texpiresAt: Date\n\t}\n}\n\nexport { SavePersonTokenCommand }\n"],"names":["plusMinutes","InsertBuilder"],"mappings":";;;;AAMA,MAAM,uBAAyE;AAAA,EAC9E,YACkB,UACA,WACA,MACA,mBAChB;AAJgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SavePersonTokenCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/SavePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\nimport { PersonToken } from '../../type'\n\nclass SavePersonTokenCommand implements Command<SavePersonTokenCommand.Result> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<SavePersonTokenCommand.Result> {\n\t\tconst id = providers.uuid()\n\t\tconst expiresAt = plusMinutes(providers.now(), this.expirationMinutes)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_token')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: expiresAt,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t\ttype: this.type,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn { id, expiresAt }\n\t}\n}\n\nnamespace SavePersonTokenCommand {\n\texport interface Result {\n\t\tid: string\n\t\texpiresAt: Date\n\t}\n}\n\nexport { SavePersonTokenCommand }\n"],"names":["plusMinutes","InsertBuilder"],"mappings":";;;;AAMA,MAAM,uBAAyE;AAAA,EAC9E,YACkB,UACA,WACA,MACA,mBAChB;AAJgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAAmE;AAChF,UAAA,KAAK,UAAU,KAAK;AAC1B,UAAM,YAAYA,KAAAA,YAAY,UAAU,IAAI,GAAG,KAAK,iBAAiB;AACrE,UAAMC,SAAAA,cAAc,OAAO,EACzB,KAAK,cAAc,EACnB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY;AAAA,MACZ,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,IAAA,CACX,EACA,QAAQ,EAAE;AAEL,WAAA,EAAE,IAAI,UAAU;AAAA,EAAA;AAEzB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavePersonTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/SavePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\nimport { PersonToken } from '../../type'\n\nclass SavePersonTokenCommand implements Command<SavePersonTokenCommand.Result> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<SavePersonTokenCommand.Result> {\n\t\tconst id = providers.uuid()\n\t\tconst expiresAt = plusMinutes(providers.now(), this.expirationMinutes)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_token')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: expiresAt,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t\ttype: this.type,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn { id, expiresAt }\n\t}\n}\n\nnamespace SavePersonTokenCommand {\n\texport interface Result {\n\t\tid: string\n\t\texpiresAt: Date\n\t}\n}\n\nexport { SavePersonTokenCommand }\n"],"names":["InsertBuilder"],"mappings":";;AAMA,MAAM,uBAAyE;AAAA,EAC9E,YACkB,UACA,WACA,MACA,mBAChB;AAJgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SavePersonTokenCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/personToken/SavePersonTokenCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { InsertBuilder } from '@contember/database'\nimport { plusMinutes } from '../../utils/time'\nimport { TokenHash } from '../../utils'\nimport { PersonToken } from '../../type'\n\nclass SavePersonTokenCommand implements Command<SavePersonTokenCommand.Result> {\n\tconstructor(\n\t\tprivate readonly personId: string,\n\t\tprivate readonly tokenHash: TokenHash,\n\t\tprivate readonly type: PersonToken.Type,\n\t\tprivate readonly expirationMinutes: number,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<SavePersonTokenCommand.Result> {\n\t\tconst id = providers.uuid()\n\t\tconst expiresAt = plusMinutes(providers.now(), this.expirationMinutes)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_token')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\ttoken_hash: this.tokenHash,\n\t\t\t\tperson_id: this.personId,\n\t\t\t\texpires_at: expiresAt,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tused_at: null,\n\t\t\t\ttype: this.type,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn { id, expiresAt }\n\t}\n}\n\nnamespace SavePersonTokenCommand {\n\texport interface Result {\n\t\tid: string\n\t\texpiresAt: Date\n\t}\n}\n\nexport { SavePersonTokenCommand }\n"],"names":["InsertBuilder"],"mappings":";;AAMA,MAAM,uBAAyE;AAAA,EAC9E,YACkB,UACA,WACA,MACA,mBAChB;AAJgB,SAAA,WAAA;AACA,SAAA,YAAA;AACA,SAAA,OAAA;AACA,SAAA,oBAAA;AAAA,EAAA;AAAA,EAGlB,MAAM,QAAQ,EAAE,IAAI,aAAmE;AAChF,UAAA,KAAK,UAAU,KAAK;AAC1B,UAAM,YAAY,YAAY,UAAU,IAAI,GAAG,KAAK,iBAAiB;AACrE,UAAMA,gBAAc,OAAO,EACzB,KAAK,cAAc,EACnB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,WAAW,KAAK;AAAA,MAChB,YAAY;AAAA,MACZ,YAAY,UAAU,IAAI;AAAA,MAC1B,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,IAAA,CACX,EACA,QAAQ,EAAE;AAEL,WAAA,EAAE,IAAI,UAAU;AAAA,EAAA;AAEzB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,EAAA;AAAA,EAElG,MAAa,QAAQ,EAAE,IAAI,aAAmD;AACvE,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,SAAS,MAAMA,uBAAc,SACjC,KAAK,SAAS,EACd,OAAO;AAAA,MACP;AAAA,MACA,MAAM,KAAK,QAAQ;AAAA,MACnB,MAAM,KAAK,QAAQ;AAAA,MACnB,QAAQ,KAAK,QAAQ;AAAA,MACrB,YAAY,KAAK;AAAA,IAAA,CACjB,EACA,WAAWC,4BAAmB,SAAS,EACvC,QAAQ,EAAE;AACL,WAAA,SAAS,IAAI,KAAK;AAAA,EAAA;AAE3B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"CreateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/CreateProjectCommand.ts"],"sourcesContent":["import { InsertBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\nimport { ConflictActionType } from '@contember/database'\n\nexport class CreateProjectCommand implements Command<string | null> {\n\tconstructor(private readonly project: Pick<Project, 'name' | 'slug' | 'config'>, private readonly timestamp: Date) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<string | null> {\n\t\tconst id = providers.uuid()\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('project')\n\t\t\t.values({\n\t\t\t\tid: id,\n\t\t\t\tname: this.project.name,\n\t\t\t\tslug: this.project.slug,\n\t\t\t\tconfig: this.project.config as any,\n\t\t\t\tupdated_at: this.timestamp,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.doNothing)\n\t\t\t.execute(db)\n\t\treturn result > 0 ? id : null\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAKO,MAAM,qBAAuD;AAAA,EACnE,YAA6B,SAAqE,WAAiB;AAAtF,SAAA,UAAA;AAAqE,SAAA,YAAA;AAAA,EAAA;AAAA,EAElG,MAAa,QAAQ,EAAE,IAAI,aAAmD;AACvE,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,SAAS,MAAMA,gBAAc,SACjC,KAAK,SAAS,EACd,OAAO;AAAA,MACP;AAAA,MACA,MAAM,KAAK,QAAQ;AAAA,MACnB,MAAM,KAAK,QAAQ;AAAA,MACnB,QAAQ,KAAK,QAAQ;AAAA,MACrB,YAAY,KAAK;AAAA,IAAA,CACjB,EACA,WAAW,mBAAmB,SAAS,EACvC,QAAQ,EAAE;AACL,WAAA,SAAS,IAAI,KAAK;AAAA,EAAA;AAE3B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetProjectSecretCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SetProjectSecretCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType"],"mappings":";;;AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,EAAA;AAAA,EAE7E,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,EAAE,OAAO,QAAQ,IAAI,MAAM,UAAU,QAAQ,KAAK,KAAK;AAC7D,UAAM,KAAKA,SAAAA,cAAc,OAAA,EACvB,KAAK,gBAAgB,EACrB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,KAAK,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,MAC1B,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B,EACA,WAAWC,SAAA,mBAAmB,QAAQ,CAAC,cAAc,KAAK,GAAG;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B;AACI,UAAA,GAAG,QAAQ,EAAE;AAAA,EAAA;AAErB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetProjectSecretCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"SetProjectSecretCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/SetProjectSecretCommand.ts"],"sourcesContent":["import { Command } from '../Command'\nimport { ConflictActionType, InsertBuilder } from '@contember/database'\n\nexport class SetProjectSecretCommand implements Command<void> {\n\tconstructor(private readonly projectId: string, private key: string, private value: Buffer) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst id = providers.uuid()\n\t\tconst { value, version } = await providers.encrypt(this.value)\n\t\tconst qb = InsertBuilder.create()\n\t\t\t.into('project_secret')\n\t\t\t.values({\n\t\t\t\tid,\n\t\t\t\tproject_id: this.projectId,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['project_id', 'key'], {\n\t\t\t\tvalue,\n\t\t\t\tversion,\n\t\t\t\tupdated_at: providers.now(),\n\t\t\t})\n\t\tawait qb.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,wBAAiD;AAAA,EAC7D,YAA6B,WAA2B,KAAqB,OAAe;AAA/D,SAAA,YAAA;AAA2B,SAAA,MAAA;AAAqB,SAAA,QAAA;AAAA,EAAA;AAAA,EAE7E,MAAM,QAAQ,EAAE,IAAI,aAA0C;AACvD,UAAA,KAAK,UAAU,KAAK;AACpB,UAAA,EAAE,OAAO,QAAQ,IAAI,MAAM,UAAU,QAAQ,KAAK,KAAK;AAC7D,UAAM,KAAKA,gBAAc,OAAA,EACvB,KAAK,gBAAgB,EACrB,OAAO;AAAA,MACP;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,KAAK,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,MAC1B,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B,EACA,WAAW,mBAAmB,QAAQ,CAAC,cAAc,KAAK,GAAG;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,YAAY,UAAU,IAAI;AAAA,IAAA,CAC1B;AACI,UAAA,GAAG,QAAQ,EAAE;AAAA,EAAA;AAErB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateProjectCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,EAAA;AAAA,EAExD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,SAA8B;AAAA,MACnC,YAAY;AAAA,IACb;AACI,QAAA,KAAK,KAAK,WAAW,QAAW;AAC5B,aAAA,SAAS,KAAK,KAAK;AAAA,IAAA;AAEvB,QAAA,KAAK,KAAK,SAAS,QAAW;AAC1B,aAAA,OAAO,KAAK,KAAK;AAAA,IAAA;AAGnB,UAAAA,SAAA,cAAc,SAClB,MAAM,SAAS,EACf,OAAO,MAAM,EACb,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateProjectCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/project/UpdateProjectCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { Command } from '../Command'\nimport { Project } from '../../type'\n\nexport class UpdateProjectCommand implements Command<void> {\n\tconstructor(private projectId: string, private readonly data: Partial<Pick<Project, 'name' | 'config'>>) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tupdated_at: 'now',\n\t\t}\n\t\tif (this.data.config !== undefined) {\n\t\t\tvalues.config = this.data.config as any\n\t\t}\n\t\tif (this.data.name !== undefined) {\n\t\t\tvalues.name = this.data.name\n\t\t}\n\n\t\tawait UpdateBuilder.create()\n\t\t\t.table('project')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tid: this.projectId,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";AAIO,MAAM,qBAA8C;AAAA,EAC1D,YAAoB,WAAoC,MAAiD;AAArF,SAAA,YAAA;AAAoC,SAAA,OAAA;AAAA,EAAA;AAAA,EAExD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,SAA8B;AAAA,MACnC,YAAY;AAAA,IACb;AACI,QAAA,KAAK,KAAK,WAAW,QAAW;AAC5B,aAAA,SAAS,KAAK,KAAK;AAAA,IAAA;AAEvB,QAAA,KAAK,KAAK,SAAS,QAAW;AAC1B,aAAA,OAAO,KAAK,KAAK;AAAA,IAAA;AAGnB,UAAAA,gBAAc,SAClB,MAAM,SAAS,EACf,OAAO,MAAM,EACb,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|