@contember/engine-tenant-api 2.2.0-alpha.1 → 2.2.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +60 -7
- package/dist/development/index.cjs +69 -0
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +71 -2
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/TenantContainer.cjs +39 -10
- package/dist/development/src/TenantContainer.cjs.map +1 -1
- package/dist/development/src/TenantContainer.js +39 -10
- package/dist/development/src/TenantContainer.js.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.cjs +9 -7
- package/dist/development/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/development/src/bridges/system/IdentityFetcher.js +9 -7
- package/dist/development/src/bridges/system/IdentityFetcher.js.map +1 -1
- package/dist/development/src/migrations/2026-06-18-120000-idp-claim-mapping.cjs +10 -0
- package/dist/development/src/migrations/2026-06-18-120000-idp-claim-mapping.cjs.map +1 -0
- package/dist/development/src/migrations/2026-06-18-120000-idp-claim-mapping.js +11 -0
- package/dist/development/src/migrations/2026-06-18-120000-idp-claim-mapping.js.map +1 -0
- package/dist/development/src/migrations/2026-08-03-120000-person-enable-auth-log.cjs +9 -0
- package/dist/development/src/migrations/2026-08-03-120000-person-enable-auth-log.cjs.map +1 -0
- package/dist/development/src/migrations/2026-08-03-120000-person-enable-auth-log.js +10 -0
- package/dist/development/src/migrations/2026-08-03-120000-person-enable-auth-log.js.map +1 -0
- package/dist/development/src/migrations/2026-08-04-120000-config-panel.cjs +11 -0
- package/dist/development/src/migrations/2026-08-04-120000-config-panel.cjs.map +1 -0
- package/dist/development/src/migrations/2026-08-04-120000-config-panel.js +12 -0
- package/dist/development/src/migrations/2026-08-04-120000-config-panel.js.map +1 -0
- package/dist/development/src/migrations/2026-09-04-120000-idp-disable-local-authentication.cjs +18 -0
- package/dist/development/src/migrations/2026-09-04-120000-idp-disable-local-authentication.cjs.map +1 -0
- package/dist/development/src/migrations/2026-09-04-120000-idp-disable-local-authentication.js +19 -0
- package/dist/development/src/migrations/2026-09-04-120000-idp-disable-local-authentication.js.map +1 -0
- package/dist/development/src/migrations/2026-09-11-120000-custom-role.cjs +18 -0
- package/dist/development/src/migrations/2026-09-11-120000-custom-role.cjs.map +1 -0
- package/dist/development/src/migrations/2026-09-11-120000-custom-role.js +19 -0
- package/dist/development/src/migrations/2026-09-11-120000-custom-role.js.map +1 -0
- package/dist/development/src/migrations/runner.cjs +17 -5
- package/dist/development/src/migrations/runner.cjs.map +1 -1
- package/dist/development/src/migrations/runner.js +17 -5
- package/dist/development/src/migrations/runner.js.map +1 -1
- package/dist/development/src/migrations/snapshot.cjs +22 -2
- package/dist/development/src/migrations/snapshot.cjs.map +1 -1
- package/dist/development/src/migrations/snapshot.js +22 -2
- package/dist/development/src/migrations/snapshot.js.map +1 -1
- package/dist/development/src/model/authorization/CustomRoleAuthorizator.cjs +65 -0
- package/dist/development/src/model/authorization/CustomRoleAuthorizator.cjs.map +1 -0
- package/dist/development/src/model/authorization/CustomRoleAuthorizator.js +65 -0
- package/dist/development/src/model/authorization/CustomRoleAuthorizator.js.map +1 -0
- package/dist/development/src/model/authorization/CustomRolePermissions.cjs +404 -0
- package/dist/development/src/model/authorization/CustomRolePermissions.cjs.map +1 -0
- package/dist/development/src/model/authorization/CustomRolePermissions.js +387 -0
- package/dist/development/src/model/authorization/CustomRolePermissions.js.map +1 -0
- package/dist/development/src/model/authorization/PermissionActions.cjs +19 -16
- package/dist/development/src/model/authorization/PermissionActions.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionActions.js +19 -16
- package/dist/development/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.cjs +20 -2
- package/dist/development/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionContextFactory.js +20 -2
- package/dist/development/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.cjs +32 -24
- package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/development/src/model/authorization/PermissionsFactory.js +33 -25
- package/dist/development/src/model/authorization/PermissionsFactory.js.map +1 -1
- package/dist/development/src/model/authorization/Roles.cjs +8 -0
- package/dist/development/src/model/authorization/Roles.cjs.map +1 -1
- package/dist/development/src/model/authorization/Roles.js +8 -0
- package/dist/development/src/model/authorization/Roles.js.map +1 -1
- package/dist/development/src/model/authorization/TargetIdentityPermission.cjs +35 -0
- package/dist/development/src/model/authorization/TargetIdentityPermission.cjs.map +1 -0
- package/dist/development/src/model/authorization/TargetIdentityPermission.js +35 -0
- package/dist/development/src/model/authorization/TargetIdentityPermission.js.map +1 -0
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.cjs +19 -0
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.js +19 -0
- package/dist/development/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.cjs +4 -2
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.js +5 -3
- package/dist/development/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.cjs +9 -10
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.js +10 -11
- package/dist/development/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
- package/dist/development/src/model/commands/authLog/CreateAuthLogEntryCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/authLog/CreateAuthLogEntryCommand.js.map +1 -1
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs +5 -3
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js +5 -3
- package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -1
- package/dist/development/src/model/commands/customRole/CreateCustomRoleCommand.cjs +23 -0
- package/dist/development/src/model/commands/customRole/CreateCustomRoleCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/customRole/CreateCustomRoleCommand.js +23 -0
- package/dist/development/src/model/commands/customRole/CreateCustomRoleCommand.js.map +1 -0
- package/dist/development/src/model/commands/customRole/DeleteCustomRoleCommand.cjs +14 -0
- package/dist/development/src/model/commands/customRole/DeleteCustomRoleCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/customRole/DeleteCustomRoleCommand.js +14 -0
- package/dist/development/src/model/commands/customRole/DeleteCustomRoleCommand.js.map +1 -0
- package/dist/development/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.cjs +16 -0
- package/dist/development/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.js +16 -0
- package/dist/development/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.js.map +1 -0
- package/dist/development/src/model/commands/customRole/UpdateCustomRoleCommand.cjs +19 -0
- package/dist/development/src/model/commands/customRole/UpdateCustomRoleCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/customRole/UpdateCustomRoleCommand.js +19 -0
- package/dist/development/src/model/commands/customRole/UpdateCustomRoleCommand.js.map +1 -0
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.cjs +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.js +1 -1
- package/dist/development/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
- package/dist/development/src/model/commands/idp/ClaimIdpRevalidationCommand.cjs +3 -7
- package/dist/development/src/model/commands/idp/ClaimIdpRevalidationCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/ClaimIdpRevalidationCommand.js +3 -7
- package/dist/development/src/model/commands/idp/ClaimIdpRevalidationCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpCommand.cjs +8 -2
- package/dist/development/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpCommand.js +8 -2
- package/dist/development/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpSessionCommand.cjs +4 -1
- package/dist/development/src/model/commands/idp/CreateIdpSessionCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/CreateIdpSessionCommand.js +5 -2
- package/dist/development/src/model/commands/idp/CreateIdpSessionCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.cjs +6 -2
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.js +6 -2
- package/dist/development/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpSessionCommand.cjs +2 -1
- package/dist/development/src/model/commands/idp/UpdateIdpSessionCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/idp/UpdateIdpSessionCommand.js +3 -2
- package/dist/development/src/model/commands/idp/UpdateIdpSessionCommand.js.map +1 -1
- package/dist/development/src/model/commands/membership/{RemoveProjectMembershipsCommand.cjs → RemoveProjectMembershipCommand.cjs} +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/membership/{RemoveProjectMembershipsCommand.js → RemoveProjectMembershipCommand.js} +1 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipCommand.js.map +1 -0
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.cjs +2 -2
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.js +1 -1
- package/dist/development/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.cjs +1 -0
- package/dist/development/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/CreatePersonCommand.js +1 -0
- package/dist/development/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/development/src/model/commands/person/EnablePersonCommand.cjs +17 -0
- package/dist/development/src/model/commands/person/EnablePersonCommand.cjs.map +1 -0
- package/dist/development/src/model/commands/person/EnablePersonCommand.js +17 -0
- package/dist/development/src/model/commands/person/EnablePersonCommand.js.map +1 -0
- package/dist/development/src/model/commands/person/SetMfaGraceUntilCommand.cjs +3 -3
- package/dist/development/src/model/commands/person/SetMfaGraceUntilCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/person/SetMfaGraceUntilCommand.js +4 -4
- package/dist/development/src/model/commands/person/SetMfaGraceUntilCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs +2 -3
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js +2 -3
- package/dist/development/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/SaveEmailOtpTokenCommand.cjs +3 -3
- package/dist/development/src/model/commands/personToken/SaveEmailOtpTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/SaveEmailOtpTokenCommand.js +4 -4
- package/dist/development/src/model/commands/personToken/SaveEmailOtpTokenCommand.js.map +1 -1
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs +12 -6
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js +13 -7
- package/dist/development/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -1
- package/dist/development/src/model/commands/rateLimit/RecordRateLimitEventCommand.cjs +1 -2
- package/dist/development/src/model/commands/rateLimit/RecordRateLimitEventCommand.cjs.map +1 -1
- package/dist/development/src/model/commands/rateLimit/RecordRateLimitEventCommand.js +1 -2
- package/dist/development/src/model/commands/rateLimit/RecordRateLimitEventCommand.js.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.cjs +2 -1
- package/dist/development/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/development/src/model/mailing/UserMailer.js +2 -1
- package/dist/development/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs +8 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js +9 -2
- package/dist/development/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeySessionsQuery.cjs +2 -3
- package/dist/development/src/model/queries/apiKey/ApiKeySessionsQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/apiKey/ApiKeySessionsQuery.js +2 -3
- package/dist/development/src/model/queries/apiKey/ApiKeySessionsQuery.js.map +1 -1
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.cjs +12 -10
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.js +12 -10
- package/dist/development/src/model/queries/authLog/NextLoginAttemptQuery.js.map +1 -1
- package/dist/development/src/model/queries/authLog/NextMailAttemptQuery.cjs +10 -8
- package/dist/development/src/model/queries/authLog/NextMailAttemptQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/authLog/NextMailAttemptQuery.js +10 -8
- package/dist/development/src/model/queries/authLog/NextMailAttemptQuery.js.map +1 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs +4 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js +4 -0
- package/dist/development/src/model/queries/configuration/ConfigurationQuery.js.map +1 -1
- package/dist/development/src/model/queries/customRole/CustomRolesQuery.cjs +23 -0
- package/dist/development/src/model/queries/customRole/CustomRolesQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/customRole/CustomRolesQuery.js +23 -0
- package/dist/development/src/model/queries/customRole/CustomRolesQuery.js.map +1 -0
- package/dist/development/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.cjs +15 -0
- package/dist/development/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.js +15 -0
- package/dist/development/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.js.map +1 -0
- package/dist/development/src/model/queries/identity/IdentityQuery.cjs +7 -2
- package/dist/development/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/identity/IdentityQuery.js +7 -2
- package/dist/development/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/LocalAuthDisablingIdpsQuery.cjs +21 -0
- package/dist/development/src/model/queries/idp/LocalAuthDisablingIdpsQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/idp/LocalAuthDisablingIdpsQuery.js +21 -0
- package/dist/development/src/model/queries/idp/LocalAuthDisablingIdpsQuery.js.map +1 -0
- package/dist/development/src/model/queries/idp/PersonIdentityProvidersQuery.cjs +1 -1
- package/dist/development/src/model/queries/idp/PersonIdentityProvidersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/PersonIdentityProvidersQuery.js +1 -1
- package/dist/development/src/model/queries/idp/PersonIdentityProvidersQuery.js.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.cjs +3 -3
- package/dist/development/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/development/src/model/queries/idp/helpers.js +3 -3
- package/dist/development/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/development/src/model/queries/membership/IdentityHasProjectMembershipsQuery.cjs +15 -0
- package/dist/development/src/model/queries/membership/IdentityHasProjectMembershipsQuery.cjs.map +1 -0
- package/dist/development/src/model/queries/membership/IdentityHasProjectMembershipsQuery.js +15 -0
- package/dist/development/src/model/queries/membership/IdentityHasProjectMembershipsQuery.js.map +1 -0
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.cjs +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.js +1 -1
- package/dist/development/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs +2 -2
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js +2 -2
- package/dist/development/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js +1 -1
- package/dist/development/src/model/queries/personToken/PersonTokenQuery.js.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.cjs +4 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.js +4 -1
- package/dist/development/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
- package/dist/development/src/model/queries/rateLimit/RateLimitCountQuery.cjs +3 -3
- package/dist/development/src/model/queries/rateLimit/RateLimitCountQuery.cjs.map +1 -1
- package/dist/development/src/model/queries/rateLimit/RateLimitCountQuery.js +3 -3
- package/dist/development/src/model/queries/rateLimit/RateLimitCountQuery.js.map +1 -1
- package/dist/development/src/model/service/AuthLogService.cjs +8 -2
- package/dist/development/src/model/service/AuthLogService.cjs.map +1 -1
- package/dist/development/src/model/service/AuthLogService.js +8 -2
- package/dist/development/src/model/service/AuthLogService.js.map +1 -1
- package/dist/development/src/model/service/AuthPolicyManager.cjs +2 -1
- package/dist/development/src/model/service/AuthPolicyManager.cjs.map +1 -1
- package/dist/development/src/model/service/AuthPolicyManager.js +2 -1
- package/dist/development/src/model/service/AuthPolicyManager.js.map +1 -1
- package/dist/development/src/model/service/AuthPolicyResolver.cjs +2 -1
- package/dist/development/src/model/service/AuthPolicyResolver.cjs.map +1 -1
- package/dist/development/src/model/service/AuthPolicyResolver.js +2 -1
- package/dist/development/src/model/service/AuthPolicyResolver.js.map +1 -1
- package/dist/development/src/model/service/CustomRoleManager.cjs +170 -0
- package/dist/development/src/model/service/CustomRoleManager.cjs.map +1 -0
- package/dist/development/src/model/service/CustomRoleManager.js +170 -0
- package/dist/development/src/model/service/CustomRoleManager.js.map +1 -0
- package/dist/development/src/model/service/EmailChangeManager.cjs +5 -4
- package/dist/development/src/model/service/EmailChangeManager.cjs.map +1 -1
- package/dist/development/src/model/service/EmailChangeManager.js +5 -4
- package/dist/development/src/model/service/EmailChangeManager.js.map +1 -1
- package/dist/development/src/model/service/EmailOtpManager.cjs +0 -1
- package/dist/development/src/model/service/EmailOtpManager.cjs.map +1 -1
- package/dist/development/src/model/service/EmailOtpManager.js +0 -1
- package/dist/development/src/model/service/EmailOtpManager.js.map +1 -1
- package/dist/development/src/model/service/EmailValidator.cjs +2 -1
- package/dist/development/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/development/src/model/service/EmailValidator.js +2 -1
- package/dist/development/src/model/service/EmailValidator.js.map +1 -1
- package/dist/development/src/model/service/EmailVerificationManager.cjs +5 -4
- package/dist/development/src/model/service/EmailVerificationManager.cjs.map +1 -1
- package/dist/development/src/model/service/EmailVerificationManager.js +5 -4
- package/dist/development/src/model/service/EmailVerificationManager.js.map +1 -1
- package/dist/development/src/model/service/GlobalRoleValidator.cjs +35 -0
- package/dist/development/src/model/service/GlobalRoleValidator.cjs.map +1 -0
- package/dist/development/src/model/service/GlobalRoleValidator.js +35 -0
- package/dist/development/src/model/service/GlobalRoleValidator.js.map +1 -0
- package/dist/development/src/model/service/IDPSignInManager.cjs +52 -16
- package/dist/development/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/IDPSignInManager.js +52 -16
- package/dist/development/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/development/src/model/service/InviteManager.cjs +2 -1
- package/dist/development/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/development/src/model/service/InviteManager.js +2 -1
- package/dist/development/src/model/service/InviteManager.js.map +1 -1
- package/dist/development/src/model/service/PanelAccessResolver.cjs +32 -0
- package/dist/development/src/model/service/PanelAccessResolver.cjs.map +1 -0
- package/dist/development/src/model/service/PanelAccessResolver.js +32 -0
- package/dist/development/src/model/service/PanelAccessResolver.js.map +1 -0
- package/dist/development/src/model/service/PasswordChangeManager.cjs +2 -1
- package/dist/development/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordChangeManager.js +2 -1
- package/dist/development/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.cjs +9 -3
- package/dist/development/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordResetManager.js +9 -3
- package/dist/development/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs +24 -6
- package/dist/development/src/model/service/PasswordlessSignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/PasswordlessSignInManager.js +24 -6
- package/dist/development/src/model/service/PasswordlessSignInManager.js.map +1 -1
- package/dist/development/src/model/service/PersonAccessManager.cjs +10 -2
- package/dist/development/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonAccessManager.js +10 -2
- package/dist/development/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/development/src/model/service/PersonManager.cjs +2 -1
- package/dist/development/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/development/src/model/service/PersonManager.js +2 -1
- package/dist/development/src/model/service/PersonManager.js.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.cjs +2 -1
- package/dist/development/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/development/src/model/service/ProjectMemberManager.js +2 -1
- package/dist/development/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/development/src/model/service/RateLimiter.cjs +1 -2
- package/dist/development/src/model/service/RateLimiter.cjs.map +1 -1
- package/dist/development/src/model/service/RateLimiter.js +1 -2
- package/dist/development/src/model/service/RateLimiter.js.map +1 -1
- package/dist/development/src/model/service/RolesManager.cjs +17 -18
- package/dist/development/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/development/src/model/service/RolesManager.js +18 -19
- package/dist/development/src/model/service/RolesManager.js.map +1 -1
- package/dist/development/src/model/service/SecretsManager.cjs +2 -1
- package/dist/development/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/development/src/model/service/SecretsManager.js +2 -1
- package/dist/development/src/model/service/SecretsManager.js.map +1 -1
- package/dist/development/src/model/service/SignInManager.cjs +9 -5
- package/dist/development/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignInManager.js +9 -5
- package/dist/development/src/model/service/SignInManager.js.map +1 -1
- package/dist/development/src/model/service/SignOutManager.cjs +2 -1
- package/dist/development/src/model/service/SignOutManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignOutManager.js +2 -1
- package/dist/development/src/model/service/SignOutManager.js.map +1 -1
- package/dist/development/src/model/service/SignUpManager.cjs +15 -7
- package/dist/development/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/development/src/model/service/SignUpManager.js +15 -7
- package/dist/development/src/model/service/SignUpManager.js.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.cjs +56 -40
- package/dist/development/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/development/src/model/service/apiKey/ApiKeyManager.js +57 -41
- 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/apiKey/UnpersistedApiKeyManager.cjs +10 -1
- package/dist/development/src/model/service/apiKey/UnpersistedApiKeyManager.cjs.map +1 -1
- package/dist/development/src/model/service/apiKey/UnpersistedApiKeyManager.js +11 -2
- package/dist/development/src/model/service/apiKey/UnpersistedApiKeyManager.js.map +1 -1
- package/dist/development/src/model/service/idp/ClaimMapping.cjs +187 -0
- package/dist/development/src/model/service/idp/ClaimMapping.cjs.map +1 -0
- package/dist/development/src/model/service/idp/ClaimMapping.js +170 -0
- package/dist/development/src/model/service/idp/ClaimMapping.js.map +1 -0
- package/dist/development/src/model/service/idp/ClaimMappingEvaluator.cjs +155 -0
- package/dist/development/src/model/service/idp/ClaimMappingEvaluator.cjs.map +1 -0
- package/dist/development/src/model/service/idp/ClaimMappingEvaluator.js +155 -0
- package/dist/development/src/model/service/idp/ClaimMappingEvaluator.js.map +1 -0
- package/dist/development/src/model/service/idp/ClaimMappingValidation.cjs +83 -0
- package/dist/development/src/model/service/idp/ClaimMappingValidation.cjs.map +1 -0
- package/dist/development/src/model/service/idp/ClaimMappingValidation.js +83 -0
- package/dist/development/src/model/service/idp/ClaimMappingValidation.js.map +1 -0
- package/dist/development/src/model/service/idp/IDPClaimSyncService.cjs +261 -0
- package/dist/development/src/model/service/idp/IDPClaimSyncService.cjs.map +1 -0
- package/dist/development/src/model/service/idp/IDPClaimSyncService.js +261 -0
- package/dist/development/src/model/service/idp/IDPClaimSyncService.js.map +1 -0
- package/dist/development/src/model/service/idp/IDPManager.cjs +98 -21
- package/dist/development/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IDPManager.js +98 -21
- package/dist/development/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/development/src/model/service/idp/IdpSessionRevalidator.cjs +93 -28
- package/dist/development/src/model/service/idp/IdpSessionRevalidator.cjs.map +1 -1
- package/dist/development/src/model/service/idp/IdpSessionRevalidator.js +93 -28
- package/dist/development/src/model/service/idp/IdpSessionRevalidator.js.map +1 -1
- package/dist/development/src/model/service/idp/PersonIdentityProviderManager.cjs +8 -1
- package/dist/development/src/model/service/idp/PersonIdentityProviderManager.cjs.map +1 -1
- package/dist/development/src/model/service/idp/PersonIdentityProviderManager.js +8 -1
- package/dist/development/src/model/service/idp/PersonIdentityProviderManager.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs +69 -33
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js +69 -33
- package/dist/development/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs +4 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js +4 -1
- package/dist/development/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.cjs +10 -3
- package/dist/development/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/development/src/model/utils/DatabaseContext.js +11 -4
- package/dist/development/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/development/src/model/utils/token.cjs +2 -2
- package/dist/development/src/model/utils/token.cjs.map +1 -1
- package/dist/development/src/model/utils/token.js +2 -2
- package/dist/development/src/model/utils/token.js.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.cjs +12 -3
- package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/ResolverFactory.js +12 -3
- package/dist/development/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.cjs +4 -4
- package/dist/development/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/TenantResolverContextFactory.js +4 -4
- package/dist/development/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs +19 -9
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js +20 -10
- package/dist/development/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/customRole/CustomRoleMutationResolver.cjs +124 -0
- package/dist/development/src/resolvers/mutation/customRole/CustomRoleMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/customRole/CustomRoleMutationResolver.js +124 -0
- package/dist/development/src/resolvers/mutation/customRole/CustomRoleMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs +35 -11
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js +35 -11
- package/dist/development/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs +10 -7
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.js +10 -7
- package/dist/development/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.cjs +8 -6
- package/dist/development/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.js +8 -6
- package/dist/development/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs +10 -7
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js +10 -7
- package/dist/development/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/audit.cjs +1 -0
- package/dist/development/src/resolvers/mutation/idp/audit.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/idp/audit.js +1 -0
- package/dist/development/src/resolvers/mutation/idp/audit.js.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs +38 -18
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js +38 -18
- package/dist/development/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs +10 -8
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.js +10 -8
- package/dist/development/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs +17 -11
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.js +17 -11
- package/dist/development/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs +10 -8
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.js +10 -8
- package/dist/development/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/EmailOtpMutationResolver.cjs +10 -8
- package/dist/development/src/resolvers/mutation/person/EmailOtpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/EmailOtpMutationResolver.js +10 -8
- package/dist/development/src/resolvers/mutation/person/EmailOtpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/EmailVerificationMutationResolver.cjs +10 -8
- package/dist/development/src/resolvers/mutation/person/EmailVerificationMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/EmailVerificationMutationResolver.js +10 -8
- package/dist/development/src/resolvers/mutation/person/EmailVerificationMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/EnablePersonMutationResolver.cjs +61 -0
- package/dist/development/src/resolvers/mutation/person/EnablePersonMutationResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/mutation/person/EnablePersonMutationResolver.js +61 -0
- package/dist/development/src/resolvers/mutation/person/EnablePersonMutationResolver.js.map +1 -0
- package/dist/development/src/resolvers/mutation/person/ForceSignOutMutationResolver.cjs +8 -6
- package/dist/development/src/resolvers/mutation/person/ForceSignOutMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ForceSignOutMutationResolver.js +8 -6
- package/dist/development/src/resolvers/mutation/person/ForceSignOutMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs +32 -5
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js +32 -5
- package/dist/development/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.cjs +9 -7
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.js +9 -7
- package/dist/development/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +12 -6
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js +12 -6
- package/dist/development/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.cjs +9 -7
- package/dist/development/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.js +9 -7
- package/dist/development/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs +10 -8
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.js +10 -8
- package/dist/development/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.cjs +8 -6
- package/dist/development/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.js +8 -6
- package/dist/development/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/RevokeSessionMutationResolver.cjs +8 -6
- package/dist/development/src/resolvers/mutation/person/RevokeSessionMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/RevokeSessionMutationResolver.js +8 -6
- package/dist/development/src/resolvers/mutation/person/RevokeSessionMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.cjs +22 -14
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.js +22 -14
- package/dist/development/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.cjs +10 -8
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.js +10 -8
- package/dist/development/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +9 -7
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +9 -7
- package/dist/development/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs +7 -5
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js +7 -5
- package/dist/development/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs +8 -6
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js +8 -6
- package/dist/development/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs +8 -6
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js +8 -6
- package/dist/development/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/audit.cjs +2 -1
- package/dist/development/src/resolvers/mutation/projectMember/audit.cjs.map +1 -1
- package/dist/development/src/resolvers/mutation/projectMember/audit.js +2 -1
- package/dist/development/src/resolvers/mutation/projectMember/audit.js.map +1 -1
- package/dist/development/src/resolvers/query/ApiKeyQueryResolver.cjs +8 -6
- package/dist/development/src/resolvers/query/ApiKeyQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ApiKeyQueryResolver.js +8 -6
- package/dist/development/src/resolvers/query/ApiKeyQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/AuthLogQueryResolver.cjs +7 -5
- package/dist/development/src/resolvers/query/AuthLogQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/AuthLogQueryResolver.js +7 -5
- package/dist/development/src/resolvers/query/AuthLogQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/AuthPolicyQueryResolver.cjs +8 -6
- package/dist/development/src/resolvers/query/AuthPolicyQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/AuthPolicyQueryResolver.js +8 -6
- package/dist/development/src/resolvers/query/AuthPolicyQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs +8 -6
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js +8 -6
- package/dist/development/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/CustomRoleQueryResolver.cjs +55 -0
- package/dist/development/src/resolvers/query/CustomRoleQueryResolver.cjs.map +1 -0
- package/dist/development/src/resolvers/query/CustomRoleQueryResolver.js +55 -0
- package/dist/development/src/resolvers/query/CustomRoleQueryResolver.js.map +1 -0
- package/dist/development/src/resolvers/query/IDPQueryResolver.cjs +7 -5
- package/dist/development/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/IDPQueryResolver.js +7 -5
- package/dist/development/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.cjs +21 -14
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.js +21 -14
- package/dist/development/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/PersonQueryResolver.cjs +7 -5
- package/dist/development/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/PersonQueryResolver.js +7 -5
- package/dist/development/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.cjs +7 -5
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.js +7 -5
- package/dist/development/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.cjs +10 -7
- package/dist/development/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/query/ProjectQueryResolver.js +10 -7
- package/dist/development/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/ApiKeyResponseFactory.cjs +7 -5
- package/dist/development/src/resolvers/responseHelpers/ApiKeyResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/ApiKeyResponseFactory.js +7 -5
- package/dist/development/src/resolvers/responseHelpers/ApiKeyResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs +5 -0
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js +5 -0
- package/dist/development/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/ProjectResponseFactory.cjs +23 -0
- package/dist/development/src/resolvers/responseHelpers/ProjectResponseFactory.cjs.map +1 -0
- package/dist/development/src/resolvers/responseHelpers/ProjectResponseFactory.js +23 -0
- package/dist/development/src/resolvers/responseHelpers/ProjectResponseFactory.js.map +1 -0
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.cjs +8 -6
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.js +8 -6
- package/dist/development/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.cjs +50 -18
- package/dist/development/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/IdentityTypeResolver.js +50 -18
- package/dist/development/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/development/src/resolvers/types/PersonTypeResolver.cjs +38 -8
- package/dist/development/src/resolvers/types/PersonTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/PersonTypeResolver.js +38 -8
- package/dist/development/src/resolvers/types/PersonTypeResolver.js.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.cjs +31 -6
- package/dist/development/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/development/src/resolvers/types/ProjectTypeResolver.js +31 -6
- package/dist/development/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/development/src/schema/tenant.graphql.cjs +275 -15
- package/dist/development/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/development/src/schema/tenant.graphql.js +275 -15
- package/dist/development/src/schema/tenant.graphql.js.map +1 -1
- package/dist/production/index.cjs +69 -0
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +71 -2
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/TenantContainer.cjs +39 -10
- package/dist/production/src/TenantContainer.cjs.map +1 -1
- package/dist/production/src/TenantContainer.js +39 -10
- package/dist/production/src/TenantContainer.js.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.cjs +9 -7
- package/dist/production/src/bridges/system/IdentityFetcher.cjs.map +1 -1
- package/dist/production/src/bridges/system/IdentityFetcher.js +9 -7
- package/dist/production/src/bridges/system/IdentityFetcher.js.map +1 -1
- package/dist/production/src/migrations/2026-06-18-120000-idp-claim-mapping.cjs +10 -0
- package/dist/production/src/migrations/2026-06-18-120000-idp-claim-mapping.cjs.map +1 -0
- package/dist/production/src/migrations/2026-06-18-120000-idp-claim-mapping.js +11 -0
- package/dist/production/src/migrations/2026-06-18-120000-idp-claim-mapping.js.map +1 -0
- package/dist/production/src/migrations/2026-08-03-120000-person-enable-auth-log.cjs +9 -0
- package/dist/production/src/migrations/2026-08-03-120000-person-enable-auth-log.cjs.map +1 -0
- package/dist/production/src/migrations/2026-08-03-120000-person-enable-auth-log.js +10 -0
- package/dist/production/src/migrations/2026-08-03-120000-person-enable-auth-log.js.map +1 -0
- package/dist/production/src/migrations/2026-08-04-120000-config-panel.cjs +11 -0
- package/dist/production/src/migrations/2026-08-04-120000-config-panel.cjs.map +1 -0
- package/dist/production/src/migrations/2026-08-04-120000-config-panel.js +12 -0
- package/dist/production/src/migrations/2026-08-04-120000-config-panel.js.map +1 -0
- package/dist/production/src/migrations/2026-09-04-120000-idp-disable-local-authentication.cjs +18 -0
- package/dist/production/src/migrations/2026-09-04-120000-idp-disable-local-authentication.cjs.map +1 -0
- package/dist/production/src/migrations/2026-09-04-120000-idp-disable-local-authentication.js +19 -0
- package/dist/production/src/migrations/2026-09-04-120000-idp-disable-local-authentication.js.map +1 -0
- package/dist/production/src/migrations/2026-09-11-120000-custom-role.cjs +18 -0
- package/dist/production/src/migrations/2026-09-11-120000-custom-role.cjs.map +1 -0
- package/dist/production/src/migrations/2026-09-11-120000-custom-role.js +19 -0
- package/dist/production/src/migrations/2026-09-11-120000-custom-role.js.map +1 -0
- package/dist/production/src/migrations/runner.cjs +17 -5
- package/dist/production/src/migrations/runner.cjs.map +1 -1
- package/dist/production/src/migrations/runner.js +17 -5
- package/dist/production/src/migrations/runner.js.map +1 -1
- package/dist/production/src/migrations/snapshot.cjs +22 -2
- package/dist/production/src/migrations/snapshot.cjs.map +1 -1
- package/dist/production/src/migrations/snapshot.js +22 -2
- package/dist/production/src/migrations/snapshot.js.map +1 -1
- package/dist/production/src/model/authorization/CustomRoleAuthorizator.cjs +65 -0
- package/dist/production/src/model/authorization/CustomRoleAuthorizator.cjs.map +1 -0
- package/dist/production/src/model/authorization/CustomRoleAuthorizator.js +65 -0
- package/dist/production/src/model/authorization/CustomRoleAuthorizator.js.map +1 -0
- package/dist/production/src/model/authorization/CustomRolePermissions.cjs +404 -0
- package/dist/production/src/model/authorization/CustomRolePermissions.cjs.map +1 -0
- package/dist/production/src/model/authorization/CustomRolePermissions.js +387 -0
- package/dist/production/src/model/authorization/CustomRolePermissions.js.map +1 -0
- package/dist/production/src/model/authorization/PermissionActions.cjs +19 -16
- package/dist/production/src/model/authorization/PermissionActions.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionActions.js +19 -16
- package/dist/production/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.cjs +20 -2
- package/dist/production/src/model/authorization/PermissionContextFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionContextFactory.js +20 -2
- package/dist/production/src/model/authorization/PermissionContextFactory.js.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.cjs +32 -24
- package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -1
- package/dist/production/src/model/authorization/PermissionsFactory.js +33 -25
- package/dist/production/src/model/authorization/PermissionsFactory.js.map +1 -1
- package/dist/production/src/model/authorization/Roles.cjs +8 -0
- package/dist/production/src/model/authorization/Roles.cjs.map +1 -1
- package/dist/production/src/model/authorization/Roles.js +8 -0
- package/dist/production/src/model/authorization/Roles.js.map +1 -1
- package/dist/production/src/model/authorization/TargetIdentityPermission.cjs +35 -0
- package/dist/production/src/model/authorization/TargetIdentityPermission.cjs.map +1 -0
- package/dist/production/src/model/authorization/TargetIdentityPermission.js +35 -0
- package/dist/production/src/model/authorization/TargetIdentityPermission.js.map +1 -0
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.cjs +19 -0
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.js +19 -0
- package/dist/production/src/model/commands/apiKey/ApiKeyHelper.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.cjs +4 -2
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.js +5 -3
- package/dist/production/src/model/commands/apiKey/CreateApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.cjs +9 -10
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.js +10 -11
- package/dist/production/src/model/commands/apiKey/ProlongApiKeyCommand.js.map +1 -1
- package/dist/production/src/model/commands/authLog/CreateAuthLogEntryCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/authLog/CreateAuthLogEntryCommand.js.map +1 -1
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs +5 -3
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js +5 -3
- package/dist/production/src/model/commands/configuration/UpdateConfigurationCommand.js.map +1 -1
- package/dist/production/src/model/commands/customRole/CreateCustomRoleCommand.cjs +23 -0
- package/dist/production/src/model/commands/customRole/CreateCustomRoleCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/customRole/CreateCustomRoleCommand.js +23 -0
- package/dist/production/src/model/commands/customRole/CreateCustomRoleCommand.js.map +1 -0
- package/dist/production/src/model/commands/customRole/DeleteCustomRoleCommand.cjs +14 -0
- package/dist/production/src/model/commands/customRole/DeleteCustomRoleCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/customRole/DeleteCustomRoleCommand.js +14 -0
- package/dist/production/src/model/commands/customRole/DeleteCustomRoleCommand.js.map +1 -0
- package/dist/production/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.cjs +16 -0
- package/dist/production/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.js +16 -0
- package/dist/production/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.js.map +1 -0
- package/dist/production/src/model/commands/customRole/UpdateCustomRoleCommand.cjs +19 -0
- package/dist/production/src/model/commands/customRole/UpdateCustomRoleCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/customRole/UpdateCustomRoleCommand.js +19 -0
- package/dist/production/src/model/commands/customRole/UpdateCustomRoleCommand.js.map +1 -0
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.cjs +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.cjs.map +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.js +1 -1
- package/dist/production/src/model/commands/identity/PatchIdentityGlobalRoles.js.map +1 -1
- package/dist/production/src/model/commands/idp/ClaimIdpRevalidationCommand.cjs +3 -7
- package/dist/production/src/model/commands/idp/ClaimIdpRevalidationCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/ClaimIdpRevalidationCommand.js +3 -7
- package/dist/production/src/model/commands/idp/ClaimIdpRevalidationCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpCommand.cjs +8 -2
- package/dist/production/src/model/commands/idp/CreateIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpCommand.js +8 -2
- package/dist/production/src/model/commands/idp/CreateIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpSessionCommand.cjs +4 -1
- package/dist/production/src/model/commands/idp/CreateIdpSessionCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/CreateIdpSessionCommand.js +5 -2
- package/dist/production/src/model/commands/idp/CreateIdpSessionCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.cjs +6 -2
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.js +6 -2
- package/dist/production/src/model/commands/idp/UpdateIdpCommand.js.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpSessionCommand.cjs +2 -1
- package/dist/production/src/model/commands/idp/UpdateIdpSessionCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/idp/UpdateIdpSessionCommand.js +3 -2
- package/dist/production/src/model/commands/idp/UpdateIdpSessionCommand.js.map +1 -1
- package/dist/production/src/model/commands/membership/{RemoveProjectMembershipsCommand.cjs → RemoveProjectMembershipCommand.cjs} +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/membership/{RemoveProjectMembershipsCommand.js → RemoveProjectMembershipCommand.js} +1 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipCommand.js.map +1 -0
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.cjs +2 -2
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.js +1 -1
- package/dist/production/src/model/commands/membership/UpdateProjectMemberCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.cjs +1 -0
- package/dist/production/src/model/commands/person/CreatePersonCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/CreatePersonCommand.js +1 -0
- package/dist/production/src/model/commands/person/CreatePersonCommand.js.map +1 -1
- package/dist/production/src/model/commands/person/EnablePersonCommand.cjs +17 -0
- package/dist/production/src/model/commands/person/EnablePersonCommand.cjs.map +1 -0
- package/dist/production/src/model/commands/person/EnablePersonCommand.js +17 -0
- package/dist/production/src/model/commands/person/EnablePersonCommand.js.map +1 -0
- package/dist/production/src/model/commands/person/SetMfaGraceUntilCommand.cjs +3 -3
- package/dist/production/src/model/commands/person/SetMfaGraceUntilCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/person/SetMfaGraceUntilCommand.js +4 -4
- package/dist/production/src/model/commands/person/SetMfaGraceUntilCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs +2 -3
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js +2 -3
- package/dist/production/src/model/commands/personToken/ResetPasswordCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/SaveEmailOtpTokenCommand.cjs +3 -3
- package/dist/production/src/model/commands/personToken/SaveEmailOtpTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/SaveEmailOtpTokenCommand.js +4 -4
- package/dist/production/src/model/commands/personToken/SaveEmailOtpTokenCommand.js.map +1 -1
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs +12 -6
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js +13 -7
- package/dist/production/src/model/commands/personToken/SavePersonTokenCommand.js.map +1 -1
- package/dist/production/src/model/commands/rateLimit/RecordRateLimitEventCommand.cjs +1 -2
- package/dist/production/src/model/commands/rateLimit/RecordRateLimitEventCommand.cjs.map +1 -1
- package/dist/production/src/model/commands/rateLimit/RecordRateLimitEventCommand.js +1 -2
- package/dist/production/src/model/commands/rateLimit/RecordRateLimitEventCommand.js.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.cjs +2 -1
- package/dist/production/src/model/mailing/UserMailer.cjs.map +1 -1
- package/dist/production/src/model/mailing/UserMailer.js +2 -1
- package/dist/production/src/model/mailing/UserMailer.js.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs +8 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js +9 -2
- package/dist/production/src/model/queries/apiKey/ApiKeyQuery.js.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeySessionsQuery.cjs +2 -3
- package/dist/production/src/model/queries/apiKey/ApiKeySessionsQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/apiKey/ApiKeySessionsQuery.js +2 -3
- package/dist/production/src/model/queries/apiKey/ApiKeySessionsQuery.js.map +1 -1
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.cjs +12 -10
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.js +12 -10
- package/dist/production/src/model/queries/authLog/NextLoginAttemptQuery.js.map +1 -1
- package/dist/production/src/model/queries/authLog/NextMailAttemptQuery.cjs +10 -8
- package/dist/production/src/model/queries/authLog/NextMailAttemptQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/authLog/NextMailAttemptQuery.js +10 -8
- package/dist/production/src/model/queries/authLog/NextMailAttemptQuery.js.map +1 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs +4 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js +4 -0
- package/dist/production/src/model/queries/configuration/ConfigurationQuery.js.map +1 -1
- package/dist/production/src/model/queries/customRole/CustomRolesQuery.cjs +23 -0
- package/dist/production/src/model/queries/customRole/CustomRolesQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/customRole/CustomRolesQuery.js +23 -0
- package/dist/production/src/model/queries/customRole/CustomRolesQuery.js.map +1 -0
- package/dist/production/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.cjs +15 -0
- package/dist/production/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.js +15 -0
- package/dist/production/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.js.map +1 -0
- package/dist/production/src/model/queries/identity/IdentityQuery.cjs +7 -2
- package/dist/production/src/model/queries/identity/IdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/identity/IdentityQuery.js +7 -2
- package/dist/production/src/model/queries/identity/IdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/LocalAuthDisablingIdpsQuery.cjs +21 -0
- package/dist/production/src/model/queries/idp/LocalAuthDisablingIdpsQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/idp/LocalAuthDisablingIdpsQuery.js +21 -0
- package/dist/production/src/model/queries/idp/LocalAuthDisablingIdpsQuery.js.map +1 -0
- package/dist/production/src/model/queries/idp/PersonIdentityProvidersQuery.cjs +1 -1
- package/dist/production/src/model/queries/idp/PersonIdentityProvidersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/PersonIdentityProvidersQuery.js +1 -1
- package/dist/production/src/model/queries/idp/PersonIdentityProvidersQuery.js.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.cjs +3 -3
- package/dist/production/src/model/queries/idp/helpers.cjs.map +1 -1
- package/dist/production/src/model/queries/idp/helpers.js +3 -3
- package/dist/production/src/model/queries/idp/helpers.js.map +1 -1
- package/dist/production/src/model/queries/membership/IdentityHasProjectMembershipsQuery.cjs +15 -0
- package/dist/production/src/model/queries/membership/IdentityHasProjectMembershipsQuery.cjs.map +1 -0
- package/dist/production/src/model/queries/membership/IdentityHasProjectMembershipsQuery.js +15 -0
- package/dist/production/src/model/queries/membership/IdentityHasProjectMembershipsQuery.js.map +1 -0
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.cjs +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.js +1 -1
- package/dist/production/src/model/queries/membership/ProjectMembersQuery.js.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs +2 -2
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.cjs.map +1 -1
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js +2 -2
- package/dist/production/src/model/queries/person/PersonQueryBuilderFactory.js.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js +1 -1
- package/dist/production/src/model/queries/personToken/PersonTokenQuery.js.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.cjs +4 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.js +4 -1
- package/dist/production/src/model/queries/project/ProjectsByIdentityQuery.js.map +1 -1
- package/dist/production/src/model/queries/rateLimit/RateLimitCountQuery.cjs +3 -3
- package/dist/production/src/model/queries/rateLimit/RateLimitCountQuery.cjs.map +1 -1
- package/dist/production/src/model/queries/rateLimit/RateLimitCountQuery.js +3 -3
- package/dist/production/src/model/queries/rateLimit/RateLimitCountQuery.js.map +1 -1
- package/dist/production/src/model/service/AuthLogService.cjs +8 -2
- package/dist/production/src/model/service/AuthLogService.cjs.map +1 -1
- package/dist/production/src/model/service/AuthLogService.js +8 -2
- package/dist/production/src/model/service/AuthLogService.js.map +1 -1
- package/dist/production/src/model/service/AuthPolicyManager.cjs +2 -1
- package/dist/production/src/model/service/AuthPolicyManager.cjs.map +1 -1
- package/dist/production/src/model/service/AuthPolicyManager.js +2 -1
- package/dist/production/src/model/service/AuthPolicyManager.js.map +1 -1
- package/dist/production/src/model/service/AuthPolicyResolver.cjs +2 -1
- package/dist/production/src/model/service/AuthPolicyResolver.cjs.map +1 -1
- package/dist/production/src/model/service/AuthPolicyResolver.js +2 -1
- package/dist/production/src/model/service/AuthPolicyResolver.js.map +1 -1
- package/dist/production/src/model/service/CustomRoleManager.cjs +170 -0
- package/dist/production/src/model/service/CustomRoleManager.cjs.map +1 -0
- package/dist/production/src/model/service/CustomRoleManager.js +170 -0
- package/dist/production/src/model/service/CustomRoleManager.js.map +1 -0
- package/dist/production/src/model/service/EmailChangeManager.cjs +5 -4
- package/dist/production/src/model/service/EmailChangeManager.cjs.map +1 -1
- package/dist/production/src/model/service/EmailChangeManager.js +5 -4
- package/dist/production/src/model/service/EmailChangeManager.js.map +1 -1
- package/dist/production/src/model/service/EmailOtpManager.cjs +0 -1
- package/dist/production/src/model/service/EmailOtpManager.cjs.map +1 -1
- package/dist/production/src/model/service/EmailOtpManager.js +0 -1
- package/dist/production/src/model/service/EmailOtpManager.js.map +1 -1
- package/dist/production/src/model/service/EmailValidator.cjs +2 -1
- package/dist/production/src/model/service/EmailValidator.cjs.map +1 -1
- package/dist/production/src/model/service/EmailValidator.js +2 -1
- package/dist/production/src/model/service/EmailValidator.js.map +1 -1
- package/dist/production/src/model/service/EmailVerificationManager.cjs +5 -4
- package/dist/production/src/model/service/EmailVerificationManager.cjs.map +1 -1
- package/dist/production/src/model/service/EmailVerificationManager.js +5 -4
- package/dist/production/src/model/service/EmailVerificationManager.js.map +1 -1
- package/dist/production/src/model/service/GlobalRoleValidator.cjs +35 -0
- package/dist/production/src/model/service/GlobalRoleValidator.cjs.map +1 -0
- package/dist/production/src/model/service/GlobalRoleValidator.js +35 -0
- package/dist/production/src/model/service/GlobalRoleValidator.js.map +1 -0
- package/dist/production/src/model/service/IDPSignInManager.cjs +52 -16
- package/dist/production/src/model/service/IDPSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/IDPSignInManager.js +52 -16
- package/dist/production/src/model/service/IDPSignInManager.js.map +1 -1
- package/dist/production/src/model/service/InviteManager.cjs +2 -1
- package/dist/production/src/model/service/InviteManager.cjs.map +1 -1
- package/dist/production/src/model/service/InviteManager.js +2 -1
- package/dist/production/src/model/service/InviteManager.js.map +1 -1
- package/dist/production/src/model/service/PanelAccessResolver.cjs +32 -0
- package/dist/production/src/model/service/PanelAccessResolver.cjs.map +1 -0
- package/dist/production/src/model/service/PanelAccessResolver.js +32 -0
- package/dist/production/src/model/service/PanelAccessResolver.js.map +1 -0
- package/dist/production/src/model/service/PasswordChangeManager.cjs +2 -1
- package/dist/production/src/model/service/PasswordChangeManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordChangeManager.js +2 -1
- package/dist/production/src/model/service/PasswordChangeManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.cjs +9 -3
- package/dist/production/src/model/service/PasswordResetManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordResetManager.js +9 -3
- package/dist/production/src/model/service/PasswordResetManager.js.map +1 -1
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs +24 -6
- package/dist/production/src/model/service/PasswordlessSignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/PasswordlessSignInManager.js +24 -6
- package/dist/production/src/model/service/PasswordlessSignInManager.js.map +1 -1
- package/dist/production/src/model/service/PersonAccessManager.cjs +10 -2
- package/dist/production/src/model/service/PersonAccessManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonAccessManager.js +10 -2
- package/dist/production/src/model/service/PersonAccessManager.js.map +1 -1
- package/dist/production/src/model/service/PersonManager.cjs +2 -1
- package/dist/production/src/model/service/PersonManager.cjs.map +1 -1
- package/dist/production/src/model/service/PersonManager.js +2 -1
- package/dist/production/src/model/service/PersonManager.js.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.cjs +2 -1
- package/dist/production/src/model/service/ProjectMemberManager.cjs.map +1 -1
- package/dist/production/src/model/service/ProjectMemberManager.js +2 -1
- package/dist/production/src/model/service/ProjectMemberManager.js.map +1 -1
- package/dist/production/src/model/service/RateLimiter.cjs +1 -2
- package/dist/production/src/model/service/RateLimiter.cjs.map +1 -1
- package/dist/production/src/model/service/RateLimiter.js +1 -2
- package/dist/production/src/model/service/RateLimiter.js.map +1 -1
- package/dist/production/src/model/service/RolesManager.cjs +17 -18
- package/dist/production/src/model/service/RolesManager.cjs.map +1 -1
- package/dist/production/src/model/service/RolesManager.js +18 -19
- package/dist/production/src/model/service/RolesManager.js.map +1 -1
- package/dist/production/src/model/service/SecretsManager.cjs +2 -1
- package/dist/production/src/model/service/SecretsManager.cjs.map +1 -1
- package/dist/production/src/model/service/SecretsManager.js +2 -1
- package/dist/production/src/model/service/SecretsManager.js.map +1 -1
- package/dist/production/src/model/service/SignInManager.cjs +9 -5
- package/dist/production/src/model/service/SignInManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignInManager.js +9 -5
- package/dist/production/src/model/service/SignInManager.js.map +1 -1
- package/dist/production/src/model/service/SignOutManager.cjs +2 -1
- package/dist/production/src/model/service/SignOutManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignOutManager.js +2 -1
- package/dist/production/src/model/service/SignOutManager.js.map +1 -1
- package/dist/production/src/model/service/SignUpManager.cjs +15 -7
- package/dist/production/src/model/service/SignUpManager.cjs.map +1 -1
- package/dist/production/src/model/service/SignUpManager.js +15 -7
- package/dist/production/src/model/service/SignUpManager.js.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.cjs +56 -40
- package/dist/production/src/model/service/apiKey/ApiKeyManager.cjs.map +1 -1
- package/dist/production/src/model/service/apiKey/ApiKeyManager.js +57 -41
- 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/apiKey/UnpersistedApiKeyManager.cjs +10 -1
- package/dist/production/src/model/service/apiKey/UnpersistedApiKeyManager.cjs.map +1 -1
- package/dist/production/src/model/service/apiKey/UnpersistedApiKeyManager.js +11 -2
- package/dist/production/src/model/service/apiKey/UnpersistedApiKeyManager.js.map +1 -1
- package/dist/production/src/model/service/idp/ClaimMapping.cjs +187 -0
- package/dist/production/src/model/service/idp/ClaimMapping.cjs.map +1 -0
- package/dist/production/src/model/service/idp/ClaimMapping.js +170 -0
- package/dist/production/src/model/service/idp/ClaimMapping.js.map +1 -0
- package/dist/production/src/model/service/idp/ClaimMappingEvaluator.cjs +155 -0
- package/dist/production/src/model/service/idp/ClaimMappingEvaluator.cjs.map +1 -0
- package/dist/production/src/model/service/idp/ClaimMappingEvaluator.js +155 -0
- package/dist/production/src/model/service/idp/ClaimMappingEvaluator.js.map +1 -0
- package/dist/production/src/model/service/idp/ClaimMappingValidation.cjs +83 -0
- package/dist/production/src/model/service/idp/ClaimMappingValidation.cjs.map +1 -0
- package/dist/production/src/model/service/idp/ClaimMappingValidation.js +83 -0
- package/dist/production/src/model/service/idp/ClaimMappingValidation.js.map +1 -0
- package/dist/production/src/model/service/idp/IDPClaimSyncService.cjs +261 -0
- package/dist/production/src/model/service/idp/IDPClaimSyncService.cjs.map +1 -0
- package/dist/production/src/model/service/idp/IDPClaimSyncService.js +261 -0
- package/dist/production/src/model/service/idp/IDPClaimSyncService.js.map +1 -0
- package/dist/production/src/model/service/idp/IDPManager.cjs +98 -21
- package/dist/production/src/model/service/idp/IDPManager.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IDPManager.js +98 -21
- package/dist/production/src/model/service/idp/IDPManager.js.map +1 -1
- package/dist/production/src/model/service/idp/IdpSessionRevalidator.cjs +93 -28
- package/dist/production/src/model/service/idp/IdpSessionRevalidator.cjs.map +1 -1
- package/dist/production/src/model/service/idp/IdpSessionRevalidator.js +93 -28
- package/dist/production/src/model/service/idp/IdpSessionRevalidator.js.map +1 -1
- package/dist/production/src/model/service/idp/PersonIdentityProviderManager.cjs +8 -1
- package/dist/production/src/model/service/idp/PersonIdentityProviderManager.cjs.map +1 -1
- package/dist/production/src/model/service/idp/PersonIdentityProviderManager.js +8 -1
- package/dist/production/src/model/service/idp/PersonIdentityProviderManager.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs +69 -33
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js +69 -33
- package/dist/production/src/model/service/idp/providers/OIDCHelpers.js.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs +4 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.cjs.map +1 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js +4 -1
- package/dist/production/src/model/service/idp/providers/OIDCProvider.js.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.cjs +10 -3
- package/dist/production/src/model/utils/DatabaseContext.cjs.map +1 -1
- package/dist/production/src/model/utils/DatabaseContext.js +11 -4
- package/dist/production/src/model/utils/DatabaseContext.js.map +1 -1
- package/dist/production/src/model/utils/token.cjs +2 -2
- package/dist/production/src/model/utils/token.cjs.map +1 -1
- package/dist/production/src/model/utils/token.js +2 -2
- package/dist/production/src/model/utils/token.js.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.cjs +12 -3
- package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/ResolverFactory.js +12 -3
- package/dist/production/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.cjs +4 -4
- package/dist/production/src/resolvers/TenantResolverContextFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/TenantResolverContextFactory.js +4 -4
- package/dist/production/src/resolvers/TenantResolverContextFactory.js.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs +19 -9
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js +20 -10
- package/dist/production/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/configuration/AuthPolicyMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/configuration/ConfigurationMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/customRole/CustomRoleMutationResolver.cjs +124 -0
- package/dist/production/src/resolvers/mutation/customRole/CustomRoleMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/customRole/CustomRoleMutationResolver.js +124 -0
- package/dist/production/src/resolvers/mutation/customRole/CustomRoleMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs +35 -11
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js +35 -11
- package/dist/production/src/resolvers/mutation/identity/GlobalRolesMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs +10 -7
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.js +10 -7
- package/dist/production/src/resolvers/mutation/idp/AddIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/idp/DisableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.cjs +8 -6
- package/dist/production/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.js +8 -6
- package/dist/production/src/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/idp/EnableIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs +10 -7
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js +10 -7
- package/dist/production/src/resolvers/mutation/idp/UpdateIDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/audit.cjs +1 -0
- package/dist/production/src/resolvers/mutation/idp/audit.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/idp/audit.js +1 -0
- package/dist/production/src/resolvers/mutation/idp/audit.js.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs +38 -18
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js +38 -18
- package/dist/production/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs +10 -8
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.js +10 -8
- package/dist/production/src/resolvers/mutation/person/ChangePasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs +17 -11
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.js +17 -11
- package/dist/production/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs +10 -8
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.js +10 -8
- package/dist/production/src/resolvers/mutation/person/DisablePersonMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/EmailOtpMutationResolver.cjs +10 -8
- package/dist/production/src/resolvers/mutation/person/EmailOtpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/EmailOtpMutationResolver.js +10 -8
- package/dist/production/src/resolvers/mutation/person/EmailOtpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/EmailVerificationMutationResolver.cjs +10 -8
- package/dist/production/src/resolvers/mutation/person/EmailVerificationMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/EmailVerificationMutationResolver.js +10 -8
- package/dist/production/src/resolvers/mutation/person/EmailVerificationMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/EnablePersonMutationResolver.cjs +61 -0
- package/dist/production/src/resolvers/mutation/person/EnablePersonMutationResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/mutation/person/EnablePersonMutationResolver.js +61 -0
- package/dist/production/src/resolvers/mutation/person/EnablePersonMutationResolver.js.map +1 -0
- package/dist/production/src/resolvers/mutation/person/ForceSignOutMutationResolver.cjs +8 -6
- package/dist/production/src/resolvers/mutation/person/ForceSignOutMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ForceSignOutMutationResolver.js +8 -6
- package/dist/production/src/resolvers/mutation/person/ForceSignOutMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs +32 -5
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js +32 -5
- package/dist/production/src/resolvers/mutation/person/IDPMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/person/InviteMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.cjs +9 -7
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.js +9 -7
- package/dist/production/src/resolvers/mutation/person/OtpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs +12 -6
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js +12 -6
- package/dist/production/src/resolvers/mutation/person/PasswordlessMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.cjs +9 -7
- package/dist/production/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.js +9 -7
- package/dist/production/src/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs +10 -8
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.js +10 -8
- package/dist/production/src/resolvers/mutation/person/ResetPasswordMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.cjs +8 -6
- package/dist/production/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.js +8 -6
- package/dist/production/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/RevokeSessionMutationResolver.cjs +8 -6
- package/dist/production/src/resolvers/mutation/person/RevokeSessionMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/RevokeSessionMutationResolver.js +8 -6
- package/dist/production/src/resolvers/mutation/person/RevokeSessionMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.cjs +22 -14
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.js +22 -14
- package/dist/production/src/resolvers/mutation/person/SignInMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/person/SignOutMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.cjs +10 -8
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.js +10 -8
- package/dist/production/src/resolvers/mutation/person/SignUpMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs +9 -7
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js +9 -7
- package/dist/production/src/resolvers/mutation/person/TogglePasswordlessMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/project/CreateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/project/SetProjectSecretMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/project/UpdateProjectMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs +7 -5
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js +7 -5
- package/dist/production/src/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs +8 -6
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js +8 -6
- package/dist/production/src/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs +8 -6
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js +8 -6
- package/dist/production/src/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.js.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/audit.cjs +2 -1
- package/dist/production/src/resolvers/mutation/projectMember/audit.cjs.map +1 -1
- package/dist/production/src/resolvers/mutation/projectMember/audit.js +2 -1
- package/dist/production/src/resolvers/mutation/projectMember/audit.js.map +1 -1
- package/dist/production/src/resolvers/query/ApiKeyQueryResolver.cjs +8 -6
- package/dist/production/src/resolvers/query/ApiKeyQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ApiKeyQueryResolver.js +8 -6
- package/dist/production/src/resolvers/query/ApiKeyQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/AuthLogQueryResolver.cjs +7 -5
- package/dist/production/src/resolvers/query/AuthLogQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/AuthLogQueryResolver.js +7 -5
- package/dist/production/src/resolvers/query/AuthLogQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/AuthPolicyQueryResolver.cjs +8 -6
- package/dist/production/src/resolvers/query/AuthPolicyQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/AuthPolicyQueryResolver.js +8 -6
- package/dist/production/src/resolvers/query/AuthPolicyQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs +8 -6
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js +8 -6
- package/dist/production/src/resolvers/query/ConfigurationQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/CustomRoleQueryResolver.cjs +55 -0
- package/dist/production/src/resolvers/query/CustomRoleQueryResolver.cjs.map +1 -0
- package/dist/production/src/resolvers/query/CustomRoleQueryResolver.js +55 -0
- package/dist/production/src/resolvers/query/CustomRoleQueryResolver.js.map +1 -0
- package/dist/production/src/resolvers/query/IDPQueryResolver.cjs +7 -5
- package/dist/production/src/resolvers/query/IDPQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/IDPQueryResolver.js +7 -5
- package/dist/production/src/resolvers/query/IDPQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.cjs +21 -14
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.js +21 -14
- package/dist/production/src/resolvers/query/MailTemplateQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/PersonQueryResolver.cjs +7 -5
- package/dist/production/src/resolvers/query/PersonQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/PersonQueryResolver.js +7 -5
- package/dist/production/src/resolvers/query/PersonQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.cjs +7 -5
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.js +7 -5
- package/dist/production/src/resolvers/query/ProjectMembersQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.cjs +10 -7
- package/dist/production/src/resolvers/query/ProjectQueryResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/query/ProjectQueryResolver.js +10 -7
- package/dist/production/src/resolvers/query/ProjectQueryResolver.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/ApiKeyResponseFactory.cjs +7 -5
- package/dist/production/src/resolvers/responseHelpers/ApiKeyResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/ApiKeyResponseFactory.js +7 -5
- package/dist/production/src/resolvers/responseHelpers/ApiKeyResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs +5 -0
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js +5 -0
- package/dist/production/src/resolvers/responseHelpers/PersonResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/ProjectResponseFactory.cjs +23 -0
- package/dist/production/src/resolvers/responseHelpers/ProjectResponseFactory.cjs.map +1 -0
- package/dist/production/src/resolvers/responseHelpers/ProjectResponseFactory.js +23 -0
- package/dist/production/src/resolvers/responseHelpers/ProjectResponseFactory.js.map +1 -0
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.cjs +8 -6
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.cjs.map +1 -1
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.js +8 -6
- package/dist/production/src/resolvers/responseHelpers/SignInResponseFactory.js.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.cjs +50 -18
- package/dist/production/src/resolvers/types/IdentityTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/IdentityTypeResolver.js +50 -18
- package/dist/production/src/resolvers/types/IdentityTypeResolver.js.map +1 -1
- package/dist/production/src/resolvers/types/PersonTypeResolver.cjs +38 -8
- package/dist/production/src/resolvers/types/PersonTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/PersonTypeResolver.js +38 -8
- package/dist/production/src/resolvers/types/PersonTypeResolver.js.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.cjs +31 -6
- package/dist/production/src/resolvers/types/ProjectTypeResolver.cjs.map +1 -1
- package/dist/production/src/resolvers/types/ProjectTypeResolver.js +31 -6
- package/dist/production/src/resolvers/types/ProjectTypeResolver.js.map +1 -1
- package/dist/production/src/schema/tenant.graphql.cjs +275 -15
- package/dist/production/src/schema/tenant.graphql.cjs.map +1 -1
- package/dist/production/src/schema/tenant.graphql.js +275 -15
- package/dist/production/src/schema/tenant.graphql.js.map +1 -1
- package/dist/tests/cases/integration/database/dbClock.test.d.ts +2 -0
- package/dist/tests/cases/integration/database/dbClock.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/configurationPanel.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/configurationPanel.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/customRoleCrud.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/customRoleCrud.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/disablePersonMutation.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/disablePersonMutation.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/enablePersonMutation.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/enablePersonMutation.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/gql/addProjectMember.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/changeMyPassword.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/changeMyProfile.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/changePassword.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/changeProfile.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/confirmOtp.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/createApiKey.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/createResetPasswordRequest.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/createSessionToken.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/emailOtp.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/emailVerification.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/invite.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/myIdentityProviders.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/passwordless.d.ts +4 -1
- package/dist/tests/cases/integration/mocked/gql/passwordless.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/prepareOtp.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/resetPassword.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/signIn.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/signInIdp.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/signUp.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/unmanagedInvite.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/gql/updateProjectMember.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/idpClaimMappingConfig.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/idpClaimMappingConfig.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/localAuthenticationDisabled.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/localAuthenticationDisabled.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/mailTemplateScope.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/mailTemplateScope.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/permissionsQuery.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/permissionsQuery.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/signInIdpClaimMapping.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/signInIdpClaimMapping.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/signInIdpClaimMappingFixes.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/signInIdpClaimMappingFixes.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/signInIdpClaimMappingSafety.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/signInIdpClaimMappingSafety.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/authLogSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/authPolicySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/consumeBackupCodeSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createApiKeySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createIdentitySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createMembershipSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createMembershipVariableSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createPersonSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createPersonTokenSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/createSessionKeySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/disableApiKeySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/disableOneOffKeySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/emailOtpSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/generateBackupCodesSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getApiKeySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getConfigSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getCustomRolesSql.d.ts +18 -0
- package/dist/tests/cases/integration/mocked/sql/getCustomRolesSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/getIdentityByIdSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getIdentityProjectMembershipPresenceSql.d.ts +3 -0
- package/dist/tests/cases/integration/mocked/sql/getIdentityProjectMembershipPresenceSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/getIdentityProjectsSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getIdpBySlugSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getIdpSessionByApiKeySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getMailTemplateSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getNextLoginAttemptSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getNextMailAttemptSql.d.ts +1 -1
- package/dist/tests/cases/integration/mocked/sql/getNextMailAttemptSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonByEmailSql.d.ts +1 -0
- package/dist/tests/cases/integration/mocked/sql/getPersonByEmailSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonByIdSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonByIdentity.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonByIdpSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getPersonsByIdentitySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getProjectBySlugSql.d.ts +1 -1
- package/dist/tests/cases/integration/mocked/sql/getProjectBySlugSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/getProjectMembershipSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/listApiKeysSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/listPersonsSql.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/sql/listPersonsSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/listProjectSecretsSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/listSessionsSql.d.ts +1 -1
- package/dist/tests/cases/integration/mocked/sql/listSessionsSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/localAuthDisablingIdpsSql.d.ts +10 -0
- package/dist/tests/cases/integration/mocked/sql/localAuthDisablingIdpsSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/loginHistorySql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/patchVariablesSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/personIdentityProvidersSql.d.ts +1 -0
- package/dist/tests/cases/integration/mocked/sql/personIdentityProvidersSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/removeMembershipSql.d.ts +8 -0
- package/dist/tests/cases/integration/mocked/sql/removeMembershipSql.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/sql/selectMembershipsSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/setEmailOtpEnabledSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/sqlTransaction.d.ts +6 -0
- package/dist/tests/cases/integration/mocked/sql/sqlTransaction.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/updatePesonNameSql.d.ts.map +1 -1
- package/dist/tests/cases/integration/mocked/sql/updatePesonPasswordSql.d.ts.map +1 -1
- package/dist/tests/cases/unit/apiKey/verifyAndProlongReplica.test.d.ts +2 -0
- package/dist/tests/cases/unit/apiKey/verifyAndProlongReplica.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/customRoleAuthorizator.test.d.ts +2 -0
- package/dist/tests/cases/unit/customRoleAuthorizator.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/customRolePermissions.test.d.ts +2 -0
- package/dist/tests/cases/unit/customRolePermissions.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/databaseContextRetry.test.d.ts +2 -0
- package/dist/tests/cases/unit/databaseContextRetry.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/idp/claimIdpRevalidation.test.d.ts +2 -0
- package/dist/tests/cases/unit/idp/claimIdpRevalidation.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/idp/claimMappingEvaluator.test.d.ts +2 -0
- package/dist/tests/cases/unit/idp/claimMappingEvaluator.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/idp/claimMappingValidation.test.d.ts +2 -0
- package/dist/tests/cases/unit/idp/claimMappingValidation.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/idp/idpManagerConfigMerge.test.d.ts +2 -0
- package/dist/tests/cases/unit/idp/idpManagerConfigMerge.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/idp/idpManagerUnknownConfigKeys.test.d.ts +2 -0
- package/dist/tests/cases/unit/idp/idpManagerUnknownConfigKeys.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/idp/oidcClaims.test.d.ts +2 -0
- package/dist/tests/cases/unit/idp/oidcClaims.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/panelAccessResolver.test.d.ts +2 -0
- package/dist/tests/cases/unit/panelAccessResolver.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/savePersonTokenCommand.test.d.ts +2 -0
- package/dist/tests/cases/unit/savePersonTokenCommand.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/updateConfigurationCommand.test.d.ts +2 -0
- package/dist/tests/cases/unit/updateConfigurationCommand.test.d.ts.map +1 -0
- package/dist/tests/src/IdPMock.d.ts.map +1 -1
- package/dist/tests/src/dbUtils.d.ts.map +1 -1
- package/dist/tests/src/tags.d.ts.map +1 -1
- package/dist/tests/src/testGraphql.d.ts.map +1 -1
- package/dist/tests/src/testTenant.d.ts +16 -4
- package/dist/tests/src/testTenant.d.ts.map +1 -1
- package/dist/tests/src/testUuid.d.ts.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/TenantContainer.d.ts +36 -13
- package/dist/types/TenantContainer.d.ts.map +1 -1
- package/dist/types/bridges/system/IdentityFetcher.d.ts +2 -2
- package/dist/types/bridges/system/IdentityFetcher.d.ts.map +1 -1
- package/dist/types/exceptions.d.ts.map +1 -1
- package/dist/types/migrations/2026-06-18-120000-idp-claim-mapping.d.ts +3 -0
- package/dist/types/migrations/2026-06-18-120000-idp-claim-mapping.d.ts.map +1 -0
- package/dist/types/migrations/2026-08-03-120000-person-enable-auth-log.d.ts +3 -0
- package/dist/types/migrations/2026-08-03-120000-person-enable-auth-log.d.ts.map +1 -0
- package/dist/types/migrations/2026-08-04-120000-config-panel.d.ts +3 -0
- package/dist/types/migrations/2026-08-04-120000-config-panel.d.ts.map +1 -0
- package/dist/types/migrations/2026-09-04-120000-idp-disable-local-authentication.d.ts +3 -0
- package/dist/types/migrations/2026-09-04-120000-idp-disable-local-authentication.d.ts.map +1 -0
- package/dist/types/migrations/2026-09-11-120000-custom-role.d.ts +3 -0
- package/dist/types/migrations/2026-09-11-120000-custom-role.d.ts.map +1 -0
- package/dist/types/migrations/runner.d.ts.map +1 -1
- package/dist/types/migrations/snapshot-factory.d.ts.map +1 -1
- package/dist/types/migrations/snapshot.d.ts.map +1 -1
- package/dist/types/migrations/tenantCredentials.d.ts.map +1 -1
- package/dist/types/model/authorization/AclSchemaAccessNodeFactory.d.ts.map +1 -1
- package/dist/types/model/authorization/CustomRoleAuthorizator.d.ts +29 -0
- package/dist/types/model/authorization/CustomRoleAuthorizator.d.ts.map +1 -0
- package/dist/types/model/authorization/CustomRolePermissions.d.ts +45 -0
- package/dist/types/model/authorization/CustomRolePermissions.d.ts.map +1 -0
- package/dist/types/model/authorization/DirectPermissionsAccessNode.d.ts.map +1 -1
- package/dist/types/model/authorization/Identity.d.ts.map +1 -1
- package/dist/types/model/authorization/IdentityFactory.d.ts.map +1 -1
- package/dist/types/model/authorization/IdentityScope.d.ts.map +1 -1
- package/dist/types/model/authorization/MembershipMatcher.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionActions.d.ts +104 -37
- package/dist/types/model/authorization/PermissionActions.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionContext.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionContextFactory.d.ts +13 -2
- package/dist/types/model/authorization/PermissionContextFactory.d.ts.map +1 -1
- package/dist/types/model/authorization/PermissionsFactory.d.ts.map +1 -1
- package/dist/types/model/authorization/ProjectScope.d.ts.map +1 -1
- package/dist/types/model/authorization/ProjectScopeFactory.d.ts.map +1 -1
- package/dist/types/model/authorization/Roles.d.ts +8 -0
- package/dist/types/model/authorization/Roles.d.ts.map +1 -1
- package/dist/types/model/authorization/TargetIdentityPermission.d.ts +15 -0
- package/dist/types/model/authorization/TargetIdentityPermission.d.ts.map +1 -0
- package/dist/types/model/authorization/index.d.ts +3 -0
- package/dist/types/model/authorization/index.d.ts.map +1 -1
- package/dist/types/model/commands/CommandBus.d.ts.map +1 -1
- package/dist/types/model/commands/apiKey/ApiKeyHelper.d.ts +15 -0
- package/dist/types/model/commands/apiKey/ApiKeyHelper.d.ts.map +1 -1
- package/dist/types/model/commands/apiKey/CreateApiKeyCommand.d.ts +5 -1
- package/dist/types/model/commands/apiKey/CreateApiKeyCommand.d.ts.map +1 -1
- package/dist/types/model/commands/apiKey/DisableApiKeyCommand.d.ts.map +1 -1
- package/dist/types/model/commands/apiKey/DisableIdentityApiKeysCommand.d.ts.map +1 -1
- package/dist/types/model/commands/apiKey/DisableOneOffApiKeyCommand.d.ts.map +1 -1
- package/dist/types/model/commands/apiKey/ProlongApiKeyCommand.d.ts +6 -4
- package/dist/types/model/commands/apiKey/ProlongApiKeyCommand.d.ts.map +1 -1
- package/dist/types/model/commands/authLog/CreateAuthLogEntryCommand.d.ts +1 -0
- package/dist/types/model/commands/authLog/CreateAuthLogEntryCommand.d.ts.map +1 -1
- package/dist/types/model/commands/authPolicy/CreateAuthPolicyCommand.d.ts.map +1 -1
- package/dist/types/model/commands/authPolicy/DeleteAuthPolicyCommand.d.ts.map +1 -1
- package/dist/types/model/commands/authPolicy/UpdateAuthPolicyCommand.d.ts.map +1 -1
- package/dist/types/model/commands/backupCode/ConsumeBackupCodeCommand.d.ts.map +1 -1
- package/dist/types/model/commands/backupCode/CreateBackupCodeCommand.d.ts.map +1 -1
- package/dist/types/model/commands/backupCode/DeleteBackupCodesCommand.d.ts.map +1 -1
- package/dist/types/model/commands/configuration/UpdateConfigurationCommand.d.ts.map +1 -1
- package/dist/types/model/commands/customRole/CreateCustomRoleCommand.d.ts +12 -0
- package/dist/types/model/commands/customRole/CreateCustomRoleCommand.d.ts.map +1 -0
- package/dist/types/model/commands/customRole/DeleteCustomRoleCommand.d.ts +13 -0
- package/dist/types/model/commands/customRole/DeleteCustomRoleCommand.d.ts.map +1 -0
- package/dist/types/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.d.ts +8 -0
- package/dist/types/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.d.ts.map +1 -0
- package/dist/types/model/commands/customRole/UpdateCustomRoleCommand.d.ts +16 -0
- package/dist/types/model/commands/customRole/UpdateCustomRoleCommand.d.ts.map +1 -0
- package/dist/types/model/commands/customRole/index.d.ts +5 -0
- package/dist/types/model/commands/customRole/index.d.ts.map +1 -0
- package/dist/types/model/commands/identity/CreateIdentityCommand.d.ts.map +1 -1
- package/dist/types/model/commands/identity/PatchIdentityGlobalRoles.d.ts.map +1 -1
- package/dist/types/model/commands/idp/ClaimIdpRevalidationCommand.d.ts.map +1 -1
- package/dist/types/model/commands/idp/CreateIdpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/idp/CreateIdpSessionCommand.d.ts.map +1 -1
- package/dist/types/model/commands/idp/DisableIdpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/idp/DisconnectPersonIdentityProviderCommand.d.ts.map +1 -1
- package/dist/types/model/commands/idp/EnableIdpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/idp/UpdateIdpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/idp/UpdateIdpSessionCommand.d.ts.map +1 -1
- package/dist/types/model/commands/index.d.ts +1 -0
- package/dist/types/model/commands/index.d.ts.map +1 -1
- package/dist/types/model/commands/mailTemplate/AddMailTemplateCommand.d.ts.map +1 -1
- package/dist/types/model/commands/mailTemplate/RemoveMailTemplateCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/AddProjectMemberCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/CreateOrUpdateProjectMembershipCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/RemoveProjectMemberCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/{RemoveProjectMembershipsCommand.d.ts → RemoveProjectMembershipCommand.d.ts} +1 -1
- package/dist/types/model/commands/membership/RemoveProjectMembershipCommand.d.ts.map +1 -0
- package/dist/types/model/commands/membership/UpdateProjectMemberCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/index.d.ts +2 -1
- package/dist/types/model/commands/membership/index.d.ts.map +1 -1
- package/dist/types/model/commands/membership/variables/PatchProjectMembershipVariableValuesCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/variables/PatchProjectMembershipVariablesCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/variables/SetProjectMembershipVariableValuesCommand.d.ts.map +1 -1
- package/dist/types/model/commands/membership/variables/index.d.ts +1 -0
- package/dist/types/model/commands/membership/variables/index.d.ts.map +1 -1
- package/dist/types/model/commands/otp/ConfirmOtpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/otp/DisableOtpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/otp/PrepareOtpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/otp/ReEncryptOtpSecretCommand.d.ts.map +1 -1
- package/dist/types/model/commands/otp/SetEmailOtpEnabledCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/ChangePasswordCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/ChangeProfileCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/CreatePersonCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/CreatePersonIdentityProviderIdentifierCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/DisablePersonCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/EnablePersonCommand.d.ts +7 -0
- package/dist/types/model/commands/person/EnablePersonCommand.d.ts.map +1 -0
- package/dist/types/model/commands/person/MarkEmailVerifiedCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/ResetPersonMfaCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/SetMfaGraceUntilCommand.d.ts +8 -3
- package/dist/types/model/commands/person/SetMfaGraceUntilCommand.d.ts.map +1 -1
- package/dist/types/model/commands/person/TogglePersonPasswordlessCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/ActivateOtpCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/ClaimOtpAttemptCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/CreatePersonTokenCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/IncreaseOtpAttemptCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/InvalidateEmailOtpTokensCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/InvalidateTokenCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/ResetPasswordCommand.d.ts +1 -1
- package/dist/types/model/commands/personToken/ResetPasswordCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/SaveEmailOtpTokenCommand.d.ts.map +1 -1
- package/dist/types/model/commands/personToken/SavePersonTokenCommand.d.ts.map +1 -1
- package/dist/types/model/commands/project/CreateProjectCommand.d.ts.map +1 -1
- package/dist/types/model/commands/project/SetProjectSecretCommand.d.ts.map +1 -1
- package/dist/types/model/commands/project/UpdateProjectCommand.d.ts.map +1 -1
- package/dist/types/model/commands/rateLimit/RecordRateLimitEventCommand.d.ts.map +1 -1
- package/dist/types/model/dtos/Password.d.ts.map +1 -1
- package/dist/types/model/mailing/UserMailer.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/BackupCodesExhausted.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/EmailChangeNotify.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/EmailChangeVerify.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/EmailOtp.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/EmailVerification.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/ExistingUserInvited.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/ForcedSignOut.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/Layout.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/NewUserInvited.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/PasswordReset.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/PasswordlessSignIn.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/templates/UnusualLogin.mustache.d.ts.map +1 -1
- package/dist/types/model/mailing/type.d.ts.map +1 -1
- package/dist/types/model/queries/apiKey/ApiKeyListQuery.d.ts.map +1 -1
- package/dist/types/model/queries/apiKey/ApiKeyQuery.d.ts +4 -0
- package/dist/types/model/queries/apiKey/ApiKeyQuery.d.ts.map +1 -1
- package/dist/types/model/queries/apiKey/ApiKeySessionsQuery.d.ts +1 -4
- package/dist/types/model/queries/apiKey/ApiKeySessionsQuery.d.ts.map +1 -1
- package/dist/types/model/queries/authLog/AuthLogQuery.d.ts.map +1 -1
- package/dist/types/model/queries/authLog/NextLoginAttemptQuery.d.ts +2 -2
- package/dist/types/model/queries/authLog/NextLoginAttemptQuery.d.ts.map +1 -1
- package/dist/types/model/queries/authLog/NextMailAttemptQuery.d.ts +2 -2
- package/dist/types/model/queries/authLog/NextMailAttemptQuery.d.ts.map +1 -1
- package/dist/types/model/queries/authPolicy/AuthPoliciesQuery.d.ts.map +1 -1
- package/dist/types/model/queries/configuration/ConfigurationQuery.d.ts.map +1 -1
- package/dist/types/model/queries/customRole/CustomRolesQuery.d.ts +12 -0
- package/dist/types/model/queries/customRole/CustomRolesQuery.d.ts.map +1 -0
- package/dist/types/model/queries/customRole/index.d.ts +2 -0
- package/dist/types/model/queries/customRole/index.d.ts.map +1 -0
- package/dist/types/model/queries/identity/IdentitiesHoldingRoleCountQuery.d.ts +8 -0
- package/dist/types/model/queries/identity/IdentitiesHoldingRoleCountQuery.d.ts.map +1 -0
- package/dist/types/model/queries/identity/IdentityQuery.d.ts +3 -2
- package/dist/types/model/queries/identity/IdentityQuery.d.ts.map +1 -1
- package/dist/types/model/queries/identity/index.d.ts +1 -0
- package/dist/types/model/queries/identity/index.d.ts.map +1 -1
- package/dist/types/model/queries/idp/IdentityProviderBySlugQuery.d.ts.map +1 -1
- package/dist/types/model/queries/idp/IdentityProvidersQuery.d.ts.map +1 -1
- package/dist/types/model/queries/idp/IdpSessionByApiKeyQuery.d.ts.map +1 -1
- package/dist/types/model/queries/idp/IdpSessionsBySidQuery.d.ts.map +1 -1
- package/dist/types/model/queries/idp/IdpSessionsBySubQuery.d.ts.map +1 -1
- package/dist/types/model/queries/idp/LocalAuthDisablingIdpsQuery.d.ts +18 -0
- package/dist/types/model/queries/idp/LocalAuthDisablingIdpsQuery.d.ts.map +1 -0
- package/dist/types/model/queries/idp/PersonIdentityProvidersQuery.d.ts +1 -0
- package/dist/types/model/queries/idp/PersonIdentityProvidersQuery.d.ts.map +1 -1
- package/dist/types/model/queries/idp/helpers.d.ts +1 -1
- package/dist/types/model/queries/idp/helpers.d.ts.map +1 -1
- package/dist/types/model/queries/idp/index.d.ts +1 -0
- package/dist/types/model/queries/idp/index.d.ts.map +1 -1
- package/dist/types/model/queries/idp/types.d.ts +1 -0
- package/dist/types/model/queries/idp/types.d.ts.map +1 -1
- package/dist/types/model/queries/index.d.ts +1 -0
- package/dist/types/model/queries/index.d.ts.map +1 -1
- package/dist/types/model/queries/mailTemplate/MailTemplateListQuery.d.ts.map +1 -1
- package/dist/types/model/queries/mailTemplate/MailTemplateQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/AllProjectRolesByIdentityQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/IdentityHasProjectMembershipsQuery.d.ts +7 -0
- package/dist/types/model/queries/membership/IdentityHasProjectMembershipsQuery.d.ts.map +1 -0
- package/dist/types/model/queries/membership/ProjectMembersQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/ProjectMembershipByIdentityQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/ProjectRolesByIdentityQuery.d.ts.map +1 -1
- package/dist/types/model/queries/membership/ProjectSlugSpecification.d.ts.map +1 -1
- package/dist/types/model/queries/membership/index.d.ts +1 -0
- package/dist/types/model/queries/membership/index.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonByIdPQuery.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonByIdentityBatchQuery.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonQuery.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonQueryBuilderFactory.d.ts.map +1 -1
- package/dist/types/model/queries/person/PersonsQuery.d.ts.map +1 -1
- package/dist/types/model/queries/person/types.d.ts +3 -0
- package/dist/types/model/queries/person/types.d.ts.map +1 -1
- package/dist/types/model/queries/personToken/PersonTokenQuery.d.ts.map +1 -1
- package/dist/types/model/queries/project/ProjectBySlugQuery.d.ts.map +1 -1
- package/dist/types/model/queries/project/ProjectSecretKeysQuery.d.ts.map +1 -1
- package/dist/types/model/queries/project/ProjectSecretsQuery.d.ts.map +1 -1
- package/dist/types/model/queries/project/ProjectUpdateTimestampQuery.d.ts.map +1 -1
- package/dist/types/model/queries/project/ProjectsByIdentityQuery.d.ts.map +1 -1
- package/dist/types/model/queries/project/ProjectsQuery.d.ts.map +1 -1
- package/dist/types/model/queries/rateLimit/RateLimitCountQuery.d.ts +2 -2
- package/dist/types/model/queries/rateLimit/RateLimitCountQuery.d.ts.map +1 -1
- package/dist/types/model/service/AuthLogService.d.ts.map +1 -1
- package/dist/types/model/service/AuthPolicyManager.d.ts.map +1 -1
- package/dist/types/model/service/AuthPolicyResolver.d.ts.map +1 -1
- package/dist/types/model/service/BackupCodeManager.d.ts.map +1 -1
- package/dist/types/model/service/ConfigurationManager.d.ts.map +1 -1
- package/dist/types/model/service/CustomRoleManager.d.ts +46 -0
- package/dist/types/model/service/CustomRoleManager.d.ts.map +1 -0
- package/dist/types/model/service/EmailChangeManager.d.ts.map +1 -1
- package/dist/types/model/service/EmailOtpManager.d.ts.map +1 -1
- package/dist/types/model/service/EmailValidator.d.ts.map +1 -1
- package/dist/types/model/service/EmailVerificationManager.d.ts.map +1 -1
- package/dist/types/model/service/GlobalRoleValidator.d.ts +5 -0
- package/dist/types/model/service/GlobalRoleValidator.d.ts.map +1 -0
- package/dist/types/model/service/HibpChecker.d.ts.map +1 -1
- package/dist/types/model/service/IDPSignInManager.d.ts +13 -1
- package/dist/types/model/service/IDPSignInManager.d.ts.map +1 -1
- package/dist/types/model/service/InviteManager.d.ts.map +1 -1
- package/dist/types/model/service/LoginRiskAnalyzer.d.ts +1 -1
- package/dist/types/model/service/LoginRiskAnalyzer.d.ts.map +1 -1
- package/dist/types/model/service/MailTemplateManager.d.ts.map +1 -1
- package/dist/types/model/service/MembershipValidator.d.ts.map +1 -1
- package/dist/types/model/service/OtpAuthenticator.d.ts.map +1 -1
- package/dist/types/model/service/OtpManager.d.ts.map +1 -1
- package/dist/types/model/service/PanelAccessResolver.d.ts +19 -0
- package/dist/types/model/service/PanelAccessResolver.d.ts.map +1 -0
- package/dist/types/model/service/PasswordChangeManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordResetManager.d.ts.map +1 -1
- package/dist/types/model/service/PasswordStrengthValidator.d.ts.map +1 -1
- package/dist/types/model/service/PasswordlessSignInManager.d.ts.map +1 -1
- package/dist/types/model/service/PersonAccessManager.d.ts +5 -2
- package/dist/types/model/service/PersonAccessManager.d.ts.map +1 -1
- package/dist/types/model/service/PersonManager.d.ts.map +1 -1
- package/dist/types/model/service/ProjectManager.d.ts.map +1 -1
- package/dist/types/model/service/ProjectMemberManager.d.ts.map +1 -1
- package/dist/types/model/service/RateLimiter.d.ts +1 -1
- package/dist/types/model/service/RateLimiter.d.ts.map +1 -1
- package/dist/types/model/service/RolesManager.d.ts +6 -1
- package/dist/types/model/service/RolesManager.d.ts.map +1 -1
- package/dist/types/model/service/SecretsManager.d.ts.map +1 -1
- package/dist/types/model/service/SignInManager.d.ts.map +1 -1
- package/dist/types/model/service/SignOutManager.d.ts.map +1 -1
- package/dist/types/model/service/SignUpManager.d.ts +3 -1
- package/dist/types/model/service/SignUpManager.d.ts.map +1 -1
- package/dist/types/model/service/apiKey/ApiKeyManager.d.ts +4 -1
- package/dist/types/model/service/apiKey/ApiKeyManager.d.ts.map +1 -1
- package/dist/types/model/service/apiKey/ApiKeyService.d.ts +2 -2
- package/dist/types/model/service/apiKey/ApiKeyService.d.ts.map +1 -1
- package/dist/types/model/service/apiKey/UnpersistedApiKeyManager.d.ts +18 -0
- package/dist/types/model/service/apiKey/UnpersistedApiKeyManager.d.ts.map +1 -1
- package/dist/types/model/service/captcha/CaptchaValidator.d.ts.map +1 -1
- package/dist/types/model/service/captcha/HCaptchaProvider.d.ts.map +1 -1
- package/dist/types/model/service/captcha/RecaptchaV3Provider.d.ts.map +1 -1
- package/dist/types/model/service/captcha/TurnstileProvider.d.ts.map +1 -1
- package/dist/types/model/service/helpers/getPreferredProject.d.ts.map +1 -1
- package/dist/types/model/service/helpers/isPasswordlessEnabled.d.ts.map +1 -1
- package/dist/types/model/service/idp/BackchannelLogoutManager.d.ts.map +1 -1
- package/dist/types/model/service/idp/ClaimMapping.d.ts +330 -0
- package/dist/types/model/service/idp/ClaimMapping.d.ts.map +1 -0
- package/dist/types/model/service/idp/ClaimMappingEvaluator.d.ts +30 -0
- package/dist/types/model/service/idp/ClaimMappingEvaluator.d.ts.map +1 -0
- package/dist/types/model/service/idp/ClaimMappingValidation.d.ts +55 -0
- package/dist/types/model/service/idp/ClaimMappingValidation.d.ts.map +1 -0
- package/dist/types/model/service/idp/IDPClaimSyncService.d.ts +113 -0
- package/dist/types/model/service/idp/IDPClaimSyncService.d.ts.map +1 -0
- package/dist/types/model/service/idp/IDPHandlerRegistry.d.ts.map +1 -1
- package/dist/types/model/service/idp/IDPManager.d.ts +31 -1
- package/dist/types/model/service/idp/IDPManager.d.ts.map +1 -1
- package/dist/types/model/service/idp/IdentityProviderHandler.d.ts +7 -0
- package/dist/types/model/service/idp/IdentityProviderHandler.d.ts.map +1 -1
- package/dist/types/model/service/idp/IdpSessionRevalidator.d.ts +15 -1
- package/dist/types/model/service/idp/IdpSessionRevalidator.d.ts.map +1 -1
- package/dist/types/model/service/idp/PersonIdentityProviderManager.d.ts.map +1 -1
- package/dist/types/model/service/idp/index.d.ts +4 -0
- package/dist/types/model/service/idp/index.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/AppleProvider.d.ts +2 -2
- package/dist/types/model/service/idp/providers/AppleProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/FacebookProvider.d.ts +2 -2
- package/dist/types/model/service/idp/providers/FacebookProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts +13 -1
- package/dist/types/model/service/idp/providers/OIDCHelpers.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCProvider.d.ts +1 -1
- package/dist/types/model/service/idp/providers/OIDCProvider.d.ts.map +1 -1
- package/dist/types/model/service/idp/providers/OIDCTypes.d.ts +5 -5
- package/dist/types/model/service/idp/providers/helpers.d.ts.map +1 -1
- package/dist/types/model/service/index.d.ts +3 -0
- package/dist/types/model/service/index.d.ts.map +1 -1
- package/dist/types/model/service/membershipUtils.d.ts.map +1 -1
- package/dist/types/model/type/AuthLog.d.ts +1 -1
- package/dist/types/model/type/AuthLog.d.ts.map +1 -1
- package/dist/types/model/type/Config.d.ts +2 -0
- package/dist/types/model/type/Config.d.ts.map +1 -1
- package/dist/types/model/type/CustomRole.d.ts +9 -0
- package/dist/types/model/type/CustomRole.d.ts.map +1 -0
- package/dist/types/model/type/IdentityProvider.d.ts +2 -0
- package/dist/types/model/type/IdentityProvider.d.ts.map +1 -1
- package/dist/types/model/type/PersonToken.d.ts +2 -0
- package/dist/types/model/type/PersonToken.d.ts.map +1 -1
- package/dist/types/model/type/RateLimit.d.ts +6 -6
- package/dist/types/model/type/RateLimit.d.ts.map +1 -1
- package/dist/types/model/type/index.d.ts +1 -0
- package/dist/types/model/type/index.d.ts.map +1 -1
- package/dist/types/model/utils/DatabaseContext.d.ts +15 -1
- package/dist/types/model/utils/DatabaseContext.d.ts.map +1 -1
- package/dist/types/model/utils/Response.d.ts.map +1 -1
- package/dist/types/model/utils/email.d.ts.map +1 -1
- package/dist/types/model/utils/hex.d.ts.map +1 -1
- package/dist/types/model/utils/interval.d.ts.map +1 -1
- package/dist/types/model/utils/time.d.ts.map +1 -1
- package/dist/types/model/utils/token.d.ts +1 -2
- package/dist/types/model/utils/token.d.ts.map +1 -1
- package/dist/types/resolvers/ResolverFactory.d.ts +6 -0
- package/dist/types/resolvers/ResolverFactory.d.ts.map +1 -1
- package/dist/types/resolvers/TenantResolverContext.d.ts +1 -1
- package/dist/types/resolvers/TenantResolverContext.d.ts.map +1 -1
- package/dist/types/resolvers/TenantResolverContextFactory.d.ts +1 -1
- package/dist/types/resolvers/TenantResolverContextFactory.d.ts.map +1 -1
- package/dist/types/resolvers/errorUtils.d.ts.map +1 -1
- package/dist/types/resolvers/membershipUtils.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/apiKey/DisableApiKeyMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/configuration/AuthPolicyMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/configuration/ConfigurationMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/customRole/CustomRoleMutationResolver.d.ts +16 -0
- package/dist/types/resolvers/mutation/customRole/CustomRoleMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/identity/GlobalRolesMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/idp/AddIDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/idp/DisableIDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/idp/DisconnectMyIdentityProviderMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/idp/EnableIDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/idp/UpdateIDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/idp/audit.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.d.ts +2 -0
- package/dist/types/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/ChangePasswordMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/ChangeProfileMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/DisablePersonMutationResolver.d.ts +1 -1
- package/dist/types/resolvers/mutation/person/DisablePersonMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/EmailOtpMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/EmailVerificationMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/EnablePersonMutationResolver.d.ts +11 -0
- package/dist/types/resolvers/mutation/person/EnablePersonMutationResolver.d.ts.map +1 -0
- package/dist/types/resolvers/mutation/person/ForceSignOutMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/IDPMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/InviteMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/OtpMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/PasswordlessMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/RegenerateBackupCodesMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/ResetPasswordMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/ResetPersonMfaMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/RevokeSessionMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/SignInMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/SignOutMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/SignUpMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/person/TogglePasswordlessMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/project/CreateProjectMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/project/SetProjectSecretMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/project/UpdateProjectMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/projectMember/AddProjectMemberMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/projectMember/RemoveProjectMemberMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/projectMember/UpdateProjectMemberMutationResolver.d.ts.map +1 -1
- package/dist/types/resolvers/mutation/projectMember/audit.d.ts +1 -1
- package/dist/types/resolvers/mutation/projectMember/audit.d.ts.map +1 -1
- package/dist/types/resolvers/query/ApiKeyQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/AuthLogQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/AuthPolicyQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/ConfigurationQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/CustomRoleQueryResolver.d.ts +11 -0
- package/dist/types/resolvers/query/CustomRoleQueryResolver.d.ts.map +1 -0
- package/dist/types/resolvers/query/IDPQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/MailTemplateQueryResolver.d.ts +1 -0
- package/dist/types/resolvers/query/MailTemplateQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/MeQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/PersonQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/ProjectMembersQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/query/ProjectQueryResolver.d.ts.map +1 -1
- package/dist/types/resolvers/responseHelpers/ApiKeyResponseFactory.d.ts.map +1 -1
- package/dist/types/resolvers/responseHelpers/PersonResponseFactory.d.ts.map +1 -1
- package/dist/types/resolvers/responseHelpers/ProjectResponseFactory.d.ts +10 -0
- package/dist/types/resolvers/responseHelpers/ProjectResponseFactory.d.ts.map +1 -0
- package/dist/types/resolvers/responseHelpers/SignInResponseFactory.d.ts.map +1 -1
- package/dist/types/resolvers/types/IdentityTypeResolver.d.ts.map +1 -1
- package/dist/types/resolvers/types/PersonTypeResolver.d.ts +15 -1
- package/dist/types/resolvers/types/PersonTypeResolver.d.ts.map +1 -1
- package/dist/types/resolvers/types/ProjectTypeResolver.d.ts +15 -6
- package/dist/types/resolvers/types/ProjectTypeResolver.d.ts.map +1 -1
- package/dist/types/schema/index.d.ts +381 -21
- package/dist/types/schema/index.d.ts.map +1 -1
- package/dist/types/schema/tenant.graphql.d.ts.map +1 -1
- package/dist/types/schema/types.d.ts +2 -2
- package/dist/types/schema/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/utils/Mailer.d.ts.map +1 -1
- package/dist/types/utils/TemplateRenderer.d.ts.map +1 -1
- package/dist/types/utils/array.d.ts.map +1 -1
- package/dist/types/utils/batchQuery.d.ts.map +1 -1
- package/package.json +12 -12
- package/readme.md +56 -0
- package/src/TenantContainer.ts +46 -8
- package/src/migrations/2026-06-18-120000-idp-claim-mapping.ts +15 -0
- package/src/migrations/2026-08-03-120000-person-enable-auth-log.ts +12 -0
- package/src/migrations/2026-08-04-120000-config-panel.ts +13 -0
- package/src/migrations/2026-09-04-120000-idp-disable-local-authentication.ts +18 -0
- package/src/migrations/2026-09-11-120000-custom-role.ts +19 -0
- package/src/migrations/runner.ts +10 -0
- package/src/migrations/snapshot.ts +22 -2
- package/src/model/authorization/CustomRoleAuthorizator.ts +72 -0
- package/src/model/authorization/CustomRolePermissions.ts +558 -0
- package/src/model/authorization/PermissionActions.ts +74 -17
- package/src/model/authorization/PermissionContextFactory.ts +39 -3
- package/src/model/authorization/PermissionsFactory.ts +65 -31
- package/src/model/authorization/Roles.ts +13 -0
- package/src/model/authorization/TargetIdentityPermission.ts +37 -0
- package/src/model/authorization/index.ts +3 -0
- package/src/model/commands/apiKey/ApiKeyHelper.ts +23 -0
- package/src/model/commands/apiKey/CreateApiKeyCommand.ts +12 -5
- package/src/model/commands/apiKey/ProlongApiKeyCommand.ts +22 -14
- package/src/model/commands/authLog/CreateAuthLogEntryCommand.ts +1 -0
- package/src/model/commands/configuration/UpdateConfigurationCommand.ts +5 -4
- package/src/model/commands/customRole/CreateCustomRoleCommand.ts +30 -0
- package/src/model/commands/customRole/DeleteCustomRoleCommand.ts +20 -0
- package/src/model/commands/customRole/RemoveCustomRoleAssignmentsCommand.ts +20 -0
- package/src/model/commands/customRole/UpdateCustomRoleCommand.ts +30 -0
- package/src/model/commands/customRole/index.ts +4 -0
- package/src/model/commands/identity/PatchIdentityGlobalRoles.ts +1 -1
- package/src/model/commands/idp/ClaimIdpRevalidationCommand.ts +8 -7
- package/src/model/commands/idp/CreateIdpCommand.ts +7 -1
- package/src/model/commands/idp/CreateIdpSessionCommand.ts +5 -2
- package/src/model/commands/idp/UpdateIdpCommand.ts +5 -1
- package/src/model/commands/idp/UpdateIdpSessionCommand.ts +3 -2
- package/src/model/commands/index.ts +1 -0
- package/src/model/commands/membership/UpdateProjectMemberCommand.ts +1 -1
- package/src/model/commands/membership/index.ts +2 -1
- package/src/model/commands/membership/variables/index.ts +1 -0
- package/src/model/commands/person/CreatePersonCommand.ts +1 -0
- package/src/model/commands/person/EnablePersonCommand.ts +18 -0
- package/src/model/commands/person/SetMfaGraceUntilCommand.ts +9 -4
- package/src/model/commands/personToken/ResetPasswordCommand.ts +2 -3
- package/src/model/commands/personToken/SaveEmailOtpTokenCommand.ts +5 -4
- package/src/model/commands/personToken/SavePersonTokenCommand.ts +13 -7
- package/src/model/commands/rateLimit/RecordRateLimitEventCommand.ts +3 -1
- package/src/model/queries/apiKey/ApiKeyQuery.ts +17 -1
- package/src/model/queries/apiKey/ApiKeySessionsQuery.ts +2 -2
- package/src/model/queries/authLog/NextLoginAttemptQuery.ts +14 -12
- package/src/model/queries/authLog/NextMailAttemptQuery.ts +12 -10
- package/src/model/queries/configuration/ConfigurationQuery.ts +4 -0
- package/src/model/queries/customRole/CustomRolesQuery.ts +30 -0
- package/src/model/queries/customRole/index.ts +1 -0
- package/src/model/queries/identity/IdentitiesHoldingRoleCountQuery.ts +17 -0
- package/src/model/queries/identity/IdentityQuery.ts +10 -4
- package/src/model/queries/identity/index.ts +1 -0
- package/src/model/queries/idp/LocalAuthDisablingIdpsQuery.ts +41 -0
- package/src/model/queries/idp/PersonIdentityProvidersQuery.ts +2 -0
- package/src/model/queries/idp/helpers.ts +3 -2
- package/src/model/queries/idp/index.ts +1 -0
- package/src/model/queries/idp/types.ts +1 -0
- package/src/model/queries/index.ts +1 -0
- package/src/model/queries/membership/IdentityHasProjectMembershipsQuery.ts +17 -0
- package/src/model/queries/membership/ProjectMembersQuery.ts +1 -0
- package/src/model/queries/membership/index.ts +1 -0
- package/src/model/queries/person/PersonQueryBuilderFactory.ts +4 -0
- package/src/model/queries/person/types.ts +3 -0
- package/src/model/queries/personToken/PersonTokenQuery.ts +4 -0
- package/src/model/queries/rateLimit/RateLimitCountQuery.ts +5 -2
- package/src/model/service/AuthLogService.ts +18 -2
- package/src/model/service/CustomRoleManager.ts +221 -0
- package/src/model/service/EmailChangeManager.ts +3 -3
- package/src/model/service/EmailOtpManager.ts +0 -1
- package/src/model/service/EmailVerificationManager.ts +3 -3
- package/src/model/service/GlobalRoleValidator.ts +30 -0
- package/src/model/service/IDPSignInManager.ts +74 -14
- package/src/model/service/PanelAccessResolver.ts +32 -0
- package/src/model/service/PasswordResetManager.ts +11 -3
- package/src/model/service/PasswordlessSignInManager.ts +26 -6
- package/src/model/service/PersonAccessManager.ts +19 -3
- package/src/model/service/RateLimiter.ts +2 -3
- package/src/model/service/RolesManager.ts +28 -14
- package/src/model/service/SignInManager.ts +16 -8
- package/src/model/service/SignUpManager.ts +12 -4
- package/src/model/service/apiKey/ApiKeyManager.ts +75 -53
- package/src/model/service/apiKey/ApiKeyService.ts +2 -2
- package/src/model/service/apiKey/UnpersistedApiKeyManager.ts +24 -0
- package/src/model/service/idp/ClaimMapping.ts +283 -0
- package/src/model/service/idp/ClaimMappingEvaluator.ts +226 -0
- package/src/model/service/idp/ClaimMappingValidation.ts +158 -0
- package/src/model/service/idp/IDPClaimSyncService.ts +401 -0
- package/src/model/service/idp/IDPManager.ts +126 -21
- package/src/model/service/idp/IdentityProviderHandler.ts +7 -0
- package/src/model/service/idp/IdpSessionRevalidator.ts +130 -25
- package/src/model/service/idp/PersonIdentityProviderManager.ts +8 -0
- package/src/model/service/idp/index.ts +4 -0
- package/src/model/service/idp/providers/OIDCHelpers.ts +161 -53
- package/src/model/service/idp/providers/OIDCProvider.ts +4 -1
- package/src/model/service/index.ts +3 -0
- package/src/model/type/AuthLog.ts +4 -0
- package/src/model/type/Config.ts +3 -0
- package/src/model/type/CustomRole.ts +8 -0
- package/src/model/type/IdentityProvider.ts +2 -0
- package/src/model/type/PersonToken.ts +2 -0
- package/src/model/type/index.ts +1 -0
- package/src/model/utils/DatabaseContext.ts +30 -6
- package/src/model/utils/token.ts +2 -3
- package/src/resolvers/ResolverFactory.ts +17 -0
- package/src/resolvers/TenantResolverContext.ts +1 -1
- package/src/resolvers/TenantResolverContextFactory.ts +5 -5
- package/src/resolvers/mutation/apiKey/CreateApiKeyMutationResolver.ts +13 -5
- package/src/resolvers/mutation/customRole/CustomRoleMutationResolver.ts +125 -0
- package/src/resolvers/mutation/identity/GlobalRolesMutationResolver.ts +30 -7
- package/src/resolvers/mutation/idp/AddIDPMutationResolver.ts +1 -0
- package/src/resolvers/mutation/idp/UpdateIDPMutationResolver.ts +1 -0
- package/src/resolvers/mutation/idp/audit.ts +1 -0
- package/src/resolvers/mutation/mailTemplates/MailTemplateMutationResolver.ts +48 -14
- package/src/resolvers/mutation/person/ChangePasswordMutationResolver.ts +2 -2
- package/src/resolvers/mutation/person/ChangeProfileMutationResolver.ts +9 -3
- package/src/resolvers/mutation/person/DisablePersonMutationResolver.ts +5 -5
- package/src/resolvers/mutation/person/EmailVerificationMutationResolver.ts +1 -1
- package/src/resolvers/mutation/person/EnablePersonMutationResolver.ts +50 -0
- package/src/resolvers/mutation/person/ForceSignOutMutationResolver.ts +2 -2
- package/src/resolvers/mutation/person/IDPMutationResolver.ts +31 -0
- package/src/resolvers/mutation/person/PasswordlessMutationResolver.ts +7 -0
- package/src/resolvers/mutation/person/ResetPasswordMutationResolver.ts +1 -1
- package/src/resolvers/mutation/person/ResetPersonMfaMutationResolver.ts +2 -2
- package/src/resolvers/mutation/person/SignInMutationResolver.ts +22 -9
- package/src/resolvers/mutation/person/SignUpMutationResolver.ts +1 -1
- package/src/resolvers/query/CustomRoleQueryResolver.ts +41 -0
- package/src/resolvers/query/MailTemplateQueryResolver.ts +13 -8
- package/src/resolvers/query/PersonQueryResolver.ts +3 -1
- package/src/resolvers/query/ProjectQueryResolver.ts +3 -2
- package/src/resolvers/responseHelpers/PersonResponseFactory.ts +5 -0
- package/src/resolvers/responseHelpers/ProjectResponseFactory.ts +24 -0
- package/src/resolvers/responseHelpers/SignInResponseFactory.ts +1 -1
- package/src/resolvers/types/IdentityTypeResolver.ts +50 -14
- package/src/resolvers/types/PersonTypeResolver.ts +45 -4
- package/src/resolvers/types/ProjectTypeResolver.ts +33 -1
- package/src/schema/index.ts +483 -15
- package/src/schema/tenant.graphql.ts +275 -15
- package/tests/cases/integration/database/dbClock.test.ts +171 -0
- package/tests/cases/integration/mocked/antiAbuseSignUp.test.ts +2 -2
- package/tests/cases/integration/mocked/changeMyProfileEmailVerificationMutation.test.ts +10 -11
- package/tests/cases/integration/mocked/changePasswordMutation.test.ts +43 -0
- package/tests/cases/integration/mocked/changeProfileMutation.test.ts +2 -0
- package/tests/cases/integration/mocked/configurationPanel.test.ts +105 -0
- package/tests/cases/integration/mocked/confirmEmailChangeMutation.test.ts +4 -2
- package/tests/cases/integration/mocked/createSessionKeyMutation.test.ts +33 -0
- package/tests/cases/integration/mocked/customRoleCrud.test.ts +442 -0
- package/tests/cases/integration/mocked/disablePersonMutation.test.ts +92 -0
- package/tests/cases/integration/mocked/enablePersonMutation.test.ts +137 -0
- package/tests/cases/integration/mocked/forceSignOutPersonMutation.test.ts +3 -1
- package/tests/cases/integration/mocked/globalIdentityRolesMutation.test.ts +169 -3
- package/tests/cases/integration/mocked/gql/passwordless.ts +10 -0
- package/tests/cases/integration/mocked/idpClaimMappingConfig.test.ts +332 -0
- package/tests/cases/integration/mocked/listProjectMembersQuery.test.ts +8 -3
- package/tests/cases/integration/mocked/localAuthenticationDisabled.test.ts +182 -0
- package/tests/cases/integration/mocked/mailTemplateScope.test.ts +95 -0
- package/tests/cases/integration/mocked/permissionsQuery.test.ts +153 -0
- package/tests/cases/integration/mocked/personByIdQuery.test.ts +59 -1
- package/tests/cases/integration/mocked/personIdentityProviders.test.ts +67 -0
- package/tests/cases/integration/mocked/personsQuery.test.ts +38 -5
- package/tests/cases/integration/mocked/requestEmailVerificationMutation.test.ts +15 -6
- package/tests/cases/integration/mocked/resetPersonMfaMutation.test.ts +5 -3
- package/tests/cases/integration/mocked/signInAnomalyDetection.test.ts +13 -2
- package/tests/cases/integration/mocked/signInIdpClaimMapping.test.ts +1258 -0
- package/tests/cases/integration/mocked/signInIdpClaimMappingFixes.test.ts +344 -0
- package/tests/cases/integration/mocked/signInIdpClaimMappingSafety.test.ts +531 -0
- package/tests/cases/integration/mocked/signInIdpMutation.test.ts +105 -1
- package/tests/cases/integration/mocked/signInMfaEnforcement.test.ts +20 -5
- package/tests/cases/integration/mocked/signInMutation.test.ts +14 -0
- package/tests/cases/integration/mocked/signInPasswordlessMutation.test.ts +38 -1
- package/tests/cases/integration/mocked/signUpMutation.test.ts +62 -3
- package/tests/cases/integration/mocked/sql/createPersonTokenSql.ts +4 -3
- package/tests/cases/integration/mocked/sql/createSessionKeySql.ts +2 -2
- package/tests/cases/integration/mocked/sql/emailOtpSql.ts +10 -8
- package/tests/cases/integration/mocked/sql/getApiKeySql.ts +2 -2
- package/tests/cases/integration/mocked/sql/getConfigSql.ts +3 -0
- package/tests/cases/integration/mocked/sql/getCustomRolesSql.ts +25 -0
- package/tests/cases/integration/mocked/sql/getIdentityProjectMembershipPresenceSql.ts +11 -0
- package/tests/cases/integration/mocked/sql/getIdpBySlugSql.ts +1 -1
- package/tests/cases/integration/mocked/sql/getNextLoginAttemptSql.ts +15 -11
- package/tests/cases/integration/mocked/sql/getNextMailAttemptSql.ts +12 -13
- package/tests/cases/integration/mocked/sql/getPersonByEmailSql.ts +5 -2
- package/tests/cases/integration/mocked/sql/getPersonByIdSql.ts +1 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdentity.ts +1 -1
- package/tests/cases/integration/mocked/sql/getPersonByIdpSql.ts +1 -1
- package/tests/cases/integration/mocked/sql/getPersonsByIdentitySql.ts +1 -1
- package/tests/cases/integration/mocked/sql/getProjectBySlugSql.ts +1 -1
- package/tests/cases/integration/mocked/sql/listPersonsSql.ts +5 -2
- package/tests/cases/integration/mocked/sql/listSessionsSql.ts +3 -3
- package/tests/cases/integration/mocked/sql/localAuthDisablingIdpsSql.ts +21 -0
- package/tests/cases/integration/mocked/sql/personIdentityProvidersSql.ts +4 -2
- package/tests/cases/integration/mocked/sql/removeMembershipSql.ts +14 -0
- package/tests/cases/integration/mocked/sql/sqlTransaction.ts +28 -0
- package/tests/cases/integration/mocked/trustForwardedClientInfo.test.ts +60 -3
- package/tests/cases/integration/mocked/verifyEmailMutation.test.ts +9 -5
- package/tests/cases/unit/apiKey/createSessionApiKeyPolicy.test.ts +9 -6
- package/tests/cases/unit/apiKey/prolongApiKeyCommand.test.ts +29 -19
- package/tests/cases/unit/apiKey/unpersistedApiKeyManager.test.ts +4 -5
- package/tests/cases/unit/apiKey/verifyAndProlongIdle.test.ts +16 -6
- package/tests/cases/unit/apiKey/verifyAndProlongReplica.test.ts +173 -0
- package/tests/cases/unit/authLogBaselineWrite.test.ts +26 -3
- package/tests/cases/unit/backupCodeManager.test.ts +1 -0
- package/tests/cases/unit/customRoleAuthorizator.test.ts +149 -0
- package/tests/cases/unit/customRolePermissions.test.ts +583 -0
- package/tests/cases/unit/databaseContextRetry.test.ts +81 -0
- package/tests/cases/unit/emailOtpManager.test.ts +10 -8
- package/tests/cases/unit/idp/claimIdpRevalidation.test.ts +50 -0
- package/tests/cases/unit/idp/claimMappingEvaluator.test.ts +554 -0
- package/tests/cases/unit/idp/claimMappingValidation.test.ts +134 -0
- package/tests/cases/unit/idp/idpManagerConfigMerge.test.ts +97 -0
- package/tests/cases/unit/idp/idpManagerUnknownConfigKeys.test.ts +108 -0
- package/tests/cases/unit/idp/idpSessionRevalidator.test.ts +261 -26
- package/tests/cases/unit/idp/oidcClaims.test.ts +29 -0
- package/tests/cases/unit/idp/oidcResponse.test.ts +54 -0
- package/tests/cases/unit/idp/oidcRevalidate.test.ts +94 -2
- package/tests/cases/unit/otpManager.test.ts +1 -0
- package/tests/cases/unit/panelAccessResolver.test.ts +57 -0
- package/tests/cases/unit/rateLimiter.test.ts +7 -7
- package/tests/cases/unit/savePersonTokenCommand.test.ts +40 -0
- package/tests/cases/unit/updateConfigurationCommand.test.ts +63 -0
- package/tests/src/IdPMock.ts +6 -0
- package/tests/src/testTenant.ts +60 -12
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +0 -1
- package/dist/development/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +0 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.cjs.map +0 -1
- package/dist/production/src/model/commands/membership/RemoveProjectMembershipsCommand.js.map +0 -1
- package/dist/types/model/commands/membership/RemoveProjectMembershipsCommand.d.ts.map +0 -1
- /package/src/model/commands/membership/{RemoveProjectMembershipsCommand.ts → RemoveProjectMembershipCommand.ts} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../queries/apiKey/ApiKeyQuery.cjs");
|
|
4
|
+
require("@contember/database");
|
|
5
|
+
require("../type/ApiKey.cjs");
|
|
6
|
+
const IdentityHasProjectMembershipsQuery = require("../queries/membership/IdentityHasProjectMembershipsQuery.cjs");
|
|
7
|
+
const IdentityQuery = require("../queries/identity/IdentityQuery.cjs");
|
|
8
|
+
require("./PermissionActions.cjs");
|
|
9
|
+
require("@contember/authorization");
|
|
10
|
+
const Roles = require("./Roles.cjs");
|
|
11
|
+
require("./CustomRolePermissions.cjs");
|
|
12
|
+
require("./PermissionContext.cjs");
|
|
13
|
+
require("@contember/schema");
|
|
14
|
+
const batchQuery = require("../../utils/batchQuery.cjs");
|
|
15
|
+
const projectMembershipPresenceLoader = batchQuery.batchLoader(
|
|
16
|
+
async (identityIds, db) => await db.queryHandler.fetch(new IdentityHasProjectMembershipsQuery.IdentityHasProjectMembershipsQuery(identityIds)),
|
|
17
|
+
(identityId, identitiesWithMemberships) => identitiesWithMemberships.has(identityId)
|
|
18
|
+
);
|
|
19
|
+
const targetIdentityLoader = batchQuery.batchLoader(
|
|
20
|
+
async (identityIds, db) => {
|
|
21
|
+
const identities = await db.queryHandler.fetch(new IdentityQuery.IdentityQuery(identityIds));
|
|
22
|
+
return Object.fromEntries(identities.map((identity) => [identity.id, identity]));
|
|
23
|
+
},
|
|
24
|
+
(identityId, identities) => identities[identityId]
|
|
25
|
+
);
|
|
26
|
+
const createTargetIdentityPermissionTarget = async (db, identity) => ({
|
|
27
|
+
id: identity.id,
|
|
28
|
+
globalRoles: identity.roles,
|
|
29
|
+
hasProjectMemberships: identity.roles.includes(Roles.TenantRole.SUPER_ADMIN) || identity.roles.includes(Roles.TenantRole.PROJECT_ADMIN) || await db.batchLoad(projectMembershipPresenceLoader, identity.id)
|
|
30
|
+
});
|
|
31
|
+
const createPersonPermissionTarget = async (db, person) => person === null ? null : await createTargetIdentityPermissionTarget(db, { id: person.identity_id, roles: person.roles });
|
|
32
|
+
exports.createPersonPermissionTarget = createPersonPermissionTarget;
|
|
33
|
+
exports.createTargetIdentityPermissionTarget = createTargetIdentityPermissionTarget;
|
|
34
|
+
exports.targetIdentityLoader = targetIdentityLoader;
|
|
35
|
+
//# sourceMappingURL=TargetIdentityPermission.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TargetIdentityPermission.cjs","sources":["../../../../../../packages/engine-tenant-api/src/model/authorization/TargetIdentityPermission.ts"],"sourcesContent":["import { DatabaseContext } from '../utils/index.js'\nimport { IdentityHasProjectMembershipsQuery, IdentityQuery, IdentityQueryResult } from '../queries/index.js'\nimport { TargetIdentityPermissionTarget } from './PermissionActions.js'\nimport { TenantRole } from './Roles.js'\nimport { batchLoader } from '../../utils/batchQuery.js'\n\nconst projectMembershipPresenceLoader = batchLoader<string, ReadonlySet<string>, boolean>(\n\tasync (identityIds, db) => await db.queryHandler.fetch(new IdentityHasProjectMembershipsQuery(identityIds)),\n\t(identityId, identitiesWithMemberships) => identitiesWithMemberships.has(identityId),\n)\n\n/** Batches the identity lookup that precedes a target-identity permission check. */\nexport const targetIdentityLoader = batchLoader<string, Record<string, IdentityQueryResult>, IdentityQueryResult | undefined>(\n\tasync (identityIds, db) => {\n\t\tconst identities = await db.queryHandler.fetch(new IdentityQuery(identityIds))\n\t\treturn Object.fromEntries(identities.map(identity => [identity.id, identity]))\n\t},\n\t(identityId, identities) => identities[identityId],\n)\n\nexport const createTargetIdentityPermissionTarget = async (\n\tdb: DatabaseContext,\n\tidentity: { readonly id: string; readonly roles: readonly string[] },\n): Promise<TargetIdentityPermissionTarget> => ({\n\tid: identity.id,\n\tglobalRoles: identity.roles,\n\thasProjectMemberships: identity.roles.includes(TenantRole.SUPER_ADMIN)\n\t\t|| identity.roles.includes(TenantRole.PROJECT_ADMIN)\n\t\t|| await db.batchLoad(projectMembershipPresenceLoader, identity.id),\n})\n\n/** Convenience for the common case where the caller already holds the target's person row. */\nexport const createPersonPermissionTarget = async (\n\tdb: DatabaseContext,\n\tperson: { readonly identity_id: string; readonly roles: readonly string[] } | null,\n): Promise<TargetIdentityPermissionTarget | null> =>\n\tperson === null ? null : await createTargetIdentityPermissionTarget(db, { id: person.identity_id, roles: person.roles })\n"],"names":["batchLoader","IdentityHasProjectMembershipsQuery","IdentityQuery","TenantRole"],"mappings":";;;;;;;;;;;;;;AAMA,MAAM,kCAAkCA,WAAAA;AAAAA,EACvC,OAAO,aAAa,OAAO,MAAM,GAAG,aAAa,MAAM,IAAIC,sEAAmC,WAAW,CAAC;AAAA,EAC1G,CAAC,YAAY,8BAA8B,0BAA0B,IAAI,UAAU;AACpF;AAGO,MAAM,uBAAuBD,WAAAA;AAAAA,EACnC,OAAO,aAAa,OAAO;AAC1B,UAAM,aAAa,MAAM,GAAG,aAAa,MAAM,IAAIE,cAAAA,cAAc,WAAW,CAAC;AAC7E,WAAO,OAAO,YAAY,WAAW,IAAI,CAAA,aAAY,CAAC,SAAS,IAAI,QAAQ,CAAC,CAAC;AAAA,EAC9E;AAAA,EACA,CAAC,YAAY,eAAe,WAAW,UAAU;AAClD;AAEO,MAAM,uCAAuC,OACnD,IACA,cAC8C;AAAA,EAC9C,IAAI,SAAS;AAAA,EACb,aAAa,SAAS;AAAA,EACtB,uBAAuB,SAAS,MAAM,SAASC,MAAAA,WAAW,WAAW,KACjE,SAAS,MAAM,SAASA,MAAAA,WAAW,aAAa,KAChD,MAAM,GAAG,UAAU,iCAAiC,SAAS,EAAE;AACpE;AAGO,MAAM,+BAA+B,OAC3C,IACA,WAEA,WAAW,OAAO,OAAO,MAAM,qCAAqC,IAAI,EAAE,IAAI,OAAO,aAAa,OAAO,OAAO,OAAO;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import "../queries/apiKey/ApiKeyQuery.js";
|
|
2
|
+
import "@contember/database";
|
|
3
|
+
import "../type/ApiKey.js";
|
|
4
|
+
import { IdentityHasProjectMembershipsQuery } from "../queries/membership/IdentityHasProjectMembershipsQuery.js";
|
|
5
|
+
import { IdentityQuery } from "../queries/identity/IdentityQuery.js";
|
|
6
|
+
import "./PermissionActions.js";
|
|
7
|
+
import "@contember/authorization";
|
|
8
|
+
import { TenantRole } from "./Roles.js";
|
|
9
|
+
import "./CustomRolePermissions.js";
|
|
10
|
+
import "./PermissionContext.js";
|
|
11
|
+
import "@contember/schema";
|
|
12
|
+
import { batchLoader } from "../../utils/batchQuery.js";
|
|
13
|
+
const projectMembershipPresenceLoader = batchLoader(
|
|
14
|
+
async (identityIds, db) => await db.queryHandler.fetch(new IdentityHasProjectMembershipsQuery(identityIds)),
|
|
15
|
+
(identityId, identitiesWithMemberships) => identitiesWithMemberships.has(identityId)
|
|
16
|
+
);
|
|
17
|
+
const targetIdentityLoader = batchLoader(
|
|
18
|
+
async (identityIds, db) => {
|
|
19
|
+
const identities = await db.queryHandler.fetch(new IdentityQuery(identityIds));
|
|
20
|
+
return Object.fromEntries(identities.map((identity) => [identity.id, identity]));
|
|
21
|
+
},
|
|
22
|
+
(identityId, identities) => identities[identityId]
|
|
23
|
+
);
|
|
24
|
+
const createTargetIdentityPermissionTarget = async (db, identity) => ({
|
|
25
|
+
id: identity.id,
|
|
26
|
+
globalRoles: identity.roles,
|
|
27
|
+
hasProjectMemberships: identity.roles.includes(TenantRole.SUPER_ADMIN) || identity.roles.includes(TenantRole.PROJECT_ADMIN) || await db.batchLoad(projectMembershipPresenceLoader, identity.id)
|
|
28
|
+
});
|
|
29
|
+
const createPersonPermissionTarget = async (db, person) => person === null ? null : await createTargetIdentityPermissionTarget(db, { id: person.identity_id, roles: person.roles });
|
|
30
|
+
export {
|
|
31
|
+
createPersonPermissionTarget,
|
|
32
|
+
createTargetIdentityPermissionTarget,
|
|
33
|
+
targetIdentityLoader
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=TargetIdentityPermission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TargetIdentityPermission.js","sources":["../../../../../../packages/engine-tenant-api/src/model/authorization/TargetIdentityPermission.ts"],"sourcesContent":["import { DatabaseContext } from '../utils/index.js'\nimport { IdentityHasProjectMembershipsQuery, IdentityQuery, IdentityQueryResult } from '../queries/index.js'\nimport { TargetIdentityPermissionTarget } from './PermissionActions.js'\nimport { TenantRole } from './Roles.js'\nimport { batchLoader } from '../../utils/batchQuery.js'\n\nconst projectMembershipPresenceLoader = batchLoader<string, ReadonlySet<string>, boolean>(\n\tasync (identityIds, db) => await db.queryHandler.fetch(new IdentityHasProjectMembershipsQuery(identityIds)),\n\t(identityId, identitiesWithMemberships) => identitiesWithMemberships.has(identityId),\n)\n\n/** Batches the identity lookup that precedes a target-identity permission check. */\nexport const targetIdentityLoader = batchLoader<string, Record<string, IdentityQueryResult>, IdentityQueryResult | undefined>(\n\tasync (identityIds, db) => {\n\t\tconst identities = await db.queryHandler.fetch(new IdentityQuery(identityIds))\n\t\treturn Object.fromEntries(identities.map(identity => [identity.id, identity]))\n\t},\n\t(identityId, identities) => identities[identityId],\n)\n\nexport const createTargetIdentityPermissionTarget = async (\n\tdb: DatabaseContext,\n\tidentity: { readonly id: string; readonly roles: readonly string[] },\n): Promise<TargetIdentityPermissionTarget> => ({\n\tid: identity.id,\n\tglobalRoles: identity.roles,\n\thasProjectMemberships: identity.roles.includes(TenantRole.SUPER_ADMIN)\n\t\t|| identity.roles.includes(TenantRole.PROJECT_ADMIN)\n\t\t|| await db.batchLoad(projectMembershipPresenceLoader, identity.id),\n})\n\n/** Convenience for the common case where the caller already holds the target's person row. */\nexport const createPersonPermissionTarget = async (\n\tdb: DatabaseContext,\n\tperson: { readonly identity_id: string; readonly roles: readonly string[] } | null,\n): Promise<TargetIdentityPermissionTarget | null> =>\n\tperson === null ? null : await createTargetIdentityPermissionTarget(db, { id: person.identity_id, roles: person.roles })\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA,MAAM,kCAAkC;AAAA,EACvC,OAAO,aAAa,OAAO,MAAM,GAAG,aAAa,MAAM,IAAI,mCAAmC,WAAW,CAAC;AAAA,EAC1G,CAAC,YAAY,8BAA8B,0BAA0B,IAAI,UAAU;AACpF;AAGO,MAAM,uBAAuB;AAAA,EACnC,OAAO,aAAa,OAAO;AAC1B,UAAM,aAAa,MAAM,GAAG,aAAa,MAAM,IAAI,cAAc,WAAW,CAAC;AAC7E,WAAO,OAAO,YAAY,WAAW,IAAI,CAAA,aAAY,CAAC,SAAS,IAAI,QAAQ,CAAC,CAAC;AAAA,EAC9E;AAAA,EACA,CAAC,YAAY,eAAe,WAAW,UAAU;AAClD;AAEO,MAAM,uCAAuC,OACnD,IACA,cAC8C;AAAA,EAC9C,IAAI,SAAS;AAAA,EACb,aAAa,SAAS;AAAA,EACtB,uBAAuB,SAAS,MAAM,SAAS,WAAW,WAAW,KACjE,SAAS,MAAM,SAAS,WAAW,aAAa,KAChD,MAAM,GAAG,UAAU,iCAAiC,SAAS,EAAE;AACpE;AAGO,MAAM,+BAA+B,OAC3C,IACA,WAEA,WAAW,OAAO,OAAO,MAAM,qCAAqC,IAAI,EAAE,IAAI,OAAO,aAAa,OAAO,OAAO,OAAO;"}
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const ApiKey = require("../../type/ApiKey.cjs");
|
|
4
4
|
const time = require("../../utils/time.cjs");
|
|
5
|
+
const Database = require("@contember/database");
|
|
5
6
|
const DEFAULT_EXPIRATION = 30;
|
|
6
7
|
class ApiKeyHelper {
|
|
8
|
+
/**
|
|
9
|
+
* App-clock expiry Date. Kept only for ProlongApiKeyCommand's significance
|
|
10
|
+
* throttle (a write-rate optimization, not an auth gate). The value actually
|
|
11
|
+
* stored / compared runs on the DB clock — see {@link getExpirationLiteral}.
|
|
12
|
+
*/
|
|
7
13
|
static getExpiration(providers, type, expiration) {
|
|
8
14
|
switch (type) {
|
|
9
15
|
case ApiKey.ApiKey.Type.PERMANENT:
|
|
@@ -14,6 +20,19 @@ class ApiKeyHelper {
|
|
|
14
20
|
return null;
|
|
15
21
|
}
|
|
16
22
|
}
|
|
23
|
+
/** Lifetime of a session key in seconds (`expiration` minutes, default 30). */
|
|
24
|
+
static getSessionExpirationSeconds(expiration) {
|
|
25
|
+
return (expiration || DEFAULT_EXPIRATION) * 60;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* DB-clock expiry expression for issuance: `now() + <lifetime>` evaluated on the
|
|
29
|
+
* database clock, so the expiry gate (ApiKeyByTokenQuery's `is_expired`) compares
|
|
30
|
+
* against the same clock and cannot be weakened by app/DB skew. NULL for
|
|
31
|
+
* non-session keys (they never expire). See engine-tenant-api/CLAUDE.md.
|
|
32
|
+
*/
|
|
33
|
+
static getExpirationLiteral(type, expiration) {
|
|
34
|
+
return type === ApiKey.ApiKey.Type.SESSION ? new Database.Literal("now() + make_interval(secs => ?)", [ApiKeyHelper.getSessionExpirationSeconds(expiration)]) : null;
|
|
35
|
+
}
|
|
17
36
|
}
|
|
18
37
|
exports.ApiKeyHelper = ApiKeyHelper;
|
|
19
38
|
//# sourceMappingURL=ApiKeyHelper.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyHelper.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ApiKeyHelper.ts"],"sourcesContent":["import { ApiKey } from '../../type/index.js'\nimport { Providers } from '../../providers.js'\nimport { plusMinutes } from '../../utils/time.js'\n\nconst DEFAULT_EXPIRATION = 30\nexport class ApiKeyHelper {\n\tpublic static getExpiration(providers: Providers, type: ApiKey.Type, expiration?: number | null): Date | null {\n\t\tswitch (type) {\n\t\t\tcase ApiKey.Type.PERMANENT:\n\t\t\t\treturn null\n\n\t\t\tcase ApiKey.Type.SESSION:\n\t\t\t\treturn plusMinutes(providers.now(), expiration || DEFAULT_EXPIRATION)\n\n\t\t\tcase ApiKey.Type.ONE_OFF:\n\t\t\t\treturn null\n\t\t}\n\t}\n}\n"],"names":["ApiKey","plusMinutes"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiKeyHelper.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ApiKeyHelper.ts"],"sourcesContent":["import { ApiKey } from '../../type/index.js'\nimport { Providers } from '../../providers.js'\nimport { plusMinutes } from '../../utils/time.js'\nimport { Literal } from '@contember/database'\n\nconst DEFAULT_EXPIRATION = 30\nexport class ApiKeyHelper {\n\t/**\n\t * App-clock expiry Date. Kept only for ProlongApiKeyCommand's significance\n\t * throttle (a write-rate optimization, not an auth gate). The value actually\n\t * stored / compared runs on the DB clock — see {@link getExpirationLiteral}.\n\t */\n\tpublic static getExpiration(providers: Providers, type: ApiKey.Type, expiration?: number | null): Date | null {\n\t\tswitch (type) {\n\t\t\tcase ApiKey.Type.PERMANENT:\n\t\t\t\treturn null\n\n\t\t\tcase ApiKey.Type.SESSION:\n\t\t\t\treturn plusMinutes(providers.now(), expiration || DEFAULT_EXPIRATION)\n\n\t\t\tcase ApiKey.Type.ONE_OFF:\n\t\t\t\treturn null\n\t\t}\n\t}\n\n\t/** Lifetime of a session key in seconds (`expiration` minutes, default 30). */\n\tpublic static getSessionExpirationSeconds(expiration?: number | null): number {\n\t\treturn (expiration || DEFAULT_EXPIRATION) * 60\n\t}\n\n\t/**\n\t * DB-clock expiry expression for issuance: `now() + <lifetime>` evaluated on the\n\t * database clock, so the expiry gate (ApiKeyByTokenQuery's `is_expired`) compares\n\t * against the same clock and cannot be weakened by app/DB skew. NULL for\n\t * non-session keys (they never expire). See engine-tenant-api/CLAUDE.md.\n\t */\n\tpublic static getExpirationLiteral(type: ApiKey.Type, expiration?: number | null): Literal | null {\n\t\treturn type === ApiKey.Type.SESSION\n\t\t\t? new Literal('now() + make_interval(secs => ?)', [ApiKeyHelper.getSessionExpirationSeconds(expiration)])\n\t\t\t: null\n\t}\n}\n"],"names":["ApiKey","plusMinutes","Literal"],"mappings":";;;;;AAKA,MAAM,qBAAqB;AACpB,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzB,OAAc,cAAc,WAAsB,MAAmB,YAAyC;AAC7G,YAAQ,MAAA;AAAA,MACP,KAAKA,OAAAA,OAAO,KAAK;AAChB,eAAO;AAAA,MAER,KAAKA,OAAAA,OAAO,KAAK;AAChB,eAAOC,KAAAA,YAAY,UAAU,IAAA,GAAO,cAAc,kBAAkB;AAAA,MAErE,KAAKD,OAAAA,OAAO,KAAK;AAChB,eAAO;AAAA,IAAA;AAAA,EAEV;AAAA;AAAA,EAGA,OAAc,4BAA4B,YAAoC;AAC7E,YAAQ,cAAc,sBAAsB;AAAA,EAC7C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAc,qBAAqB,MAAmB,YAA4C;AACjG,WAAO,SAASA,OAAAA,OAAO,KAAK,UACzB,IAAIE,SAAAA,QAAQ,oCAAoC,CAAC,aAAa,4BAA4B,UAAU,CAAC,CAAC,IACtG;AAAA,EACJ;AACD;;"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { ApiKey } from "../../type/ApiKey.js";
|
|
2
2
|
import { plusMinutes } from "../../utils/time.js";
|
|
3
|
+
import { Literal } from "@contember/database";
|
|
3
4
|
const DEFAULT_EXPIRATION = 30;
|
|
4
5
|
class ApiKeyHelper {
|
|
6
|
+
/**
|
|
7
|
+
* App-clock expiry Date. Kept only for ProlongApiKeyCommand's significance
|
|
8
|
+
* throttle (a write-rate optimization, not an auth gate). The value actually
|
|
9
|
+
* stored / compared runs on the DB clock — see {@link getExpirationLiteral}.
|
|
10
|
+
*/
|
|
5
11
|
static getExpiration(providers, type, expiration) {
|
|
6
12
|
switch (type) {
|
|
7
13
|
case ApiKey.Type.PERMANENT:
|
|
@@ -12,6 +18,19 @@ class ApiKeyHelper {
|
|
|
12
18
|
return null;
|
|
13
19
|
}
|
|
14
20
|
}
|
|
21
|
+
/** Lifetime of a session key in seconds (`expiration` minutes, default 30). */
|
|
22
|
+
static getSessionExpirationSeconds(expiration) {
|
|
23
|
+
return (expiration || DEFAULT_EXPIRATION) * 60;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* DB-clock expiry expression for issuance: `now() + <lifetime>` evaluated on the
|
|
27
|
+
* database clock, so the expiry gate (ApiKeyByTokenQuery's `is_expired`) compares
|
|
28
|
+
* against the same clock and cannot be weakened by app/DB skew. NULL for
|
|
29
|
+
* non-session keys (they never expire). See engine-tenant-api/CLAUDE.md.
|
|
30
|
+
*/
|
|
31
|
+
static getExpirationLiteral(type, expiration) {
|
|
32
|
+
return type === ApiKey.Type.SESSION ? new Literal("now() + make_interval(secs => ?)", [ApiKeyHelper.getSessionExpirationSeconds(expiration)]) : null;
|
|
33
|
+
}
|
|
15
34
|
}
|
|
16
35
|
export {
|
|
17
36
|
ApiKeyHelper
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKeyHelper.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ApiKeyHelper.ts"],"sourcesContent":["import { ApiKey } from '../../type/index.js'\nimport { Providers } from '../../providers.js'\nimport { plusMinutes } from '../../utils/time.js'\n\nconst DEFAULT_EXPIRATION = 30\nexport class ApiKeyHelper {\n\tpublic static getExpiration(providers: Providers, type: ApiKey.Type, expiration?: number | null): Date | null {\n\t\tswitch (type) {\n\t\t\tcase ApiKey.Type.PERMANENT:\n\t\t\t\treturn null\n\n\t\t\tcase ApiKey.Type.SESSION:\n\t\t\t\treturn plusMinutes(providers.now(), expiration || DEFAULT_EXPIRATION)\n\n\t\t\tcase ApiKey.Type.ONE_OFF:\n\t\t\t\treturn null\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiKeyHelper.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ApiKeyHelper.ts"],"sourcesContent":["import { ApiKey } from '../../type/index.js'\nimport { Providers } from '../../providers.js'\nimport { plusMinutes } from '../../utils/time.js'\nimport { Literal } from '@contember/database'\n\nconst DEFAULT_EXPIRATION = 30\nexport class ApiKeyHelper {\n\t/**\n\t * App-clock expiry Date. Kept only for ProlongApiKeyCommand's significance\n\t * throttle (a write-rate optimization, not an auth gate). The value actually\n\t * stored / compared runs on the DB clock — see {@link getExpirationLiteral}.\n\t */\n\tpublic static getExpiration(providers: Providers, type: ApiKey.Type, expiration?: number | null): Date | null {\n\t\tswitch (type) {\n\t\t\tcase ApiKey.Type.PERMANENT:\n\t\t\t\treturn null\n\n\t\t\tcase ApiKey.Type.SESSION:\n\t\t\t\treturn plusMinutes(providers.now(), expiration || DEFAULT_EXPIRATION)\n\n\t\t\tcase ApiKey.Type.ONE_OFF:\n\t\t\t\treturn null\n\t\t}\n\t}\n\n\t/** Lifetime of a session key in seconds (`expiration` minutes, default 30). */\n\tpublic static getSessionExpirationSeconds(expiration?: number | null): number {\n\t\treturn (expiration || DEFAULT_EXPIRATION) * 60\n\t}\n\n\t/**\n\t * DB-clock expiry expression for issuance: `now() + <lifetime>` evaluated on the\n\t * database clock, so the expiry gate (ApiKeyByTokenQuery's `is_expired`) compares\n\t * against the same clock and cannot be weakened by app/DB skew. NULL for\n\t * non-session keys (they never expire). See engine-tenant-api/CLAUDE.md.\n\t */\n\tpublic static getExpirationLiteral(type: ApiKey.Type, expiration?: number | null): Literal | null {\n\t\treturn type === ApiKey.Type.SESSION\n\t\t\t? new Literal('now() + make_interval(secs => ?)', [ApiKeyHelper.getSessionExpirationSeconds(expiration)])\n\t\t\t: null\n\t}\n}\n"],"names":[],"mappings":";;;AAKA,MAAM,qBAAqB;AACpB,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzB,OAAc,cAAc,WAAsB,MAAmB,YAAyC;AAC7G,YAAQ,MAAA;AAAA,MACP,KAAK,OAAO,KAAK;AAChB,eAAO;AAAA,MAER,KAAK,OAAO,KAAK;AAChB,eAAO,YAAY,UAAU,IAAA,GAAO,cAAc,kBAAkB;AAAA,MAErE,KAAK,OAAO,KAAK;AAChB,eAAO;AAAA,IAAA;AAAA,EAEV;AAAA;AAAA,EAGA,OAAc,4BAA4B,YAAoC;AAC7E,YAAQ,cAAc,sBAAsB;AAAA,EAC7C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAc,qBAAqB,MAAmB,YAA4C;AACjG,WAAO,SAAS,OAAO,KAAK,UACzB,IAAI,QAAQ,oCAAoC,CAAC,aAAa,4BAA4B,UAAU,CAAC,CAAC,IACtG;AAAA,EACJ;AACD;"}
|
|
@@ -19,8 +19,9 @@ class CreateApiKeyCommand {
|
|
|
19
19
|
const args = this.args;
|
|
20
20
|
const sessionPolicy = args.type === ApiKey.ApiKey.Type.SESSION ? {
|
|
21
21
|
issued_at: providers.now(),
|
|
22
|
+
// display/ordering only, never compared
|
|
22
23
|
idle_timeout: args.idleTimeout ?? null,
|
|
23
|
-
max_expires_at: args.
|
|
24
|
+
max_expires_at: args.maxExpirationSeconds != null ? new Database.Literal("now() + make_interval(secs => ?)", [args.maxExpirationSeconds]) : null
|
|
24
25
|
} : { issued_at: null, idle_timeout: null, max_expires_at: null };
|
|
25
26
|
await Database.InsertBuilder.create().into("api_key").values({
|
|
26
27
|
id: apiKeyId,
|
|
@@ -28,7 +29,8 @@ class CreateApiKeyCommand {
|
|
|
28
29
|
type: this.args.type,
|
|
29
30
|
identity_id: this.args.identityId,
|
|
30
31
|
disabled_at: null,
|
|
31
|
-
expires_at
|
|
32
|
+
// expires_at on the DB clock so the verify gate compares like-for-like.
|
|
33
|
+
expires_at: ApiKeyHelper.ApiKeyHelper.getExpirationLiteral(this.args.type, this.args.expiration),
|
|
32
34
|
expiration: this.args.expiration || null,
|
|
33
35
|
created_at: providers.now(),
|
|
34
36
|
created_ip: this.args.requestInfo?.ip || null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateApiKeyCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/CreateApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { InsertBuilder } from '@contember/database'\nimport { computeTokenHash, generateToken, TokenHash } from '../../utils/index.js'\nimport { ApiKeyRequestInfo } from './ProlongApiKeyCommand.js'\n\ninterface CreateSessionApiKeyArgs {\n\ttype: ApiKey.Type.SESSION\n\tidentityId: string\n\texpiration?: number\n\ttokenHash?: string\n\trequestInfo?: ApiKeyRequestInfo\n\ttrustForwardedInfo?: boolean\n\t/**\n\t * A19 session-policy snapshot, fixed at sign-in. NULLs preserve today's\n\t * behavior (no idle timeout, no absolute cap on the sliding window).\n\t * `idleTimeout` is a Postgres interval literal (e.g. `'15 minutes'`).\n\t */\n\tidleTimeout?: string | null\n\
|
|
1
|
+
{"version":3,"file":"CreateApiKeyCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/CreateApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { InsertBuilder, Literal } from '@contember/database'\nimport { computeTokenHash, generateToken, TokenHash } from '../../utils/index.js'\nimport { ApiKeyRequestInfo } from './ProlongApiKeyCommand.js'\n\ninterface CreateSessionApiKeyArgs {\n\ttype: ApiKey.Type.SESSION\n\tidentityId: string\n\texpiration?: number\n\ttokenHash?: string\n\trequestInfo?: ApiKeyRequestInfo\n\ttrustForwardedInfo?: boolean\n\t/**\n\t * A19 session-policy snapshot, fixed at sign-in. NULLs preserve today's\n\t * behavior (no idle timeout, no absolute cap on the sliding window).\n\t * `idleTimeout` is a Postgres interval literal (e.g. `'15 minutes'`).\n\t */\n\tidleTimeout?: string | null\n\t/**\n\t * Absolute lifetime cap in seconds (A19). Written as `now() + interval` on the DB\n\t * clock so the cap is compared against the same clock. NULL = uncapped.\n\t */\n\tmaxExpirationSeconds?: number | null\n}\n\ninterface CreatePermanentApiKeyArgs {\n\ttype: ApiKey.Type.PERMANENT\n\tidentityId: string\n\ttokenHash?: TokenHash\n\texpiration?: undefined\n\trequestInfo?: ApiKeyRequestInfo\n\ttrustForwardedInfo?: boolean\n}\n\nexport type CreateApiKeyArgs =\n\t| CreateSessionApiKeyArgs\n\t| CreatePermanentApiKeyArgs\n\nexport class CreateApiKeyCommand implements Command<CreateApiKeyCommandResult> {\n\tconstructor(private args: CreateApiKeyArgs) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<CreateApiKeyCommandResult> {\n\t\tconst apiKeyId = providers.uuid()\n\t\tlet token\n\t\tlet tokenHash = this.args.tokenHash\n\t\tif (!tokenHash) {\n\t\t\ttoken = await generateToken(providers)\n\t\t\ttokenHash = computeTokenHash(token)\n\t\t}\n\n\t\t// Session-policy snapshot (A19). Only session keys carry it; permanent/one-off\n\t\t// keys have no session policy → NULL (preserving today's behavior).\n\t\tconst args = this.args\n\t\tconst sessionPolicy = args.type === ApiKey.Type.SESSION\n\t\t\t? {\n\t\t\t\tissued_at: providers.now(), // display/ordering only, never compared\n\t\t\t\tidle_timeout: args.idleTimeout ?? null,\n\t\t\t\tmax_expires_at: args.maxExpirationSeconds != null\n\t\t\t\t\t? new Literal('now() + make_interval(secs => ?)', [args.maxExpirationSeconds])\n\t\t\t\t\t: null,\n\t\t\t}\n\t\t\t: { issued_at: null, idle_timeout: null, max_expires_at: null }\n\t\tawait InsertBuilder.create()\n\t\t\t.into('api_key')\n\t\t\t.values({\n\t\t\t\tid: apiKeyId,\n\t\t\t\ttoken_hash: tokenHash,\n\t\t\t\ttype: this.args.type,\n\t\t\t\tidentity_id: this.args.identityId,\n\t\t\t\tdisabled_at: null,\n\t\t\t\t// expires_at on the DB clock so the verify gate compares like-for-like.\n\t\t\t\texpires_at: ApiKeyHelper.getExpirationLiteral(this.args.type, this.args.expiration),\n\t\t\t\texpiration: this.args.expiration || null,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tcreated_ip: this.args.requestInfo?.ip || null,\n\t\t\t\tcreated_user_agent: this.args.requestInfo?.userAgent || null,\n\t\t\t\ttrust_forwarded_info: this.args.trustForwardedInfo ?? false,\n\t\t\t\tissued_at: sessionPolicy.issued_at,\n\t\t\t\tidle_timeout: sessionPolicy.idle_timeout,\n\t\t\t\tmax_expires_at: sessionPolicy.max_expires_at,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn new CreateApiKeyCommandResult(apiKeyId, token)\n\t}\n}\n\nexport class CreateApiKeyCommandResult {\n\tconstructor(public readonly id: string, public readonly token?: string) {\n\t}\n}\n"],"names":["token","generateToken","computeTokenHash","ApiKey","Literal","InsertBuilder","ApiKeyHelper"],"mappings":";;;;;;AAwCO,MAAM,oBAAkE;AAAA,EAC9E,YAAoB,MAAwB;AAAxB,SAAA,OAAA;AAAA,EAAyB;AAAA,EAE7C,MAAM,QAAQ,EAAE,IAAI,aAA+D;AAClF,UAAM,WAAW,UAAU,KAAA;AAC3B,QAAIA;AACJ,QAAI,YAAY,KAAK,KAAK;AAC1B,QAAI,CAAC,WAAW;AACfA,gBAAQ,MAAMC,MAAAA,cAAc,SAAS;AACrC,kBAAYC,MAAAA,iBAAiBF,OAAK;AAAA,IACnC;AAIA,UAAM,OAAO,KAAK;AAClB,UAAM,gBAAgB,KAAK,SAASG,OAAAA,OAAO,KAAK,UAC7C;AAAA,MACD,WAAW,UAAU,IAAA;AAAA;AAAA,MACrB,cAAc,KAAK,eAAe;AAAA,MAClC,gBAAgB,KAAK,wBAAwB,OAC1C,IAAIC,iBAAQ,oCAAoC,CAAC,KAAK,oBAAoB,CAAC,IAC3E;AAAA,IAAA,IAEF,EAAE,WAAW,MAAM,cAAc,MAAM,gBAAgB,KAAA;AAC1D,UAAMC,SAAAA,cAAc,OAAA,EAClB,KAAK,SAAS,EACd,OAAO;AAAA,MACP,IAAI;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,KAAK,KAAK;AAAA,MAChB,aAAa,KAAK,KAAK;AAAA,MACvB,aAAa;AAAA;AAAA,MAEb,YAAYC,aAAAA,aAAa,qBAAqB,KAAK,KAAK,MAAM,KAAK,KAAK,UAAU;AAAA,MAClF,YAAY,KAAK,KAAK,cAAc;AAAA,MACpC,YAAY,UAAU,IAAA;AAAA,MACtB,YAAY,KAAK,KAAK,aAAa,MAAM;AAAA,MACzC,oBAAoB,KAAK,KAAK,aAAa,aAAa;AAAA,MACxD,sBAAsB,KAAK,KAAK,sBAAsB;AAAA,MACtD,WAAW,cAAc;AAAA,MACzB,cAAc,cAAc;AAAA,MAC5B,gBAAgB,cAAc;AAAA,IAAA,CAC9B,EACA,QAAQ,EAAE;AAEZ,WAAO,IAAI,0BAA0B,UAAUN,OAAK;AAAA,EACrD;AACD;AAEO,MAAM,0BAA0B;AAAA,EACtC,YAA4B,IAA4BA,QAAgB;AAA5C,SAAA,KAAA;AAA4B,SAAA,QAAAA;AAAA,EACxD;AACD;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiKey } from "../../type/ApiKey.js";
|
|
2
2
|
import { ApiKeyHelper } from "./ApiKeyHelper.js";
|
|
3
|
-
import { InsertBuilder as InsertBuilder$1 } from "@contember/database";
|
|
3
|
+
import { Literal, InsertBuilder as InsertBuilder$1 } from "@contember/database";
|
|
4
4
|
import { generateToken, computeTokenHash } from "../../utils/token.js";
|
|
5
5
|
class CreateApiKeyCommand {
|
|
6
6
|
constructor(args) {
|
|
@@ -17,8 +17,9 @@ class CreateApiKeyCommand {
|
|
|
17
17
|
const args = this.args;
|
|
18
18
|
const sessionPolicy = args.type === ApiKey.Type.SESSION ? {
|
|
19
19
|
issued_at: providers.now(),
|
|
20
|
+
// display/ordering only, never compared
|
|
20
21
|
idle_timeout: args.idleTimeout ?? null,
|
|
21
|
-
max_expires_at: args.
|
|
22
|
+
max_expires_at: args.maxExpirationSeconds != null ? new Literal("now() + make_interval(secs => ?)", [args.maxExpirationSeconds]) : null
|
|
22
23
|
} : { issued_at: null, idle_timeout: null, max_expires_at: null };
|
|
23
24
|
await InsertBuilder$1.create().into("api_key").values({
|
|
24
25
|
id: apiKeyId,
|
|
@@ -26,7 +27,8 @@ class CreateApiKeyCommand {
|
|
|
26
27
|
type: this.args.type,
|
|
27
28
|
identity_id: this.args.identityId,
|
|
28
29
|
disabled_at: null,
|
|
29
|
-
expires_at
|
|
30
|
+
// expires_at on the DB clock so the verify gate compares like-for-like.
|
|
31
|
+
expires_at: ApiKeyHelper.getExpirationLiteral(this.args.type, this.args.expiration),
|
|
30
32
|
expiration: this.args.expiration || null,
|
|
31
33
|
created_at: providers.now(),
|
|
32
34
|
created_ip: this.args.requestInfo?.ip || null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateApiKeyCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/CreateApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { InsertBuilder } from '@contember/database'\nimport { computeTokenHash, generateToken, TokenHash } from '../../utils/index.js'\nimport { ApiKeyRequestInfo } from './ProlongApiKeyCommand.js'\n\ninterface CreateSessionApiKeyArgs {\n\ttype: ApiKey.Type.SESSION\n\tidentityId: string\n\texpiration?: number\n\ttokenHash?: string\n\trequestInfo?: ApiKeyRequestInfo\n\ttrustForwardedInfo?: boolean\n\t/**\n\t * A19 session-policy snapshot, fixed at sign-in. NULLs preserve today's\n\t * behavior (no idle timeout, no absolute cap on the sliding window).\n\t * `idleTimeout` is a Postgres interval literal (e.g. `'15 minutes'`).\n\t */\n\tidleTimeout?: string | null\n\
|
|
1
|
+
{"version":3,"file":"CreateApiKeyCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/CreateApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { InsertBuilder, Literal } from '@contember/database'\nimport { computeTokenHash, generateToken, TokenHash } from '../../utils/index.js'\nimport { ApiKeyRequestInfo } from './ProlongApiKeyCommand.js'\n\ninterface CreateSessionApiKeyArgs {\n\ttype: ApiKey.Type.SESSION\n\tidentityId: string\n\texpiration?: number\n\ttokenHash?: string\n\trequestInfo?: ApiKeyRequestInfo\n\ttrustForwardedInfo?: boolean\n\t/**\n\t * A19 session-policy snapshot, fixed at sign-in. NULLs preserve today's\n\t * behavior (no idle timeout, no absolute cap on the sliding window).\n\t * `idleTimeout` is a Postgres interval literal (e.g. `'15 minutes'`).\n\t */\n\tidleTimeout?: string | null\n\t/**\n\t * Absolute lifetime cap in seconds (A19). Written as `now() + interval` on the DB\n\t * clock so the cap is compared against the same clock. NULL = uncapped.\n\t */\n\tmaxExpirationSeconds?: number | null\n}\n\ninterface CreatePermanentApiKeyArgs {\n\ttype: ApiKey.Type.PERMANENT\n\tidentityId: string\n\ttokenHash?: TokenHash\n\texpiration?: undefined\n\trequestInfo?: ApiKeyRequestInfo\n\ttrustForwardedInfo?: boolean\n}\n\nexport type CreateApiKeyArgs =\n\t| CreateSessionApiKeyArgs\n\t| CreatePermanentApiKeyArgs\n\nexport class CreateApiKeyCommand implements Command<CreateApiKeyCommandResult> {\n\tconstructor(private args: CreateApiKeyArgs) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<CreateApiKeyCommandResult> {\n\t\tconst apiKeyId = providers.uuid()\n\t\tlet token\n\t\tlet tokenHash = this.args.tokenHash\n\t\tif (!tokenHash) {\n\t\t\ttoken = await generateToken(providers)\n\t\t\ttokenHash = computeTokenHash(token)\n\t\t}\n\n\t\t// Session-policy snapshot (A19). Only session keys carry it; permanent/one-off\n\t\t// keys have no session policy → NULL (preserving today's behavior).\n\t\tconst args = this.args\n\t\tconst sessionPolicy = args.type === ApiKey.Type.SESSION\n\t\t\t? {\n\t\t\t\tissued_at: providers.now(), // display/ordering only, never compared\n\t\t\t\tidle_timeout: args.idleTimeout ?? null,\n\t\t\t\tmax_expires_at: args.maxExpirationSeconds != null\n\t\t\t\t\t? new Literal('now() + make_interval(secs => ?)', [args.maxExpirationSeconds])\n\t\t\t\t\t: null,\n\t\t\t}\n\t\t\t: { issued_at: null, idle_timeout: null, max_expires_at: null }\n\t\tawait InsertBuilder.create()\n\t\t\t.into('api_key')\n\t\t\t.values({\n\t\t\t\tid: apiKeyId,\n\t\t\t\ttoken_hash: tokenHash,\n\t\t\t\ttype: this.args.type,\n\t\t\t\tidentity_id: this.args.identityId,\n\t\t\t\tdisabled_at: null,\n\t\t\t\t// expires_at on the DB clock so the verify gate compares like-for-like.\n\t\t\t\texpires_at: ApiKeyHelper.getExpirationLiteral(this.args.type, this.args.expiration),\n\t\t\t\texpiration: this.args.expiration || null,\n\t\t\t\tcreated_at: providers.now(),\n\t\t\t\tcreated_ip: this.args.requestInfo?.ip || null,\n\t\t\t\tcreated_user_agent: this.args.requestInfo?.userAgent || null,\n\t\t\t\ttrust_forwarded_info: this.args.trustForwardedInfo ?? false,\n\t\t\t\tissued_at: sessionPolicy.issued_at,\n\t\t\t\tidle_timeout: sessionPolicy.idle_timeout,\n\t\t\t\tmax_expires_at: sessionPolicy.max_expires_at,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\treturn new CreateApiKeyCommandResult(apiKeyId, token)\n\t}\n}\n\nexport class CreateApiKeyCommandResult {\n\tconstructor(public readonly id: string, public readonly token?: string) {\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;;;AAwCO,MAAM,oBAAkE;AAAA,EAC9E,YAAoB,MAAwB;AAAxB,SAAA,OAAA;AAAA,EAAyB;AAAA,EAE7C,MAAM,QAAQ,EAAE,IAAI,aAA+D;AAClF,UAAM,WAAW,UAAU,KAAA;AAC3B,QAAI;AACJ,QAAI,YAAY,KAAK,KAAK;AAC1B,QAAI,CAAC,WAAW;AACf,cAAQ,MAAM,cAAc,SAAS;AACrC,kBAAY,iBAAiB,KAAK;AAAA,IACnC;AAIA,UAAM,OAAO,KAAK;AAClB,UAAM,gBAAgB,KAAK,SAAS,OAAO,KAAK,UAC7C;AAAA,MACD,WAAW,UAAU,IAAA;AAAA;AAAA,MACrB,cAAc,KAAK,eAAe;AAAA,MAClC,gBAAgB,KAAK,wBAAwB,OAC1C,IAAI,QAAQ,oCAAoC,CAAC,KAAK,oBAAoB,CAAC,IAC3E;AAAA,IAAA,IAEF,EAAE,WAAW,MAAM,cAAc,MAAM,gBAAgB,KAAA;AAC1D,UAAMA,gBAAc,OAAA,EAClB,KAAK,SAAS,EACd,OAAO;AAAA,MACP,IAAI;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,KAAK,KAAK;AAAA,MAChB,aAAa,KAAK,KAAK;AAAA,MACvB,aAAa;AAAA;AAAA,MAEb,YAAY,aAAa,qBAAqB,KAAK,KAAK,MAAM,KAAK,KAAK,UAAU;AAAA,MAClF,YAAY,KAAK,KAAK,cAAc;AAAA,MACpC,YAAY,UAAU,IAAA;AAAA,MACtB,YAAY,KAAK,KAAK,aAAa,MAAM;AAAA,MACzC,oBAAoB,KAAK,KAAK,aAAa,aAAa;AAAA,MACxD,sBAAsB,KAAK,KAAK,sBAAsB;AAAA,MACtD,WAAW,cAAc;AAAA,MACzB,cAAc,cAAc;AAAA,MAC5B,gBAAgB,cAAc;AAAA,IAAA,CAC9B,EACA,QAAQ,EAAE;AAEZ,WAAO,IAAI,0BAA0B,UAAU,KAAK;AAAA,EACrD;AACD;AAEO,MAAM,0BAA0B;AAAA,EACtC,YAA4B,IAA4B,OAAgB;AAA5C,SAAA,KAAA;AAA4B,SAAA,QAAA;AAAA,EACxD;AACD;"}
|
|
@@ -28,34 +28,33 @@ class ProlongApiKeyCommand {
|
|
|
28
28
|
}
|
|
29
29
|
const requestIp = this.requestInfo?.ip || null;
|
|
30
30
|
const requestUserAgent = this.requestInfo?.userAgent || null;
|
|
31
|
-
const updateTracking = this.shouldUpdateTracking(now
|
|
31
|
+
const updateTracking = this.shouldUpdateTracking(now);
|
|
32
32
|
if (!updateExpiration && !updateTracking) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const values = {};
|
|
36
36
|
if (updateExpiration && newExpiration !== null) {
|
|
37
|
-
values.expires_at =
|
|
37
|
+
values.expires_at = new Database.Literal('LEAST(now() + make_interval(secs => ?), "max_expires_at")', [
|
|
38
|
+
ApiKeyHelper.ApiKeyHelper.getSessionExpirationSeconds(this.expiration)
|
|
39
|
+
]);
|
|
38
40
|
}
|
|
39
41
|
if (updateTracking) {
|
|
40
42
|
values.last_ip = requestIp;
|
|
41
43
|
values.last_user_agent = requestUserAgent;
|
|
42
|
-
values.last_used_at = now;
|
|
44
|
+
values.last_used_at = new Database.Literal("now()");
|
|
43
45
|
}
|
|
44
46
|
const qb = Database.UpdateBuilder.create().table("api_key").where({ id: this.id }).values(values);
|
|
45
47
|
await qb.execute(db);
|
|
46
48
|
}
|
|
47
|
-
shouldUpdateTracking(now
|
|
49
|
+
shouldUpdateTracking(now) {
|
|
48
50
|
if (!this.requestInfo) {
|
|
49
51
|
return false;
|
|
50
52
|
}
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
53
|
+
const lastUsedAt = this.tracking?.lastUsedAt;
|
|
54
|
+
if (!lastUsedAt) {
|
|
53
55
|
return true;
|
|
54
56
|
}
|
|
55
|
-
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
return now.getTime() - last.lastUsedAt.getTime() >= PROLONG_THROTTLE_MS;
|
|
57
|
+
return now.getTime() - lastUsedAt.getTime() >= PROLONG_THROTTLE_MS;
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
exports.PROLONG_THROTTLE_MS = PROLONG_THROTTLE_MS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProlongApiKeyCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ProlongApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { QueryBuilder, UpdateBuilder } from '@contember/database'\n\n/**\n * Tracking writes (`last_used_at`) are throttled to at most once per this window,
|
|
1
|
+
{"version":3,"file":"ProlongApiKeyCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ProlongApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { Literal, QueryBuilder, UpdateBuilder } from '@contember/database'\n\n/**\n * Tracking writes (`last_ip`, `last_user_agent`, `last_used_at`) are throttled to at most once per\n * this window, even when the IP or User-Agent changes: a key shared by several service replicas\n * alternates between their addresses, and writing every change makes its row a lock hotspot.\n * An idle check must add this slack to avoid prematurely expiring an active session whose\n * `last_used_at` is intentionally stale (see {@link ApiKeyManager.verifyAndProlong}).\n */\nexport const PROLONG_THROTTLE_MS = 60_000\n\nexport interface ApiKeyRequestInfo {\n\tip?: string\n\tuserAgent?: string\n}\n\nexport interface ApiKeyTrackingState {\n\tlastIp: string | null\n\tlastUserAgent: string | null\n\tlastUsedAt: Date | null\n}\n\nexport class ProlongApiKeyCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t\tprivate readonly type: ApiKey.Type,\n\t\tprivate readonly expiration: number | null,\n\t\tprivate readonly currentExpiration: Date | null,\n\t\tprivate readonly requestInfo?: ApiKeyRequestInfo,\n\t\tprivate readonly tracking?: ApiKeyTrackingState,\n\t\tprivate readonly maxExpiresAt?: Date | null,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tlet newExpiration = ApiKeyHelper.getExpiration(providers, this.type, this.expiration)\n\t\t// A19: clamp the sliding window at the absolute cap snapshotted at sign-in.\n\t\t// NULL maxExpiresAt = today's uncapped sliding window.\n\t\tif (newExpiration !== null && this.maxExpiresAt && newExpiration.getTime() > this.maxExpiresAt.getTime()) {\n\t\t\tnewExpiration = this.maxExpiresAt\n\t\t}\n\t\tconst now = providers.now()\n\n\t\tlet updateExpiration = newExpiration !== null\n\t\tif (updateExpiration && this.currentExpiration && newExpiration !== null) {\n\t\t\tconst prolongMs = newExpiration.getTime() - this.currentExpiration.getTime()\n\t\t\tif (prolongMs > 0 && prolongMs < PROLONG_THROTTLE_MS) {\n\t\t\t\tupdateExpiration = false\n\t\t\t}\n\t\t}\n\n\t\tconst requestIp = this.requestInfo?.ip || null\n\t\tconst requestUserAgent = this.requestInfo?.userAgent || null\n\t\tconst updateTracking = this.shouldUpdateTracking(now)\n\n\t\tif (!updateExpiration && !updateTracking) {\n\t\t\treturn\n\t\t}\n\n\t\tconst values: QueryBuilder.Values = {}\n\t\tif (updateExpiration && newExpiration !== null) {\n\t\t\t// Write the sliding expiry on the DB clock and clamp to the stored\n\t\t\t// max_expires_at in SQL (LEAST ignores a NULL cap → uncapped window). The JS\n\t\t\t// throttle above only decides *whether* to write; the expiry gate itself is\n\t\t\t// computed on the DB clock. See engine-tenant-api/CLAUDE.md.\n\t\t\tvalues.expires_at = new Literal('LEAST(now() + make_interval(secs => ?), \"max_expires_at\")', [\n\t\t\t\tApiKeyHelper.getSessionExpirationSeconds(this.expiration),\n\t\t\t])\n\t\t}\n\t\tif (updateTracking) {\n\t\t\tvalues.last_ip = requestIp\n\t\t\tvalues.last_user_agent = requestUserAgent\n\t\t\t// last_used_at on the DB clock: it's compared against now() in the idle gate\n\t\t\t// (ApiKeyByTokenQuery's is_idle_expired), so it must be written on the same\n\t\t\t// clock. The app-clock `now` above only drives the write-rate throttle. See CLAUDE.md.\n\t\t\tvalues.last_used_at = new Literal('now()')\n\t\t}\n\n\t\tconst qb = UpdateBuilder.create()\n\t\t\t.table('api_key')\n\t\t\t.where({ id: this.id })\n\t\t\t.values(values)\n\t\tawait qb.execute(db)\n\t}\n\n\tprivate shouldUpdateTracking(now: Date): boolean {\n\t\tif (!this.requestInfo) {\n\t\t\treturn false\n\t\t}\n\t\tconst lastUsedAt = this.tracking?.lastUsedAt\n\t\tif (!lastUsedAt) {\n\t\t\treturn true\n\t\t}\n\t\treturn now.getTime() - lastUsedAt.getTime() >= PROLONG_THROTTLE_MS\n\t}\n}\n"],"names":["ApiKeyHelper","Literal","UpdateBuilder"],"mappings":";;;;AAYO,MAAM,sBAAsB;AAa5B,MAAM,qBAA8C;AAAA,EAC1D,YACkB,IACA,MACA,YACA,mBACA,aACA,UACA,cAChB;AAPgB,SAAA,KAAA;AACA,SAAA,OAAA;AACA,SAAA,aAAA;AACA,SAAA,oBAAA;AACA,SAAA,cAAA;AACA,SAAA,WAAA;AACA,SAAA,eAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,QAAI,gBAAgBA,aAAAA,aAAa,cAAc,WAAW,KAAK,MAAM,KAAK,UAAU;AAGpF,QAAI,kBAAkB,QAAQ,KAAK,gBAAgB,cAAc,YAAY,KAAK,aAAa,WAAW;AACzG,sBAAgB,KAAK;AAAA,IACtB;AACA,UAAM,MAAM,UAAU,IAAA;AAEtB,QAAI,mBAAmB,kBAAkB;AACzC,QAAI,oBAAoB,KAAK,qBAAqB,kBAAkB,MAAM;AACzE,YAAM,YAAY,cAAc,QAAA,IAAY,KAAK,kBAAkB,QAAA;AACnE,UAAI,YAAY,KAAK,YAAY,qBAAqB;AACrD,2BAAmB;AAAA,MACpB;AAAA,IACD;AAEA,UAAM,YAAY,KAAK,aAAa,MAAM;AAC1C,UAAM,mBAAmB,KAAK,aAAa,aAAa;AACxD,UAAM,iBAAiB,KAAK,qBAAqB,GAAG;AAEpD,QAAI,CAAC,oBAAoB,CAAC,gBAAgB;AACzC;AAAA,IACD;AAEA,UAAM,SAA8B,CAAA;AACpC,QAAI,oBAAoB,kBAAkB,MAAM;AAK/C,aAAO,aAAa,IAAIC,SAAAA,QAAQ,6DAA6D;AAAA,QAC5FD,0BAAa,4BAA4B,KAAK,UAAU;AAAA,MAAA,CACxD;AAAA,IACF;AACA,QAAI,gBAAgB;AACnB,aAAO,UAAU;AACjB,aAAO,kBAAkB;AAIzB,aAAO,eAAe,IAAIC,SAAAA,QAAQ,OAAO;AAAA,IAC1C;AAEA,UAAM,KAAKC,SAAAA,cAAc,OAAA,EACvB,MAAM,SAAS,EACf,MAAM,EAAE,IAAI,KAAK,GAAA,CAAI,EACrB,OAAO,MAAM;AACf,UAAM,GAAG,QAAQ,EAAE;AAAA,EACpB;AAAA,EAEQ,qBAAqB,KAAoB;AAChD,QAAI,CAAC,KAAK,aAAa;AACtB,aAAO;AAAA,IACR;AACA,UAAM,aAAa,KAAK,UAAU;AAClC,QAAI,CAAC,YAAY;AAChB,aAAO;AAAA,IACR;AACA,WAAO,IAAI,QAAA,IAAY,WAAW,aAAa;AAAA,EAChD;AACD;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyHelper } from "./ApiKeyHelper.js";
|
|
2
|
-
import { UpdateBuilder as UpdateBuilder$1 } from "@contember/database";
|
|
2
|
+
import { Literal, UpdateBuilder as UpdateBuilder$1 } from "@contember/database";
|
|
3
3
|
const PROLONG_THROTTLE_MS = 6e4;
|
|
4
4
|
class ProlongApiKeyCommand {
|
|
5
5
|
constructor(id, type, expiration, currentExpiration, requestInfo, tracking, maxExpiresAt) {
|
|
@@ -26,34 +26,33 @@ class ProlongApiKeyCommand {
|
|
|
26
26
|
}
|
|
27
27
|
const requestIp = this.requestInfo?.ip || null;
|
|
28
28
|
const requestUserAgent = this.requestInfo?.userAgent || null;
|
|
29
|
-
const updateTracking = this.shouldUpdateTracking(now
|
|
29
|
+
const updateTracking = this.shouldUpdateTracking(now);
|
|
30
30
|
if (!updateExpiration && !updateTracking) {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
const values = {};
|
|
34
34
|
if (updateExpiration && newExpiration !== null) {
|
|
35
|
-
values.expires_at =
|
|
35
|
+
values.expires_at = new Literal('LEAST(now() + make_interval(secs => ?), "max_expires_at")', [
|
|
36
|
+
ApiKeyHelper.getSessionExpirationSeconds(this.expiration)
|
|
37
|
+
]);
|
|
36
38
|
}
|
|
37
39
|
if (updateTracking) {
|
|
38
40
|
values.last_ip = requestIp;
|
|
39
41
|
values.last_user_agent = requestUserAgent;
|
|
40
|
-
values.last_used_at = now;
|
|
42
|
+
values.last_used_at = new Literal("now()");
|
|
41
43
|
}
|
|
42
44
|
const qb = UpdateBuilder$1.create().table("api_key").where({ id: this.id }).values(values);
|
|
43
45
|
await qb.execute(db);
|
|
44
46
|
}
|
|
45
|
-
shouldUpdateTracking(now
|
|
47
|
+
shouldUpdateTracking(now) {
|
|
46
48
|
if (!this.requestInfo) {
|
|
47
49
|
return false;
|
|
48
50
|
}
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
51
|
+
const lastUsedAt = this.tracking?.lastUsedAt;
|
|
52
|
+
if (!lastUsedAt) {
|
|
51
53
|
return true;
|
|
52
54
|
}
|
|
53
|
-
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
return now.getTime() - last.lastUsedAt.getTime() >= PROLONG_THROTTLE_MS;
|
|
55
|
+
return now.getTime() - lastUsedAt.getTime() >= PROLONG_THROTTLE_MS;
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProlongApiKeyCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ProlongApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { QueryBuilder, UpdateBuilder } from '@contember/database'\n\n/**\n * Tracking writes (`last_used_at`) are throttled to at most once per this window,
|
|
1
|
+
{"version":3,"file":"ProlongApiKeyCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/apiKey/ProlongApiKeyCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ApiKey } from '../../type/index.js'\nimport { ApiKeyHelper } from './ApiKeyHelper.js'\nimport { Literal, QueryBuilder, UpdateBuilder } from '@contember/database'\n\n/**\n * Tracking writes (`last_ip`, `last_user_agent`, `last_used_at`) are throttled to at most once per\n * this window, even when the IP or User-Agent changes: a key shared by several service replicas\n * alternates between their addresses, and writing every change makes its row a lock hotspot.\n * An idle check must add this slack to avoid prematurely expiring an active session whose\n * `last_used_at` is intentionally stale (see {@link ApiKeyManager.verifyAndProlong}).\n */\nexport const PROLONG_THROTTLE_MS = 60_000\n\nexport interface ApiKeyRequestInfo {\n\tip?: string\n\tuserAgent?: string\n}\n\nexport interface ApiKeyTrackingState {\n\tlastIp: string | null\n\tlastUserAgent: string | null\n\tlastUsedAt: Date | null\n}\n\nexport class ProlongApiKeyCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t\tprivate readonly type: ApiKey.Type,\n\t\tprivate readonly expiration: number | null,\n\t\tprivate readonly currentExpiration: Date | null,\n\t\tprivate readonly requestInfo?: ApiKeyRequestInfo,\n\t\tprivate readonly tracking?: ApiKeyTrackingState,\n\t\tprivate readonly maxExpiresAt?: Date | null,\n\t) {}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tlet newExpiration = ApiKeyHelper.getExpiration(providers, this.type, this.expiration)\n\t\t// A19: clamp the sliding window at the absolute cap snapshotted at sign-in.\n\t\t// NULL maxExpiresAt = today's uncapped sliding window.\n\t\tif (newExpiration !== null && this.maxExpiresAt && newExpiration.getTime() > this.maxExpiresAt.getTime()) {\n\t\t\tnewExpiration = this.maxExpiresAt\n\t\t}\n\t\tconst now = providers.now()\n\n\t\tlet updateExpiration = newExpiration !== null\n\t\tif (updateExpiration && this.currentExpiration && newExpiration !== null) {\n\t\t\tconst prolongMs = newExpiration.getTime() - this.currentExpiration.getTime()\n\t\t\tif (prolongMs > 0 && prolongMs < PROLONG_THROTTLE_MS) {\n\t\t\t\tupdateExpiration = false\n\t\t\t}\n\t\t}\n\n\t\tconst requestIp = this.requestInfo?.ip || null\n\t\tconst requestUserAgent = this.requestInfo?.userAgent || null\n\t\tconst updateTracking = this.shouldUpdateTracking(now)\n\n\t\tif (!updateExpiration && !updateTracking) {\n\t\t\treturn\n\t\t}\n\n\t\tconst values: QueryBuilder.Values = {}\n\t\tif (updateExpiration && newExpiration !== null) {\n\t\t\t// Write the sliding expiry on the DB clock and clamp to the stored\n\t\t\t// max_expires_at in SQL (LEAST ignores a NULL cap → uncapped window). The JS\n\t\t\t// throttle above only decides *whether* to write; the expiry gate itself is\n\t\t\t// computed on the DB clock. See engine-tenant-api/CLAUDE.md.\n\t\t\tvalues.expires_at = new Literal('LEAST(now() + make_interval(secs => ?), \"max_expires_at\")', [\n\t\t\t\tApiKeyHelper.getSessionExpirationSeconds(this.expiration),\n\t\t\t])\n\t\t}\n\t\tif (updateTracking) {\n\t\t\tvalues.last_ip = requestIp\n\t\t\tvalues.last_user_agent = requestUserAgent\n\t\t\t// last_used_at on the DB clock: it's compared against now() in the idle gate\n\t\t\t// (ApiKeyByTokenQuery's is_idle_expired), so it must be written on the same\n\t\t\t// clock. The app-clock `now` above only drives the write-rate throttle. See CLAUDE.md.\n\t\t\tvalues.last_used_at = new Literal('now()')\n\t\t}\n\n\t\tconst qb = UpdateBuilder.create()\n\t\t\t.table('api_key')\n\t\t\t.where({ id: this.id })\n\t\t\t.values(values)\n\t\tawait qb.execute(db)\n\t}\n\n\tprivate shouldUpdateTracking(now: Date): boolean {\n\t\tif (!this.requestInfo) {\n\t\t\treturn false\n\t\t}\n\t\tconst lastUsedAt = this.tracking?.lastUsedAt\n\t\tif (!lastUsedAt) {\n\t\t\treturn true\n\t\t}\n\t\treturn now.getTime() - lastUsedAt.getTime() >= PROLONG_THROTTLE_MS\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;AAYO,MAAM,sBAAsB;AAa5B,MAAM,qBAA8C;AAAA,EAC1D,YACkB,IACA,MACA,YACA,mBACA,aACA,UACA,cAChB;AAPgB,SAAA,KAAA;AACA,SAAA,OAAA;AACA,SAAA,aAAA;AACA,SAAA,oBAAA;AACA,SAAA,cAAA;AACA,SAAA,WAAA;AACA,SAAA,eAAA;AAAA,EACf;AAAA,EAEH,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,QAAI,gBAAgB,aAAa,cAAc,WAAW,KAAK,MAAM,KAAK,UAAU;AAGpF,QAAI,kBAAkB,QAAQ,KAAK,gBAAgB,cAAc,YAAY,KAAK,aAAa,WAAW;AACzG,sBAAgB,KAAK;AAAA,IACtB;AACA,UAAM,MAAM,UAAU,IAAA;AAEtB,QAAI,mBAAmB,kBAAkB;AACzC,QAAI,oBAAoB,KAAK,qBAAqB,kBAAkB,MAAM;AACzE,YAAM,YAAY,cAAc,QAAA,IAAY,KAAK,kBAAkB,QAAA;AACnE,UAAI,YAAY,KAAK,YAAY,qBAAqB;AACrD,2BAAmB;AAAA,MACpB;AAAA,IACD;AAEA,UAAM,YAAY,KAAK,aAAa,MAAM;AAC1C,UAAM,mBAAmB,KAAK,aAAa,aAAa;AACxD,UAAM,iBAAiB,KAAK,qBAAqB,GAAG;AAEpD,QAAI,CAAC,oBAAoB,CAAC,gBAAgB;AACzC;AAAA,IACD;AAEA,UAAM,SAA8B,CAAA;AACpC,QAAI,oBAAoB,kBAAkB,MAAM;AAK/C,aAAO,aAAa,IAAI,QAAQ,6DAA6D;AAAA,QAC5F,aAAa,4BAA4B,KAAK,UAAU;AAAA,MAAA,CACxD;AAAA,IACF;AACA,QAAI,gBAAgB;AACnB,aAAO,UAAU;AACjB,aAAO,kBAAkB;AAIzB,aAAO,eAAe,IAAI,QAAQ,OAAO;AAAA,IAC1C;AAEA,UAAM,KAAKA,gBAAc,OAAA,EACvB,MAAM,SAAS,EACf,MAAM,EAAE,IAAI,KAAK,GAAA,CAAI,EACrB,OAAO,MAAM;AACf,UAAM,GAAG,QAAQ,EAAE;AAAA,EACpB;AAAA,EAEQ,qBAAqB,KAAoB;AAChD,QAAI,CAAC,KAAK,aAAa;AACtB,aAAO;AAAA,IACR;AACA,UAAM,aAAa,KAAK,UAAU;AAClC,QAAI,CAAC,YAAY;AAChB,aAAO;AAAA,IACR;AACA,WAAO,IAAI,QAAA,IAAY,WAAW,aAAa;AAAA,EAChD;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAuthLogEntryCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/authLog/CreateAuthLogEntryCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { AuthActionType } from '../../type/AuthLog.js'\nimport { InsertBuilder } from '@contember/database'\nimport { JSONValue } from '@contember/schema'\n\nexport class CreateAuthLogEntryCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly data: CreateAuthLogEntryCommand.Entry,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_auth_log')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tinvoked_by_id: this.data.invokedById,\n\t\t\t\tperson_id: this.data.personId,\n\t\t\t\tperson_input_identifier: this.data.personInputIdentifier,\n\t\t\t\tperson_token_id: this.data.personTokenId,\n\t\t\t\ttype: this.data.type,\n\t\t\t\tsuccess: this.data.success,\n\t\t\t\terror_code: this.data.errorCode,\n\t\t\t\terror_message: this.data.errorMessage,\n\t\t\t\tip_address: this.data.ipAddress,\n\t\t\t\tuser_agent: this.data.userAgent,\n\t\t\t\tidentity_provider_id: this.data.identityProviderId,\n\t\t\t\tmetadata: this.data.metadata ?? {},\n\t\t\t\ttarget_person_id: this.data.targetPersonId,\n\t\t\t\tevent_data: this.data.eventData,\n\t\t\t\tgeo_country: this.data.geoCountry,\n\t\t\t\tdevice_fingerprint: this.data.deviceFingerprint,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n\nnamespace CreateAuthLogEntryCommand {\n\texport type Entry = {\n\t\ttype: AuthActionType\n\t\t/** The identity that initiated the action. Omit (→ NULL) when there is no acting identity, e.g. an IdP-initiated back-channel logout. */\n\t\tinvokedById?: string\n\t\tpersonInputIdentifier?: string\n\t\tpersonId?: string\n\t\tpersonTokenId?: string\n\t\tsuccess: boolean\n\t\terrorCode?: string\n\t\terrorMessage?: string\n\t\tipAddress?: string\n\t\tuserAgent?: string\n\t\tidentityProviderId?: string\n\t\tmetadata?: JSONValue\n\t\ttargetPersonId?: string\n\t\teventData?: JSONValue\n\t\t/** A03: country derived from the trusted reverse-proxy geo header, when present. */\n\t\tgeoCountry?: string\n\t\t/** A03: hash of the client user-agent (never the raw UA). */\n\t\tdeviceFingerprint?: string\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;;AAKO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,MAChB;AADgB,SAAA,OAAA;AAAA,EAElB;AAAA,EAEA,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAA,EAClB,KAAK,iBAAiB,EACtB,OAAO;AAAA,MACP,IAAI,UAAU,KAAA;AAAA,MACd,eAAe,KAAK,KAAK;AAAA,MACzB,WAAW,KAAK,KAAK;AAAA,MACrB,yBAAyB,KAAK,KAAK;AAAA,MACnC,iBAAiB,KAAK,KAAK;AAAA,MAC3B,MAAM,KAAK,KAAK;AAAA,MAChB,SAAS,KAAK,KAAK;AAAA,MACnB,YAAY,KAAK,KAAK;AAAA,MACtB,eAAe,KAAK,KAAK;AAAA,MACzB,YAAY,KAAK,KAAK;AAAA,MACtB,YAAY,KAAK,KAAK;AAAA,MACtB,sBAAsB,KAAK,KAAK;AAAA,MAChC,UAAU,KAAK,KAAK,YAAY,CAAA;AAAA,MAChC,kBAAkB,KAAK,KAAK;AAAA,MAC5B,YAAY,KAAK,KAAK;AAAA,MACtB,aAAa,KAAK,KAAK;AAAA,MACvB,oBAAoB,KAAK,KAAK;AAAA,IAAA,CAC9B,EACA,QAAQ,EAAE;AAAA,EACb;AACD;;"}
|
|
1
|
+
{"version":3,"file":"CreateAuthLogEntryCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/authLog/CreateAuthLogEntryCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { AuthActionType } from '../../type/AuthLog.js'\nimport { InsertBuilder } from '@contember/database'\nimport { JSONValue } from '@contember/schema'\n\nexport class CreateAuthLogEntryCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly data: CreateAuthLogEntryCommand.Entry,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_auth_log')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tinvoked_by_id: this.data.invokedById,\n\t\t\t\tperson_id: this.data.personId,\n\t\t\t\tperson_input_identifier: this.data.personInputIdentifier,\n\t\t\t\tperson_token_id: this.data.personTokenId,\n\t\t\t\ttype: this.data.type,\n\t\t\t\tsuccess: this.data.success,\n\t\t\t\terror_code: this.data.errorCode,\n\t\t\t\terror_message: this.data.errorMessage,\n\t\t\t\tip_address: this.data.ipAddress,\n\t\t\t\tuser_agent: this.data.userAgent,\n\t\t\t\tidentity_provider_id: this.data.identityProviderId,\n\t\t\t\tmetadata: this.data.metadata ?? {},\n\t\t\t\ttarget_person_id: this.data.targetPersonId,\n\t\t\t\tevent_data: this.data.eventData,\n\t\t\t\tgeo_country: this.data.geoCountry,\n\t\t\t\tdevice_fingerprint: this.data.deviceFingerprint,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n\nnamespace CreateAuthLogEntryCommand {\n\texport type Entry = {\n\t\ttype: AuthActionType\n\t\t/** The identity that initiated the action. Omit (→ NULL) when there is no acting identity, e.g. an IdP-initiated back-channel logout. */\n\t\tinvokedById?: string\n\t\tpersonInputIdentifier?: string\n\t\tpersonId?: string\n\t\t/** A `person_token` id (password reset, e-mail verification, passwordless). FK-checked, so never an `api_key` id: put that in `eventData`. */\n\t\tpersonTokenId?: string\n\t\tsuccess: boolean\n\t\terrorCode?: string\n\t\terrorMessage?: string\n\t\tipAddress?: string\n\t\tuserAgent?: string\n\t\tidentityProviderId?: string\n\t\tmetadata?: JSONValue\n\t\ttargetPersonId?: string\n\t\teventData?: JSONValue\n\t\t/** A03: country derived from the trusted reverse-proxy geo header, when present. */\n\t\tgeoCountry?: string\n\t\t/** A03: hash of the client user-agent (never the raw UA). */\n\t\tdeviceFingerprint?: string\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;;AAKO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,MAChB;AADgB,SAAA,OAAA;AAAA,EAElB;AAAA,EAEA,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,SAAAA,cAAc,OAAA,EAClB,KAAK,iBAAiB,EACtB,OAAO;AAAA,MACP,IAAI,UAAU,KAAA;AAAA,MACd,eAAe,KAAK,KAAK;AAAA,MACzB,WAAW,KAAK,KAAK;AAAA,MACrB,yBAAyB,KAAK,KAAK;AAAA,MACnC,iBAAiB,KAAK,KAAK;AAAA,MAC3B,MAAM,KAAK,KAAK;AAAA,MAChB,SAAS,KAAK,KAAK;AAAA,MACnB,YAAY,KAAK,KAAK;AAAA,MACtB,eAAe,KAAK,KAAK;AAAA,MACzB,YAAY,KAAK,KAAK;AAAA,MACtB,YAAY,KAAK,KAAK;AAAA,MACtB,sBAAsB,KAAK,KAAK;AAAA,MAChC,UAAU,KAAK,KAAK,YAAY,CAAA;AAAA,MAChC,kBAAkB,KAAK,KAAK;AAAA,MAC5B,YAAY,KAAK,KAAK;AAAA,MACtB,aAAa,KAAK,KAAK;AAAA,MACvB,oBAAoB,KAAK,KAAK;AAAA,IAAA,CAC9B,EACA,QAAQ,EAAE;AAAA,EACb;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAuthLogEntryCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/authLog/CreateAuthLogEntryCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { AuthActionType } from '../../type/AuthLog.js'\nimport { InsertBuilder } from '@contember/database'\nimport { JSONValue } from '@contember/schema'\n\nexport class CreateAuthLogEntryCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly data: CreateAuthLogEntryCommand.Entry,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_auth_log')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tinvoked_by_id: this.data.invokedById,\n\t\t\t\tperson_id: this.data.personId,\n\t\t\t\tperson_input_identifier: this.data.personInputIdentifier,\n\t\t\t\tperson_token_id: this.data.personTokenId,\n\t\t\t\ttype: this.data.type,\n\t\t\t\tsuccess: this.data.success,\n\t\t\t\terror_code: this.data.errorCode,\n\t\t\t\terror_message: this.data.errorMessage,\n\t\t\t\tip_address: this.data.ipAddress,\n\t\t\t\tuser_agent: this.data.userAgent,\n\t\t\t\tidentity_provider_id: this.data.identityProviderId,\n\t\t\t\tmetadata: this.data.metadata ?? {},\n\t\t\t\ttarget_person_id: this.data.targetPersonId,\n\t\t\t\tevent_data: this.data.eventData,\n\t\t\t\tgeo_country: this.data.geoCountry,\n\t\t\t\tdevice_fingerprint: this.data.deviceFingerprint,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n\nnamespace CreateAuthLogEntryCommand {\n\texport type Entry = {\n\t\ttype: AuthActionType\n\t\t/** The identity that initiated the action. Omit (→ NULL) when there is no acting identity, e.g. an IdP-initiated back-channel logout. */\n\t\tinvokedById?: string\n\t\tpersonInputIdentifier?: string\n\t\tpersonId?: string\n\t\tpersonTokenId?: string\n\t\tsuccess: boolean\n\t\terrorCode?: string\n\t\terrorMessage?: string\n\t\tipAddress?: string\n\t\tuserAgent?: string\n\t\tidentityProviderId?: string\n\t\tmetadata?: JSONValue\n\t\ttargetPersonId?: string\n\t\teventData?: JSONValue\n\t\t/** A03: country derived from the trusted reverse-proxy geo header, when present. */\n\t\tgeoCountry?: string\n\t\t/** A03: hash of the client user-agent (never the raw UA). */\n\t\tdeviceFingerprint?: string\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAKO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,MAChB;AADgB,SAAA,OAAA;AAAA,EAElB;AAAA,EAEA,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAA,EAClB,KAAK,iBAAiB,EACtB,OAAO;AAAA,MACP,IAAI,UAAU,KAAA;AAAA,MACd,eAAe,KAAK,KAAK;AAAA,MACzB,WAAW,KAAK,KAAK;AAAA,MACrB,yBAAyB,KAAK,KAAK;AAAA,MACnC,iBAAiB,KAAK,KAAK;AAAA,MAC3B,MAAM,KAAK,KAAK;AAAA,MAChB,SAAS,KAAK,KAAK;AAAA,MACnB,YAAY,KAAK,KAAK;AAAA,MACtB,eAAe,KAAK,KAAK;AAAA,MACzB,YAAY,KAAK,KAAK;AAAA,MACtB,YAAY,KAAK,KAAK;AAAA,MACtB,sBAAsB,KAAK,KAAK;AAAA,MAChC,UAAU,KAAK,KAAK,YAAY,CAAA;AAAA,MAChC,kBAAkB,KAAK,KAAK;AAAA,MAC5B,YAAY,KAAK,KAAK;AAAA,MACtB,aAAa,KAAK,KAAK;AAAA,MACvB,oBAAoB,KAAK,KAAK;AAAA,IAAA,CAC9B,EACA,QAAQ,EAAE;AAAA,EACb;AACD;"}
|
|
1
|
+
{"version":3,"file":"CreateAuthLogEntryCommand.js","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/authLog/CreateAuthLogEntryCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { AuthActionType } from '../../type/AuthLog.js'\nimport { InsertBuilder } from '@contember/database'\nimport { JSONValue } from '@contember/schema'\n\nexport class CreateAuthLogEntryCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly data: CreateAuthLogEntryCommand.Entry,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('person_auth_log')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tinvoked_by_id: this.data.invokedById,\n\t\t\t\tperson_id: this.data.personId,\n\t\t\t\tperson_input_identifier: this.data.personInputIdentifier,\n\t\t\t\tperson_token_id: this.data.personTokenId,\n\t\t\t\ttype: this.data.type,\n\t\t\t\tsuccess: this.data.success,\n\t\t\t\terror_code: this.data.errorCode,\n\t\t\t\terror_message: this.data.errorMessage,\n\t\t\t\tip_address: this.data.ipAddress,\n\t\t\t\tuser_agent: this.data.userAgent,\n\t\t\t\tidentity_provider_id: this.data.identityProviderId,\n\t\t\t\tmetadata: this.data.metadata ?? {},\n\t\t\t\ttarget_person_id: this.data.targetPersonId,\n\t\t\t\tevent_data: this.data.eventData,\n\t\t\t\tgeo_country: this.data.geoCountry,\n\t\t\t\tdevice_fingerprint: this.data.deviceFingerprint,\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n\nnamespace CreateAuthLogEntryCommand {\n\texport type Entry = {\n\t\ttype: AuthActionType\n\t\t/** The identity that initiated the action. Omit (→ NULL) when there is no acting identity, e.g. an IdP-initiated back-channel logout. */\n\t\tinvokedById?: string\n\t\tpersonInputIdentifier?: string\n\t\tpersonId?: string\n\t\t/** A `person_token` id (password reset, e-mail verification, passwordless). FK-checked, so never an `api_key` id: put that in `eventData`. */\n\t\tpersonTokenId?: string\n\t\tsuccess: boolean\n\t\terrorCode?: string\n\t\terrorMessage?: string\n\t\tipAddress?: string\n\t\tuserAgent?: string\n\t\tidentityProviderId?: string\n\t\tmetadata?: JSONValue\n\t\ttargetPersonId?: string\n\t\teventData?: JSONValue\n\t\t/** A03: country derived from the trusted reverse-proxy geo header, when present. */\n\t\tgeoCountry?: string\n\t\t/** A03: hash of the client user-agent (never the raw UA). */\n\t\tdeviceFingerprint?: string\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAKO,MAAM,0BAAmD;AAAA,EAC/D,YACkB,MAChB;AADgB,SAAA,OAAA;AAAA,EAElB;AAAA,EAEA,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAMA,gBAAc,OAAA,EAClB,KAAK,iBAAiB,EACtB,OAAO;AAAA,MACP,IAAI,UAAU,KAAA;AAAA,MACd,eAAe,KAAK,KAAK;AAAA,MACzB,WAAW,KAAK,KAAK;AAAA,MACrB,yBAAyB,KAAK,KAAK;AAAA,MACnC,iBAAiB,KAAK,KAAK;AAAA,MAC3B,MAAM,KAAK,KAAK;AAAA,MAChB,SAAS,KAAK,KAAK;AAAA,MACnB,YAAY,KAAK,KAAK;AAAA,MACtB,eAAe,KAAK,KAAK;AAAA,MACzB,YAAY,KAAK,KAAK;AAAA,MACtB,YAAY,KAAK,KAAK;AAAA,MACtB,sBAAsB,KAAK,KAAK;AAAA,MAChC,UAAU,KAAK,KAAK,YAAY,CAAA;AAAA,MAChC,kBAAkB,KAAK,KAAK;AAAA,MAC5B,YAAY,KAAK,KAAK;AAAA,MACtB,aAAa,KAAK,KAAK;AAAA,MACvB,oBAAoB,KAAK,KAAK;AAAA,IAAA,CAC9B,EACA,QAAQ,EAAE;AAAA,EACb;AACD;"}
|
|
@@ -10,8 +10,8 @@ class UpdateConfigurationCommand {
|
|
|
10
10
|
const rl = this.configuration.rateLimits;
|
|
11
11
|
let captchaSecretCol;
|
|
12
12
|
let captchaSecretVersionCol;
|
|
13
|
-
if (captcha?.secret !== void 0) {
|
|
14
|
-
if (captcha.secret === ""
|
|
13
|
+
if (captcha?.secret !== void 0 && captcha.secret !== null) {
|
|
14
|
+
if (captcha.secret === "") {
|
|
15
15
|
captchaSecretCol = null;
|
|
16
16
|
captchaSecretVersionCol = null;
|
|
17
17
|
} else {
|
|
@@ -66,7 +66,9 @@ class UpdateConfigurationCommand {
|
|
|
66
66
|
rate_limit_email_otp_per_person_limit: rl?.emailOtpPerPerson?.limit ?? void 0,
|
|
67
67
|
rate_limit_email_otp_per_person_window: rl?.emailOtpPerPerson?.window ?? void 0,
|
|
68
68
|
rate_limit_email_verification_per_ip_limit: rl?.emailVerificationPerIp?.limit ?? void 0,
|
|
69
|
-
rate_limit_email_verification_per_ip_window: rl?.emailVerificationPerIp?.window ?? void 0
|
|
69
|
+
rate_limit_email_verification_per_ip_window: rl?.emailVerificationPerIp?.window ?? void 0,
|
|
70
|
+
panel_global_roles: this.configuration.panel?.globalRoles ?? void 0,
|
|
71
|
+
panel_project_roles: this.configuration.panel?.projectRoles ?? void 0
|
|
70
72
|
}
|
|
71
73
|
).execute(db);
|
|
72
74
|
if (!result) {
|
package/dist/development/src/model/commands/configuration/UpdateConfigurationCommand.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateConfigurationCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/configuration/UpdateConfigurationCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ConfigInput } from '../../../schema/index.js'\nimport { UpdateBuilder } from '@contember/database'\nimport { ConfigRow } from '../../type/Config.js'\nimport { IPostgresInterval } from 'postgres-interval'\n\nexport class UpdateConfigurationCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly configuration: ConfigInput,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst captcha = this.configuration.captcha\n\t\tconst rl = this.configuration.rateLimits\n\n\t\t//
|
|
1
|
+
{"version":3,"file":"UpdateConfigurationCommand.cjs","sources":["../../../../../../../packages/engine-tenant-api/src/model/commands/configuration/UpdateConfigurationCommand.ts"],"sourcesContent":["import { Command } from '../Command.js'\nimport { ConfigInput } from '../../../schema/index.js'\nimport { UpdateBuilder } from '@contember/database'\nimport { ConfigRow } from '../../type/Config.js'\nimport { IPostgresInterval } from 'postgres-interval'\n\nexport class UpdateConfigurationCommand implements Command<void> {\n\tconstructor(\n\t\tprivate readonly configuration: ConfigInput,\n\t) {\n\t}\n\n\tasync execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst captcha = this.configuration.captcha\n\t\tconst rl = this.configuration.rateLimits\n\n\t\t// Null and omission preserve the stored secret; only an empty string clears it.\n\t\tlet captchaSecretCol: Buffer | null | undefined\n\t\tlet captchaSecretVersionCol: number | null | undefined\n\t\tif (captcha?.secret !== undefined && captcha.secret !== null) {\n\t\t\tif (captcha.secret === '') {\n\t\t\t\tcaptchaSecretCol = null\n\t\t\t\tcaptchaSecretVersionCol = null\n\t\t\t} else {\n\t\t\t\tconst encrypted = await providers.encrypt(Buffer.from(captcha.secret, 'utf8'))\n\t\t\t\tcaptchaSecretCol = encrypted.value\n\t\t\t\tcaptchaSecretVersionCol = encrypted.version\n\t\t\t}\n\t\t}\n\n\t\tconst result = await UpdateBuilder.create()\n\t\t\t.table('config')\n\t\t\t.where({ id: 'singleton' })\n\t\t\t.values(\n\t\t\t\t{\n\t\t\t\t\tpasswordless_enabled: this.configuration.passwordless?.enabled ?? undefined,\n\t\t\t\t\tsignup_require_email_verification: this.configuration.signup?.requireEmailVerification ?? undefined,\n\t\t\t\t\trequire_email_change_verification: this.configuration.emailChange?.requireVerification ?? undefined,\n\t\t\t\t\tpasswordless_url: this.configuration.passwordless?.url,\n\t\t\t\t\tpasswordless_expiration: this.configuration.passwordless?.expiration ?? undefined,\n\t\t\t\t\tpassword_min_length: this.configuration.password?.minLength ?? undefined,\n\t\t\t\t\tpassword_require_uppercase: this.configuration.password?.requireUppercase ?? undefined,\n\t\t\t\t\tpassword_require_lowercase: this.configuration.password?.requireLowercase ?? undefined,\n\t\t\t\t\tpassword_require_digit: this.configuration.password?.requireDigit ?? undefined,\n\t\t\t\t\tpassword_require_special: this.configuration.password?.requireSpecial ?? undefined,\n\t\t\t\t\tpassword_pattern: this.configuration.password?.pattern,\n\t\t\t\t\tpassword_check_blacklist: this.configuration.password?.checkBlacklist ?? undefined,\n\t\t\t\t\tpassword_check_hibp: this.configuration.password?.checkHibp ?? undefined,\n\t\t\t\t\tlogin_base_backoff: this.configuration.login?.baseBackoff ?? undefined,\n\t\t\t\t\tlogin_max_backoff: this.configuration.login?.maxBackoff ?? undefined,\n\t\t\t\t\tlogin_attempt_window: this.configuration.login?.attemptWindow ?? undefined,\n\t\t\t\t\tlogin_reveal_user_exits: this.configuration.login?.revealUserExists ?? undefined,\n\t\t\t\t\tlogin_reveal_login_method: this.configuration.login?.revealLoginMethod ?? undefined,\n\t\t\t\t\tlogin_default_token_expiration: this.configuration.login?.defaultTokenExpiration ?? undefined,\n\t\t\t\t\tlogin_max_token_expiration: this.configuration.login?.maxTokenExpiration,\n\t\t\t\t\tlogin_mfa_grace_duration: this.configuration.login?.mfaGraceDuration ?? undefined,\n\t\t\t\t\tlogin_anomaly_detection_enabled: this.configuration.login?.anomalyDetection?.enabled ?? undefined,\n\t\t\t\t\tlogin_anomaly_history_size: this.configuration.login?.anomalyDetection?.historySize ?? undefined,\n\t\t\t\t\tlogin_anomaly_email_threshold: this.configuration.login?.anomalyDetection?.emailThreshold ?? undefined,\n\t\t\t\t\tlogin_anomaly_step_up_threshold: this.configuration.login?.anomalyDetection?.stepUpThreshold ?? undefined,\n\t\t\t\t\tcaptcha_provider: captcha?.provider !== undefined ? captcha.provider : undefined,\n\t\t\t\t\tcaptcha_secret: captchaSecretCol,\n\t\t\t\t\tcaptcha_secret_version: captchaSecretVersionCol,\n\t\t\t\t\tcaptcha_threshold: captcha?.threshold !== undefined ? captcha.threshold : undefined,\n\t\t\t\t\tcaptcha_protect_sign_up: captcha?.protect?.signUp ?? undefined,\n\t\t\t\t\tcaptcha_protect_password_reset: captcha?.protect?.passwordReset ?? undefined,\n\t\t\t\t\tcaptcha_protect_passwordless_init: captcha?.protect?.passwordlessInit ?? undefined,\n\t\t\t\t\tcaptcha_protect_email_verification: captcha?.protect?.emailVerification ?? undefined,\n\t\t\t\t\trate_limit_sign_up_per_ip_limit: rl?.signUpPerIp?.limit ?? undefined,\n\t\t\t\t\trate_limit_sign_up_per_ip_window: rl?.signUpPerIp?.window ?? undefined,\n\t\t\t\t\trate_limit_login_per_ip_limit: rl?.loginPerIp?.limit ?? undefined,\n\t\t\t\t\trate_limit_login_per_ip_window: rl?.loginPerIp?.window ?? undefined,\n\t\t\t\t\trate_limit_password_reset_per_ip_limit: rl?.passwordResetPerIp?.limit ?? undefined,\n\t\t\t\t\trate_limit_password_reset_per_ip_window: rl?.passwordResetPerIp?.window ?? undefined,\n\t\t\t\t\trate_limit_passwordless_init_per_ip_limit: rl?.passwordlessInitPerIp?.limit ?? undefined,\n\t\t\t\t\trate_limit_passwordless_init_per_ip_window: rl?.passwordlessInitPerIp?.window ?? undefined,\n\t\t\t\t\trate_limit_email_otp_per_person_limit: rl?.emailOtpPerPerson?.limit ?? undefined,\n\t\t\t\t\trate_limit_email_otp_per_person_window: rl?.emailOtpPerPerson?.window ?? undefined,\n\t\t\t\t\trate_limit_email_verification_per_ip_limit: rl?.emailVerificationPerIp?.limit ?? undefined,\n\t\t\t\t\trate_limit_email_verification_per_ip_window: rl?.emailVerificationPerIp?.window ?? undefined,\n\t\t\t\t\tpanel_global_roles: this.configuration.panel?.globalRoles ?? undefined,\n\t\t\t\t\tpanel_project_roles: this.configuration.panel?.projectRoles ?? undefined,\n\t\t\t\t} satisfies {\n\t\t\t\t\t[K in keyof ConfigRow]: (IPostgresInterval extends ConfigRow[K] ? string : never) | Exclude<ConfigRow[K], IPostgresInterval> | undefined\n\t\t\t\t},\n\t\t\t)\n\t\t\t.execute(db)\n\t\tif (!result) {\n\t\t\tthrow new Error('Configuration not found')\n\t\t}\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;AAMO,MAAM,2BAAoD;AAAA,EAChE,YACkB,eAChB;AADgB,SAAA,gBAAA;AAAA,EAElB;AAAA,EAEA,MAAM,QAAQ,EAAE,IAAI,aAA0C;AAC7D,UAAM,UAAU,KAAK,cAAc;AACnC,UAAM,KAAK,KAAK,cAAc;AAG9B,QAAI;AACJ,QAAI;AACJ,QAAI,SAAS,WAAW,UAAa,QAAQ,WAAW,MAAM;AAC7D,UAAI,QAAQ,WAAW,IAAI;AAC1B,2BAAmB;AACnB,kCAA0B;AAAA,MAC3B,OAAO;AACN,cAAM,YAAY,MAAM,UAAU,QAAQ,OAAO,KAAK,QAAQ,QAAQ,MAAM,CAAC;AAC7E,2BAAmB,UAAU;AAC7B,kCAA0B,UAAU;AAAA,MACrC;AAAA,IACD;AAEA,UAAM,SAAS,MAAMA,uBAAc,OAAA,EACjC,MAAM,QAAQ,EACd,MAAM,EAAE,IAAI,YAAA,CAAa,EACzB;AAAA,MACA;AAAA,QACC,sBAAsB,KAAK,cAAc,cAAc,WAAW;AAAA,QAClE,mCAAmC,KAAK,cAAc,QAAQ,4BAA4B;AAAA,QAC1F,mCAAmC,KAAK,cAAc,aAAa,uBAAuB;AAAA,QAC1F,kBAAkB,KAAK,cAAc,cAAc;AAAA,QACnD,yBAAyB,KAAK,cAAc,cAAc,cAAc;AAAA,QACxE,qBAAqB,KAAK,cAAc,UAAU,aAAa;AAAA,QAC/D,4BAA4B,KAAK,cAAc,UAAU,oBAAoB;AAAA,QAC7E,4BAA4B,KAAK,cAAc,UAAU,oBAAoB;AAAA,QAC7E,wBAAwB,KAAK,cAAc,UAAU,gBAAgB;AAAA,QACrE,0BAA0B,KAAK,cAAc,UAAU,kBAAkB;AAAA,QACzE,kBAAkB,KAAK,cAAc,UAAU;AAAA,QAC/C,0BAA0B,KAAK,cAAc,UAAU,kBAAkB;AAAA,QACzE,qBAAqB,KAAK,cAAc,UAAU,aAAa;AAAA,QAC/D,oBAAoB,KAAK,cAAc,OAAO,eAAe;AAAA,QAC7D,mBAAmB,KAAK,cAAc,OAAO,cAAc;AAAA,QAC3D,sBAAsB,KAAK,cAAc,OAAO,iBAAiB;AAAA,QACjE,yBAAyB,KAAK,cAAc,OAAO,oBAAoB;AAAA,QACvE,2BAA2B,KAAK,cAAc,OAAO,qBAAqB;AAAA,QAC1E,gCAAgC,KAAK,cAAc,OAAO,0BAA0B;AAAA,QACpF,4BAA4B,KAAK,cAAc,OAAO;AAAA,QACtD,0BAA0B,KAAK,cAAc,OAAO,oBAAoB;AAAA,QACxE,iCAAiC,KAAK,cAAc,OAAO,kBAAkB,WAAW;AAAA,QACxF,4BAA4B,KAAK,cAAc,OAAO,kBAAkB,eAAe;AAAA,QACvF,+BAA+B,KAAK,cAAc,OAAO,kBAAkB,kBAAkB;AAAA,QAC7F,iCAAiC,KAAK,cAAc,OAAO,kBAAkB,mBAAmB;AAAA,QAChG,kBAAkB,SAAS,aAAa,SAAY,QAAQ,WAAW;AAAA,QACvE,gBAAgB;AAAA,QAChB,wBAAwB;AAAA,QACxB,mBAAmB,SAAS,cAAc,SAAY,QAAQ,YAAY;AAAA,QAC1E,yBAAyB,SAAS,SAAS,UAAU;AAAA,QACrD,gCAAgC,SAAS,SAAS,iBAAiB;AAAA,QACnE,mCAAmC,SAAS,SAAS,oBAAoB;AAAA,QACzE,oCAAoC,SAAS,SAAS,qBAAqB;AAAA,QAC3E,iCAAiC,IAAI,aAAa,SAAS;AAAA,QAC3D,kCAAkC,IAAI,aAAa,UAAU;AAAA,QAC7D,+BAA+B,IAAI,YAAY,SAAS;AAAA,QACxD,gCAAgC,IAAI,YAAY,UAAU;AAAA,QAC1D,wCAAwC,IAAI,oBAAoB,SAAS;AAAA,QACzE,yCAAyC,IAAI,oBAAoB,UAAU;AAAA,QAC3E,2CAA2C,IAAI,uBAAuB,SAAS;AAAA,QAC/E,4CAA4C,IAAI,uBAAuB,UAAU;AAAA,QACjF,uCAAuC,IAAI,mBAAmB,SAAS;AAAA,QACvE,wCAAwC,IAAI,mBAAmB,UAAU;AAAA,QACzE,4CAA4C,IAAI,wBAAwB,SAAS;AAAA,QACjF,6CAA6C,IAAI,wBAAwB,UAAU;AAAA,QACnF,oBAAoB,KAAK,cAAc,OAAO,eAAe;AAAA,QAC7D,qBAAqB,KAAK,cAAc,OAAO,gBAAgB;AAAA,MAAA;AAAA,IAChE,EAIA,QAAQ,EAAE;AACZ,QAAI,CAAC,QAAQ;AACZ,YAAM,IAAI,MAAM,yBAAyB;AAAA,IAC1C;AAAA,EACD;AACD;;"}
|
|
@@ -8,8 +8,8 @@ class UpdateConfigurationCommand {
|
|
|
8
8
|
const rl = this.configuration.rateLimits;
|
|
9
9
|
let captchaSecretCol;
|
|
10
10
|
let captchaSecretVersionCol;
|
|
11
|
-
if (captcha?.secret !== void 0) {
|
|
12
|
-
if (captcha.secret === ""
|
|
11
|
+
if (captcha?.secret !== void 0 && captcha.secret !== null) {
|
|
12
|
+
if (captcha.secret === "") {
|
|
13
13
|
captchaSecretCol = null;
|
|
14
14
|
captchaSecretVersionCol = null;
|
|
15
15
|
} else {
|
|
@@ -64,7 +64,9 @@ class UpdateConfigurationCommand {
|
|
|
64
64
|
rate_limit_email_otp_per_person_limit: rl?.emailOtpPerPerson?.limit ?? void 0,
|
|
65
65
|
rate_limit_email_otp_per_person_window: rl?.emailOtpPerPerson?.window ?? void 0,
|
|
66
66
|
rate_limit_email_verification_per_ip_limit: rl?.emailVerificationPerIp?.limit ?? void 0,
|
|
67
|
-
rate_limit_email_verification_per_ip_window: rl?.emailVerificationPerIp?.window ?? void 0
|
|
67
|
+
rate_limit_email_verification_per_ip_window: rl?.emailVerificationPerIp?.window ?? void 0,
|
|
68
|
+
panel_global_roles: this.configuration.panel?.globalRoles ?? void 0,
|
|
69
|
+
panel_project_roles: this.configuration.panel?.projectRoles ?? void 0
|
|
68
70
|
}
|
|
69
71
|
).execute(db);
|
|
70
72
|
if (!result) {
|