@contember/cli 2.2.0-alpha.2 → 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,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const cliCommon = require("@contember/cli-common");
|
|
5
|
+
const globalApiKeysFetcher = TenantApi.query$.globalApiKeys(TenantApi.apiKey$$.identity(TenantApi.identity$.id.roles));
|
|
6
|
+
const projectApiKeysFetcher = TenantApi.query$.projectBySlug(
|
|
7
|
+
TenantApi.project$.apiKeys(
|
|
8
|
+
TenantApi.apiKey$$.identity(
|
|
9
|
+
TenantApi.identity$.id.projects(
|
|
10
|
+
TenantApi.identityProjectRelation$.project(TenantApi.project$.slug).memberships(TenantApi.membership$.role.variables(TenantApi.variableEntry$$))
|
|
11
|
+
)
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
const createApiKeyFetcher = TenantApi.mutation$.createApiKey(
|
|
16
|
+
TenantApi.createApiKeyResponse$$.error(TenantApi.createApiKeyError$$).result(TenantApi.createApiKeyResult$.apiKey(TenantApi.apiKeyWithToken$$))
|
|
17
|
+
);
|
|
18
|
+
const createGlobalApiKeyFetcher = TenantApi.mutation$.createGlobalApiKey(
|
|
19
|
+
TenantApi.createApiKeyResponse$$.error(TenantApi.createApiKeyError$$).result(TenantApi.createApiKeyResult$.apiKey(TenantApi.apiKeyWithToken$$))
|
|
20
|
+
);
|
|
21
|
+
const disableApiKeyFetcher = TenantApi.mutation$.disableApiKey(TenantApi.disableApiKeyResponse$$.error(TenantApi.disableApiKeyError$$));
|
|
22
|
+
class TenantApiKeyClient {
|
|
23
|
+
constructor(transport) {
|
|
24
|
+
this.transport = transport;
|
|
25
|
+
}
|
|
26
|
+
async listGlobalApiKeys() {
|
|
27
|
+
const result = await this.transport.exec(globalApiKeysFetcher, {});
|
|
28
|
+
return result.globalApiKeys.map((it) => ({
|
|
29
|
+
...toApiKey(it),
|
|
30
|
+
globalRoles: it.identity.roles ? [...it.identity.roles] : null
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
async listProjectApiKeys(projectSlug) {
|
|
34
|
+
const result = await this.transport.exec(projectApiKeysFetcher, { slug: projectSlug });
|
|
35
|
+
const project = result.projectBySlug;
|
|
36
|
+
if (!project) {
|
|
37
|
+
throw new cliCommon.CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {
|
|
38
|
+
code: "PROJECT_NOT_FOUND",
|
|
39
|
+
exitCode: cliCommon.ExitCode.NotFound,
|
|
40
|
+
details: { projectSlug }
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return project.apiKeys.map((it) => ({
|
|
44
|
+
...toApiKey(it),
|
|
45
|
+
memberships: it.identity.projects.find((relation) => relation.project.slug === projectSlug)?.memberships.map((membership) => ({
|
|
46
|
+
role: membership.role,
|
|
47
|
+
variables: membership.variables.map((variable) => ({ name: variable.name, values: [...variable.values] }))
|
|
48
|
+
})) ?? []
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
/** Project-scoped key. The token in the result is shown exactly once — the server does not store or re-expose it. */
|
|
52
|
+
async createApiKey(args) {
|
|
53
|
+
const operation = `createApiKey(${args.projectSlug})`;
|
|
54
|
+
const result = await this.transport.exec(createApiKeyFetcher, {
|
|
55
|
+
projectSlug: args.projectSlug,
|
|
56
|
+
memberships: args.memberships,
|
|
57
|
+
description: args.description,
|
|
58
|
+
tokenHash: args.tokenHash,
|
|
59
|
+
options: args.options
|
|
60
|
+
});
|
|
61
|
+
this.transport.assertOk(result.createApiKey, operation);
|
|
62
|
+
return toApiKeyWithToken(result.createApiKey?.result?.apiKey, operation);
|
|
63
|
+
}
|
|
64
|
+
/** Global key, tied to no project. The token in the result is shown exactly once. */
|
|
65
|
+
async createGlobalApiKey(args) {
|
|
66
|
+
const operation = `createGlobalApiKey(${args.description})`;
|
|
67
|
+
const result = await this.transport.exec(createGlobalApiKeyFetcher, {
|
|
68
|
+
description: args.description,
|
|
69
|
+
roles: args.roles,
|
|
70
|
+
tokenHash: args.tokenHash,
|
|
71
|
+
options: args.options
|
|
72
|
+
});
|
|
73
|
+
this.transport.assertOk(result.createGlobalApiKey, operation);
|
|
74
|
+
return toApiKeyWithToken(result.createGlobalApiKey?.result?.apiKey, operation);
|
|
75
|
+
}
|
|
76
|
+
async disableApiKey(id) {
|
|
77
|
+
const result = await this.transport.exec(disableApiKeyFetcher, { id });
|
|
78
|
+
this.transport.assertOk(result.disableApiKey, `disableApiKey(${id})`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const toApiKey = (it) => ({
|
|
82
|
+
id: it.id,
|
|
83
|
+
identityId: it.identity.id,
|
|
84
|
+
description: it.description ?? null,
|
|
85
|
+
type: it.type ?? null,
|
|
86
|
+
enabled: it.enabled ?? null,
|
|
87
|
+
createdAt: it.createdAt ?? null,
|
|
88
|
+
lastUsedAt: it.lastUsedAt ?? null,
|
|
89
|
+
expiresAt: it.expiresAt ?? null
|
|
90
|
+
});
|
|
91
|
+
const toApiKeyWithToken = (apiKey, operation) => {
|
|
92
|
+
if (!apiKey) {
|
|
93
|
+
throw new cliCommon.CliError(`${operation} reported success but returned no api key`, {
|
|
94
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
95
|
+
exitCode: cliCommon.ExitCode.InternalError
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return { id: apiKey.id, token: apiKey.token ?? null };
|
|
99
|
+
};
|
|
100
|
+
exports.TenantApiKeyClient = TenantApiKeyClient;
|
|
101
|
+
//# sourceMappingURL=TenantApiKeyClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantApiKeyClient.cjs","sources":["../../../../../../../packages/cli/src/lib/tenant/clients/TenantApiKeyClient.ts"],"sourcesContent":["import {\n\tapiKey$$,\n\tapiKeyWithToken$$,\n\tcreateApiKeyError$$,\n\ttype CreateApiKeyOptions,\n\tcreateApiKeyResponse$$,\n\tcreateApiKeyResult$,\n\tdisableApiKeyError$$,\n\tdisableApiKeyResponse$$,\n\tidentity$,\n\tidentityProjectRelation$,\n\tmembership$,\n\ttype MembershipInput,\n\tmutation$,\n\tproject$,\n\tquery$,\n\tvariableEntry$$,\n} from '@contember/graphql-client-tenant'\nimport { CliError, ExitCode } from '@contember/cli-common'\nimport { TenantApiTransport } from '../TenantApiTransport.js'\n\nexport interface TenantApiKey {\n\tid: string\n\tidentityId: string\n\tdescription: string | null\n\ttype: string | null\n\tenabled: boolean | null\n\tcreatedAt: string | null\n\tlastUsedAt: string | null\n\texpiresAt: string | null\n}\n\nexport interface TenantGlobalApiKey extends TenantApiKey {\n\tglobalRoles: string[] | null\n}\n\nexport interface TenantApiKeyMembership {\n\trole: string\n\tvariables: { name: string; values: string[] }[]\n}\n\nexport interface TenantProjectApiKey extends TenantApiKey {\n\tmemberships: TenantApiKeyMembership[]\n}\n\nexport interface TenantApiKeyWithToken {\n\tid: string\n\t/** Null when the key was provisioned from a caller-supplied `tokenHash` — the server never had a plaintext to return. */\n\ttoken: string | null\n}\n\nexport interface CreateApiKeyArgs {\n\tprojectSlug: string\n\tmemberships: MembershipInput[]\n\tdescription: string\n\ttokenHash?: string\n\toptions?: CreateApiKeyOptions\n}\n\nexport interface CreateGlobalApiKeyArgs {\n\tdescription: string\n\troles?: string[]\n\ttokenHash?: string\n\toptions?: CreateApiKeyOptions\n}\n\n// Fetchers are immutable and reusable, so they are built once at module load.\nconst globalApiKeysFetcher = query$.globalApiKeys(apiKey$$.identity(identity$.id.roles))\nconst projectApiKeysFetcher = query$.projectBySlug(\n\tproject$.apiKeys(\n\t\tapiKey$$.identity(\n\t\t\tidentity$.id.projects(\n\t\t\t\tidentityProjectRelation$.project(project$.slug).memberships(membership$.role.variables(variableEntry$$)),\n\t\t\t),\n\t\t),\n\t),\n)\nconst createApiKeyFetcher = mutation$.createApiKey(\n\tcreateApiKeyResponse$$.error(createApiKeyError$$).result(createApiKeyResult$.apiKey(apiKeyWithToken$$)),\n)\nconst createGlobalApiKeyFetcher = mutation$.createGlobalApiKey(\n\tcreateApiKeyResponse$$.error(createApiKeyError$$).result(createApiKeyResult$.apiKey(apiKeyWithToken$$)),\n)\nconst disableApiKeyFetcher = mutation$.disableApiKey(disableApiKeyResponse$$.error(disableApiKeyError$$))\n\n/** API keys — global permanent keys and per-project ones. */\nexport class TenantApiKeyClient {\n\tconstructor(\n\t\tprivate readonly transport: TenantApiTransport,\n\t) {\n\t}\n\n\tpublic async listGlobalApiKeys(): Promise<TenantGlobalApiKey[]> {\n\t\tconst result = await this.transport.exec(globalApiKeysFetcher, {})\n\t\treturn result.globalApiKeys.map(it => ({\n\t\t\t...toApiKey(it),\n\t\t\tglobalRoles: it.identity.roles ? [...it.identity.roles] : null,\n\t\t}))\n\t}\n\n\tpublic async listProjectApiKeys(projectSlug: string): Promise<TenantProjectApiKey[]> {\n\t\tconst result = await this.transport.exec(projectApiKeysFetcher, { slug: projectSlug })\n\t\tconst project = result.projectBySlug\n\t\tif (!project) {\n\t\t\tthrow new CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {\n\t\t\t\tcode: 'PROJECT_NOT_FOUND',\n\t\t\t\texitCode: ExitCode.NotFound,\n\t\t\t\tdetails: { projectSlug },\n\t\t\t})\n\t\t}\n\t\treturn project.apiKeys.map(it => ({\n\t\t\t...toApiKey(it),\n\t\t\tmemberships: it.identity.projects.find(relation => relation.project.slug === projectSlug)?.memberships.map(membership => ({\n\t\t\t\trole: membership.role,\n\t\t\t\tvariables: membership.variables.map(variable => ({ name: variable.name, values: [...variable.values] })),\n\t\t\t})) ?? [],\n\t\t}))\n\t}\n\n\t/** Project-scoped key. The token in the result is shown exactly once — the server does not store or re-expose it. */\n\tpublic async createApiKey(args: CreateApiKeyArgs): Promise<TenantApiKeyWithToken> {\n\t\tconst operation = `createApiKey(${args.projectSlug})`\n\t\tconst result = await this.transport.exec(createApiKeyFetcher, {\n\t\t\tprojectSlug: args.projectSlug,\n\t\t\tmemberships: args.memberships,\n\t\t\tdescription: args.description,\n\t\t\ttokenHash: args.tokenHash,\n\t\t\toptions: args.options,\n\t\t})\n\t\tthis.transport.assertOk(result.createApiKey, operation)\n\t\treturn toApiKeyWithToken(result.createApiKey?.result?.apiKey, operation)\n\t}\n\n\t/** Global key, tied to no project. The token in the result is shown exactly once. */\n\tpublic async createGlobalApiKey(args: CreateGlobalApiKeyArgs): Promise<TenantApiKeyWithToken> {\n\t\tconst operation = `createGlobalApiKey(${args.description})`\n\t\tconst result = await this.transport.exec(createGlobalApiKeyFetcher, {\n\t\t\tdescription: args.description,\n\t\t\troles: args.roles,\n\t\t\ttokenHash: args.tokenHash,\n\t\t\toptions: args.options,\n\t\t})\n\t\tthis.transport.assertOk(result.createGlobalApiKey, operation)\n\t\treturn toApiKeyWithToken(result.createGlobalApiKey?.result?.apiKey, operation)\n\t}\n\n\tpublic async disableApiKey(id: string): Promise<void> {\n\t\tconst result = await this.transport.exec(disableApiKeyFetcher, { id })\n\t\tthis.transport.assertOk(result.disableApiKey, `disableApiKey(${id})`)\n\t}\n}\n\nconst toApiKey = (it: {\n\treadonly id: string\n\treadonly identity: { readonly id: string }\n\treadonly description?: string\n\treadonly type?: string\n\treadonly enabled?: boolean\n\treadonly createdAt?: string\n\treadonly lastUsedAt?: string\n\treadonly expiresAt?: string\n}): TenantApiKey => ({\n\tid: it.id,\n\tidentityId: it.identity.id,\n\tdescription: it.description ?? null,\n\ttype: it.type ?? null,\n\tenabled: it.enabled ?? null,\n\tcreatedAt: it.createdAt ?? null,\n\tlastUsedAt: it.lastUsedAt ?? null,\n\texpiresAt: it.expiresAt ?? null,\n})\n\n/** `assertOk` only proves `ok`/`error` are consistent — `result` is still typed optional, so this guards the actual payload. */\nconst toApiKeyWithToken = (apiKey: { id: string; token?: string } | undefined, operation: string): TenantApiKeyWithToken => {\n\tif (!apiKey) {\n\t\tthrow new CliError(`${operation} reported success but returned no api key`, {\n\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\texitCode: ExitCode.InternalError,\n\t\t})\n\t}\n\treturn { id: apiKey.id, token: apiKey.token ?? null }\n}\n"],"names":["query$","apiKey$$","identity$","project$","identityProjectRelation$","membership$","variableEntry$$","mutation$","createApiKeyResponse$$","createApiKeyError$$","createApiKeyResult$","apiKeyWithToken$$","disableApiKeyResponse$$","disableApiKeyError$$","CliError","ExitCode"],"mappings":"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"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { query$, apiKey$$, identity$, project$, identityProjectRelation$, membership$, variableEntry$$, mutation$, createApiKeyResponse$$, createApiKeyError$$, createApiKeyResult$, apiKeyWithToken$$, disableApiKeyResponse$$, disableApiKeyError$$ } from "@contember/graphql-client-tenant";
|
|
2
|
+
import { CliError, ExitCode } from "@contember/cli-common";
|
|
3
|
+
const globalApiKeysFetcher = query$.globalApiKeys(apiKey$$.identity(identity$.id.roles));
|
|
4
|
+
const projectApiKeysFetcher = query$.projectBySlug(
|
|
5
|
+
project$.apiKeys(
|
|
6
|
+
apiKey$$.identity(
|
|
7
|
+
identity$.id.projects(
|
|
8
|
+
identityProjectRelation$.project(project$.slug).memberships(membership$.role.variables(variableEntry$$))
|
|
9
|
+
)
|
|
10
|
+
)
|
|
11
|
+
)
|
|
12
|
+
);
|
|
13
|
+
const createApiKeyFetcher = mutation$.createApiKey(
|
|
14
|
+
createApiKeyResponse$$.error(createApiKeyError$$).result(createApiKeyResult$.apiKey(apiKeyWithToken$$))
|
|
15
|
+
);
|
|
16
|
+
const createGlobalApiKeyFetcher = mutation$.createGlobalApiKey(
|
|
17
|
+
createApiKeyResponse$$.error(createApiKeyError$$).result(createApiKeyResult$.apiKey(apiKeyWithToken$$))
|
|
18
|
+
);
|
|
19
|
+
const disableApiKeyFetcher = mutation$.disableApiKey(disableApiKeyResponse$$.error(disableApiKeyError$$));
|
|
20
|
+
class TenantApiKeyClient {
|
|
21
|
+
constructor(transport) {
|
|
22
|
+
this.transport = transport;
|
|
23
|
+
}
|
|
24
|
+
async listGlobalApiKeys() {
|
|
25
|
+
const result = await this.transport.exec(globalApiKeysFetcher, {});
|
|
26
|
+
return result.globalApiKeys.map((it) => ({
|
|
27
|
+
...toApiKey(it),
|
|
28
|
+
globalRoles: it.identity.roles ? [...it.identity.roles] : null
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
async listProjectApiKeys(projectSlug) {
|
|
32
|
+
const result = await this.transport.exec(projectApiKeysFetcher, { slug: projectSlug });
|
|
33
|
+
const project = result.projectBySlug;
|
|
34
|
+
if (!project) {
|
|
35
|
+
throw new CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {
|
|
36
|
+
code: "PROJECT_NOT_FOUND",
|
|
37
|
+
exitCode: ExitCode.NotFound,
|
|
38
|
+
details: { projectSlug }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return project.apiKeys.map((it) => ({
|
|
42
|
+
...toApiKey(it),
|
|
43
|
+
memberships: it.identity.projects.find((relation) => relation.project.slug === projectSlug)?.memberships.map((membership) => ({
|
|
44
|
+
role: membership.role,
|
|
45
|
+
variables: membership.variables.map((variable) => ({ name: variable.name, values: [...variable.values] }))
|
|
46
|
+
})) ?? []
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/** Project-scoped key. The token in the result is shown exactly once — the server does not store or re-expose it. */
|
|
50
|
+
async createApiKey(args) {
|
|
51
|
+
const operation = `createApiKey(${args.projectSlug})`;
|
|
52
|
+
const result = await this.transport.exec(createApiKeyFetcher, {
|
|
53
|
+
projectSlug: args.projectSlug,
|
|
54
|
+
memberships: args.memberships,
|
|
55
|
+
description: args.description,
|
|
56
|
+
tokenHash: args.tokenHash,
|
|
57
|
+
options: args.options
|
|
58
|
+
});
|
|
59
|
+
this.transport.assertOk(result.createApiKey, operation);
|
|
60
|
+
return toApiKeyWithToken(result.createApiKey?.result?.apiKey, operation);
|
|
61
|
+
}
|
|
62
|
+
/** Global key, tied to no project. The token in the result is shown exactly once. */
|
|
63
|
+
async createGlobalApiKey(args) {
|
|
64
|
+
const operation = `createGlobalApiKey(${args.description})`;
|
|
65
|
+
const result = await this.transport.exec(createGlobalApiKeyFetcher, {
|
|
66
|
+
description: args.description,
|
|
67
|
+
roles: args.roles,
|
|
68
|
+
tokenHash: args.tokenHash,
|
|
69
|
+
options: args.options
|
|
70
|
+
});
|
|
71
|
+
this.transport.assertOk(result.createGlobalApiKey, operation);
|
|
72
|
+
return toApiKeyWithToken(result.createGlobalApiKey?.result?.apiKey, operation);
|
|
73
|
+
}
|
|
74
|
+
async disableApiKey(id) {
|
|
75
|
+
const result = await this.transport.exec(disableApiKeyFetcher, { id });
|
|
76
|
+
this.transport.assertOk(result.disableApiKey, `disableApiKey(${id})`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const toApiKey = (it) => ({
|
|
80
|
+
id: it.id,
|
|
81
|
+
identityId: it.identity.id,
|
|
82
|
+
description: it.description ?? null,
|
|
83
|
+
type: it.type ?? null,
|
|
84
|
+
enabled: it.enabled ?? null,
|
|
85
|
+
createdAt: it.createdAt ?? null,
|
|
86
|
+
lastUsedAt: it.lastUsedAt ?? null,
|
|
87
|
+
expiresAt: it.expiresAt ?? null
|
|
88
|
+
});
|
|
89
|
+
const toApiKeyWithToken = (apiKey, operation) => {
|
|
90
|
+
if (!apiKey) {
|
|
91
|
+
throw new CliError(`${operation} reported success but returned no api key`, {
|
|
92
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
93
|
+
exitCode: ExitCode.InternalError
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return { id: apiKey.id, token: apiKey.token ?? null };
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
TenantApiKeyClient
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=TenantApiKeyClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantApiKeyClient.js","sources":["../../../../../../../packages/cli/src/lib/tenant/clients/TenantApiKeyClient.ts"],"sourcesContent":["import {\n\tapiKey$$,\n\tapiKeyWithToken$$,\n\tcreateApiKeyError$$,\n\ttype CreateApiKeyOptions,\n\tcreateApiKeyResponse$$,\n\tcreateApiKeyResult$,\n\tdisableApiKeyError$$,\n\tdisableApiKeyResponse$$,\n\tidentity$,\n\tidentityProjectRelation$,\n\tmembership$,\n\ttype MembershipInput,\n\tmutation$,\n\tproject$,\n\tquery$,\n\tvariableEntry$$,\n} from '@contember/graphql-client-tenant'\nimport { CliError, ExitCode } from '@contember/cli-common'\nimport { TenantApiTransport } from '../TenantApiTransport.js'\n\nexport interface TenantApiKey {\n\tid: string\n\tidentityId: string\n\tdescription: string | null\n\ttype: string | null\n\tenabled: boolean | null\n\tcreatedAt: string | null\n\tlastUsedAt: string | null\n\texpiresAt: string | null\n}\n\nexport interface TenantGlobalApiKey extends TenantApiKey {\n\tglobalRoles: string[] | null\n}\n\nexport interface TenantApiKeyMembership {\n\trole: string\n\tvariables: { name: string; values: string[] }[]\n}\n\nexport interface TenantProjectApiKey extends TenantApiKey {\n\tmemberships: TenantApiKeyMembership[]\n}\n\nexport interface TenantApiKeyWithToken {\n\tid: string\n\t/** Null when the key was provisioned from a caller-supplied `tokenHash` — the server never had a plaintext to return. */\n\ttoken: string | null\n}\n\nexport interface CreateApiKeyArgs {\n\tprojectSlug: string\n\tmemberships: MembershipInput[]\n\tdescription: string\n\ttokenHash?: string\n\toptions?: CreateApiKeyOptions\n}\n\nexport interface CreateGlobalApiKeyArgs {\n\tdescription: string\n\troles?: string[]\n\ttokenHash?: string\n\toptions?: CreateApiKeyOptions\n}\n\n// Fetchers are immutable and reusable, so they are built once at module load.\nconst globalApiKeysFetcher = query$.globalApiKeys(apiKey$$.identity(identity$.id.roles))\nconst projectApiKeysFetcher = query$.projectBySlug(\n\tproject$.apiKeys(\n\t\tapiKey$$.identity(\n\t\t\tidentity$.id.projects(\n\t\t\t\tidentityProjectRelation$.project(project$.slug).memberships(membership$.role.variables(variableEntry$$)),\n\t\t\t),\n\t\t),\n\t),\n)\nconst createApiKeyFetcher = mutation$.createApiKey(\n\tcreateApiKeyResponse$$.error(createApiKeyError$$).result(createApiKeyResult$.apiKey(apiKeyWithToken$$)),\n)\nconst createGlobalApiKeyFetcher = mutation$.createGlobalApiKey(\n\tcreateApiKeyResponse$$.error(createApiKeyError$$).result(createApiKeyResult$.apiKey(apiKeyWithToken$$)),\n)\nconst disableApiKeyFetcher = mutation$.disableApiKey(disableApiKeyResponse$$.error(disableApiKeyError$$))\n\n/** API keys — global permanent keys and per-project ones. */\nexport class TenantApiKeyClient {\n\tconstructor(\n\t\tprivate readonly transport: TenantApiTransport,\n\t) {\n\t}\n\n\tpublic async listGlobalApiKeys(): Promise<TenantGlobalApiKey[]> {\n\t\tconst result = await this.transport.exec(globalApiKeysFetcher, {})\n\t\treturn result.globalApiKeys.map(it => ({\n\t\t\t...toApiKey(it),\n\t\t\tglobalRoles: it.identity.roles ? [...it.identity.roles] : null,\n\t\t}))\n\t}\n\n\tpublic async listProjectApiKeys(projectSlug: string): Promise<TenantProjectApiKey[]> {\n\t\tconst result = await this.transport.exec(projectApiKeysFetcher, { slug: projectSlug })\n\t\tconst project = result.projectBySlug\n\t\tif (!project) {\n\t\t\tthrow new CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {\n\t\t\t\tcode: 'PROJECT_NOT_FOUND',\n\t\t\t\texitCode: ExitCode.NotFound,\n\t\t\t\tdetails: { projectSlug },\n\t\t\t})\n\t\t}\n\t\treturn project.apiKeys.map(it => ({\n\t\t\t...toApiKey(it),\n\t\t\tmemberships: it.identity.projects.find(relation => relation.project.slug === projectSlug)?.memberships.map(membership => ({\n\t\t\t\trole: membership.role,\n\t\t\t\tvariables: membership.variables.map(variable => ({ name: variable.name, values: [...variable.values] })),\n\t\t\t})) ?? [],\n\t\t}))\n\t}\n\n\t/** Project-scoped key. The token in the result is shown exactly once — the server does not store or re-expose it. */\n\tpublic async createApiKey(args: CreateApiKeyArgs): Promise<TenantApiKeyWithToken> {\n\t\tconst operation = `createApiKey(${args.projectSlug})`\n\t\tconst result = await this.transport.exec(createApiKeyFetcher, {\n\t\t\tprojectSlug: args.projectSlug,\n\t\t\tmemberships: args.memberships,\n\t\t\tdescription: args.description,\n\t\t\ttokenHash: args.tokenHash,\n\t\t\toptions: args.options,\n\t\t})\n\t\tthis.transport.assertOk(result.createApiKey, operation)\n\t\treturn toApiKeyWithToken(result.createApiKey?.result?.apiKey, operation)\n\t}\n\n\t/** Global key, tied to no project. The token in the result is shown exactly once. */\n\tpublic async createGlobalApiKey(args: CreateGlobalApiKeyArgs): Promise<TenantApiKeyWithToken> {\n\t\tconst operation = `createGlobalApiKey(${args.description})`\n\t\tconst result = await this.transport.exec(createGlobalApiKeyFetcher, {\n\t\t\tdescription: args.description,\n\t\t\troles: args.roles,\n\t\t\ttokenHash: args.tokenHash,\n\t\t\toptions: args.options,\n\t\t})\n\t\tthis.transport.assertOk(result.createGlobalApiKey, operation)\n\t\treturn toApiKeyWithToken(result.createGlobalApiKey?.result?.apiKey, operation)\n\t}\n\n\tpublic async disableApiKey(id: string): Promise<void> {\n\t\tconst result = await this.transport.exec(disableApiKeyFetcher, { id })\n\t\tthis.transport.assertOk(result.disableApiKey, `disableApiKey(${id})`)\n\t}\n}\n\nconst toApiKey = (it: {\n\treadonly id: string\n\treadonly identity: { readonly id: string }\n\treadonly description?: string\n\treadonly type?: string\n\treadonly enabled?: boolean\n\treadonly createdAt?: string\n\treadonly lastUsedAt?: string\n\treadonly expiresAt?: string\n}): TenantApiKey => ({\n\tid: it.id,\n\tidentityId: it.identity.id,\n\tdescription: it.description ?? null,\n\ttype: it.type ?? null,\n\tenabled: it.enabled ?? null,\n\tcreatedAt: it.createdAt ?? null,\n\tlastUsedAt: it.lastUsedAt ?? null,\n\texpiresAt: it.expiresAt ?? null,\n})\n\n/** `assertOk` only proves `ok`/`error` are consistent — `result` is still typed optional, so this guards the actual payload. */\nconst toApiKeyWithToken = (apiKey: { id: string; token?: string } | undefined, operation: string): TenantApiKeyWithToken => {\n\tif (!apiKey) {\n\t\tthrow new CliError(`${operation} reported success but returned no api key`, {\n\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\texitCode: ExitCode.InternalError,\n\t\t})\n\t}\n\treturn { id: apiKey.id, token: apiKey.token ?? null }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,96 @@
|
|
|
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 membershipFetcher = TenantApi.membership$.role.variables(TenantApi.variableEntry$$);
|
|
6
|
+
const projectMembershipsFetcher = TenantApi.query$.projectMemberships(membershipFetcher);
|
|
7
|
+
const projectMembersFetcher = TenantApi.query$.projectBySlug(
|
|
8
|
+
TenantApi.project$.members(
|
|
9
|
+
TenantApi.projectIdentityRelation$.identity(TenantApi.identity$.id.description.person(TenantApi.person$.id.email.name)).memberships(membershipFetcher)
|
|
10
|
+
)
|
|
11
|
+
);
|
|
12
|
+
const inviteResultFetcher = TenantApi.inviteResult$.isNew.person(TenantApi.person$.id.email.name.identity(TenantApi.identity$.id));
|
|
13
|
+
const inviteFetcher = TenantApi.mutation$.invite(TenantApi.inviteResponse$$.error(TenantApi.inviteError$$).result(inviteResultFetcher));
|
|
14
|
+
const unmanagedInviteFetcher = TenantApi.mutation$.unmanagedInvite(TenantApi.inviteResponse$$.error(TenantApi.inviteError$$).result(inviteResultFetcher));
|
|
15
|
+
const addProjectMemberFetcher = TenantApi.mutation$.addProjectMember(TenantApi.addProjectMemberResponse$$.error(TenantApi.addProjectMemberError$$));
|
|
16
|
+
const updateProjectMemberFetcher = TenantApi.mutation$.updateProjectMember(TenantApi.updateProjectMemberResponse$$.error(TenantApi.updateProjectMemberError$$));
|
|
17
|
+
const removeProjectMemberFetcher = TenantApi.mutation$.removeProjectMember(TenantApi.removeProjectMemberResponse$$.error(TenantApi.removeProjectMemberError$$));
|
|
18
|
+
class TenantMemberClient {
|
|
19
|
+
constructor(transport) {
|
|
20
|
+
this.transport = transport;
|
|
21
|
+
}
|
|
22
|
+
async listProjectMemberships(projectSlug, identityId) {
|
|
23
|
+
const result = await this.transport.exec(projectMembershipsFetcher, { projectSlug, identityId });
|
|
24
|
+
return result.projectMemberships.map(toMembership);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Lists every member of a project. The tenant API answers with an empty list — not an error — when the
|
|
28
|
+
* caller lacks the `project.view members` permission, so an empty result is not proof the project is empty.
|
|
29
|
+
*/
|
|
30
|
+
async listProjectMembers(projectSlug, { filter, limit, offset } = {}) {
|
|
31
|
+
const result = await this.transport.exec(projectMembersFetcher, { slug: projectSlug, input: { filter, limit, offset } });
|
|
32
|
+
const project = result.projectBySlug;
|
|
33
|
+
if (!project) {
|
|
34
|
+
throw new cliCommon.CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {
|
|
35
|
+
code: "PROJECT_NOT_FOUND",
|
|
36
|
+
exitCode: cliCommon.ExitCode.NotFound,
|
|
37
|
+
details: { projectSlug }
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return project.members.map((member) => ({
|
|
41
|
+
identityId: member.identity.id,
|
|
42
|
+
personId: member.identity.person?.id ?? null,
|
|
43
|
+
email: member.identity.person?.email ?? null,
|
|
44
|
+
name: member.identity.person?.name ?? null,
|
|
45
|
+
description: member.identity.description ?? null,
|
|
46
|
+
memberships: member.memberships.map(toMembership)
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/** Invites a person, letting the tenant deliver the credentials by mail. */
|
|
50
|
+
async invite({ projectSlug, email, name, memberships, options }) {
|
|
51
|
+
const result = await this.transport.exec(inviteFetcher, { projectSlug, email, name, memberships, options });
|
|
52
|
+
return this.toInviteResult(result.invite, `invite(${email})`);
|
|
53
|
+
}
|
|
54
|
+
/** Invites a person without any mail — the caller supplies the password or the reset token hash. */
|
|
55
|
+
async unmanagedInvite({ projectSlug, email, memberships, options }) {
|
|
56
|
+
const result = await this.transport.exec(unmanagedInviteFetcher, { projectSlug, email, memberships, options });
|
|
57
|
+
return this.toInviteResult(result.unmanagedInvite, `unmanagedInvite(${email})`);
|
|
58
|
+
}
|
|
59
|
+
async addProjectMember(projectSlug, identityId, memberships) {
|
|
60
|
+
const result = await this.transport.exec(addProjectMemberFetcher, { projectSlug, identityId, memberships });
|
|
61
|
+
this.transport.assertOk(result.addProjectMember, `addProjectMember(${identityId})`);
|
|
62
|
+
}
|
|
63
|
+
/** Replaces all memberships of an existing member — anything not passed is removed. */
|
|
64
|
+
async updateProjectMember(projectSlug, identityId, memberships) {
|
|
65
|
+
const result = await this.transport.exec(updateProjectMemberFetcher, { projectSlug, identityId, memberships });
|
|
66
|
+
this.transport.assertOk(result.updateProjectMember, `updateProjectMember(${identityId})`);
|
|
67
|
+
}
|
|
68
|
+
async removeProjectMember(projectSlug, identityId) {
|
|
69
|
+
const result = await this.transport.exec(removeProjectMemberFetcher, { projectSlug, identityId });
|
|
70
|
+
this.transport.assertOk(result.removeProjectMember, `removeProjectMember(${identityId})`);
|
|
71
|
+
}
|
|
72
|
+
toInviteResult(response, operation) {
|
|
73
|
+
this.transport.assertOk(response, operation);
|
|
74
|
+
const result = response?.result;
|
|
75
|
+
if (!result) {
|
|
76
|
+
throw new cliCommon.CliError(`${operation} reported success but returned no result.`, {
|
|
77
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
78
|
+
exitCode: cliCommon.ExitCode.InternalError,
|
|
79
|
+
details: { operation }
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
personId: result.person.id,
|
|
84
|
+
identityId: result.person.identity.id,
|
|
85
|
+
email: result.person.email ?? null,
|
|
86
|
+
name: result.person.name ?? null,
|
|
87
|
+
isNew: result.isNew
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const toMembership = (membership) => ({
|
|
92
|
+
role: membership.role,
|
|
93
|
+
variables: membership.variables.map((variable) => ({ name: variable.name, values: [...variable.values] }))
|
|
94
|
+
});
|
|
95
|
+
exports.TenantMemberClient = TenantMemberClient;
|
|
96
|
+
//# sourceMappingURL=TenantMemberClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantMemberClient.cjs","sources":["../../../../../../../packages/cli/src/lib/tenant/clients/TenantMemberClient.ts"],"sourcesContent":["import { CliError, ExitCode } from '@contember/cli-common'\nimport {\n\taddProjectMemberError$$,\n\taddProjectMemberResponse$$,\n\tidentity$,\n\tinviteError$$,\n\ttype InviteOptions,\n\tinviteResponse$$,\n\tinviteResult$,\n\tmembership$,\n\ttype MembershipInput,\n\tmutation$,\n\tperson$,\n\tproject$,\n\tprojectIdentityRelation$,\n\ttype ProjectMembersFilter,\n\tquery$,\n\tremoveProjectMemberError$$,\n\tremoveProjectMemberResponse$$,\n\ttype UnmanagedInviteOptions,\n\tupdateProjectMemberError$$,\n\tupdateProjectMemberResponse$$,\n\tvariableEntry$$,\n} from '@contember/graphql-client-tenant'\nimport { TenantApiTransport } from '../TenantApiTransport.js'\n\nexport interface TenantMembershipVariable {\n\tname: string\n\tvalues: string[]\n}\n\nexport interface TenantMembership {\n\trole: string\n\tvariables: TenantMembershipVariable[]\n}\n\n/** One member of a project — the identity, the person behind it when there is one, and its memberships. */\nexport interface TenantProjectMember {\n\tidentityId: string\n\t/** Null for an API key member — those have no person. */\n\tpersonId: string | null\n\temail: string | null\n\tname: string | null\n\t/** Identity label, the only human-readable name an API key member has. */\n\tdescription: string | null\n\tmemberships: TenantMembership[]\n}\n\nexport interface ListProjectMembersArgs {\n\tfilter?: ProjectMembersFilter\n\tlimit?: number\n\toffset?: number\n}\n\nexport interface InviteArgs {\n\tprojectSlug: string\n\temail: string\n\tname?: string\n\tmemberships: readonly MembershipInput[]\n\toptions?: InviteOptions\n}\n\nexport interface UnmanagedInviteArgs {\n\tprojectSlug: string\n\temail: string\n\tmemberships: readonly MembershipInput[]\n\toptions?: UnmanagedInviteOptions\n}\n\nexport interface TenantInviteResult {\n\tpersonId: string\n\tidentityId: string\n\temail: string | null\n\tname: string | null\n\t/** False when the person already existed and was only added to the project. */\n\tisNew: boolean\n}\n\n/** The part of an `InviteResponse` selection this client reads — shared by `invite` and `unmanagedInvite`. */\ninterface InviteResponsePayload {\n\treadonly ok: boolean\n\treadonly error?: { readonly code: string; readonly developerMessage: string } | null\n\treadonly result?: {\n\t\treadonly isNew: boolean\n\t\treadonly person: {\n\t\t\treadonly id: string\n\t\t\treadonly email?: string\n\t\t\treadonly name?: string\n\t\t\treadonly identity: { readonly id: string }\n\t\t}\n\t} | null\n}\n\n// Fetchers are immutable and reusable, so they are built once at module load.\nconst membershipFetcher = membership$.role.variables(variableEntry$$)\nconst projectMembershipsFetcher = query$.projectMemberships(membershipFetcher)\nconst projectMembersFetcher = query$.projectBySlug(\n\tproject$.members(\n\t\tprojectIdentityRelation$\n\t\t\t.identity(identity$.id.description.person(person$.id.email.name))\n\t\t\t.memberships(membershipFetcher),\n\t),\n)\nconst inviteResultFetcher = inviteResult$.isNew.person(person$.id.email.name.identity(identity$.id))\nconst inviteFetcher = mutation$.invite(inviteResponse$$.error(inviteError$$).result(inviteResultFetcher))\nconst unmanagedInviteFetcher = mutation$.unmanagedInvite(inviteResponse$$.error(inviteError$$).result(inviteResultFetcher))\nconst addProjectMemberFetcher = mutation$.addProjectMember(addProjectMemberResponse$$.error(addProjectMemberError$$))\nconst updateProjectMemberFetcher = mutation$.updateProjectMember(updateProjectMemberResponse$$.error(updateProjectMemberError$$))\nconst removeProjectMemberFetcher = mutation$.removeProjectMember(removeProjectMemberResponse$$.error(removeProjectMemberError$$))\n\n/** Project memberships and invites. */\nexport class TenantMemberClient {\n\tconstructor(\n\t\tprivate readonly transport: TenantApiTransport,\n\t) {\n\t}\n\n\tpublic async listProjectMemberships(projectSlug: string, identityId: string): Promise<TenantMembership[]> {\n\t\tconst result = await this.transport.exec(projectMembershipsFetcher, { projectSlug, identityId })\n\t\treturn result.projectMemberships.map(toMembership)\n\t}\n\n\t/**\n\t * Lists every member of a project. The tenant API answers with an empty list — not an error — when the\n\t * caller lacks the `project.view members` permission, so an empty result is not proof the project is empty.\n\t */\n\tpublic async listProjectMembers(projectSlug: string, { filter, limit, offset }: ListProjectMembersArgs = {}): Promise<TenantProjectMember[]> {\n\t\tconst result = await this.transport.exec(projectMembersFetcher, { slug: projectSlug, input: { filter, limit, offset } })\n\t\tconst project = result.projectBySlug\n\t\tif (!project) {\n\t\t\tthrow new CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {\n\t\t\t\tcode: 'PROJECT_NOT_FOUND',\n\t\t\t\texitCode: ExitCode.NotFound,\n\t\t\t\tdetails: { projectSlug },\n\t\t\t})\n\t\t}\n\t\treturn project.members.map(member => ({\n\t\t\tidentityId: member.identity.id,\n\t\t\tpersonId: member.identity.person?.id ?? null,\n\t\t\temail: member.identity.person?.email ?? null,\n\t\t\tname: member.identity.person?.name ?? null,\n\t\t\tdescription: member.identity.description ?? null,\n\t\t\tmemberships: member.memberships.map(toMembership),\n\t\t}))\n\t}\n\n\t/** Invites a person, letting the tenant deliver the credentials by mail. */\n\tpublic async invite({ projectSlug, email, name, memberships, options }: InviteArgs): Promise<TenantInviteResult> {\n\t\tconst result = await this.transport.exec(inviteFetcher, { projectSlug, email, name, memberships, options })\n\t\treturn this.toInviteResult(result.invite, `invite(${email})`)\n\t}\n\n\t/** Invites a person without any mail — the caller supplies the password or the reset token hash. */\n\tpublic async unmanagedInvite({ projectSlug, email, memberships, options }: UnmanagedInviteArgs): Promise<TenantInviteResult> {\n\t\tconst result = await this.transport.exec(unmanagedInviteFetcher, { projectSlug, email, memberships, options })\n\t\treturn this.toInviteResult(result.unmanagedInvite, `unmanagedInvite(${email})`)\n\t}\n\n\tpublic async addProjectMember(projectSlug: string, identityId: string, memberships: readonly MembershipInput[]): Promise<void> {\n\t\tconst result = await this.transport.exec(addProjectMemberFetcher, { projectSlug, identityId, memberships })\n\t\tthis.transport.assertOk(result.addProjectMember, `addProjectMember(${identityId})`)\n\t}\n\n\t/** Replaces all memberships of an existing member — anything not passed is removed. */\n\tpublic async updateProjectMember(projectSlug: string, identityId: string, memberships: readonly MembershipInput[]): Promise<void> {\n\t\tconst result = await this.transport.exec(updateProjectMemberFetcher, { projectSlug, identityId, memberships })\n\t\tthis.transport.assertOk(result.updateProjectMember, `updateProjectMember(${identityId})`)\n\t}\n\n\tpublic async removeProjectMember(projectSlug: string, identityId: string): Promise<void> {\n\t\tconst result = await this.transport.exec(removeProjectMemberFetcher, { projectSlug, identityId })\n\t\tthis.transport.assertOk(result.removeProjectMember, `removeProjectMember(${identityId})`)\n\t}\n\n\tprivate toInviteResult(response: InviteResponsePayload | undefined, operation: string): TenantInviteResult {\n\t\tthis.transport.assertOk(response, operation)\n\t\tconst result = response?.result\n\t\tif (!result) {\n\t\t\t// assertOk throws on every failure, so an ok payload without a result is a broken response, not a user error\n\t\t\tthrow new CliError(`${operation} reported success but returned no result.`, {\n\t\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\t\texitCode: ExitCode.InternalError,\n\t\t\t\tdetails: { operation },\n\t\t\t})\n\t\t}\n\t\treturn {\n\t\t\tpersonId: result.person.id,\n\t\t\tidentityId: result.person.identity.id,\n\t\t\temail: result.person.email ?? null,\n\t\t\tname: result.person.name ?? null,\n\t\t\tisNew: result.isNew,\n\t\t}\n\t}\n}\n\nconst toMembership = (membership: { role: string; variables: readonly { name: string; values: readonly string[] }[] }): TenantMembership => ({\n\trole: membership.role,\n\tvariables: membership.variables.map(variable => ({ name: variable.name, values: [...variable.values] })),\n})\n"],"names":["membership$","variableEntry$$","query$","project$","projectIdentityRelation$","identity$","person$","inviteResult$","mutation$","inviteResponse$$","inviteError$$","addProjectMemberResponse$$","addProjectMemberError$$","updateProjectMemberResponse$$","updateProjectMemberError$$","removeProjectMemberResponse$$","removeProjectMemberError$$","CliError","ExitCode"],"mappings":"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"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { CliError, ExitCode } from "@contember/cli-common";
|
|
2
|
+
import { membership$, variableEntry$$, query$, project$, projectIdentityRelation$, identity$, person$, inviteResult$, mutation$, inviteResponse$$, inviteError$$, addProjectMemberResponse$$, addProjectMemberError$$, updateProjectMemberResponse$$, updateProjectMemberError$$, removeProjectMemberResponse$$, removeProjectMemberError$$ } from "@contember/graphql-client-tenant";
|
|
3
|
+
const membershipFetcher = membership$.role.variables(variableEntry$$);
|
|
4
|
+
const projectMembershipsFetcher = query$.projectMemberships(membershipFetcher);
|
|
5
|
+
const projectMembersFetcher = query$.projectBySlug(
|
|
6
|
+
project$.members(
|
|
7
|
+
projectIdentityRelation$.identity(identity$.id.description.person(person$.id.email.name)).memberships(membershipFetcher)
|
|
8
|
+
)
|
|
9
|
+
);
|
|
10
|
+
const inviteResultFetcher = inviteResult$.isNew.person(person$.id.email.name.identity(identity$.id));
|
|
11
|
+
const inviteFetcher = mutation$.invite(inviteResponse$$.error(inviteError$$).result(inviteResultFetcher));
|
|
12
|
+
const unmanagedInviteFetcher = mutation$.unmanagedInvite(inviteResponse$$.error(inviteError$$).result(inviteResultFetcher));
|
|
13
|
+
const addProjectMemberFetcher = mutation$.addProjectMember(addProjectMemberResponse$$.error(addProjectMemberError$$));
|
|
14
|
+
const updateProjectMemberFetcher = mutation$.updateProjectMember(updateProjectMemberResponse$$.error(updateProjectMemberError$$));
|
|
15
|
+
const removeProjectMemberFetcher = mutation$.removeProjectMember(removeProjectMemberResponse$$.error(removeProjectMemberError$$));
|
|
16
|
+
class TenantMemberClient {
|
|
17
|
+
constructor(transport) {
|
|
18
|
+
this.transport = transport;
|
|
19
|
+
}
|
|
20
|
+
async listProjectMemberships(projectSlug, identityId) {
|
|
21
|
+
const result = await this.transport.exec(projectMembershipsFetcher, { projectSlug, identityId });
|
|
22
|
+
return result.projectMemberships.map(toMembership);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Lists every member of a project. The tenant API answers with an empty list — not an error — when the
|
|
26
|
+
* caller lacks the `project.view members` permission, so an empty result is not proof the project is empty.
|
|
27
|
+
*/
|
|
28
|
+
async listProjectMembers(projectSlug, { filter, limit, offset } = {}) {
|
|
29
|
+
const result = await this.transport.exec(projectMembersFetcher, { slug: projectSlug, input: { filter, limit, offset } });
|
|
30
|
+
const project = result.projectBySlug;
|
|
31
|
+
if (!project) {
|
|
32
|
+
throw new CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {
|
|
33
|
+
code: "PROJECT_NOT_FOUND",
|
|
34
|
+
exitCode: ExitCode.NotFound,
|
|
35
|
+
details: { projectSlug }
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return project.members.map((member) => ({
|
|
39
|
+
identityId: member.identity.id,
|
|
40
|
+
personId: member.identity.person?.id ?? null,
|
|
41
|
+
email: member.identity.person?.email ?? null,
|
|
42
|
+
name: member.identity.person?.name ?? null,
|
|
43
|
+
description: member.identity.description ?? null,
|
|
44
|
+
memberships: member.memberships.map(toMembership)
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
/** Invites a person, letting the tenant deliver the credentials by mail. */
|
|
48
|
+
async invite({ projectSlug, email, name, memberships, options }) {
|
|
49
|
+
const result = await this.transport.exec(inviteFetcher, { projectSlug, email, name, memberships, options });
|
|
50
|
+
return this.toInviteResult(result.invite, `invite(${email})`);
|
|
51
|
+
}
|
|
52
|
+
/** Invites a person without any mail — the caller supplies the password or the reset token hash. */
|
|
53
|
+
async unmanagedInvite({ projectSlug, email, memberships, options }) {
|
|
54
|
+
const result = await this.transport.exec(unmanagedInviteFetcher, { projectSlug, email, memberships, options });
|
|
55
|
+
return this.toInviteResult(result.unmanagedInvite, `unmanagedInvite(${email})`);
|
|
56
|
+
}
|
|
57
|
+
async addProjectMember(projectSlug, identityId, memberships) {
|
|
58
|
+
const result = await this.transport.exec(addProjectMemberFetcher, { projectSlug, identityId, memberships });
|
|
59
|
+
this.transport.assertOk(result.addProjectMember, `addProjectMember(${identityId})`);
|
|
60
|
+
}
|
|
61
|
+
/** Replaces all memberships of an existing member — anything not passed is removed. */
|
|
62
|
+
async updateProjectMember(projectSlug, identityId, memberships) {
|
|
63
|
+
const result = await this.transport.exec(updateProjectMemberFetcher, { projectSlug, identityId, memberships });
|
|
64
|
+
this.transport.assertOk(result.updateProjectMember, `updateProjectMember(${identityId})`);
|
|
65
|
+
}
|
|
66
|
+
async removeProjectMember(projectSlug, identityId) {
|
|
67
|
+
const result = await this.transport.exec(removeProjectMemberFetcher, { projectSlug, identityId });
|
|
68
|
+
this.transport.assertOk(result.removeProjectMember, `removeProjectMember(${identityId})`);
|
|
69
|
+
}
|
|
70
|
+
toInviteResult(response, operation) {
|
|
71
|
+
this.transport.assertOk(response, operation);
|
|
72
|
+
const result = response?.result;
|
|
73
|
+
if (!result) {
|
|
74
|
+
throw new CliError(`${operation} reported success but returned no result.`, {
|
|
75
|
+
code: "TENANT_API_INVALID_RESPONSE",
|
|
76
|
+
exitCode: ExitCode.InternalError,
|
|
77
|
+
details: { operation }
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
personId: result.person.id,
|
|
82
|
+
identityId: result.person.identity.id,
|
|
83
|
+
email: result.person.email ?? null,
|
|
84
|
+
name: result.person.name ?? null,
|
|
85
|
+
isNew: result.isNew
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const toMembership = (membership) => ({
|
|
90
|
+
role: membership.role,
|
|
91
|
+
variables: membership.variables.map((variable) => ({ name: variable.name, values: [...variable.values] }))
|
|
92
|
+
});
|
|
93
|
+
export {
|
|
94
|
+
TenantMemberClient
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=TenantMemberClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantMemberClient.js","sources":["../../../../../../../packages/cli/src/lib/tenant/clients/TenantMemberClient.ts"],"sourcesContent":["import { CliError, ExitCode } from '@contember/cli-common'\nimport {\n\taddProjectMemberError$$,\n\taddProjectMemberResponse$$,\n\tidentity$,\n\tinviteError$$,\n\ttype InviteOptions,\n\tinviteResponse$$,\n\tinviteResult$,\n\tmembership$,\n\ttype MembershipInput,\n\tmutation$,\n\tperson$,\n\tproject$,\n\tprojectIdentityRelation$,\n\ttype ProjectMembersFilter,\n\tquery$,\n\tremoveProjectMemberError$$,\n\tremoveProjectMemberResponse$$,\n\ttype UnmanagedInviteOptions,\n\tupdateProjectMemberError$$,\n\tupdateProjectMemberResponse$$,\n\tvariableEntry$$,\n} from '@contember/graphql-client-tenant'\nimport { TenantApiTransport } from '../TenantApiTransport.js'\n\nexport interface TenantMembershipVariable {\n\tname: string\n\tvalues: string[]\n}\n\nexport interface TenantMembership {\n\trole: string\n\tvariables: TenantMembershipVariable[]\n}\n\n/** One member of a project — the identity, the person behind it when there is one, and its memberships. */\nexport interface TenantProjectMember {\n\tidentityId: string\n\t/** Null for an API key member — those have no person. */\n\tpersonId: string | null\n\temail: string | null\n\tname: string | null\n\t/** Identity label, the only human-readable name an API key member has. */\n\tdescription: string | null\n\tmemberships: TenantMembership[]\n}\n\nexport interface ListProjectMembersArgs {\n\tfilter?: ProjectMembersFilter\n\tlimit?: number\n\toffset?: number\n}\n\nexport interface InviteArgs {\n\tprojectSlug: string\n\temail: string\n\tname?: string\n\tmemberships: readonly MembershipInput[]\n\toptions?: InviteOptions\n}\n\nexport interface UnmanagedInviteArgs {\n\tprojectSlug: string\n\temail: string\n\tmemberships: readonly MembershipInput[]\n\toptions?: UnmanagedInviteOptions\n}\n\nexport interface TenantInviteResult {\n\tpersonId: string\n\tidentityId: string\n\temail: string | null\n\tname: string | null\n\t/** False when the person already existed and was only added to the project. */\n\tisNew: boolean\n}\n\n/** The part of an `InviteResponse` selection this client reads — shared by `invite` and `unmanagedInvite`. */\ninterface InviteResponsePayload {\n\treadonly ok: boolean\n\treadonly error?: { readonly code: string; readonly developerMessage: string } | null\n\treadonly result?: {\n\t\treadonly isNew: boolean\n\t\treadonly person: {\n\t\t\treadonly id: string\n\t\t\treadonly email?: string\n\t\t\treadonly name?: string\n\t\t\treadonly identity: { readonly id: string }\n\t\t}\n\t} | null\n}\n\n// Fetchers are immutable and reusable, so they are built once at module load.\nconst membershipFetcher = membership$.role.variables(variableEntry$$)\nconst projectMembershipsFetcher = query$.projectMemberships(membershipFetcher)\nconst projectMembersFetcher = query$.projectBySlug(\n\tproject$.members(\n\t\tprojectIdentityRelation$\n\t\t\t.identity(identity$.id.description.person(person$.id.email.name))\n\t\t\t.memberships(membershipFetcher),\n\t),\n)\nconst inviteResultFetcher = inviteResult$.isNew.person(person$.id.email.name.identity(identity$.id))\nconst inviteFetcher = mutation$.invite(inviteResponse$$.error(inviteError$$).result(inviteResultFetcher))\nconst unmanagedInviteFetcher = mutation$.unmanagedInvite(inviteResponse$$.error(inviteError$$).result(inviteResultFetcher))\nconst addProjectMemberFetcher = mutation$.addProjectMember(addProjectMemberResponse$$.error(addProjectMemberError$$))\nconst updateProjectMemberFetcher = mutation$.updateProjectMember(updateProjectMemberResponse$$.error(updateProjectMemberError$$))\nconst removeProjectMemberFetcher = mutation$.removeProjectMember(removeProjectMemberResponse$$.error(removeProjectMemberError$$))\n\n/** Project memberships and invites. */\nexport class TenantMemberClient {\n\tconstructor(\n\t\tprivate readonly transport: TenantApiTransport,\n\t) {\n\t}\n\n\tpublic async listProjectMemberships(projectSlug: string, identityId: string): Promise<TenantMembership[]> {\n\t\tconst result = await this.transport.exec(projectMembershipsFetcher, { projectSlug, identityId })\n\t\treturn result.projectMemberships.map(toMembership)\n\t}\n\n\t/**\n\t * Lists every member of a project. The tenant API answers with an empty list — not an error — when the\n\t * caller lacks the `project.view members` permission, so an empty result is not proof the project is empty.\n\t */\n\tpublic async listProjectMembers(projectSlug: string, { filter, limit, offset }: ListProjectMembersArgs = {}): Promise<TenantProjectMember[]> {\n\t\tconst result = await this.transport.exec(projectMembersFetcher, { slug: projectSlug, input: { filter, limit, offset } })\n\t\tconst project = result.projectBySlug\n\t\tif (!project) {\n\t\t\tthrow new CliError(`Project ${projectSlug} was not found or is not visible to this token.`, {\n\t\t\t\tcode: 'PROJECT_NOT_FOUND',\n\t\t\t\texitCode: ExitCode.NotFound,\n\t\t\t\tdetails: { projectSlug },\n\t\t\t})\n\t\t}\n\t\treturn project.members.map(member => ({\n\t\t\tidentityId: member.identity.id,\n\t\t\tpersonId: member.identity.person?.id ?? null,\n\t\t\temail: member.identity.person?.email ?? null,\n\t\t\tname: member.identity.person?.name ?? null,\n\t\t\tdescription: member.identity.description ?? null,\n\t\t\tmemberships: member.memberships.map(toMembership),\n\t\t}))\n\t}\n\n\t/** Invites a person, letting the tenant deliver the credentials by mail. */\n\tpublic async invite({ projectSlug, email, name, memberships, options }: InviteArgs): Promise<TenantInviteResult> {\n\t\tconst result = await this.transport.exec(inviteFetcher, { projectSlug, email, name, memberships, options })\n\t\treturn this.toInviteResult(result.invite, `invite(${email})`)\n\t}\n\n\t/** Invites a person without any mail — the caller supplies the password or the reset token hash. */\n\tpublic async unmanagedInvite({ projectSlug, email, memberships, options }: UnmanagedInviteArgs): Promise<TenantInviteResult> {\n\t\tconst result = await this.transport.exec(unmanagedInviteFetcher, { projectSlug, email, memberships, options })\n\t\treturn this.toInviteResult(result.unmanagedInvite, `unmanagedInvite(${email})`)\n\t}\n\n\tpublic async addProjectMember(projectSlug: string, identityId: string, memberships: readonly MembershipInput[]): Promise<void> {\n\t\tconst result = await this.transport.exec(addProjectMemberFetcher, { projectSlug, identityId, memberships })\n\t\tthis.transport.assertOk(result.addProjectMember, `addProjectMember(${identityId})`)\n\t}\n\n\t/** Replaces all memberships of an existing member — anything not passed is removed. */\n\tpublic async updateProjectMember(projectSlug: string, identityId: string, memberships: readonly MembershipInput[]): Promise<void> {\n\t\tconst result = await this.transport.exec(updateProjectMemberFetcher, { projectSlug, identityId, memberships })\n\t\tthis.transport.assertOk(result.updateProjectMember, `updateProjectMember(${identityId})`)\n\t}\n\n\tpublic async removeProjectMember(projectSlug: string, identityId: string): Promise<void> {\n\t\tconst result = await this.transport.exec(removeProjectMemberFetcher, { projectSlug, identityId })\n\t\tthis.transport.assertOk(result.removeProjectMember, `removeProjectMember(${identityId})`)\n\t}\n\n\tprivate toInviteResult(response: InviteResponsePayload | undefined, operation: string): TenantInviteResult {\n\t\tthis.transport.assertOk(response, operation)\n\t\tconst result = response?.result\n\t\tif (!result) {\n\t\t\t// assertOk throws on every failure, so an ok payload without a result is a broken response, not a user error\n\t\t\tthrow new CliError(`${operation} reported success but returned no result.`, {\n\t\t\t\tcode: 'TENANT_API_INVALID_RESPONSE',\n\t\t\t\texitCode: ExitCode.InternalError,\n\t\t\t\tdetails: { operation },\n\t\t\t})\n\t\t}\n\t\treturn {\n\t\t\tpersonId: result.person.id,\n\t\t\tidentityId: result.person.identity.id,\n\t\t\temail: result.person.email ?? null,\n\t\t\tname: result.person.name ?? null,\n\t\t\tisNew: result.isNew,\n\t\t}\n\t}\n}\n\nconst toMembership = (membership: { role: string; variables: readonly { name: string; values: readonly string[] }[] }): TenantMembership => ({\n\trole: membership.role,\n\tvariables: membership.variables.map(variable => ({ name: variable.name, values: [...variable.values] })),\n})\n"],"names":[],"mappings":"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"}
|