@contember/cli 2.2.0-alpha.3 → 2.2.0-alpha.4
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 +35 -41
- package/dist/development/run.cjs +12 -4
- package/dist/development/run.cjs.map +1 -1
- package/dist/development/run.js +12 -4
- package/dist/development/run.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs +30 -15
- package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsGetEventCommand.js +31 -16
- package/dist/development/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs +21 -41
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js +22 -42
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs +15 -13
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.js +15 -13
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs +28 -16
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.js +29 -17
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs +51 -22
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js +52 -23
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs +28 -16
- package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsStopEventCommand.js +29 -17
- package/dist/development/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
- package/dist/development/src/commands/deploy/DeployCommand.cjs +56 -29
- package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -1
- package/dist/development/src/commands/deploy/DeployCommand.js +57 -30
- package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +64 -24
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js +65 -25
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +2 -2
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js +2 -2
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +7 -3
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +8 -4
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +73 -25
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js +74 -26
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +7 -2
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +7 -2
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.cjs +11 -4
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.js +11 -4
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +24 -4
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +25 -5
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.cjs +39 -8
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.js +40 -9
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +5 -5
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js +5 -5
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.cjs +6 -7
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.js +6 -7
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.js.map +1 -1
- package/dist/development/src/commands/misc/CommandsCommand.cjs +58 -0
- package/dist/development/src/commands/misc/CommandsCommand.cjs.map +1 -0
- package/dist/development/src/commands/misc/CommandsCommand.js +58 -0
- package/dist/development/src/commands/misc/CommandsCommand.js.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs +2 -3
- package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -1
- package/dist/development/src/commands/misc/VersionCommand.js +2 -3
- package/dist/development/src/commands/misc/VersionCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +12 -12
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +13 -13
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +17 -15
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +18 -16
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -12
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectValidateCommand.js +42 -14
- package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -1
- package/dist/development/src/commands/tenant/TenantApplyCommand.cjs +31 -11
- package/dist/development/src/commands/tenant/TenantApplyCommand.cjs.map +1 -1
- package/dist/development/src/commands/tenant/TenantApplyCommand.js +32 -12
- package/dist/development/src/commands/tenant/TenantApplyCommand.js.map +1 -1
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs +68 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js +68 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs +31 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js +31 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs +55 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.js +55 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.cjs +36 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.js +36 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.cjs +62 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.js +62 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs +102 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js +102 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.cjs +73 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.js +73 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.cjs +35 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.js +35 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.cjs +45 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.js +45 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/memberOptions.cjs +16 -0
- package/dist/development/src/commands/tenant/member/memberOptions.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/memberOptions.js +16 -0
- package/dist/development/src/commands/tenant/member/memberOptions.js.map +1 -0
- package/dist/development/src/commands/tenant/member/membershipInput.cjs +109 -0
- package/dist/development/src/commands/tenant/member/membershipInput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/membershipInput.js +109 -0
- package/dist/development/src/commands/tenant/member/membershipInput.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs +27 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.js +27 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs +34 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js +34 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.cjs +79 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.js +79 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.cjs +29 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.js +29 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.cjs +53 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.js +53 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs +37 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.js +37 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs +47 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js +47 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs +46 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.js +46 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.cjs +55 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.js +55 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.cjs +38 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.js +38 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.cjs +36 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.js +36 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.cjs +65 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.js +65 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/personInput.cjs +77 -0
- package/dist/development/src/commands/tenant/person/personInput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/personInput.js +77 -0
- package/dist/development/src/commands/tenant/person/personInput.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.cjs +96 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.js +96 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs +59 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.js +59 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs +41 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.js +41 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs +42 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js +42 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs +36 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.js +36 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs +31 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.js +31 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.cjs +33 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.js +33 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs +38 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.js +38 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/policyInput.cjs +167 -0
- package/dist/development/src/commands/tenant/policy/policyInput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/policyInput.js +167 -0
- package/dist/development/src/commands/tenant/policy/policyInput.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.cjs +24 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.js +24 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.cjs +22 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.js +22 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.cjs +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.js +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.cjs +22 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.js +22 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs +50 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.js +50 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.cjs +23 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.js +23 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.cjs +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.js +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.cjs +18 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.js +18 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.cjs +26 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.js +26 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.js.map +1 -0
- package/dist/development/src/commands/tenant/tenantOutput.cjs +35 -0
- package/dist/development/src/commands/tenant/tenantOutput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/tenantOutput.js +35 -0
- package/dist/development/src/commands/tenant/tenantOutput.js.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs +35 -20
- package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/ExportCommand.js +38 -23
- package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/ImportCommand.cjs +70 -27
- package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/ImportCommand.js +72 -29
- package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.cjs +79 -29
- package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.js +81 -31
- package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/utils.cjs +12 -10
- package/dist/development/src/commands/transfer/utils.cjs.map +1 -1
- package/dist/development/src/commands/transfer/utils.js +12 -10
- package/dist/development/src/commands/transfer/utils.js.map +1 -1
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +87 -32
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +89 -34
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
- package/dist/development/src/dic.cjs +152 -47
- package/dist/development/src/dic.cjs.map +1 -1
- package/dist/development/src/dic.js +152 -47
- package/dist/development/src/dic.js.map +1 -1
- package/dist/development/src/lib/SystemClientProvider.cjs +55 -2
- package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -1
- package/dist/development/src/lib/SystemClientProvider.js +55 -2
- package/dist/development/src/lib/SystemClientProvider.js.map +1 -1
- package/dist/development/src/lib/TenantClientProvider.cjs +28 -5
- package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -1
- package/dist/development/src/lib/TenantClientProvider.js +28 -5
- package/dist/development/src/lib/TenantClientProvider.js.map +1 -1
- package/dist/development/src/lib/actions/ActionsClient.cjs +18 -6
- package/dist/development/src/lib/actions/ActionsClient.cjs.map +1 -1
- package/dist/development/src/lib/actions/ActionsClient.js +18 -6
- package/dist/development/src/lib/actions/ActionsClient.js.map +1 -1
- package/dist/development/src/lib/actions/resolveActionsClient.cjs +13 -0
- package/dist/development/src/lib/actions/resolveActionsClient.cjs.map +1 -0
- package/dist/development/src/lib/actions/resolveActionsClient.js +13 -0
- package/dist/development/src/lib/actions/resolveActionsClient.js.map +1 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.cjs +44 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.cjs.map +1 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.js +44 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.js.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.cjs +31 -11
- package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -1
- package/dist/development/src/lib/admin/AdminClient.js +31 -11
- package/dist/development/src/lib/admin/AdminClient.js.map +1 -1
- package/dist/development/src/lib/admin/AdminDeployer.cjs +5 -3
- package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -1
- package/dist/development/src/lib/admin/AdminDeployer.js +5 -3
- package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -1
- package/dist/development/src/lib/errors/TransportError.cjs +204 -0
- package/dist/development/src/lib/errors/TransportError.cjs.map +1 -0
- package/dist/development/src/lib/errors/TransportError.js +204 -0
- package/dist/development/src/lib/errors/TransportError.js.map +1 -0
- package/dist/development/src/lib/maskToken.cjs +7 -1
- package/dist/development/src/lib/maskToken.cjs.map +1 -1
- package/dist/development/src/lib/maskToken.js +7 -1
- package/dist/development/src/lib/maskToken.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +97 -50
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +97 -50
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs +80 -64
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationPrinter.js +81 -65
- package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +2 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +2 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.cjs +14 -10
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.js +14 -10
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +12 -4
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +12 -4
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs +5 -3
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsValidator.js +5 -3
- package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs +5 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.js +5 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -1
- package/dist/development/src/lib/prompt/prompt.cjs +13 -0
- package/dist/development/src/lib/prompt/prompt.cjs.map +1 -0
- package/dist/development/src/lib/prompt/prompt.internal.cjs +21 -0
- package/dist/development/src/lib/prompt/prompt.internal.cjs.map +1 -0
- package/dist/development/src/lib/prompt/prompt.internal.js +21 -0
- package/dist/development/src/lib/prompt/prompt.internal.js.map +1 -0
- package/dist/development/src/lib/prompt/prompt.js +13 -0
- package/dist/development/src/lib/prompt/prompt.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +2 -2
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationHelper.js +2 -2
- package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +4 -4
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js +4 -4
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
- package/dist/development/src/lib/tenant/TenantApiTransport.cjs +152 -0
- package/dist/development/src/lib/tenant/TenantApiTransport.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantApiTransport.js +152 -0
- package/dist/development/src/lib/tenant/TenantApiTransport.js.map +1 -0
- package/dist/development/src/lib/tenant/TenantConfigApplier.cjs +95 -26
- package/dist/development/src/lib/tenant/TenantConfigApplier.cjs.map +1 -1
- package/dist/development/src/lib/tenant/TenantConfigApplier.js +95 -26
- package/dist/development/src/lib/tenant/TenantConfigApplier.js.map +1 -1
- package/dist/development/src/lib/tenant/TenantConnectionProvider.cjs +20 -0
- package/dist/development/src/lib/tenant/TenantConnectionProvider.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantConnectionProvider.js +20 -0
- package/dist/development/src/lib/tenant/TenantConnectionProvider.js.map +1 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.cjs +30 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.js +30 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.js.map +1 -0
- package/dist/development/src/lib/tenant/authPolicy.cjs +10 -0
- package/dist/development/src/lib/tenant/authPolicy.cjs.map +1 -0
- package/dist/development/src/lib/tenant/authPolicy.js +10 -0
- package/dist/development/src/lib/tenant/authPolicy.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.cjs +101 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.js +101 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.cjs +96 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.js +96 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.cjs +162 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.js +162 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.cjs +101 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.js +101 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.cjs +209 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.js +209 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/index.cjs +21 -0
- package/dist/development/src/lib/tenant/clients/index.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/index.js +21 -0
- package/dist/development/src/lib/tenant/clients/index.js.map +1 -0
- package/dist/development/src/lib/tenant/confirmation.cjs +23 -0
- package/dist/development/src/lib/tenant/confirmation.cjs.map +1 -0
- package/dist/development/src/lib/tenant/confirmation.js +23 -0
- package/dist/development/src/lib/tenant/confirmation.js.map +1 -0
- package/dist/development/src/lib/tenant/input/pagination.cjs +24 -0
- package/dist/development/src/lib/tenant/input/pagination.cjs.map +1 -0
- package/dist/development/src/lib/tenant/input/pagination.js +24 -0
- package/dist/development/src/lib/tenant/input/pagination.js.map +1 -0
- package/dist/development/src/lib/tenant/input/value.cjs +71 -0
- package/dist/development/src/lib/tenant/input/value.cjs.map +1 -0
- package/dist/development/src/lib/tenant/input/value.js +71 -0
- package/dist/development/src/lib/tenant/input/value.js.map +1 -0
- package/dist/development/src/lib/tenant/stdin.cjs +13 -0
- package/dist/development/src/lib/tenant/stdin.cjs.map +1 -0
- package/dist/development/src/lib/tenant/stdin.js +13 -0
- package/dist/development/src/lib/tenant/stdin.js.map +1 -0
- package/dist/development/src/lib/tenant/tenantConfig.cjs.map +1 -1
- package/dist/development/src/lib/tenant/tenantConfig.js.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.cjs +290 -54
- package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.js +292 -56
- package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/development/src/lib/transfer/stdio.cjs +3 -8
- package/dist/development/src/lib/transfer/stdio.cjs.map +1 -1
- package/dist/development/src/lib/transfer/stdio.js +3 -8
- package/dist/development/src/lib/transfer/stdio.js.map +1 -1
- package/dist/production/run.cjs +12 -4
- package/dist/production/run.cjs.map +1 -1
- package/dist/production/run.js +12 -4
- package/dist/production/run.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs +30 -15
- package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsGetEventCommand.js +31 -16
- package/dist/production/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs +21 -41
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js +22 -42
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs +15 -13
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.js +15 -13
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs +28 -16
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.js +29 -17
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs +51 -22
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js +52 -23
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs +28 -16
- package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsStopEventCommand.js +29 -17
- package/dist/production/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
- package/dist/production/src/commands/deploy/DeployCommand.cjs +56 -29
- package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -1
- package/dist/production/src/commands/deploy/DeployCommand.js +57 -30
- package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +64 -24
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js +65 -25
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +2 -2
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js +2 -2
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +7 -3
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +8 -4
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +73 -25
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js +74 -26
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +7 -2
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +7 -2
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.cjs +11 -4
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.js +11 -4
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +24 -4
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +25 -5
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.cjs +39 -8
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.js +40 -9
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +5 -5
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js +5 -5
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.cjs +6 -7
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.js +6 -7
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.js.map +1 -1
- package/dist/production/src/commands/misc/CommandsCommand.cjs +58 -0
- package/dist/production/src/commands/misc/CommandsCommand.cjs.map +1 -0
- package/dist/production/src/commands/misc/CommandsCommand.js +58 -0
- package/dist/production/src/commands/misc/CommandsCommand.js.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs +2 -3
- package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -1
- package/dist/production/src/commands/misc/VersionCommand.js +2 -3
- package/dist/production/src/commands/misc/VersionCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +12 -12
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +13 -13
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +17 -15
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +18 -16
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -12
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectValidateCommand.js +42 -14
- package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -1
- package/dist/production/src/commands/tenant/TenantApplyCommand.cjs +31 -11
- package/dist/production/src/commands/tenant/TenantApplyCommand.cjs.map +1 -1
- package/dist/production/src/commands/tenant/TenantApplyCommand.js +32 -12
- package/dist/production/src/commands/tenant/TenantApplyCommand.js.map +1 -1
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs +68 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js +68 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs +31 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js +31 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs +55 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.js +55 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.cjs +36 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.js +36 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.cjs +62 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.js +62 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs +102 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js +102 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.cjs +73 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.js +73 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.cjs +35 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.js +35 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.cjs +45 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.js +45 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/memberOptions.cjs +16 -0
- package/dist/production/src/commands/tenant/member/memberOptions.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/memberOptions.js +16 -0
- package/dist/production/src/commands/tenant/member/memberOptions.js.map +1 -0
- package/dist/production/src/commands/tenant/member/membershipInput.cjs +109 -0
- package/dist/production/src/commands/tenant/member/membershipInput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/membershipInput.js +109 -0
- package/dist/production/src/commands/tenant/member/membershipInput.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs +27 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.js +27 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs +34 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js +34 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.cjs +79 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.js +79 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.cjs +29 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.js +29 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.cjs +53 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.js +53 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs +37 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.js +37 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs +47 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js +47 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs +46 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.js +46 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.cjs +55 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.js +55 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.cjs +38 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.js +38 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.cjs +36 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.js +36 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.cjs +65 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.js +65 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/personInput.cjs +77 -0
- package/dist/production/src/commands/tenant/person/personInput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/personInput.js +77 -0
- package/dist/production/src/commands/tenant/person/personInput.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.cjs +96 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.js +96 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs +59 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.js +59 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs +41 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.js +41 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs +42 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js +42 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs +36 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.js +36 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs +31 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.js +31 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.cjs +33 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.js +33 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs +38 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.js +38 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/policyInput.cjs +167 -0
- package/dist/production/src/commands/tenant/policy/policyInput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/policyInput.js +167 -0
- package/dist/production/src/commands/tenant/policy/policyInput.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.cjs +24 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.js +24 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.cjs +22 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.js +22 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.cjs +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.js +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.cjs +22 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.js +22 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs +50 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.js +50 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.cjs +23 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.js +23 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.cjs +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.js +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.cjs +18 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.js +18 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.cjs +26 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.js +26 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.js.map +1 -0
- package/dist/production/src/commands/tenant/tenantOutput.cjs +35 -0
- package/dist/production/src/commands/tenant/tenantOutput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/tenantOutput.js +35 -0
- package/dist/production/src/commands/tenant/tenantOutput.js.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs +35 -20
- package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/ExportCommand.js +38 -23
- package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/ImportCommand.cjs +70 -27
- package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/ImportCommand.js +72 -29
- package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.cjs +79 -29
- package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.js +81 -31
- package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/utils.cjs +12 -10
- package/dist/production/src/commands/transfer/utils.cjs.map +1 -1
- package/dist/production/src/commands/transfer/utils.js +12 -10
- package/dist/production/src/commands/transfer/utils.js.map +1 -1
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +87 -32
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +89 -34
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
- package/dist/production/src/dic.cjs +152 -47
- package/dist/production/src/dic.cjs.map +1 -1
- package/dist/production/src/dic.js +152 -47
- package/dist/production/src/dic.js.map +1 -1
- package/dist/production/src/lib/SystemClientProvider.cjs +55 -2
- package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -1
- package/dist/production/src/lib/SystemClientProvider.js +55 -2
- package/dist/production/src/lib/SystemClientProvider.js.map +1 -1
- package/dist/production/src/lib/TenantClientProvider.cjs +28 -5
- package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -1
- package/dist/production/src/lib/TenantClientProvider.js +28 -5
- package/dist/production/src/lib/TenantClientProvider.js.map +1 -1
- package/dist/production/src/lib/actions/ActionsClient.cjs +18 -6
- package/dist/production/src/lib/actions/ActionsClient.cjs.map +1 -1
- package/dist/production/src/lib/actions/ActionsClient.js +18 -6
- package/dist/production/src/lib/actions/ActionsClient.js.map +1 -1
- package/dist/production/src/lib/actions/resolveActionsClient.cjs +13 -0
- package/dist/production/src/lib/actions/resolveActionsClient.cjs.map +1 -0
- package/dist/production/src/lib/actions/resolveActionsClient.js +13 -0
- package/dist/production/src/lib/actions/resolveActionsClient.js.map +1 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.cjs +44 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.cjs.map +1 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.js +44 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.js.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.cjs +31 -11
- package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -1
- package/dist/production/src/lib/admin/AdminClient.js +31 -11
- package/dist/production/src/lib/admin/AdminClient.js.map +1 -1
- package/dist/production/src/lib/admin/AdminDeployer.cjs +5 -3
- package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -1
- package/dist/production/src/lib/admin/AdminDeployer.js +5 -3
- package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -1
- package/dist/production/src/lib/errors/TransportError.cjs +204 -0
- package/dist/production/src/lib/errors/TransportError.cjs.map +1 -0
- package/dist/production/src/lib/errors/TransportError.js +204 -0
- package/dist/production/src/lib/errors/TransportError.js.map +1 -0
- package/dist/production/src/lib/maskToken.cjs +7 -1
- package/dist/production/src/lib/maskToken.cjs.map +1 -1
- package/dist/production/src/lib/maskToken.js +7 -1
- package/dist/production/src/lib/maskToken.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +97 -50
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +97 -50
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs +80 -64
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationPrinter.js +81 -65
- package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +2 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +2 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.cjs +14 -10
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.js +14 -10
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +12 -4
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +12 -4
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs +5 -3
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsValidator.js +5 -3
- package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs +5 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.js +5 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -1
- package/dist/production/src/lib/prompt/prompt.cjs +13 -0
- package/dist/production/src/lib/prompt/prompt.cjs.map +1 -0
- package/dist/production/src/lib/prompt/prompt.internal.cjs +21 -0
- package/dist/production/src/lib/prompt/prompt.internal.cjs.map +1 -0
- package/dist/production/src/lib/prompt/prompt.internal.js +21 -0
- package/dist/production/src/lib/prompt/prompt.internal.js.map +1 -0
- package/dist/production/src/lib/prompt/prompt.js +13 -0
- package/dist/production/src/lib/prompt/prompt.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +2 -2
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationHelper.js +2 -2
- package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +4 -4
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js +4 -4
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
- package/dist/production/src/lib/tenant/TenantApiTransport.cjs +152 -0
- package/dist/production/src/lib/tenant/TenantApiTransport.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantApiTransport.js +152 -0
- package/dist/production/src/lib/tenant/TenantApiTransport.js.map +1 -0
- package/dist/production/src/lib/tenant/TenantConfigApplier.cjs +95 -26
- package/dist/production/src/lib/tenant/TenantConfigApplier.cjs.map +1 -1
- package/dist/production/src/lib/tenant/TenantConfigApplier.js +95 -26
- package/dist/production/src/lib/tenant/TenantConfigApplier.js.map +1 -1
- package/dist/production/src/lib/tenant/TenantConnectionProvider.cjs +20 -0
- package/dist/production/src/lib/tenant/TenantConnectionProvider.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantConnectionProvider.js +20 -0
- package/dist/production/src/lib/tenant/TenantConnectionProvider.js.map +1 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.cjs +30 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.js +30 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.js.map +1 -0
- package/dist/production/src/lib/tenant/authPolicy.cjs +10 -0
- package/dist/production/src/lib/tenant/authPolicy.cjs.map +1 -0
- package/dist/production/src/lib/tenant/authPolicy.js +10 -0
- package/dist/production/src/lib/tenant/authPolicy.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.cjs +101 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.js +101 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.cjs +96 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.js +96 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.cjs +162 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.js +162 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.cjs +101 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.js +101 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.cjs +209 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.js +209 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/index.cjs +21 -0
- package/dist/production/src/lib/tenant/clients/index.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/index.js +21 -0
- package/dist/production/src/lib/tenant/clients/index.js.map +1 -0
- package/dist/production/src/lib/tenant/confirmation.cjs +23 -0
- package/dist/production/src/lib/tenant/confirmation.cjs.map +1 -0
- package/dist/production/src/lib/tenant/confirmation.js +23 -0
- package/dist/production/src/lib/tenant/confirmation.js.map +1 -0
- package/dist/production/src/lib/tenant/input/pagination.cjs +24 -0
- package/dist/production/src/lib/tenant/input/pagination.cjs.map +1 -0
- package/dist/production/src/lib/tenant/input/pagination.js +24 -0
- package/dist/production/src/lib/tenant/input/pagination.js.map +1 -0
- package/dist/production/src/lib/tenant/input/value.cjs +71 -0
- package/dist/production/src/lib/tenant/input/value.cjs.map +1 -0
- package/dist/production/src/lib/tenant/input/value.js +71 -0
- package/dist/production/src/lib/tenant/input/value.js.map +1 -0
- package/dist/production/src/lib/tenant/stdin.cjs +13 -0
- package/dist/production/src/lib/tenant/stdin.cjs.map +1 -0
- package/dist/production/src/lib/tenant/stdin.js +13 -0
- package/dist/production/src/lib/tenant/stdin.js.map +1 -0
- package/dist/production/src/lib/tenant/tenantConfig.cjs.map +1 -1
- package/dist/production/src/lib/tenant/tenantConfig.js.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.cjs +290 -54
- package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.js +292 -56
- package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/production/src/lib/transfer/stdio.cjs +3 -8
- package/dist/production/src/lib/transfer/stdio.cjs.map +1 -1
- package/dist/production/src/lib/transfer/stdio.js +3 -8
- package/dist/production/src/lib/transfer/stdio.js.map +1 -1
- package/dist/types/commands/actions/ActionsGetEventCommand.d.ts +6 -4
- package/dist/types/commands/actions/ActionsGetEventCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts +5 -4
- package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts +5 -3
- package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts +6 -4
- package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts +5 -3
- package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsStopEventCommand.d.ts +6 -4
- package/dist/types/commands/actions/ActionsStopEventCommand.d.ts.map +1 -1
- package/dist/types/commands/deploy/DeployCommand.d.ts +11 -3
- package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +3 -2
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +4 -3
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +4 -3
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationInitStateCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationInitStateCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +4 -3
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationSnapshotCommand.d.ts +5 -3
- package/dist/types/commands/migrations/MigrationSnapshotCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +9 -3
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationVerifySnapshotCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationVerifySnapshotCommand.d.ts.map +1 -1
- package/dist/types/commands/misc/CommandsCommand.d.ts +13 -0
- package/dist/types/commands/misc/CommandsCommand.d.ts.map +1 -0
- package/dist/types/commands/misc/VersionCommand.d.ts +11 -4
- package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -1
- package/dist/types/commands/misc/index.d.ts +1 -0
- package/dist/types/commands/misc/index.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +5 -3
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +2 -2
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectValidateCommand.d.ts +3 -3
- package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -1
- package/dist/types/commands/tenant/TenantApplyCommand.d.ts +10 -3
- package/dist/types/commands/tenant/TenantApplyCommand.d.ts.map +1 -1
- package/dist/types/commands/tenant/apikey/TenantApiKeyCreateCommand.d.ts +22 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyDisableCommand.d.ts +17 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyDisableCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyListCommand.d.ts +15 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/apikey/index.d.ts +4 -0
- package/dist/types/commands/tenant/apikey/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/index.d.ts +5 -0
- package/dist/types/commands/tenant/index.d.ts.map +1 -1
- package/dist/types/commands/tenant/member/TenantMemberAddCommand.d.ts +19 -0
- package/dist/types/commands/tenant/member/TenantMemberAddCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteCommand.d.ts +28 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteUnmanagedCommand.d.ts +36 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteUnmanagedCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberListCommand.d.ts +21 -0
- package/dist/types/commands/tenant/member/TenantMemberListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberRemoveCommand.d.ts +17 -0
- package/dist/types/commands/tenant/member/TenantMemberRemoveCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberUpdateCommand.d.ts +20 -0
- package/dist/types/commands/tenant/member/TenantMemberUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/index.d.ts +7 -0
- package/dist/types/commands/tenant/member/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/memberOptions.d.ts +16 -0
- package/dist/types/commands/tenant/member/memberOptions.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/membershipInput.d.ts +44 -0
- package/dist/types/commands/tenant/member/membershipInput.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleAddCommand.d.ts +15 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleAddCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleRemoveCommand.d.ts +17 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleRemoveCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonCreateCommand.d.ts +25 -0
- package/dist/types/commands/tenant/person/TenantPersonCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonDisableCommand.d.ts +16 -0
- package/dist/types/commands/tenant/person/TenantPersonDisableCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonListCommand.d.ts +18 -0
- package/dist/types/commands/tenant/person/TenantPersonListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonResetMfaCommand.d.ts +16 -0
- package/dist/types/commands/tenant/person/TenantPersonResetMfaCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonResetPasswordRequestCommand.d.ts +21 -0
- package/dist/types/commands/tenant/person/TenantPersonResetPasswordRequestCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonSetPasswordCommand.d.ts +20 -0
- package/dist/types/commands/tenant/person/TenantPersonSetPasswordCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonShowCommand.d.ts +14 -0
- package/dist/types/commands/tenant/person/TenantPersonShowCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonSignOutCommand.d.ts +17 -0
- package/dist/types/commands/tenant/person/TenantPersonSignOutCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonUpdateCommand.d.ts +17 -0
- package/dist/types/commands/tenant/person/TenantPersonUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantSessionCreateCommand.d.ts +18 -0
- package/dist/types/commands/tenant/person/TenantSessionCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/index.d.ts +13 -0
- package/dist/types/commands/tenant/person/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/personInput.d.ts +37 -0
- package/dist/types/commands/tenant/person/personInput.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantAuthLogCommand.d.ts +35 -0
- package/dist/types/commands/tenant/policy/TenantAuthLogCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateAddCommand.d.ts +30 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateAddCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateRemoveCommand.d.ts +19 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateRemoveCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyCreateCommand.d.ts +17 -0
- package/dist/types/commands/tenant/policy/TenantPolicyCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyDeleteCommand.d.ts +16 -0
- package/dist/types/commands/tenant/policy/TenantPolicyDeleteCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/policy/TenantPolicyListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyUpdateCommand.d.ts +19 -0
- package/dist/types/commands/tenant/policy/TenantPolicyUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/index.d.ts +9 -0
- package/dist/types/commands/tenant/policy/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/policyInput.d.ts +41 -0
- package/dist/types/commands/tenant/policy/policyInput.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantConfigShowCommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantConfigShowCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantIdpListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantIdpListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectCreateCommand.d.ts +22 -0
- package/dist/types/commands/tenant/project/TenantProjectCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantProjectListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectSecretSetCommand.d.ts +21 -0
- package/dist/types/commands/tenant/project/TenantProjectSecretSetCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectShowCommand.d.ts +14 -0
- package/dist/types/commands/tenant/project/TenantProjectShowCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectUpdateCommand.d.ts +21 -0
- package/dist/types/commands/tenant/project/TenantProjectUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantWhoAmICommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantWhoAmICommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/index.d.ts +9 -0
- package/dist/types/commands/tenant/project/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/jsonConfigOption.d.ts +9 -0
- package/dist/types/commands/tenant/project/jsonConfigOption.d.ts.map +1 -0
- package/dist/types/commands/tenant/tenantOutput.d.ts +7 -0
- package/dist/types/commands/tenant/tenantOutput.d.ts.map +1 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts +8 -2
- package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/ImportCommand.d.ts +15 -3
- package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/TransferCommand.d.ts +14 -2
- package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/utils.d.ts +2 -2
- package/dist/types/commands/transfer/utils.d.ts.map +1 -1
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +27 -4
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -1
- package/dist/types/dic.d.ts +93 -6
- package/dist/types/dic.d.ts.map +1 -1
- package/dist/types/lib/SystemClientProvider.d.ts +4 -1
- package/dist/types/lib/SystemClientProvider.d.ts.map +1 -1
- package/dist/types/lib/TenantClientProvider.d.ts +14 -5
- package/dist/types/lib/TenantClientProvider.d.ts.map +1 -1
- package/dist/types/lib/VersionChecker.d.ts.map +1 -1
- package/dist/types/lib/actions/ActionsClient.d.ts +17 -8
- package/dist/types/lib/actions/ActionsClient.d.ts.map +1 -1
- package/dist/types/lib/actions/resolveActionsClient.d.ts +7 -0
- package/dist/types/lib/actions/resolveActionsClient.d.ts.map +1 -0
- package/dist/types/lib/actions/runActionMutationBatch.d.ts +23 -0
- package/dist/types/lib/actions/runActionMutationBatch.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminClient.d.ts +1 -0
- package/dist/types/lib/admin/AdminClient.d.ts.map +1 -1
- package/dist/types/lib/admin/AdminDeployer.d.ts +3 -1
- package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -1
- package/dist/types/lib/dsn.d.ts.map +1 -1
- package/dist/types/lib/errors/TransportError.d.ts +29 -0
- package/dist/types/lib/errors/TransportError.d.ts.map +1 -0
- package/dist/types/lib/errors/index.d.ts +2 -0
- package/dist/types/lib/errors/index.d.ts.map +1 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -1
- package/dist/types/lib/fs/FileSystem.d.ts.map +1 -1
- package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -1
- package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -1
- package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -1
- package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -1
- package/dist/types/lib/maskToken.d.ts +1 -0
- package/dist/types/lib/maskToken.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +8 -3
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationPrinter.d.ts +28 -2
- package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationSnapshotFacade.d.ts +6 -3
- package/dist/types/lib/migrations/MigrationSnapshotFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +13 -2
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationsValidator.d.ts +3 -1
- package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -1
- package/dist/types/lib/project/RemoteProject.d.ts.map +1 -1
- package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -1
- package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -1
- package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -1
- package/dist/types/lib/prompt/index.d.ts +2 -0
- package/dist/types/lib/prompt/index.d.ts.map +1 -0
- package/dist/types/lib/prompt/prompt.d.ts +6 -0
- package/dist/types/lib/prompt/prompt.d.ts.map +1 -0
- package/dist/types/lib/prompt/prompt.internal.d.ts +37 -0
- package/dist/types/lib/prompt/prompt.internal.d.ts.map +1 -0
- package/dist/types/lib/prompt/prompt.test.d.ts +2 -0
- package/dist/types/lib/prompt/prompt.test.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -1
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts +2 -1
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -1
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +2 -1
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -1
- package/dist/types/lib/schema/collectReferences.d.ts.map +1 -1
- package/dist/types/lib/stream.d.ts.map +1 -1
- package/dist/types/lib/tenant/TenantApiTransport.d.ts +47 -0
- package/dist/types/lib/tenant/TenantApiTransport.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantConfigApplier.d.ts +37 -3
- package/dist/types/lib/tenant/TenantConfigApplier.d.ts.map +1 -1
- package/dist/types/lib/tenant/TenantConfigLoader.d.ts.map +1 -1
- package/dist/types/lib/tenant/TenantConnection.d.ts +8 -0
- package/dist/types/lib/tenant/TenantConnection.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantConnectionProvider.d.ts +8 -0
- package/dist/types/lib/tenant/TenantConnectionProvider.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantConnectionResolver.d.ts +8 -0
- package/dist/types/lib/tenant/TenantConnectionResolver.d.ts.map +1 -0
- package/dist/types/lib/tenant/authPolicy.d.ts +17 -0
- package/dist/types/lib/tenant/authPolicy.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantApiKeyClient.d.ts +56 -0
- package/dist/types/lib/tenant/clients/TenantApiKeyClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantMemberClient.d.ts +68 -0
- package/dist/types/lib/tenant/clients/TenantMemberClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantPersonClient.d.ts +97 -0
- package/dist/types/lib/tenant/clients/TenantPersonClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantPolicyClient.d.ts +69 -0
- package/dist/types/lib/tenant/clients/TenantPolicyClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantProjectClient.d.ts +162 -0
- package/dist/types/lib/tenant/clients/TenantProjectClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/index.d.ts +21 -0
- package/dist/types/lib/tenant/clients/index.d.ts.map +1 -0
- package/dist/types/lib/tenant/confirmation.d.ts +14 -0
- package/dist/types/lib/tenant/confirmation.d.ts.map +1 -0
- package/dist/types/lib/tenant/input/index.d.ts +3 -0
- package/dist/types/lib/tenant/input/index.d.ts.map +1 -0
- package/dist/types/lib/tenant/input/pagination.d.ts +7 -0
- package/dist/types/lib/tenant/input/pagination.d.ts.map +1 -0
- package/dist/types/lib/tenant/input/value.d.ts +45 -0
- package/dist/types/lib/tenant/input/value.d.ts.map +1 -0
- package/dist/types/lib/tenant/stdin.d.ts +8 -0
- package/dist/types/lib/tenant/stdin.d.ts.map +1 -0
- package/dist/types/lib/tenant/tenantConfig.d.ts +20 -22
- package/dist/types/lib/tenant/tenantConfig.d.ts.map +1 -1
- package/dist/types/lib/transfer/DataTransferClient.d.ts +8 -2
- package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -1
- package/dist/types/lib/transfer/stdio.d.ts +3 -1
- package/dist/types/lib/transfer/stdio.d.ts.map +1 -1
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/commands/actions/ActionsGetEventCommand.ts +38 -16
- package/src/commands/actions/ActionsListFailedEventsCommand.ts +24 -43
- package/src/commands/actions/ActionsListVariablesCommand.ts +15 -13
- package/src/commands/actions/ActionsRetryEventCommand.ts +36 -18
- package/src/commands/actions/ActionsSetVariablesCommand.ts +56 -28
- package/src/commands/actions/ActionsStopEventCommand.ts +36 -18
- package/src/commands/deploy/DeployCommand.ts +69 -30
- package/src/commands/migrations/MigrationAmendCommand.ts +69 -26
- package/src/commands/migrations/MigrationBlankCommand.ts +3 -3
- package/src/commands/migrations/MigrationDescribeCommand.ts +9 -4
- package/src/commands/migrations/MigrationDiffCommand.ts +83 -31
- package/src/commands/migrations/MigrationExecuteCommand.ts +11 -4
- package/src/commands/migrations/MigrationInitStateCommand.ts +18 -5
- package/src/commands/migrations/MigrationRebaseCommand.ts +28 -6
- package/src/commands/migrations/MigrationSnapshotCommand.ts +45 -10
- package/src/commands/migrations/MigrationStatusCommand.ts +20 -12
- package/src/commands/migrations/MigrationVerifySnapshotCommand.ts +7 -8
- package/src/commands/misc/CommandsCommand.ts +74 -0
- package/src/commands/misc/VersionCommand.ts +13 -6
- package/src/commands/misc/index.ts +1 -0
- package/src/commands/project/ProjectGenerateDocumentationCommand.ts +12 -13
- package/src/commands/project/ProjectPrintSchemaCommand.ts +19 -17
- package/src/commands/project/ProjectValidateCommand.ts +52 -18
- package/src/commands/tenant/TenantApplyCommand.ts +45 -13
- package/src/commands/tenant/apikey/TenantApiKeyCreateCommand.ts +102 -0
- package/src/commands/tenant/apikey/TenantApiKeyDisableCommand.ts +47 -0
- package/src/commands/tenant/apikey/TenantApiKeyListCommand.ts +64 -0
- package/src/commands/tenant/apikey/index.ts +4 -0
- package/src/commands/tenant/index.ts +5 -0
- package/src/commands/tenant/member/TenantMemberAddCommand.ts +48 -0
- package/src/commands/tenant/member/TenantMemberInviteCommand.ts +88 -0
- package/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.ts +135 -0
- package/src/commands/tenant/member/TenantMemberListCommand.ts +94 -0
- package/src/commands/tenant/member/TenantMemberRemoveCommand.ts +48 -0
- package/src/commands/tenant/member/TenantMemberUpdateCommand.ts +58 -0
- package/src/commands/tenant/member/index.ts +9 -0
- package/src/commands/tenant/member/memberOptions.ts +29 -0
- package/src/commands/tenant/member/membershipInput.ts +155 -0
- package/src/commands/tenant/person/TenantIdentityRoleAddCommand.ts +44 -0
- package/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.ts +54 -0
- package/src/commands/tenant/person/TenantPersonCreateCommand.ts +98 -0
- package/src/commands/tenant/person/TenantPersonDisableCommand.ts +46 -0
- package/src/commands/tenant/person/TenantPersonListCommand.ts +68 -0
- package/src/commands/tenant/person/TenantPersonResetMfaCommand.ts +59 -0
- package/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.ts +67 -0
- package/src/commands/tenant/person/TenantPersonSetPasswordCommand.ts +66 -0
- package/src/commands/tenant/person/TenantPersonShowCommand.ts +70 -0
- package/src/commands/tenant/person/TenantPersonSignOutCommand.ts +60 -0
- package/src/commands/tenant/person/TenantPersonUpdateCommand.ts +55 -0
- package/src/commands/tenant/person/TenantSessionCreateCommand.ts +79 -0
- package/src/commands/tenant/person/index.ts +15 -0
- package/src/commands/tenant/person/personInput.ts +112 -0
- package/src/commands/tenant/policy/TenantAuthLogCommand.ts +141 -0
- package/src/commands/tenant/policy/TenantMailTemplateAddCommand.ts +92 -0
- package/src/commands/tenant/policy/TenantMailTemplateListCommand.ts +50 -0
- package/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.ts +63 -0
- package/src/commands/tenant/policy/TenantPolicyCreateCommand.ts +46 -0
- package/src/commands/tenant/policy/TenantPolicyDeleteCommand.ts +42 -0
- package/src/commands/tenant/policy/TenantPolicyListCommand.ts +39 -0
- package/src/commands/tenant/policy/TenantPolicyUpdateCommand.ts +51 -0
- package/src/commands/tenant/policy/index.ts +9 -0
- package/src/commands/tenant/policy/policyInput.ts +210 -0
- package/src/commands/tenant/project/TenantConfigShowCommand.ts +28 -0
- package/src/commands/tenant/project/TenantIdpListCommand.ts +27 -0
- package/src/commands/tenant/project/TenantProjectCreateCommand.ts +67 -0
- package/src/commands/tenant/project/TenantProjectListCommand.ts +27 -0
- package/src/commands/tenant/project/TenantProjectSecretSetCommand.ts +63 -0
- package/src/commands/tenant/project/TenantProjectShowCommand.ts +29 -0
- package/src/commands/tenant/project/TenantProjectUpdateCommand.ts +66 -0
- package/src/commands/tenant/project/TenantWhoAmICommand.ts +22 -0
- package/src/commands/tenant/project/index.ts +9 -0
- package/src/commands/tenant/project/jsonConfigOption.ts +33 -0
- package/src/commands/tenant/tenantOutput.ts +35 -0
- package/src/commands/transfer/ExportCommand.ts +46 -29
- package/src/commands/transfer/ImportCommand.ts +87 -34
- package/src/commands/transfer/TransferCommand.ts +94 -34
- package/src/commands/transfer/utils.ts +12 -11
- package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +135 -36
- package/src/dic.ts +198 -47
- package/src/lib/SystemClientProvider.ts +75 -1
- package/src/lib/TenantClientProvider.ts +44 -6
- package/src/lib/actions/ActionsClient.ts +38 -14
- package/src/lib/actions/resolveActionsClient.ts +15 -0
- package/src/lib/actions/runActionMutationBatch.ts +69 -0
- package/src/lib/admin/AdminClient.ts +39 -12
- package/src/lib/admin/AdminDeployer.ts +4 -2
- package/src/lib/errors/TransportError.ts +260 -0
- package/src/lib/errors/index.ts +1 -0
- package/src/lib/maskToken.ts +9 -1
- package/src/lib/migrations/MigrationExecutionFacade.ts +117 -59
- package/src/lib/migrations/MigrationPrinter.ts +100 -64
- package/src/lib/migrations/MigrationRebaseFacade.ts +2 -1
- package/src/lib/migrations/MigrationSnapshotFacade.ts +15 -10
- package/src/lib/migrations/MigrationsStatusFacade.ts +17 -3
- package/src/lib/migrations/MigrationsValidator.ts +4 -2
- package/src/lib/project/RemoteProjectProvider.ts +6 -1
- package/src/lib/prompt/index.ts +1 -0
- package/src/lib/prompt/prompt.internal.ts +69 -0
- package/src/lib/prompt/prompt.test.ts +100 -0
- package/src/lib/prompt/prompt.ts +23 -0
- package/src/lib/schema/SchemaValidationHelper.ts +8 -2
- package/src/lib/schema/SchemaValidationPrinter.ts +5 -4
- package/src/lib/tenant/TenantApiTransport.ts +200 -0
- package/src/lib/tenant/TenantConfigApplier.ts +172 -29
- package/src/lib/tenant/TenantConnection.ts +8 -0
- package/src/lib/tenant/TenantConnectionProvider.ts +21 -0
- package/src/lib/tenant/TenantConnectionResolver.ts +31 -0
- package/src/lib/tenant/authPolicy.ts +20 -0
- package/src/lib/tenant/clients/README.md +84 -0
- package/src/lib/tenant/clients/TenantApiKeyClient.ts +182 -0
- package/src/lib/tenant/clients/TenantMemberClient.ts +199 -0
- package/src/lib/tenant/clients/TenantPersonClient.ts +306 -0
- package/src/lib/tenant/clients/TenantPolicyClient.ts +192 -0
- package/src/lib/tenant/clients/TenantProjectClient.ts +425 -0
- package/src/lib/tenant/clients/index.ts +29 -0
- package/src/lib/tenant/confirmation.ts +32 -0
- package/src/lib/tenant/input/index.ts +2 -0
- package/src/lib/tenant/input/pagination.ts +39 -0
- package/src/lib/tenant/input/value.ts +149 -0
- package/src/lib/tenant/stdin.ts +16 -0
- package/src/lib/tenant/tenantConfig.ts +23 -25
- package/src/lib/transfer/DataTransferClient.ts +354 -59
- package/src/lib/transfer/stdio.ts +5 -7
- package/src/run.ts +19 -3
- package/tests/cases/unit/MigrationAmendCommand.test.ts +17 -2
- package/tests/cases/unit/MigrationDiffCommand.test.ts +182 -0
- package/tests/cases/unit/MigrationExecuteCommand.test.ts +58 -0
- package/tests/cases/unit/MigrationExecutionFacade.test.ts +341 -54
- package/tests/cases/unit/MigrationInitStateCommand.test.ts +72 -0
- package/tests/cases/unit/MigrationRebaseCommand.test.ts +59 -0
- package/tests/cases/unit/MigrationSnapshotFacade.test.ts +75 -13
- package/tests/cases/unit/MigrationStatusCommand.test.ts +197 -0
- package/tests/cases/unit/MigrationsValidator.test.ts +61 -0
- package/tests/cases/unit/actions.test.ts +802 -0
- package/tests/cases/unit/cli-process.test.ts +266 -0
- package/tests/cases/unit/command-registry.test.ts +214 -0
- package/tests/cases/unit/deploy.test.ts +505 -0
- package/tests/cases/unit/migration-transport.test.ts +156 -0
- package/tests/cases/unit/project.test.ts +223 -0
- package/tests/cases/unit/structured-output.test.ts +189 -0
- package/tests/cases/unit/tenant-apikey.test.ts +645 -0
- package/tests/cases/unit/tenant-apply-command.test.ts +247 -0
- package/tests/cases/unit/tenant-clients.test.ts +130 -0
- package/tests/cases/unit/tenant-connection.test.ts +91 -0
- package/tests/cases/unit/tenant-input.test.ts +275 -0
- package/tests/cases/unit/tenant-member.test.ts +683 -0
- package/tests/cases/unit/tenant-person.test.ts +857 -0
- package/tests/cases/unit/tenant-policy.test.ts +799 -0
- package/tests/cases/unit/tenant-project.test.ts +634 -0
- package/tests/cases/unit/tenant-transport.test.ts +322 -0
- package/tests/cases/unit/transfer.test.ts +714 -0
- package/tests/cases/unit/transport-errors.test.ts +78 -0
- package/tests/cases/unit/workspace-update-api.test.ts +152 -0
- package/tests/tenantConfigApplier.test.ts +275 -38
- package/dist/development/src/lib/tenant/TenantClient.cjs +0 -104
- package/dist/development/src/lib/tenant/TenantClient.cjs.map +0 -1
- package/dist/development/src/lib/tenant/TenantClient.js +0 -104
- package/dist/development/src/lib/tenant/TenantClient.js.map +0 -1
- package/dist/production/src/lib/tenant/TenantClient.cjs +0 -104
- package/dist/production/src/lib/tenant/TenantClient.cjs.map +0 -1
- package/dist/production/src/lib/tenant/TenantClient.js +0 -104
- package/dist/production/src/lib/tenant/TenantClient.js.map +0 -1
- package/dist/types/lib/tenant/TenantClient.d.ts +0 -24
- package/dist/types/lib/tenant/TenantClient.d.ts.map +0 -1
- package/src/lib/tenant/TenantClient.ts +0 -149
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const cliCommon = require("@contember/cli-common");
|
|
4
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
5
|
+
const personsFetcher = TenantApi.query$.persons(TenantApi.person$$.identity(TenantApi.identity$.id));
|
|
6
|
+
const personByIdFetcher = TenantApi.query$.personById(
|
|
7
|
+
TenantApi.person$$.identity(TenantApi.identity$.id.roles.sessions(TenantApi.sessionInfo$$)).identityProviders(TenantApi.personIdentityProvider$.id.createdAt.externalIdentifier.identityProvider(TenantApi.identityProviderListItem$$))
|
|
8
|
+
);
|
|
9
|
+
const signUpFetcher = TenantApi.mutation$.signUp(
|
|
10
|
+
TenantApi.signUpResponse$$.error(TenantApi.signUpError$$.weakPasswordReasons.recommendedAction).result(TenantApi.signUpResult$.person(TenantApi.person$$.identity(TenantApi.identity$.id)))
|
|
11
|
+
);
|
|
12
|
+
const changeProfileFetcher = TenantApi.mutation$.changeProfile(TenantApi.changeProfileResponse$$.error(TenantApi.changeProfileError$$));
|
|
13
|
+
const changePasswordFetcher = TenantApi.mutation$.changePassword(TenantApi.changePasswordResponse$$.error(TenantApi.changePasswordError$$.weakPasswordReasons));
|
|
14
|
+
const disablePersonFetcher = TenantApi.mutation$.disablePerson(TenantApi.disablePersonResponse$$.error(TenantApi.disablePersonError$$));
|
|
15
|
+
const forceSignOutPersonFetcher = TenantApi.mutation$.forceSignOutPerson(TenantApi.forceSignOutPersonResponse$$.error(TenantApi.forceSignOutPersonError$$));
|
|
16
|
+
const resetPersonMfaFetcher = TenantApi.mutation$.resetPersonMfa(TenantApi.resetPersonMfaResponse$$.error(TenantApi.resetPersonMfaError$$));
|
|
17
|
+
const createResetPasswordRequestFetcher = TenantApi.mutation$.createResetPasswordRequest(
|
|
18
|
+
TenantApi.createPasswordResetRequestResponse$$.error(TenantApi.createPasswordResetRequestError$$)
|
|
19
|
+
);
|
|
20
|
+
const createSessionTokenFetcher = TenantApi.mutation$.createSessionToken(
|
|
21
|
+
TenantApi.createSessionTokenResponse$$.error(TenantApi.createSessionTokenError$$).result(TenantApi.createSessionTokenResult$.token.person(TenantApi.person$$.id.email.name.identity(TenantApi.identity$.id)))
|
|
22
|
+
);
|
|
23
|
+
const addGlobalIdentityRolesFetcher = TenantApi.mutation$.addGlobalIdentityRoles(
|
|
24
|
+
TenantApi.addGlobalIdentityRolesResponse$$.error(TenantApi.addGlobalIdentityRolesError$$).result(TenantApi.addGlobalIdentityRolesResult$.identity(TenantApi.identity$.id.roles))
|
|
25
|
+
);
|
|
26
|
+
const removeGlobalIdentityRolesFetcher = TenantApi.mutation$.removeGlobalIdentityRoles(
|
|
27
|
+
TenantApi.removeGlobalIdentityRolesResponse$$.error(TenantApi.removeGlobalIdentityRolesError$$).result(
|
|
28
|
+
TenantApi.removeGlobalIdentityRolesResult$.identity(TenantApi.identity$.id.roles)
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
const toTenantPerson = (person) => ({
|
|
32
|
+
id: person.id,
|
|
33
|
+
identityId: person.identity.id,
|
|
34
|
+
email: person.email ?? null,
|
|
35
|
+
name: person.name ?? null,
|
|
36
|
+
otpEnabled: person.otpEnabled,
|
|
37
|
+
emailOtpEnabled: person.emailOtpEnabled,
|
|
38
|
+
emailVerified: person.emailVerified
|
|
39
|
+
});
|
|
40
|
+
class TenantPersonClient {
|
|
41
|
+
constructor(transport) {
|
|
42
|
+
this.transport = transport;
|
|
43
|
+
}
|
|
44
|
+
async listPersons({ filter, limit, offset } = {}) {
|
|
45
|
+
const result = await this.transport.exec(personsFetcher, { filter, limit, offset });
|
|
46
|
+
return result.persons.map((it) => ({
|
|
47
|
+
id: it.id,
|
|
48
|
+
identityId: it.identity.id,
|
|
49
|
+
email: it.email ?? null,
|
|
50
|
+
name: it.name ?? null,
|
|
51
|
+
otpEnabled: it.otpEnabled,
|
|
52
|
+
emailOtpEnabled: it.emailOtpEnabled,
|
|
53
|
+
emailVerified: it.emailVerified
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
/** Null both when the person does not exist and when the caller may not see them — the API does not distinguish. */
|
|
57
|
+
async getPerson(id) {
|
|
58
|
+
const result = await this.transport.exec(personByIdFetcher, { id });
|
|
59
|
+
const person = result.personById;
|
|
60
|
+
if (!person) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
...toTenantPerson(person),
|
|
65
|
+
passwordlessEnabled: person.passwordlessEnabled ?? null,
|
|
66
|
+
roles: person.identity.roles ? [...person.identity.roles] : null,
|
|
67
|
+
sessions: person.identity.sessions.map((it) => ({
|
|
68
|
+
id: it.id,
|
|
69
|
+
createdAt: it.createdAt,
|
|
70
|
+
expiresAt: it.expiresAt ?? null,
|
|
71
|
+
lastUsedAt: it.lastUsedAt ?? null,
|
|
72
|
+
lastIp: it.lastIp ?? null,
|
|
73
|
+
lastUserAgent: it.lastUserAgent ?? null,
|
|
74
|
+
createdIp: it.createdIp ?? null,
|
|
75
|
+
createdUserAgent: it.createdUserAgent ?? null,
|
|
76
|
+
isCurrent: it.isCurrent,
|
|
77
|
+
trustForwardedClientInfo: it.trustForwardedClientInfo
|
|
78
|
+
})),
|
|
79
|
+
identityProviders: person.identityProviders.map((it) => ({
|
|
80
|
+
id: it.id,
|
|
81
|
+
slug: it.identityProvider.slug,
|
|
82
|
+
type: it.identityProvider.type,
|
|
83
|
+
externalIdentifier: it.externalIdentifier,
|
|
84
|
+
createdAt: it.createdAt
|
|
85
|
+
}))
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Creates a person through `signUp`. Needs the `PERSON_SIGN_UP` permission, consumes the tenant's
|
|
90
|
+
* per-IP sign-up rate limit and triggers the verification mail when the tenant requires it.
|
|
91
|
+
*/
|
|
92
|
+
async signUp({ email, password, passwordHash, name, roles, captchaToken }) {
|
|
93
|
+
const result = await this.transport.exec(signUpFetcher, { email, password, passwordHash, name, roles, captchaToken });
|
|
94
|
+
this.transport.assertOk(result.signUp, `signUp(${email})`);
|
|
95
|
+
const person = result.signUp?.result?.person;
|
|
96
|
+
if (!person) {
|
|
97
|
+
throw new cliCommon.CliError(`signUp(${email}) reported success but returned no person`, {
|
|
98
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
99
|
+
exitCode: cliCommon.ExitCode.InternalError
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return toTenantPerson(person);
|
|
103
|
+
}
|
|
104
|
+
async changeProfile(personId, { email, name }) {
|
|
105
|
+
const result = await this.transport.exec(changeProfileFetcher, { personId, email, name });
|
|
106
|
+
this.transport.assertOk(result.changeProfile, `changeProfile(${personId})`);
|
|
107
|
+
}
|
|
108
|
+
async changePassword(personId, password) {
|
|
109
|
+
const result = await this.transport.exec(changePasswordFetcher, { personId, password });
|
|
110
|
+
this.transport.assertOk(result.changePassword, `changePassword(${personId})`);
|
|
111
|
+
}
|
|
112
|
+
async disablePerson(personId) {
|
|
113
|
+
const result = await this.transport.exec(disablePersonFetcher, { personId });
|
|
114
|
+
this.transport.assertOk(result.disablePerson, `disablePerson(${personId})`);
|
|
115
|
+
}
|
|
116
|
+
async forceSignOutPerson(personId, reason) {
|
|
117
|
+
const result = await this.transport.exec(forceSignOutPersonFetcher, { personId, reason });
|
|
118
|
+
this.transport.assertOk(result.forceSignOutPerson, `forceSignOutPerson(${personId})`);
|
|
119
|
+
}
|
|
120
|
+
async resetPersonMfa(personId) {
|
|
121
|
+
const result = await this.transport.exec(resetPersonMfaFetcher, { personId });
|
|
122
|
+
this.transport.assertOk(result.resetPersonMfa, `resetPersonMfa(${personId})`);
|
|
123
|
+
}
|
|
124
|
+
async createResetPasswordRequest(email, options, captchaToken) {
|
|
125
|
+
const result = await this.transport.exec(createResetPasswordRequestFetcher, { email, options, captchaToken });
|
|
126
|
+
this.transport.assertOk(result.createResetPasswordRequest, `createResetPasswordRequest(${email})`);
|
|
127
|
+
}
|
|
128
|
+
async createSessionToken({ email, personId, expiration, options }) {
|
|
129
|
+
const result = await this.transport.exec(createSessionTokenFetcher, { email, personId, expiration, options });
|
|
130
|
+
this.transport.assertOk(result.createSessionToken, "createSessionToken");
|
|
131
|
+
const tokenResult = result.createSessionToken?.result;
|
|
132
|
+
if (!tokenResult) {
|
|
133
|
+
throw new cliCommon.CliError("createSessionToken reported success but returned no token.", {
|
|
134
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
135
|
+
exitCode: cliCommon.ExitCode.InternalError
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
token: tokenResult.token,
|
|
140
|
+
personId: tokenResult.person.id,
|
|
141
|
+
identityId: tokenResult.person.identity.id,
|
|
142
|
+
email: tokenResult.person.email ?? null,
|
|
143
|
+
name: tokenResult.person.name ?? null
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/** Returns the identity's roles after the change, or null when the caller may not read them. */
|
|
147
|
+
async addGlobalIdentityRoles(identityId, roles) {
|
|
148
|
+
const result = await this.transport.exec(addGlobalIdentityRolesFetcher, { identityId, roles });
|
|
149
|
+
this.transport.assertOk(result.addGlobalIdentityRoles, `addGlobalIdentityRoles(${identityId})`);
|
|
150
|
+
const resultRoles = result.addGlobalIdentityRoles?.result?.identity.roles;
|
|
151
|
+
return resultRoles ? [...resultRoles] : null;
|
|
152
|
+
}
|
|
153
|
+
/** Returns the identity's roles after the change, or null when the caller may not read them. */
|
|
154
|
+
async removeGlobalIdentityRoles(identityId, roles) {
|
|
155
|
+
const result = await this.transport.exec(removeGlobalIdentityRolesFetcher, { identityId, roles });
|
|
156
|
+
this.transport.assertOk(result.removeGlobalIdentityRoles, `removeGlobalIdentityRoles(${identityId})`);
|
|
157
|
+
const resultRoles = result.removeGlobalIdentityRoles?.result?.identity.roles;
|
|
158
|
+
return resultRoles ? [...resultRoles] : null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.TenantPersonClient = TenantPersonClient;
|
|
162
|
+
//# sourceMappingURL=TenantPersonClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantPersonClient.cjs","sources":["../../../../../../../packages/cli/src/lib/tenant/clients/TenantPersonClient.ts"],"sourcesContent":["import { CliError, ExitCode } from '@contember/cli-common'\nimport {\n\taddGlobalIdentityRolesError$$,\n\taddGlobalIdentityRolesResponse$$,\n\taddGlobalIdentityRolesResult$,\n\tchangePasswordError$$,\n\tchangePasswordResponse$$,\n\tchangeProfileError$$,\n\tchangeProfileResponse$$,\n\tcreatePasswordResetRequestError$$,\n\tcreatePasswordResetRequestResponse$$,\n\ttype CreateResetPasswordRequestOptions,\n\tcreateSessionTokenError$$,\n\tcreateSessionTokenResponse$$,\n\tcreateSessionTokenResult$,\n\tdisablePersonError$$,\n\tdisablePersonResponse$$,\n\tforceSignOutPersonError$$,\n\tforceSignOutPersonResponse$$,\n\tidentity$,\n\tidentityProviderListItem$$,\n\tmutation$,\n\tperson$$,\n\tpersonIdentityProvider$,\n\ttype PersonsFilter,\n\tquery$,\n\tremoveGlobalIdentityRolesError$$,\n\tremoveGlobalIdentityRolesResponse$$,\n\tremoveGlobalIdentityRolesResult$,\n\tresetPersonMfaError$$,\n\tresetPersonMfaResponse$$,\n\tsessionInfo$$,\n\ttype SignInOptions,\n\tsignUpError$$,\n\tsignUpResponse$$,\n\tsignUpResult$,\n} from '@contember/graphql-client-tenant'\nimport { TenantApiTransport } from '../TenantApiTransport.js'\n\nexport interface TenantPerson {\n\tid: string\n\tidentityId: string\n\temail: string | null\n\tname: string | null\n\totpEnabled: boolean\n\temailOtpEnabled: boolean\n\temailVerified: boolean\n}\n\nexport interface TenantPersonSession {\n\tid: string\n\tcreatedAt: string\n\texpiresAt: string | null\n\tlastUsedAt: string | null\n\tlastIp: string | null\n\tlastUserAgent: string | null\n\tcreatedIp: string | null\n\tcreatedUserAgent: string | null\n\tisCurrent: boolean\n\ttrustForwardedClientInfo: boolean\n}\n\nexport interface TenantPersonIdentityProvider {\n\tid: string\n\tslug: string\n\ttype: string\n\texternalIdentifier: string\n\tcreatedAt: string\n}\n\n/**\n * Everything `personById` exposes about a single person. `roles` is null when the caller may not read\n * them, and `sessions` / `identityProviders` come back empty (never an error) for the same reason.\n */\nexport interface TenantPersonDetail extends TenantPerson {\n\tpasswordlessEnabled: boolean | null\n\troles: string[] | null\n\tsessions: TenantPersonSession[]\n\tidentityProviders: TenantPersonIdentityProvider[]\n}\n\nexport interface ListPersonsArgs {\n\tfilter?: PersonsFilter\n\tlimit?: number\n\toffset?: number\n}\n\nexport interface SignUpPersonArgs {\n\temail: string\n\t/** Plaintext password. Mutually exclusive with {@link passwordHash}; omit both to create a person without one. */\n\tpassword?: string\n\t/** Pre-computed bcrypt hash — the tenant API accepts `$2b$` only. */\n\tpasswordHash?: string\n\tname?: string\n\troles?: readonly string[]\n\tcaptchaToken?: string\n}\n\nexport interface CreateSessionTokenArgs {\n\temail?: string\n\tpersonId?: string\n\texpiration?: number\n\toptions?: SignInOptions\n}\n\nexport interface TenantCreatedSessionToken {\n\ttoken: string\n\tpersonId: string\n\tidentityId: string\n\temail: string | null\n\tname: string | null\n}\n\nexport interface ChangeProfileArgs {\n\temail?: string\n\tname?: string\n}\n\n/** The subset of a `person$$` selection the CLI maps — an actual row carries more, which is fine. */\ninterface PersonRow {\n\treadonly id: string\n\treadonly email?: string\n\treadonly name?: string\n\treadonly otpEnabled: boolean\n\treadonly emailOtpEnabled: boolean\n\treadonly emailVerified: boolean\n\treadonly identity: { readonly id: string }\n}\n\n// Fetchers are immutable and reusable, so they are built once at module load.\nconst personsFetcher = query$.persons(person$$.identity(identity$.id))\nconst personByIdFetcher = query$.personById(\n\tperson$$\n\t\t.identity(identity$.id.roles.sessions(sessionInfo$$))\n\t\t.identityProviders(personIdentityProvider$.id.createdAt.externalIdentifier.identityProvider(identityProviderListItem$$)),\n)\nconst signUpFetcher = mutation$.signUp(\n\tsignUpResponse$$.error(signUpError$$.weakPasswordReasons.recommendedAction).result(signUpResult$.person(person$$.identity(identity$.id))),\n)\nconst changeProfileFetcher = mutation$.changeProfile(changeProfileResponse$$.error(changeProfileError$$))\nconst changePasswordFetcher = mutation$.changePassword(changePasswordResponse$$.error(changePasswordError$$.weakPasswordReasons))\nconst disablePersonFetcher = mutation$.disablePerson(disablePersonResponse$$.error(disablePersonError$$))\nconst forceSignOutPersonFetcher = mutation$.forceSignOutPerson(forceSignOutPersonResponse$$.error(forceSignOutPersonError$$))\nconst resetPersonMfaFetcher = mutation$.resetPersonMfa(resetPersonMfaResponse$$.error(resetPersonMfaError$$))\nconst createResetPasswordRequestFetcher = mutation$.createResetPasswordRequest(\n\tcreatePasswordResetRequestResponse$$.error(createPasswordResetRequestError$$),\n)\nconst createSessionTokenFetcher = mutation$.createSessionToken(\n\tcreateSessionTokenResponse$$\n\t\t.error(createSessionTokenError$$)\n\t\t.result(createSessionTokenResult$.token.person(person$$.id.email.name.identity(identity$.id))),\n)\nconst addGlobalIdentityRolesFetcher = mutation$.addGlobalIdentityRoles(\n\taddGlobalIdentityRolesResponse$$.error(addGlobalIdentityRolesError$$).result(addGlobalIdentityRolesResult$.identity(identity$.id.roles)),\n)\nconst removeGlobalIdentityRolesFetcher = mutation$.removeGlobalIdentityRoles(\n\tremoveGlobalIdentityRolesResponse$$.error(removeGlobalIdentityRolesError$$).result(\n\t\tremoveGlobalIdentityRolesResult$.identity(identity$.id.roles),\n\t),\n)\n\nconst toTenantPerson = (person: PersonRow): TenantPerson => ({\n\tid: person.id,\n\tidentityId: person.identity.id,\n\temail: person.email ?? null,\n\tname: person.name ?? null,\n\totpEnabled: person.otpEnabled,\n\temailOtpEnabled: person.emailOtpEnabled,\n\temailVerified: person.emailVerified,\n})\n\n/** Persons, their global identity roles and their sessions. */\nexport class TenantPersonClient {\n\tconstructor(\n\t\tprivate readonly transport: TenantApiTransport,\n\t) {\n\t}\n\n\tpublic async listPersons({ filter, limit, offset }: ListPersonsArgs = {}): Promise<TenantPerson[]> {\n\t\tconst result = await this.transport.exec(personsFetcher, { filter, limit, offset })\n\t\treturn result.persons.map(it => ({\n\t\t\tid: it.id,\n\t\t\tidentityId: it.identity.id,\n\t\t\temail: it.email ?? null,\n\t\t\tname: it.name ?? null,\n\t\t\totpEnabled: it.otpEnabled,\n\t\t\temailOtpEnabled: it.emailOtpEnabled,\n\t\t\temailVerified: it.emailVerified,\n\t\t}))\n\t}\n\n\t/** Null both when the person does not exist and when the caller may not see them — the API does not distinguish. */\n\tpublic async getPerson(id: string): Promise<TenantPersonDetail | null> {\n\t\tconst result = await this.transport.exec(personByIdFetcher, { id })\n\t\tconst person = result.personById\n\t\tif (!person) {\n\t\t\treturn null\n\t\t}\n\t\treturn {\n\t\t\t...toTenantPerson(person),\n\t\t\tpasswordlessEnabled: person.passwordlessEnabled ?? null,\n\t\t\troles: person.identity.roles ? [...person.identity.roles] : null,\n\t\t\tsessions: person.identity.sessions.map(it => ({\n\t\t\t\tid: it.id,\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t\texpiresAt: it.expiresAt ?? null,\n\t\t\t\tlastUsedAt: it.lastUsedAt ?? null,\n\t\t\t\tlastIp: it.lastIp ?? null,\n\t\t\t\tlastUserAgent: it.lastUserAgent ?? null,\n\t\t\t\tcreatedIp: it.createdIp ?? null,\n\t\t\t\tcreatedUserAgent: it.createdUserAgent ?? null,\n\t\t\t\tisCurrent: it.isCurrent,\n\t\t\t\ttrustForwardedClientInfo: it.trustForwardedClientInfo,\n\t\t\t})),\n\t\t\tidentityProviders: person.identityProviders.map(it => ({\n\t\t\t\tid: it.id,\n\t\t\t\tslug: it.identityProvider.slug,\n\t\t\t\ttype: it.identityProvider.type,\n\t\t\t\texternalIdentifier: it.externalIdentifier,\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t})),\n\t\t}\n\t}\n\n\t/**\n\t * Creates a person through `signUp`. Needs the `PERSON_SIGN_UP` permission, consumes the tenant's\n\t * per-IP sign-up rate limit and triggers the verification mail when the tenant requires it.\n\t */\n\tpublic async signUp({ email, password, passwordHash, name, roles, captchaToken }: SignUpPersonArgs): Promise<TenantPerson> {\n\t\tconst result = await this.transport.exec(signUpFetcher, { email, password, passwordHash, name, roles, captchaToken })\n\t\tthis.transport.assertOk(result.signUp, `signUp(${email})`)\n\t\tconst person = result.signUp?.result?.person\n\t\tif (!person) {\n\t\t\tthrow new CliError(`signUp(${email}) reported success but returned no person`, {\n\t\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\t\texitCode: ExitCode.InternalError,\n\t\t\t})\n\t\t}\n\t\treturn toTenantPerson(person)\n\t}\n\n\tpublic async changeProfile(personId: string, { email, name }: ChangeProfileArgs): Promise<void> {\n\t\tconst result = await this.transport.exec(changeProfileFetcher, { personId, email, name })\n\t\tthis.transport.assertOk(result.changeProfile, `changeProfile(${personId})`)\n\t}\n\n\tpublic async changePassword(personId: string, password: string): Promise<void> {\n\t\tconst result = await this.transport.exec(changePasswordFetcher, { personId, password })\n\t\tthis.transport.assertOk(result.changePassword, `changePassword(${personId})`)\n\t}\n\n\tpublic async disablePerson(personId: string): Promise<void> {\n\t\tconst result = await this.transport.exec(disablePersonFetcher, { personId })\n\t\tthis.transport.assertOk(result.disablePerson, `disablePerson(${personId})`)\n\t}\n\n\tpublic async forceSignOutPerson(personId: string, reason?: string): Promise<void> {\n\t\tconst result = await this.transport.exec(forceSignOutPersonFetcher, { personId, reason })\n\t\tthis.transport.assertOk(result.forceSignOutPerson, `forceSignOutPerson(${personId})`)\n\t}\n\n\tpublic async resetPersonMfa(personId: string): Promise<void> {\n\t\tconst result = await this.transport.exec(resetPersonMfaFetcher, { personId })\n\t\tthis.transport.assertOk(result.resetPersonMfa, `resetPersonMfa(${personId})`)\n\t}\n\n\tpublic async createResetPasswordRequest(email: string, options?: CreateResetPasswordRequestOptions, captchaToken?: string): Promise<void> {\n\t\tconst result = await this.transport.exec(createResetPasswordRequestFetcher, { email, options, captchaToken })\n\t\tthis.transport.assertOk(result.createResetPasswordRequest, `createResetPasswordRequest(${email})`)\n\t}\n\n\tpublic async createSessionToken({ email, personId, expiration, options }: CreateSessionTokenArgs): Promise<TenantCreatedSessionToken> {\n\t\tconst result = await this.transport.exec(createSessionTokenFetcher, { email, personId, expiration, options })\n\t\tthis.transport.assertOk(result.createSessionToken, 'createSessionToken')\n\t\tconst tokenResult = result.createSessionToken?.result\n\t\tif (!tokenResult) {\n\t\t\tthrow new CliError('createSessionToken reported success but returned no token.', {\n\t\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\t\texitCode: ExitCode.InternalError,\n\t\t\t})\n\t\t}\n\t\treturn {\n\t\t\ttoken: tokenResult.token,\n\t\t\tpersonId: tokenResult.person.id,\n\t\t\tidentityId: tokenResult.person.identity.id,\n\t\t\temail: tokenResult.person.email ?? null,\n\t\t\tname: tokenResult.person.name ?? null,\n\t\t}\n\t}\n\n\t/** Returns the identity's roles after the change, or null when the caller may not read them. */\n\tpublic async addGlobalIdentityRoles(identityId: string, roles: readonly string[]): Promise<string[] | null> {\n\t\tconst result = await this.transport.exec(addGlobalIdentityRolesFetcher, { identityId, roles })\n\t\tthis.transport.assertOk(result.addGlobalIdentityRoles, `addGlobalIdentityRoles(${identityId})`)\n\t\tconst resultRoles = result.addGlobalIdentityRoles?.result?.identity.roles\n\t\treturn resultRoles ? [...resultRoles] : null\n\t}\n\n\t/** Returns the identity's roles after the change, or null when the caller may not read them. */\n\tpublic async removeGlobalIdentityRoles(identityId: string, roles: readonly string[]): Promise<string[] | null> {\n\t\tconst result = await this.transport.exec(removeGlobalIdentityRolesFetcher, { identityId, roles })\n\t\tthis.transport.assertOk(result.removeGlobalIdentityRoles, `removeGlobalIdentityRoles(${identityId})`)\n\t\tconst resultRoles = result.removeGlobalIdentityRoles?.result?.identity.roles\n\t\treturn resultRoles ? [...resultRoles] : null\n\t}\n}\n"],"names":["query$","person$$","identity$","sessionInfo$$","personIdentityProvider$","identityProviderListItem$$","mutation$","signUpResponse$$","signUpError$$","signUpResult$","changeProfileResponse$$","changeProfileError$$","changePasswordResponse$$","changePasswordError$$","disablePersonResponse$$","disablePersonError$$","forceSignOutPersonResponse$$","forceSignOutPersonError$$","resetPersonMfaResponse$$","resetPersonMfaError$$","createPasswordResetRequestResponse$$","createPasswordResetRequestError$$","createSessionTokenResponse$$","createSessionTokenError$$","createSessionTokenResult$","addGlobalIdentityRolesResponse$$","addGlobalIdentityRolesError$$","addGlobalIdentityRolesResult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2BAA2B,EAAE,OAAO,UAAU,YAAY,QAAA,CAAS;AAC5G,SAAK,UAAU,SAAS,OAAO,oBAAoB,oBAAoB;AACvE,UAAM,cAAc,OAAO,oBAAoB;AAC/C,QAAI,CAAC,aAAa;AACjB,YAAM,IAAID,UAAAA,SAAS,8DAA8D;AAAA,QAChF,MAAM;AAAA,QACN,UAAUC,UAAAA,SAAS;AAAA,MAAA,CACnB;AAAA,IACF;AACA,WAAO;AAAA,MACN,OAAO,YAAY;AAAA,MACnB,UAAU,YAAY,OAAO;AAAA,MAC7B,YAAY,YAAY,OAAO,SAAS;AAAA,MACxC,OAAO,YAAY,OAAO,SAAS;AAAA,MACnC,MAAM,YAAY,OAAO,QAAQ;AAAA,IAAA;AAAA,EAEnC;AAAA;AAAA,EAGA,MAAa,uBAAuB,YAAoB,OAAoD;AAC3G,UAAM,SAAS,MAAM,KAAK,UAAU,KAAK,+BAA+B,EAAE,YAAY,OAAO;AAC7F,SAAK,UAAU,SAAS,OAAO,wBAAwB,0BAA0B,UAAU,GAAG;AAC9F,UAAM,cAAc,OAAO,wBAAwB,QAAQ,SAAS;AACpE,WAAO,cAAc,CAAC,GAAG,WAAW,IAAI;AAAA,EACzC;AAAA;AAAA,EAGA,MAAa,0BAA0B,YAAoB,OAAoD;AAC9G,UAAM,SAAS,MAAM,KAAK,UAAU,KAAK,kCAAkC,EAAE,YAAY,OAAO;AAChG,SAAK,UAAU,SAAS,OAAO,2BAA2B,6BAA6B,UAAU,GAAG;AACpG,UAAM,cAAc,OAAO,2BAA2B,QAAQ,SAAS;AACvE,WAAO,cAAc,CAAC,GAAG,WAAW,IAAI;AAAA,EACzC;AACD;;"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { CliError, ExitCode } from "@contember/cli-common";
|
|
2
|
+
import { query$, person$$, identity$, sessionInfo$$, personIdentityProvider$, identityProviderListItem$$, mutation$, signUpResponse$$, signUpError$$, signUpResult$, changeProfileResponse$$, changeProfileError$$, changePasswordResponse$$, changePasswordError$$, disablePersonResponse$$, disablePersonError$$, forceSignOutPersonResponse$$, forceSignOutPersonError$$, resetPersonMfaResponse$$, resetPersonMfaError$$, createPasswordResetRequestResponse$$, createPasswordResetRequestError$$, createSessionTokenResponse$$, createSessionTokenError$$, createSessionTokenResult$, addGlobalIdentityRolesResponse$$, addGlobalIdentityRolesError$$, addGlobalIdentityRolesResult$, removeGlobalIdentityRolesResponse$$, removeGlobalIdentityRolesError$$, removeGlobalIdentityRolesResult$ } from "@contember/graphql-client-tenant";
|
|
3
|
+
const personsFetcher = query$.persons(person$$.identity(identity$.id));
|
|
4
|
+
const personByIdFetcher = query$.personById(
|
|
5
|
+
person$$.identity(identity$.id.roles.sessions(sessionInfo$$)).identityProviders(personIdentityProvider$.id.createdAt.externalIdentifier.identityProvider(identityProviderListItem$$))
|
|
6
|
+
);
|
|
7
|
+
const signUpFetcher = mutation$.signUp(
|
|
8
|
+
signUpResponse$$.error(signUpError$$.weakPasswordReasons.recommendedAction).result(signUpResult$.person(person$$.identity(identity$.id)))
|
|
9
|
+
);
|
|
10
|
+
const changeProfileFetcher = mutation$.changeProfile(changeProfileResponse$$.error(changeProfileError$$));
|
|
11
|
+
const changePasswordFetcher = mutation$.changePassword(changePasswordResponse$$.error(changePasswordError$$.weakPasswordReasons));
|
|
12
|
+
const disablePersonFetcher = mutation$.disablePerson(disablePersonResponse$$.error(disablePersonError$$));
|
|
13
|
+
const forceSignOutPersonFetcher = mutation$.forceSignOutPerson(forceSignOutPersonResponse$$.error(forceSignOutPersonError$$));
|
|
14
|
+
const resetPersonMfaFetcher = mutation$.resetPersonMfa(resetPersonMfaResponse$$.error(resetPersonMfaError$$));
|
|
15
|
+
const createResetPasswordRequestFetcher = mutation$.createResetPasswordRequest(
|
|
16
|
+
createPasswordResetRequestResponse$$.error(createPasswordResetRequestError$$)
|
|
17
|
+
);
|
|
18
|
+
const createSessionTokenFetcher = mutation$.createSessionToken(
|
|
19
|
+
createSessionTokenResponse$$.error(createSessionTokenError$$).result(createSessionTokenResult$.token.person(person$$.id.email.name.identity(identity$.id)))
|
|
20
|
+
);
|
|
21
|
+
const addGlobalIdentityRolesFetcher = mutation$.addGlobalIdentityRoles(
|
|
22
|
+
addGlobalIdentityRolesResponse$$.error(addGlobalIdentityRolesError$$).result(addGlobalIdentityRolesResult$.identity(identity$.id.roles))
|
|
23
|
+
);
|
|
24
|
+
const removeGlobalIdentityRolesFetcher = mutation$.removeGlobalIdentityRoles(
|
|
25
|
+
removeGlobalIdentityRolesResponse$$.error(removeGlobalIdentityRolesError$$).result(
|
|
26
|
+
removeGlobalIdentityRolesResult$.identity(identity$.id.roles)
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
const toTenantPerson = (person) => ({
|
|
30
|
+
id: person.id,
|
|
31
|
+
identityId: person.identity.id,
|
|
32
|
+
email: person.email ?? null,
|
|
33
|
+
name: person.name ?? null,
|
|
34
|
+
otpEnabled: person.otpEnabled,
|
|
35
|
+
emailOtpEnabled: person.emailOtpEnabled,
|
|
36
|
+
emailVerified: person.emailVerified
|
|
37
|
+
});
|
|
38
|
+
class TenantPersonClient {
|
|
39
|
+
constructor(transport) {
|
|
40
|
+
this.transport = transport;
|
|
41
|
+
}
|
|
42
|
+
async listPersons({ filter, limit, offset } = {}) {
|
|
43
|
+
const result = await this.transport.exec(personsFetcher, { filter, limit, offset });
|
|
44
|
+
return result.persons.map((it) => ({
|
|
45
|
+
id: it.id,
|
|
46
|
+
identityId: it.identity.id,
|
|
47
|
+
email: it.email ?? null,
|
|
48
|
+
name: it.name ?? null,
|
|
49
|
+
otpEnabled: it.otpEnabled,
|
|
50
|
+
emailOtpEnabled: it.emailOtpEnabled,
|
|
51
|
+
emailVerified: it.emailVerified
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
/** Null both when the person does not exist and when the caller may not see them — the API does not distinguish. */
|
|
55
|
+
async getPerson(id) {
|
|
56
|
+
const result = await this.transport.exec(personByIdFetcher, { id });
|
|
57
|
+
const person = result.personById;
|
|
58
|
+
if (!person) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
...toTenantPerson(person),
|
|
63
|
+
passwordlessEnabled: person.passwordlessEnabled ?? null,
|
|
64
|
+
roles: person.identity.roles ? [...person.identity.roles] : null,
|
|
65
|
+
sessions: person.identity.sessions.map((it) => ({
|
|
66
|
+
id: it.id,
|
|
67
|
+
createdAt: it.createdAt,
|
|
68
|
+
expiresAt: it.expiresAt ?? null,
|
|
69
|
+
lastUsedAt: it.lastUsedAt ?? null,
|
|
70
|
+
lastIp: it.lastIp ?? null,
|
|
71
|
+
lastUserAgent: it.lastUserAgent ?? null,
|
|
72
|
+
createdIp: it.createdIp ?? null,
|
|
73
|
+
createdUserAgent: it.createdUserAgent ?? null,
|
|
74
|
+
isCurrent: it.isCurrent,
|
|
75
|
+
trustForwardedClientInfo: it.trustForwardedClientInfo
|
|
76
|
+
})),
|
|
77
|
+
identityProviders: person.identityProviders.map((it) => ({
|
|
78
|
+
id: it.id,
|
|
79
|
+
slug: it.identityProvider.slug,
|
|
80
|
+
type: it.identityProvider.type,
|
|
81
|
+
externalIdentifier: it.externalIdentifier,
|
|
82
|
+
createdAt: it.createdAt
|
|
83
|
+
}))
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Creates a person through `signUp`. Needs the `PERSON_SIGN_UP` permission, consumes the tenant's
|
|
88
|
+
* per-IP sign-up rate limit and triggers the verification mail when the tenant requires it.
|
|
89
|
+
*/
|
|
90
|
+
async signUp({ email, password, passwordHash, name, roles, captchaToken }) {
|
|
91
|
+
const result = await this.transport.exec(signUpFetcher, { email, password, passwordHash, name, roles, captchaToken });
|
|
92
|
+
this.transport.assertOk(result.signUp, `signUp(${email})`);
|
|
93
|
+
const person = result.signUp?.result?.person;
|
|
94
|
+
if (!person) {
|
|
95
|
+
throw new CliError(`signUp(${email}) reported success but returned no person`, {
|
|
96
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
97
|
+
exitCode: ExitCode.InternalError
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return toTenantPerson(person);
|
|
101
|
+
}
|
|
102
|
+
async changeProfile(personId, { email, name }) {
|
|
103
|
+
const result = await this.transport.exec(changeProfileFetcher, { personId, email, name });
|
|
104
|
+
this.transport.assertOk(result.changeProfile, `changeProfile(${personId})`);
|
|
105
|
+
}
|
|
106
|
+
async changePassword(personId, password) {
|
|
107
|
+
const result = await this.transport.exec(changePasswordFetcher, { personId, password });
|
|
108
|
+
this.transport.assertOk(result.changePassword, `changePassword(${personId})`);
|
|
109
|
+
}
|
|
110
|
+
async disablePerson(personId) {
|
|
111
|
+
const result = await this.transport.exec(disablePersonFetcher, { personId });
|
|
112
|
+
this.transport.assertOk(result.disablePerson, `disablePerson(${personId})`);
|
|
113
|
+
}
|
|
114
|
+
async forceSignOutPerson(personId, reason) {
|
|
115
|
+
const result = await this.transport.exec(forceSignOutPersonFetcher, { personId, reason });
|
|
116
|
+
this.transport.assertOk(result.forceSignOutPerson, `forceSignOutPerson(${personId})`);
|
|
117
|
+
}
|
|
118
|
+
async resetPersonMfa(personId) {
|
|
119
|
+
const result = await this.transport.exec(resetPersonMfaFetcher, { personId });
|
|
120
|
+
this.transport.assertOk(result.resetPersonMfa, `resetPersonMfa(${personId})`);
|
|
121
|
+
}
|
|
122
|
+
async createResetPasswordRequest(email, options, captchaToken) {
|
|
123
|
+
const result = await this.transport.exec(createResetPasswordRequestFetcher, { email, options, captchaToken });
|
|
124
|
+
this.transport.assertOk(result.createResetPasswordRequest, `createResetPasswordRequest(${email})`);
|
|
125
|
+
}
|
|
126
|
+
async createSessionToken({ email, personId, expiration, options }) {
|
|
127
|
+
const result = await this.transport.exec(createSessionTokenFetcher, { email, personId, expiration, options });
|
|
128
|
+
this.transport.assertOk(result.createSessionToken, "createSessionToken");
|
|
129
|
+
const tokenResult = result.createSessionToken?.result;
|
|
130
|
+
if (!tokenResult) {
|
|
131
|
+
throw new CliError("createSessionToken reported success but returned no token.", {
|
|
132
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
133
|
+
exitCode: ExitCode.InternalError
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
token: tokenResult.token,
|
|
138
|
+
personId: tokenResult.person.id,
|
|
139
|
+
identityId: tokenResult.person.identity.id,
|
|
140
|
+
email: tokenResult.person.email ?? null,
|
|
141
|
+
name: tokenResult.person.name ?? null
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/** Returns the identity's roles after the change, or null when the caller may not read them. */
|
|
145
|
+
async addGlobalIdentityRoles(identityId, roles) {
|
|
146
|
+
const result = await this.transport.exec(addGlobalIdentityRolesFetcher, { identityId, roles });
|
|
147
|
+
this.transport.assertOk(result.addGlobalIdentityRoles, `addGlobalIdentityRoles(${identityId})`);
|
|
148
|
+
const resultRoles = result.addGlobalIdentityRoles?.result?.identity.roles;
|
|
149
|
+
return resultRoles ? [...resultRoles] : null;
|
|
150
|
+
}
|
|
151
|
+
/** Returns the identity's roles after the change, or null when the caller may not read them. */
|
|
152
|
+
async removeGlobalIdentityRoles(identityId, roles) {
|
|
153
|
+
const result = await this.transport.exec(removeGlobalIdentityRolesFetcher, { identityId, roles });
|
|
154
|
+
this.transport.assertOk(result.removeGlobalIdentityRoles, `removeGlobalIdentityRoles(${identityId})`);
|
|
155
|
+
const resultRoles = result.removeGlobalIdentityRoles?.result?.identity.roles;
|
|
156
|
+
return resultRoles ? [...resultRoles] : null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
TenantPersonClient
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=TenantPersonClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantPersonClient.js","sources":["../../../../../../../packages/cli/src/lib/tenant/clients/TenantPersonClient.ts"],"sourcesContent":["import { CliError, ExitCode } from '@contember/cli-common'\nimport {\n\taddGlobalIdentityRolesError$$,\n\taddGlobalIdentityRolesResponse$$,\n\taddGlobalIdentityRolesResult$,\n\tchangePasswordError$$,\n\tchangePasswordResponse$$,\n\tchangeProfileError$$,\n\tchangeProfileResponse$$,\n\tcreatePasswordResetRequestError$$,\n\tcreatePasswordResetRequestResponse$$,\n\ttype CreateResetPasswordRequestOptions,\n\tcreateSessionTokenError$$,\n\tcreateSessionTokenResponse$$,\n\tcreateSessionTokenResult$,\n\tdisablePersonError$$,\n\tdisablePersonResponse$$,\n\tforceSignOutPersonError$$,\n\tforceSignOutPersonResponse$$,\n\tidentity$,\n\tidentityProviderListItem$$,\n\tmutation$,\n\tperson$$,\n\tpersonIdentityProvider$,\n\ttype PersonsFilter,\n\tquery$,\n\tremoveGlobalIdentityRolesError$$,\n\tremoveGlobalIdentityRolesResponse$$,\n\tremoveGlobalIdentityRolesResult$,\n\tresetPersonMfaError$$,\n\tresetPersonMfaResponse$$,\n\tsessionInfo$$,\n\ttype SignInOptions,\n\tsignUpError$$,\n\tsignUpResponse$$,\n\tsignUpResult$,\n} from '@contember/graphql-client-tenant'\nimport { TenantApiTransport } from '../TenantApiTransport.js'\n\nexport interface TenantPerson {\n\tid: string\n\tidentityId: string\n\temail: string | null\n\tname: string | null\n\totpEnabled: boolean\n\temailOtpEnabled: boolean\n\temailVerified: boolean\n}\n\nexport interface TenantPersonSession {\n\tid: string\n\tcreatedAt: string\n\texpiresAt: string | null\n\tlastUsedAt: string | null\n\tlastIp: string | null\n\tlastUserAgent: string | null\n\tcreatedIp: string | null\n\tcreatedUserAgent: string | null\n\tisCurrent: boolean\n\ttrustForwardedClientInfo: boolean\n}\n\nexport interface TenantPersonIdentityProvider {\n\tid: string\n\tslug: string\n\ttype: string\n\texternalIdentifier: string\n\tcreatedAt: string\n}\n\n/**\n * Everything `personById` exposes about a single person. `roles` is null when the caller may not read\n * them, and `sessions` / `identityProviders` come back empty (never an error) for the same reason.\n */\nexport interface TenantPersonDetail extends TenantPerson {\n\tpasswordlessEnabled: boolean | null\n\troles: string[] | null\n\tsessions: TenantPersonSession[]\n\tidentityProviders: TenantPersonIdentityProvider[]\n}\n\nexport interface ListPersonsArgs {\n\tfilter?: PersonsFilter\n\tlimit?: number\n\toffset?: number\n}\n\nexport interface SignUpPersonArgs {\n\temail: string\n\t/** Plaintext password. Mutually exclusive with {@link passwordHash}; omit both to create a person without one. */\n\tpassword?: string\n\t/** Pre-computed bcrypt hash — the tenant API accepts `$2b$` only. */\n\tpasswordHash?: string\n\tname?: string\n\troles?: readonly string[]\n\tcaptchaToken?: string\n}\n\nexport interface CreateSessionTokenArgs {\n\temail?: string\n\tpersonId?: string\n\texpiration?: number\n\toptions?: SignInOptions\n}\n\nexport interface TenantCreatedSessionToken {\n\ttoken: string\n\tpersonId: string\n\tidentityId: string\n\temail: string | null\n\tname: string | null\n}\n\nexport interface ChangeProfileArgs {\n\temail?: string\n\tname?: string\n}\n\n/** The subset of a `person$$` selection the CLI maps — an actual row carries more, which is fine. */\ninterface PersonRow {\n\treadonly id: string\n\treadonly email?: string\n\treadonly name?: string\n\treadonly otpEnabled: boolean\n\treadonly emailOtpEnabled: boolean\n\treadonly emailVerified: boolean\n\treadonly identity: { readonly id: string }\n}\n\n// Fetchers are immutable and reusable, so they are built once at module load.\nconst personsFetcher = query$.persons(person$$.identity(identity$.id))\nconst personByIdFetcher = query$.personById(\n\tperson$$\n\t\t.identity(identity$.id.roles.sessions(sessionInfo$$))\n\t\t.identityProviders(personIdentityProvider$.id.createdAt.externalIdentifier.identityProvider(identityProviderListItem$$)),\n)\nconst signUpFetcher = mutation$.signUp(\n\tsignUpResponse$$.error(signUpError$$.weakPasswordReasons.recommendedAction).result(signUpResult$.person(person$$.identity(identity$.id))),\n)\nconst changeProfileFetcher = mutation$.changeProfile(changeProfileResponse$$.error(changeProfileError$$))\nconst changePasswordFetcher = mutation$.changePassword(changePasswordResponse$$.error(changePasswordError$$.weakPasswordReasons))\nconst disablePersonFetcher = mutation$.disablePerson(disablePersonResponse$$.error(disablePersonError$$))\nconst forceSignOutPersonFetcher = mutation$.forceSignOutPerson(forceSignOutPersonResponse$$.error(forceSignOutPersonError$$))\nconst resetPersonMfaFetcher = mutation$.resetPersonMfa(resetPersonMfaResponse$$.error(resetPersonMfaError$$))\nconst createResetPasswordRequestFetcher = mutation$.createResetPasswordRequest(\n\tcreatePasswordResetRequestResponse$$.error(createPasswordResetRequestError$$),\n)\nconst createSessionTokenFetcher = mutation$.createSessionToken(\n\tcreateSessionTokenResponse$$\n\t\t.error(createSessionTokenError$$)\n\t\t.result(createSessionTokenResult$.token.person(person$$.id.email.name.identity(identity$.id))),\n)\nconst addGlobalIdentityRolesFetcher = mutation$.addGlobalIdentityRoles(\n\taddGlobalIdentityRolesResponse$$.error(addGlobalIdentityRolesError$$).result(addGlobalIdentityRolesResult$.identity(identity$.id.roles)),\n)\nconst removeGlobalIdentityRolesFetcher = mutation$.removeGlobalIdentityRoles(\n\tremoveGlobalIdentityRolesResponse$$.error(removeGlobalIdentityRolesError$$).result(\n\t\tremoveGlobalIdentityRolesResult$.identity(identity$.id.roles),\n\t),\n)\n\nconst toTenantPerson = (person: PersonRow): TenantPerson => ({\n\tid: person.id,\n\tidentityId: person.identity.id,\n\temail: person.email ?? null,\n\tname: person.name ?? null,\n\totpEnabled: person.otpEnabled,\n\temailOtpEnabled: person.emailOtpEnabled,\n\temailVerified: person.emailVerified,\n})\n\n/** Persons, their global identity roles and their sessions. */\nexport class TenantPersonClient {\n\tconstructor(\n\t\tprivate readonly transport: TenantApiTransport,\n\t) {\n\t}\n\n\tpublic async listPersons({ filter, limit, offset }: ListPersonsArgs = {}): Promise<TenantPerson[]> {\n\t\tconst result = await this.transport.exec(personsFetcher, { filter, limit, offset })\n\t\treturn result.persons.map(it => ({\n\t\t\tid: it.id,\n\t\t\tidentityId: it.identity.id,\n\t\t\temail: it.email ?? null,\n\t\t\tname: it.name ?? null,\n\t\t\totpEnabled: it.otpEnabled,\n\t\t\temailOtpEnabled: it.emailOtpEnabled,\n\t\t\temailVerified: it.emailVerified,\n\t\t}))\n\t}\n\n\t/** Null both when the person does not exist and when the caller may not see them — the API does not distinguish. */\n\tpublic async getPerson(id: string): Promise<TenantPersonDetail | null> {\n\t\tconst result = await this.transport.exec(personByIdFetcher, { id })\n\t\tconst person = result.personById\n\t\tif (!person) {\n\t\t\treturn null\n\t\t}\n\t\treturn {\n\t\t\t...toTenantPerson(person),\n\t\t\tpasswordlessEnabled: person.passwordlessEnabled ?? null,\n\t\t\troles: person.identity.roles ? [...person.identity.roles] : null,\n\t\t\tsessions: person.identity.sessions.map(it => ({\n\t\t\t\tid: it.id,\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t\texpiresAt: it.expiresAt ?? null,\n\t\t\t\tlastUsedAt: it.lastUsedAt ?? null,\n\t\t\t\tlastIp: it.lastIp ?? null,\n\t\t\t\tlastUserAgent: it.lastUserAgent ?? null,\n\t\t\t\tcreatedIp: it.createdIp ?? null,\n\t\t\t\tcreatedUserAgent: it.createdUserAgent ?? null,\n\t\t\t\tisCurrent: it.isCurrent,\n\t\t\t\ttrustForwardedClientInfo: it.trustForwardedClientInfo,\n\t\t\t})),\n\t\t\tidentityProviders: person.identityProviders.map(it => ({\n\t\t\t\tid: it.id,\n\t\t\t\tslug: it.identityProvider.slug,\n\t\t\t\ttype: it.identityProvider.type,\n\t\t\t\texternalIdentifier: it.externalIdentifier,\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t})),\n\t\t}\n\t}\n\n\t/**\n\t * Creates a person through `signUp`. Needs the `PERSON_SIGN_UP` permission, consumes the tenant's\n\t * per-IP sign-up rate limit and triggers the verification mail when the tenant requires it.\n\t */\n\tpublic async signUp({ email, password, passwordHash, name, roles, captchaToken }: SignUpPersonArgs): Promise<TenantPerson> {\n\t\tconst result = await this.transport.exec(signUpFetcher, { email, password, passwordHash, name, roles, captchaToken })\n\t\tthis.transport.assertOk(result.signUp, `signUp(${email})`)\n\t\tconst person = result.signUp?.result?.person\n\t\tif (!person) {\n\t\t\tthrow new CliError(`signUp(${email}) reported success but returned no person`, {\n\t\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\t\texitCode: ExitCode.InternalError,\n\t\t\t})\n\t\t}\n\t\treturn toTenantPerson(person)\n\t}\n\n\tpublic async changeProfile(personId: string, { email, name }: ChangeProfileArgs): Promise<void> {\n\t\tconst result = await this.transport.exec(changeProfileFetcher, { personId, email, name })\n\t\tthis.transport.assertOk(result.changeProfile, `changeProfile(${personId})`)\n\t}\n\n\tpublic async changePassword(personId: string, password: string): Promise<void> {\n\t\tconst result = await this.transport.exec(changePasswordFetcher, { personId, password })\n\t\tthis.transport.assertOk(result.changePassword, `changePassword(${personId})`)\n\t}\n\n\tpublic async disablePerson(personId: string): Promise<void> {\n\t\tconst result = await this.transport.exec(disablePersonFetcher, { personId })\n\t\tthis.transport.assertOk(result.disablePerson, `disablePerson(${personId})`)\n\t}\n\n\tpublic async forceSignOutPerson(personId: string, reason?: string): Promise<void> {\n\t\tconst result = await this.transport.exec(forceSignOutPersonFetcher, { personId, reason })\n\t\tthis.transport.assertOk(result.forceSignOutPerson, `forceSignOutPerson(${personId})`)\n\t}\n\n\tpublic async resetPersonMfa(personId: string): Promise<void> {\n\t\tconst result = await this.transport.exec(resetPersonMfaFetcher, { personId })\n\t\tthis.transport.assertOk(result.resetPersonMfa, `resetPersonMfa(${personId})`)\n\t}\n\n\tpublic async createResetPasswordRequest(email: string, options?: CreateResetPasswordRequestOptions, captchaToken?: string): Promise<void> {\n\t\tconst result = await this.transport.exec(createResetPasswordRequestFetcher, { email, options, captchaToken })\n\t\tthis.transport.assertOk(result.createResetPasswordRequest, `createResetPasswordRequest(${email})`)\n\t}\n\n\tpublic async createSessionToken({ email, personId, expiration, options }: CreateSessionTokenArgs): Promise<TenantCreatedSessionToken> {\n\t\tconst result = await this.transport.exec(createSessionTokenFetcher, { email, personId, expiration, options })\n\t\tthis.transport.assertOk(result.createSessionToken, 'createSessionToken')\n\t\tconst tokenResult = result.createSessionToken?.result\n\t\tif (!tokenResult) {\n\t\t\tthrow new CliError('createSessionToken reported success but returned no token.', {\n\t\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\t\texitCode: ExitCode.InternalError,\n\t\t\t})\n\t\t}\n\t\treturn {\n\t\t\ttoken: tokenResult.token,\n\t\t\tpersonId: tokenResult.person.id,\n\t\t\tidentityId: tokenResult.person.identity.id,\n\t\t\temail: tokenResult.person.email ?? null,\n\t\t\tname: tokenResult.person.name ?? null,\n\t\t}\n\t}\n\n\t/** Returns the identity's roles after the change, or null when the caller may not read them. */\n\tpublic async addGlobalIdentityRoles(identityId: string, roles: readonly string[]): Promise<string[] | null> {\n\t\tconst result = await this.transport.exec(addGlobalIdentityRolesFetcher, { identityId, roles })\n\t\tthis.transport.assertOk(result.addGlobalIdentityRoles, `addGlobalIdentityRoles(${identityId})`)\n\t\tconst resultRoles = result.addGlobalIdentityRoles?.result?.identity.roles\n\t\treturn resultRoles ? [...resultRoles] : null\n\t}\n\n\t/** Returns the identity's roles after the change, or null when the caller may not read them. */\n\tpublic async removeGlobalIdentityRoles(identityId: string, roles: readonly string[]): Promise<string[] | null> {\n\t\tconst result = await this.transport.exec(removeGlobalIdentityRolesFetcher, { identityId, roles })\n\t\tthis.transport.assertOk(result.removeGlobalIdentityRoles, `removeGlobalIdentityRoles(${identityId})`)\n\t\tconst resultRoles = result.removeGlobalIdentityRoles?.result?.identity.roles\n\t\treturn resultRoles ? [...resultRoles] : null\n\t}\n}\n"],"names":[],"mappings":";;AAkIA,MAAM,iBAAiB,OAAO,QAAQ,SAAS,SAAS,UAAU,EAAE,CAAC;AACrE,MAAM,oBAAoB,OAAO;AAAA,EAChC,SACE,SAAS,UAAU,GAAG,MAAM,SAAS,aAAa,CAAC,EACnD,kBAAkB,wBAAwB,GAAG,UAAU,mBAAmB,iBAAiB,0BAA0B,CAAC;AACzH;AACA,MAAM,gBAAgB,UAAU;AAAA,EAC/B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0BAA0B,YAAoB,OAAoD;AAC9G,UAAM,SAAS,MAAM,KAAK,UAAU,KAAK,kCAAkC,EAAE,YAAY,OAAO;AAChG,SAAK,UAAU,SAAS,OAAO,2BAA2B,6BAA6B,UAAU,GAAG;AACpG,UAAM,cAAc,OAAO,2BAA2B,QAAQ,SAAS;AACvE,WAAO,cAAc,CAAC,GAAG,WAAW,IAAI;AAAA,EACzC;AACD;"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const cliCommon = require("@contember/cli-common");
|
|
4
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
5
|
+
const authPolicy = require("../authPolicy.cjs");
|
|
6
|
+
const authPoliciesFetcher = TenantApi.query$.authPolicies(TenantApi.authPolicy$$);
|
|
7
|
+
const createAuthPolicyFetcher = TenantApi.mutation$.createAuthPolicy(
|
|
8
|
+
TenantApi.createAuthPolicyResponse$$.error(TenantApi.createAuthPolicyError$$).result(TenantApi.createAuthPolicyResult$$)
|
|
9
|
+
);
|
|
10
|
+
const updateAuthPolicyFetcher = TenantApi.mutation$.updateAuthPolicy(TenantApi.updateAuthPolicyResponse$$.error(TenantApi.updateAuthPolicyError$$));
|
|
11
|
+
const deleteAuthPolicyFetcher = TenantApi.mutation$.deleteAuthPolicy(TenantApi.deleteAuthPolicyResponse$$.error(TenantApi.deleteAuthPolicyError$$));
|
|
12
|
+
const mailTemplatesFetcher = TenantApi.query$.mailTemplates(TenantApi.mailTemplateData$$);
|
|
13
|
+
const addMailTemplateFetcher = TenantApi.mutation$.addMailTemplate(TenantApi.addMailTemplateResponse$$.error(TenantApi.addMailTemplateError$$));
|
|
14
|
+
const removeMailTemplateFetcher = TenantApi.mutation$.removeMailTemplate(TenantApi.removeMailTemplateResponse$$.error(TenantApi.removeMailTemplateError$$));
|
|
15
|
+
const authLogFetcher = TenantApi.query$.authLog(TenantApi.authLogPage$.hasMore.entries(TenantApi.authLogEntry$$));
|
|
16
|
+
class TenantPolicyClient {
|
|
17
|
+
constructor(transport) {
|
|
18
|
+
this.transport = transport;
|
|
19
|
+
}
|
|
20
|
+
async listAuthPolicies() {
|
|
21
|
+
const result = await this.transport.exec(authPoliciesFetcher, {});
|
|
22
|
+
return result.authPolicies.map((it) => ({
|
|
23
|
+
id: it.id,
|
|
24
|
+
scope: it.scope,
|
|
25
|
+
project: it.project ?? null,
|
|
26
|
+
roles: [...it.roles],
|
|
27
|
+
mfaRequired: it.mfaRequired ?? null,
|
|
28
|
+
tokenExpiration: it.tokenExpiration ?? null,
|
|
29
|
+
idleTimeout: it.idleTimeout ?? null,
|
|
30
|
+
mfaGraceDuration: it.mfaGraceDuration ?? null,
|
|
31
|
+
rememberMeAllowed: it.rememberMeAllowed ?? null
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
/** Returns the id of the created policy — the only thing `createAuthPolicy` hands back. */
|
|
35
|
+
async createAuthPolicy(policy) {
|
|
36
|
+
const result = await this.transport.exec(createAuthPolicyFetcher, { policy });
|
|
37
|
+
this.transport.assertOk(result.createAuthPolicy, `createAuthPolicy(${authPolicy.describeAuthPolicy(policy)})`);
|
|
38
|
+
const id = result.createAuthPolicy?.result?.id;
|
|
39
|
+
if (id === void 0) {
|
|
40
|
+
throw new cliCommon.CliError(`createAuthPolicy(${authPolicy.describeAuthPolicy(policy)}) reported success without returning an id.`, {
|
|
41
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
42
|
+
exitCode: cliCommon.ExitCode.InternalError
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return id;
|
|
46
|
+
}
|
|
47
|
+
async updateAuthPolicy(id, policy) {
|
|
48
|
+
const result = await this.transport.exec(updateAuthPolicyFetcher, { id, policy });
|
|
49
|
+
this.transport.assertOk(result.updateAuthPolicy, `updateAuthPolicy(${id}: ${authPolicy.describeAuthPolicy(policy)})`);
|
|
50
|
+
}
|
|
51
|
+
async deleteAuthPolicy(id) {
|
|
52
|
+
const result = await this.transport.exec(deleteAuthPolicyFetcher, { id });
|
|
53
|
+
this.transport.assertOk(result.deleteAuthPolicy, `deleteAuthPolicy(${id})`);
|
|
54
|
+
}
|
|
55
|
+
async listMailTemplates() {
|
|
56
|
+
const result = await this.transport.exec(mailTemplatesFetcher, {});
|
|
57
|
+
return result.mailTemplates.map((it) => ({
|
|
58
|
+
projectSlug: it.projectSlug ?? null,
|
|
59
|
+
type: it.type,
|
|
60
|
+
variant: it.variant ?? null,
|
|
61
|
+
subject: it.subject,
|
|
62
|
+
content: it.content,
|
|
63
|
+
useLayout: it.useLayout,
|
|
64
|
+
replyTo: it.replyTo ?? null
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
async addMailTemplate(template) {
|
|
68
|
+
const result = await this.transport.exec(addMailTemplateFetcher, { template });
|
|
69
|
+
this.transport.assertOk(result.addMailTemplate, `addMailTemplate(${template.type}/${template.variant ?? ""})`);
|
|
70
|
+
}
|
|
71
|
+
/** A template is addressed by the `projectSlug`/`type`/`variant` triple — it has no id of its own. */
|
|
72
|
+
async removeMailTemplate(templateIdentifier) {
|
|
73
|
+
const result = await this.transport.exec(removeMailTemplateFetcher, { templateIdentifier });
|
|
74
|
+
this.transport.assertOk(result.removeMailTemplate, `removeMailTemplate(${templateIdentifier.type}/${templateIdentifier.variant ?? ""})`);
|
|
75
|
+
}
|
|
76
|
+
async readAuthLog({ filter, limit, offset } = {}) {
|
|
77
|
+
const result = await this.transport.exec(authLogFetcher, { filter, limit, offset });
|
|
78
|
+
return {
|
|
79
|
+
hasMore: result.authLog.hasMore,
|
|
80
|
+
entries: result.authLog.entries.map((it) => ({
|
|
81
|
+
id: it.id,
|
|
82
|
+
createdAt: it.createdAt,
|
|
83
|
+
type: it.type,
|
|
84
|
+
success: it.success,
|
|
85
|
+
invokedByIdentityId: it.invokedByIdentityId ?? null,
|
|
86
|
+
personId: it.personId ?? null,
|
|
87
|
+
targetPersonId: it.targetPersonId ?? null,
|
|
88
|
+
personInputIdentifier: it.personInputIdentifier ?? null,
|
|
89
|
+
errorCode: it.errorCode ?? null,
|
|
90
|
+
errorMessage: it.errorMessage ?? null,
|
|
91
|
+
ipAddress: it.ipAddress ?? null,
|
|
92
|
+
userAgent: it.userAgent ?? null,
|
|
93
|
+
identityProviderId: it.identityProviderId ?? null,
|
|
94
|
+
metadata: it.metadata ?? null,
|
|
95
|
+
eventData: it.eventData ?? null
|
|
96
|
+
}))
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.TenantPolicyClient = TenantPolicyClient;
|
|
101
|
+
//# sourceMappingURL=TenantPolicyClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantPolicyClient.cjs","sources":["../../../../../../../packages/cli/src/lib/tenant/clients/TenantPolicyClient.ts"],"sourcesContent":["import { CliError, ExitCode } from '@contember/cli-common'\nimport {\n\taddMailTemplateError$$,\n\taddMailTemplateResponse$$,\n\tauthLogEntry$$,\n\ttype AuthLogFilter,\n\tauthLogPage$,\n\tauthPolicy$$,\n\ttype AuthPolicyInput,\n\ttype AuthPolicyScope,\n\tcreateAuthPolicyError$$,\n\tcreateAuthPolicyResponse$$,\n\tcreateAuthPolicyResult$$,\n\tdeleteAuthPolicyError$$,\n\tdeleteAuthPolicyResponse$$,\n\tmailTemplateData$$,\n\ttype MailTemplateIdentifier,\n\ttype MailType,\n\tmutation$,\n\tquery$,\n\tremoveMailTemplateError$$,\n\tremoveMailTemplateResponse$$,\n\tupdateAuthPolicyError$$,\n\tupdateAuthPolicyResponse$$,\n} from '@contember/graphql-client-tenant'\nimport { describeAuthPolicy } from '../authPolicy.js'\nimport { TenantApiTransport } from '../TenantApiTransport.js'\nimport { TenantMailTemplate } from '../tenantConfig.js'\n\n/** A policy as it exists server-side. The config-side counterpart is `TenantAuthPolicy` in `tenantConfig.ts`. */\nexport interface RemoteAuthPolicy {\n\tid: string\n\tscope: AuthPolicyScope\n\t/** Project slug, `null` for a global policy. */\n\tproject: string | null\n\troles: string[]\n\tmfaRequired: boolean | null\n\t/** ISO 8601 duration, e.g. `PT1H`. */\n\ttokenExpiration: string | null\n\tidleTimeout: string | null\n\tmfaGraceDuration: string | null\n\trememberMeAllowed: boolean | null\n}\n\nexport interface TenantMailTemplateData {\n\tprojectSlug: string | null\n\ttype: MailType\n\tvariant: string | null\n\tsubject: string\n\tcontent: string\n\tuseLayout: boolean\n\treplyTo: string | null\n}\n\nexport interface TenantAuthLogEntry {\n\tid: string\n\tcreatedAt: string\n\ttype: string\n\tsuccess: boolean\n\tinvokedByIdentityId: string | null\n\tpersonId: string | null\n\ttargetPersonId: string | null\n\tpersonInputIdentifier: string | null\n\terrorCode: string | null\n\terrorMessage: string | null\n\tipAddress: string | null\n\tuserAgent: string | null\n\tidentityProviderId: string | null\n\tmetadata: unknown\n\teventData: unknown\n}\n\nexport interface TenantAuthLogPage {\n\tentries: TenantAuthLogEntry[]\n\t/** True when more rows exist past `offset + entries.length`. */\n\thasMore: boolean\n}\n\nexport interface ReadAuthLogArgs {\n\tfilter?: AuthLogFilter\n\tlimit?: number\n\toffset?: number\n}\n\n// Fetchers are immutable and reusable, so they are built once at module load.\nconst authPoliciesFetcher = query$.authPolicies(authPolicy$$)\nconst createAuthPolicyFetcher = mutation$.createAuthPolicy(\n\tcreateAuthPolicyResponse$$.error(createAuthPolicyError$$).result(createAuthPolicyResult$$),\n)\nconst updateAuthPolicyFetcher = mutation$.updateAuthPolicy(updateAuthPolicyResponse$$.error(updateAuthPolicyError$$))\nconst deleteAuthPolicyFetcher = mutation$.deleteAuthPolicy(deleteAuthPolicyResponse$$.error(deleteAuthPolicyError$$))\nconst mailTemplatesFetcher = query$.mailTemplates(mailTemplateData$$)\nconst addMailTemplateFetcher = mutation$.addMailTemplate(addMailTemplateResponse$$.error(addMailTemplateError$$))\nconst removeMailTemplateFetcher = mutation$.removeMailTemplate(removeMailTemplateResponse$$.error(removeMailTemplateError$$))\nconst authLogFetcher = query$.authLog(authLogPage$.hasMore.entries(authLogEntry$$))\n\n/** Auth policies, mail templates and the auth log. */\nexport class TenantPolicyClient {\n\tconstructor(\n\t\tprivate readonly transport: TenantApiTransport,\n\t) {\n\t}\n\n\tpublic async listAuthPolicies(): Promise<RemoteAuthPolicy[]> {\n\t\tconst result = await this.transport.exec(authPoliciesFetcher, {})\n\t\treturn result.authPolicies.map(it => ({\n\t\t\tid: it.id,\n\t\t\tscope: it.scope,\n\t\t\tproject: it.project ?? null,\n\t\t\troles: [...it.roles],\n\t\t\tmfaRequired: it.mfaRequired ?? null,\n\t\t\ttokenExpiration: it.tokenExpiration ?? null,\n\t\t\tidleTimeout: it.idleTimeout ?? null,\n\t\t\tmfaGraceDuration: it.mfaGraceDuration ?? null,\n\t\t\trememberMeAllowed: it.rememberMeAllowed ?? null,\n\t\t}))\n\t}\n\n\t/** Returns the id of the created policy — the only thing `createAuthPolicy` hands back. */\n\tpublic async createAuthPolicy(policy: AuthPolicyInput): Promise<string> {\n\t\tconst result = await this.transport.exec(createAuthPolicyFetcher, { policy })\n\t\t// a policy has no slug, so the target is the only thing that identifies it in an error\n\t\tthis.transport.assertOk(result.createAuthPolicy, `createAuthPolicy(${describeAuthPolicy(policy)})`)\n\t\tconst id = result.createAuthPolicy?.result?.id\n\t\tif (id === undefined) {\n\t\t\t// ok without a result breaks the schema contract, so there is nothing sensible to report back\n\t\t\tthrow new CliError(`createAuthPolicy(${describeAuthPolicy(policy)}) reported success without returning an id.`, {\n\t\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\t\texitCode: ExitCode.InternalError,\n\t\t\t})\n\t\t}\n\t\treturn id\n\t}\n\n\tpublic async updateAuthPolicy(id: string, policy: AuthPolicyInput): Promise<void> {\n\t\tconst result = await this.transport.exec(updateAuthPolicyFetcher, { id, policy })\n\t\tthis.transport.assertOk(result.updateAuthPolicy, `updateAuthPolicy(${id}: ${describeAuthPolicy(policy)})`)\n\t}\n\n\tpublic async deleteAuthPolicy(id: string): Promise<void> {\n\t\tconst result = await this.transport.exec(deleteAuthPolicyFetcher, { id })\n\t\tthis.transport.assertOk(result.deleteAuthPolicy, `deleteAuthPolicy(${id})`)\n\t}\n\n\tpublic async listMailTemplates(): Promise<TenantMailTemplateData[]> {\n\t\tconst result = await this.transport.exec(mailTemplatesFetcher, {})\n\t\treturn result.mailTemplates.map(it => ({\n\t\t\tprojectSlug: it.projectSlug ?? null,\n\t\t\ttype: it.type,\n\t\t\tvariant: it.variant ?? null,\n\t\t\tsubject: it.subject,\n\t\t\tcontent: it.content,\n\t\t\tuseLayout: it.useLayout,\n\t\t\treplyTo: it.replyTo ?? null,\n\t\t}))\n\t}\n\n\tpublic async addMailTemplate(template: TenantMailTemplate): Promise<void> {\n\t\tconst result = await this.transport.exec(addMailTemplateFetcher, { template })\n\t\tthis.transport.assertOk(result.addMailTemplate, `addMailTemplate(${template.type}/${template.variant ?? ''})`)\n\t}\n\n\t/** A template is addressed by the `projectSlug`/`type`/`variant` triple — it has no id of its own. */\n\tpublic async removeMailTemplate(templateIdentifier: MailTemplateIdentifier): Promise<void> {\n\t\tconst result = await this.transport.exec(removeMailTemplateFetcher, { templateIdentifier })\n\t\tthis.transport.assertOk(result.removeMailTemplate, `removeMailTemplate(${templateIdentifier.type}/${templateIdentifier.variant ?? ''})`)\n\t}\n\n\tpublic async readAuthLog({ filter, limit, offset }: ReadAuthLogArgs = {}): Promise<TenantAuthLogPage> {\n\t\tconst result = await this.transport.exec(authLogFetcher, { filter, limit, offset })\n\t\treturn {\n\t\t\thasMore: result.authLog.hasMore,\n\t\t\tentries: result.authLog.entries.map(it => ({\n\t\t\t\tid: it.id,\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t\ttype: it.type,\n\t\t\t\tsuccess: it.success,\n\t\t\t\tinvokedByIdentityId: it.invokedByIdentityId ?? null,\n\t\t\t\tpersonId: it.personId ?? null,\n\t\t\t\ttargetPersonId: it.targetPersonId ?? null,\n\t\t\t\tpersonInputIdentifier: it.personInputIdentifier ?? null,\n\t\t\t\terrorCode: it.errorCode ?? null,\n\t\t\t\terrorMessage: it.errorMessage ?? null,\n\t\t\t\tipAddress: it.ipAddress ?? null,\n\t\t\t\tuserAgent: it.userAgent ?? null,\n\t\t\t\tidentityProviderId: it.identityProviderId ?? null,\n\t\t\t\tmetadata: it.metadata ?? null,\n\t\t\t\teventData: it.eventData ?? null,\n\t\t\t})),\n\t\t}\n\t}\n}\n"],"names":["query$","authPolicy$$","mutation$","createAuthPolicyResponse$$","createAuthPolicyError$$","createAuthPolicyResult$$","updateAuthPolicyResponse$$","updateAuthPolicyError$$","deleteAuthPolicyResponse$$","deleteAuthPolicyError$$","mailTemplateData$$","addMailTemplateResponse$$","addMailTemplateError$$","removeMailTemplateResponse$$","removeMailTemplateError$$","authLogPage$","authLogEntry$$","describeAuthPolicy","CliError","ExitCode"],"mappings":";;;;;AAqFA,MAAM,sBAAsBA,UAAAA,OAAO,aAAaC,sBAAY;AAC5D,MAAM,0BAA0BC,UAAAA,UAAU;AAAA,EACzCC,UAAAA,2BAA2B,MAAMC,iCAAuB,EAAE,OAAOC,UAAAA,wBAAwB;AAC1F;AACA,MAAM,0BAA0BH,UAAAA,UAAU,iBAAiBI,UAAAA,2BAA2B,MAAMC,UAAAA,uBAAuB,CAAC;AACpH,MAAM,0BAA0BL,UAAAA,UAAU,iBAAiBM,UAAAA,2BAA2B,MAAMC,UAAAA,uBAAuB,CAAC;AACpH,MAAM,uBAAuBT,UAAAA,OAAO,cAAcU,4BAAkB;AACpE,MAAM,yBAAyBR,UAAAA,UAAU,gBAAgBS,UAAAA,0BAA0B,MAAMC,UAAAA,sBAAsB,CAAC;AAChH,MAAM,4BAA4BV,UAAAA,UAAU,mBAAmBW,UAAAA,6BAA6B,MAAMC,UAAAA,yBAAyB,CAAC;AAC5H,MAAM,iBAAiBd,UAAAA,OAAO,QAAQe,UAAAA,aAAa,QAAQ,QAAQC,UAAAA,cAAc,CAAC;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/C,UAAU,GAAG,YAAY;AAAA,QACzB,gBAAgB,GAAG,kBAAkB;AAAA,QACrC,uBAAuB,GAAG,yBAAyB;AAAA,QACnD,WAAW,GAAG,aAAa;AAAA,QAC3B,cAAc,GAAG,gBAAgB;AAAA,QACjC,WAAW,GAAG,aAAa;AAAA,QAC3B,WAAW,GAAG,aAAa;AAAA,QAC3B,oBAAoB,GAAG,sBAAsB;AAAA,QAC7C,UAAU,GAAG,YAAY;AAAA,QACzB,WAAW,GAAG,aAAa;AAAA,MAAA,EAC1B;AAAA,IAAA;AAAA,EAEJ;AACD;;"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { CliError, ExitCode } from "@contember/cli-common";
|
|
2
|
+
import { query$, authPolicy$$, mutation$, createAuthPolicyResponse$$, createAuthPolicyError$$, createAuthPolicyResult$$, updateAuthPolicyResponse$$, updateAuthPolicyError$$, deleteAuthPolicyResponse$$, deleteAuthPolicyError$$, mailTemplateData$$, addMailTemplateResponse$$, addMailTemplateError$$, removeMailTemplateResponse$$, removeMailTemplateError$$, authLogPage$, authLogEntry$$ } from "@contember/graphql-client-tenant";
|
|
3
|
+
import { describeAuthPolicy } from "../authPolicy.js";
|
|
4
|
+
const authPoliciesFetcher = query$.authPolicies(authPolicy$$);
|
|
5
|
+
const createAuthPolicyFetcher = mutation$.createAuthPolicy(
|
|
6
|
+
createAuthPolicyResponse$$.error(createAuthPolicyError$$).result(createAuthPolicyResult$$)
|
|
7
|
+
);
|
|
8
|
+
const updateAuthPolicyFetcher = mutation$.updateAuthPolicy(updateAuthPolicyResponse$$.error(updateAuthPolicyError$$));
|
|
9
|
+
const deleteAuthPolicyFetcher = mutation$.deleteAuthPolicy(deleteAuthPolicyResponse$$.error(deleteAuthPolicyError$$));
|
|
10
|
+
const mailTemplatesFetcher = query$.mailTemplates(mailTemplateData$$);
|
|
11
|
+
const addMailTemplateFetcher = mutation$.addMailTemplate(addMailTemplateResponse$$.error(addMailTemplateError$$));
|
|
12
|
+
const removeMailTemplateFetcher = mutation$.removeMailTemplate(removeMailTemplateResponse$$.error(removeMailTemplateError$$));
|
|
13
|
+
const authLogFetcher = query$.authLog(authLogPage$.hasMore.entries(authLogEntry$$));
|
|
14
|
+
class TenantPolicyClient {
|
|
15
|
+
constructor(transport) {
|
|
16
|
+
this.transport = transport;
|
|
17
|
+
}
|
|
18
|
+
async listAuthPolicies() {
|
|
19
|
+
const result = await this.transport.exec(authPoliciesFetcher, {});
|
|
20
|
+
return result.authPolicies.map((it) => ({
|
|
21
|
+
id: it.id,
|
|
22
|
+
scope: it.scope,
|
|
23
|
+
project: it.project ?? null,
|
|
24
|
+
roles: [...it.roles],
|
|
25
|
+
mfaRequired: it.mfaRequired ?? null,
|
|
26
|
+
tokenExpiration: it.tokenExpiration ?? null,
|
|
27
|
+
idleTimeout: it.idleTimeout ?? null,
|
|
28
|
+
mfaGraceDuration: it.mfaGraceDuration ?? null,
|
|
29
|
+
rememberMeAllowed: it.rememberMeAllowed ?? null
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
/** Returns the id of the created policy — the only thing `createAuthPolicy` hands back. */
|
|
33
|
+
async createAuthPolicy(policy) {
|
|
34
|
+
const result = await this.transport.exec(createAuthPolicyFetcher, { policy });
|
|
35
|
+
this.transport.assertOk(result.createAuthPolicy, `createAuthPolicy(${describeAuthPolicy(policy)})`);
|
|
36
|
+
const id = result.createAuthPolicy?.result?.id;
|
|
37
|
+
if (id === void 0) {
|
|
38
|
+
throw new CliError(`createAuthPolicy(${describeAuthPolicy(policy)}) reported success without returning an id.`, {
|
|
39
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
40
|
+
exitCode: ExitCode.InternalError
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return id;
|
|
44
|
+
}
|
|
45
|
+
async updateAuthPolicy(id, policy) {
|
|
46
|
+
const result = await this.transport.exec(updateAuthPolicyFetcher, { id, policy });
|
|
47
|
+
this.transport.assertOk(result.updateAuthPolicy, `updateAuthPolicy(${id}: ${describeAuthPolicy(policy)})`);
|
|
48
|
+
}
|
|
49
|
+
async deleteAuthPolicy(id) {
|
|
50
|
+
const result = await this.transport.exec(deleteAuthPolicyFetcher, { id });
|
|
51
|
+
this.transport.assertOk(result.deleteAuthPolicy, `deleteAuthPolicy(${id})`);
|
|
52
|
+
}
|
|
53
|
+
async listMailTemplates() {
|
|
54
|
+
const result = await this.transport.exec(mailTemplatesFetcher, {});
|
|
55
|
+
return result.mailTemplates.map((it) => ({
|
|
56
|
+
projectSlug: it.projectSlug ?? null,
|
|
57
|
+
type: it.type,
|
|
58
|
+
variant: it.variant ?? null,
|
|
59
|
+
subject: it.subject,
|
|
60
|
+
content: it.content,
|
|
61
|
+
useLayout: it.useLayout,
|
|
62
|
+
replyTo: it.replyTo ?? null
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
async addMailTemplate(template) {
|
|
66
|
+
const result = await this.transport.exec(addMailTemplateFetcher, { template });
|
|
67
|
+
this.transport.assertOk(result.addMailTemplate, `addMailTemplate(${template.type}/${template.variant ?? ""})`);
|
|
68
|
+
}
|
|
69
|
+
/** A template is addressed by the `projectSlug`/`type`/`variant` triple — it has no id of its own. */
|
|
70
|
+
async removeMailTemplate(templateIdentifier) {
|
|
71
|
+
const result = await this.transport.exec(removeMailTemplateFetcher, { templateIdentifier });
|
|
72
|
+
this.transport.assertOk(result.removeMailTemplate, `removeMailTemplate(${templateIdentifier.type}/${templateIdentifier.variant ?? ""})`);
|
|
73
|
+
}
|
|
74
|
+
async readAuthLog({ filter, limit, offset } = {}) {
|
|
75
|
+
const result = await this.transport.exec(authLogFetcher, { filter, limit, offset });
|
|
76
|
+
return {
|
|
77
|
+
hasMore: result.authLog.hasMore,
|
|
78
|
+
entries: result.authLog.entries.map((it) => ({
|
|
79
|
+
id: it.id,
|
|
80
|
+
createdAt: it.createdAt,
|
|
81
|
+
type: it.type,
|
|
82
|
+
success: it.success,
|
|
83
|
+
invokedByIdentityId: it.invokedByIdentityId ?? null,
|
|
84
|
+
personId: it.personId ?? null,
|
|
85
|
+
targetPersonId: it.targetPersonId ?? null,
|
|
86
|
+
personInputIdentifier: it.personInputIdentifier ?? null,
|
|
87
|
+
errorCode: it.errorCode ?? null,
|
|
88
|
+
errorMessage: it.errorMessage ?? null,
|
|
89
|
+
ipAddress: it.ipAddress ?? null,
|
|
90
|
+
userAgent: it.userAgent ?? null,
|
|
91
|
+
identityProviderId: it.identityProviderId ?? null,
|
|
92
|
+
metadata: it.metadata ?? null,
|
|
93
|
+
eventData: it.eventData ?? null
|
|
94
|
+
}))
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
TenantPolicyClient
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=TenantPolicyClient.js.map
|