@seliseblocks/cli-os 0.1.4 → 0.2.0
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/AI_USAGE_GUIDE.md +328 -58
- package/README.md +84 -47
- package/dist/commands/auth/client-credentials/delete.d.ts +1 -0
- package/dist/commands/auth/client-credentials/delete.js +23 -0
- package/dist/commands/auth/client-credentials/list.d.ts +1 -0
- package/dist/commands/auth/client-credentials/list.js +14 -0
- package/dist/commands/auth/client-credentials/save.d.ts +1 -0
- package/dist/commands/auth/client-credentials/save.js +41 -0
- package/dist/commands/auth/config/get.d.ts +1 -0
- package/dist/commands/auth/config/get.js +14 -0
- package/dist/commands/auth/config/save.d.ts +1 -0
- package/dist/commands/auth/config/save.js +37 -0
- package/dist/commands/auth/idp/create.d.ts +1 -0
- package/dist/commands/auth/idp/create.js +46 -0
- package/dist/commands/auth/idp/delete.d.ts +1 -0
- package/dist/commands/auth/idp/delete.js +23 -0
- package/dist/commands/auth/idp/get.d.ts +1 -0
- package/dist/commands/auth/idp/get.js +16 -0
- package/dist/commands/auth/idp/list.d.ts +1 -0
- package/dist/commands/auth/idp/list.js +14 -0
- package/dist/commands/auth/idp/status.d.ts +1 -0
- package/dist/commands/auth/idp/status.js +27 -0
- package/dist/commands/auth/idp/update.d.ts +7 -0
- package/dist/commands/auth/idp/update.js +45 -0
- package/dist/commands/auth/oidc-clients/delete.d.ts +1 -0
- package/dist/commands/auth/oidc-clients/delete.js +23 -0
- package/dist/commands/auth/oidc-clients/get.d.ts +1 -0
- package/dist/commands/auth/oidc-clients/get.js +16 -0
- package/dist/commands/auth/oidc-clients/list.d.ts +1 -0
- package/dist/commands/auth/oidc-clients/list.js +14 -0
- package/dist/commands/auth/oidc-clients/rotate-secret.d.ts +1 -0
- package/dist/commands/auth/oidc-clients/rotate-secret.js +23 -0
- package/dist/commands/auth/oidc-clients/save.d.ts +2 -0
- package/dist/commands/auth/oidc-clients/save.js +57 -0
- package/dist/commands/auth/refresh.js +1 -1
- package/dist/commands/data/config/create.d.ts +1 -0
- package/dist/commands/data/config/create.js +38 -0
- package/dist/commands/data/config/get.d.ts +1 -0
- package/dist/commands/data/config/get.js +14 -0
- package/dist/commands/data/config/update.d.ts +1 -0
- package/dist/commands/data/config/update.js +41 -0
- package/dist/commands/data/files/create-folder.d.ts +1 -0
- package/dist/commands/data/files/create-folder.js +34 -0
- package/dist/commands/data/files/delete-folder.d.ts +1 -0
- package/dist/commands/data/files/delete-folder.js +25 -0
- package/dist/commands/data/files/delete.d.ts +1 -0
- package/dist/commands/data/files/delete.js +28 -0
- package/dist/commands/data/files/dms-list.d.ts +1 -0
- package/dist/commands/data/files/dms-list.js +27 -0
- package/dist/commands/data/files/dms-upload.d.ts +6 -0
- package/dist/commands/data/files/dms-upload.js +41 -0
- package/dist/commands/data/files/get-many.d.ts +1 -0
- package/dist/commands/data/files/get-many.js +24 -0
- package/dist/commands/data/files/get.d.ts +1 -0
- package/dist/commands/data/files/get.js +21 -0
- package/dist/commands/data/files/info.d.ts +1 -0
- package/dist/commands/data/files/info.js +30 -0
- package/dist/commands/data/files/presigned-upload-url.d.ts +6 -0
- package/dist/commands/data/files/presigned-upload-url.js +34 -0
- package/dist/commands/data/files/update-additional-info.d.ts +1 -0
- package/dist/commands/data/files/update-additional-info.js +26 -0
- package/dist/commands/data/files/upload-to-local-storage.d.ts +5 -0
- package/dist/commands/data/files/upload-to-local-storage.js +55 -0
- package/dist/commands/data/files/upload-to-url.d.ts +8 -0
- package/dist/commands/data/files/upload-to-url.js +36 -0
- package/dist/commands/data/files/upload.d.ts +7 -0
- package/dist/commands/data/files/upload.js +145 -0
- package/dist/commands/data/rules/policy/delete.d.ts +1 -0
- package/dist/commands/data/rules/policy/delete.js +24 -0
- package/dist/commands/data/rules/policy/get.d.ts +1 -0
- package/dist/commands/data/rules/policy/get.js +17 -0
- package/dist/commands/data/schema/aggregation.d.ts +1 -0
- package/dist/commands/data/schema/aggregation.js +26 -0
- package/dist/commands/data/schema/change-logs.d.ts +1 -0
- package/dist/commands/data/schema/change-logs.js +14 -0
- package/dist/commands/data/schema/delete.d.ts +1 -0
- package/dist/commands/data/schema/delete.js +24 -0
- package/dist/commands/data/schema/fields.d.ts +5 -0
- package/dist/commands/data/schema/fields.js +39 -0
- package/dist/commands/data/schema/get-by-name.d.ts +1 -0
- package/dist/commands/data/schema/get-by-name.js +17 -0
- package/dist/commands/data/schema/get.d.ts +1 -0
- package/dist/commands/data/schema/get.js +17 -0
- package/dist/commands/data/schema/info/list.d.ts +1 -0
- package/dist/commands/data/schema/info/list.js +15 -0
- package/dist/commands/data/schema/info/save.d.ts +1 -0
- package/dist/commands/data/schema/info/save.js +34 -0
- package/dist/commands/data/schema/info/update.d.ts +1 -0
- package/dist/commands/data/schema/info/update.js +35 -0
- package/dist/commands/data/sync.d.ts +7 -0
- package/dist/commands/data/sync.js +46 -0
- package/dist/commands/data/validation/by-schema-field.d.ts +1 -0
- package/dist/commands/data/validation/by-schema-field.js +18 -0
- package/dist/commands/data/validation/by-schema.d.ts +1 -0
- package/dist/commands/data/validation/by-schema.js +17 -0
- package/dist/commands/data/validation/delete.d.ts +1 -0
- package/dist/commands/data/validation/delete.js +24 -0
- package/dist/commands/data/validation/get.d.ts +1 -0
- package/dist/commands/data/validation/get.js +17 -0
- package/dist/commands/data/validation/list.d.ts +1 -0
- package/dist/commands/data/validation/list.js +25 -0
- package/dist/commands/data/validation/save.d.ts +6 -0
- package/dist/commands/data/validation/save.js +44 -0
- package/dist/commands/deselect.js +12 -22
- package/dist/commands/iam/email/available.d.ts +1 -0
- package/dist/commands/iam/email/available.js +17 -0
- package/dist/commands/iam/me.js +4 -1
- package/dist/commands/iam/organizations/config-get.d.ts +1 -0
- package/dist/commands/iam/organizations/config-get.js +14 -0
- package/dist/commands/iam/organizations/config-save.d.ts +1 -0
- package/dist/commands/iam/organizations/config-save.js +34 -0
- package/dist/commands/iam/organizations/create.d.ts +1 -0
- package/dist/commands/iam/organizations/create.js +37 -0
- package/dist/commands/iam/organizations/get.d.ts +1 -0
- package/dist/commands/iam/organizations/get.js +16 -0
- package/dist/commands/iam/organizations/list.d.ts +1 -0
- package/dist/commands/iam/organizations/list.js +26 -0
- package/dist/commands/iam/organizations/my.d.ts +1 -0
- package/dist/commands/iam/organizations/my.js +14 -0
- package/dist/commands/iam/organizations/update.d.ts +1 -0
- package/dist/commands/iam/organizations/update.js +39 -0
- package/dist/commands/iam/permissions/by-severity.d.ts +1 -0
- package/dist/commands/iam/permissions/by-severity.js +14 -0
- package/dist/commands/iam/permissions/create.d.ts +1 -0
- package/dist/commands/iam/permissions/create.js +39 -0
- package/dist/commands/iam/permissions/get.d.ts +1 -0
- package/dist/commands/iam/permissions/get.js +16 -0
- package/dist/commands/iam/permissions/list.d.ts +1 -0
- package/dist/commands/iam/permissions/list.js +41 -0
- package/dist/commands/iam/permissions/update.d.ts +1 -0
- package/dist/commands/iam/permissions/update.js +40 -0
- package/dist/commands/iam/resources/features.d.ts +1 -0
- package/dist/commands/iam/resources/features.js +19 -0
- package/dist/commands/iam/resources/groups.d.ts +1 -0
- package/dist/commands/iam/resources/groups.js +14 -0
- package/dist/commands/iam/roles/assign-permissions.d.ts +1 -0
- package/dist/commands/iam/roles/assign-permissions.js +33 -0
- package/dist/commands/iam/roles/assignable.d.ts +1 -0
- package/dist/commands/iam/roles/assignable.js +14 -0
- package/dist/commands/iam/roles/create.d.ts +1 -0
- package/dist/commands/iam/roles/create.js +35 -0
- package/dist/commands/iam/roles/get.d.ts +1 -0
- package/dist/commands/iam/roles/get.js +16 -0
- package/dist/commands/iam/roles/list.d.ts +1 -0
- package/dist/commands/iam/roles/list.js +34 -0
- package/dist/commands/iam/roles/update.d.ts +1 -0
- package/dist/commands/iam/roles/update.js +35 -0
- package/dist/commands/iam/signup-settings/get.d.ts +1 -0
- package/dist/commands/iam/signup-settings/get.js +14 -0
- package/dist/commands/iam/signup-settings/save.d.ts +1 -0
- package/dist/commands/iam/signup-settings/save.js +32 -0
- package/dist/commands/iam/users/access-grant.d.ts +1 -0
- package/dist/commands/iam/users/access-grant.js +32 -0
- package/dist/commands/iam/users/access-revoke.d.ts +1 -0
- package/dist/commands/iam/users/access-revoke.js +24 -0
- package/dist/commands/iam/users/activate.d.ts +1 -0
- package/dist/commands/iam/users/activate.js +24 -0
- package/dist/commands/iam/users/create.d.ts +1 -0
- package/dist/commands/iam/users/create.js +39 -0
- package/dist/commands/iam/users/deactivate.d.ts +1 -0
- package/dist/commands/iam/users/deactivate.js +24 -0
- package/dist/commands/iam/users/exists.d.ts +1 -0
- package/dist/commands/iam/users/exists.js +17 -0
- package/dist/commands/iam/users/get.d.ts +1 -0
- package/dist/commands/iam/users/get.js +17 -0
- package/dist/commands/iam/users/list.d.ts +1 -0
- package/dist/commands/iam/users/list.js +34 -0
- package/dist/commands/iam/users/update.d.ts +1 -0
- package/dist/commands/iam/users/update.js +35 -0
- package/dist/commands/init.js +0 -12
- package/dist/commands/localization/assistant/translation-suggestion.d.ts +1 -0
- package/dist/commands/localization/assistant/translation-suggestion.js +35 -0
- package/dist/commands/localization/config/get-webhook.d.ts +1 -0
- package/dist/commands/localization/config/get-webhook.js +14 -0
- package/dist/commands/localization/config/save-webhook.d.ts +1 -0
- package/dist/commands/localization/config/save-webhook.js +47 -0
- package/dist/commands/localization/glossary/delete.d.ts +1 -0
- package/dist/commands/localization/glossary/delete.js +24 -0
- package/dist/commands/localization/glossary/get.d.ts +1 -0
- package/dist/commands/localization/glossary/get.js +17 -0
- package/dist/commands/localization/glossary/list.d.ts +1 -0
- package/dist/commands/localization/glossary/list.js +22 -0
- package/dist/commands/localization/glossary/save.d.ts +1 -0
- package/dist/commands/localization/glossary/save.js +38 -0
- package/dist/commands/localization/glossary/suggested.d.ts +1 -0
- package/dist/commands/localization/glossary/suggested.js +20 -0
- package/dist/commands/localization/key/delete-keys.d.ts +1 -0
- package/dist/commands/localization/key/delete-keys.js +28 -0
- package/dist/commands/localization/key/delete.d.ts +1 -0
- package/dist/commands/localization/key/delete.js +24 -0
- package/dist/commands/localization/key/generate-uilm-file.d.ts +1 -0
- package/dist/commands/localization/key/generate-uilm-file.js +29 -0
- package/dist/commands/localization/key/get-by-names.d.ts +1 -0
- package/dist/commands/localization/key/get-by-names.js +24 -0
- package/dist/commands/localization/key/get-language-file-generation-history.d.ts +1 -0
- package/dist/commands/localization/key/get-language-file-generation-history.js +19 -0
- package/dist/commands/localization/key/get-localization-timeline.d.ts +1 -0
- package/dist/commands/localization/key/get-localization-timeline.js +28 -0
- package/dist/commands/localization/key/get-timeline-by-operation-id.d.ts +1 -0
- package/dist/commands/localization/key/get-timeline-by-operation-id.js +21 -0
- package/dist/commands/localization/key/get-timeline.d.ts +1 -0
- package/dist/commands/localization/key/get-timeline.js +25 -0
- package/dist/commands/localization/key/get-uilm-exported-files.d.ts +1 -0
- package/dist/commands/localization/key/get-uilm-exported-files.js +22 -0
- package/dist/commands/localization/key/get-uilm-file.d.ts +1 -0
- package/dist/commands/localization/key/get-uilm-file.js +18 -0
- package/dist/commands/localization/key/get.d.ts +1 -0
- package/dist/commands/localization/key/get.js +17 -0
- package/dist/commands/localization/key/list.d.ts +1 -0
- package/dist/commands/localization/key/list.js +39 -0
- package/dist/commands/localization/key/rollback.d.ts +1 -0
- package/dist/commands/localization/key/rollback.js +24 -0
- package/dist/commands/localization/key/save.d.ts +1 -0
- package/dist/commands/localization/key/save.js +44 -0
- package/dist/commands/localization/key/translate-all.d.ts +1 -0
- package/dist/commands/localization/key/translate-all.js +30 -0
- package/dist/commands/localization/key/translate-and-export.d.ts +7 -0
- package/dist/commands/localization/key/translate-and-export.js +132 -0
- package/dist/commands/localization/key/translate-key.d.ts +1 -0
- package/dist/commands/localization/key/translate-key.js +27 -0
- package/dist/commands/localization/key/translate-keys.d.ts +1 -0
- package/dist/commands/localization/key/translate-keys.js +31 -0
- package/dist/commands/localization/key/uilm-export.d.ts +1 -0
- package/dist/commands/localization/key/uilm-export.js +33 -0
- package/dist/commands/localization/key/uilm-import.d.ts +1 -0
- package/dist/commands/localization/key/uilm-import.js +26 -0
- package/dist/commands/localization/language/delete.d.ts +1 -0
- package/dist/commands/localization/language/delete.js +24 -0
- package/dist/commands/localization/language/list-for-tenant.d.ts +1 -0
- package/dist/commands/localization/language/list-for-tenant.js +14 -0
- package/dist/commands/localization/language/list.d.ts +1 -0
- package/dist/commands/localization/language/list.js +14 -0
- package/dist/commands/localization/language/save.d.ts +1 -0
- package/dist/commands/localization/language/save.js +36 -0
- package/dist/commands/localization/language/set-default.d.ts +1 -0
- package/dist/commands/localization/language/set-default.js +24 -0
- package/dist/commands/localization/module/list-for-tenant.d.ts +1 -0
- package/dist/commands/localization/module/list-for-tenant.js +14 -0
- package/dist/commands/localization/module/list.d.ts +1 -0
- package/dist/commands/localization/module/list.js +14 -0
- package/dist/commands/localization/module/save.d.ts +1 -0
- package/dist/commands/localization/module/save.js +32 -0
- package/dist/commands/localization/module/tag-glossary.d.ts +1 -0
- package/dist/commands/localization/module/tag-glossary.js +28 -0
- package/dist/commands/login.js +32 -1
- package/dist/commands/mail/config/delete.d.ts +1 -0
- package/dist/commands/mail/config/delete.js +24 -0
- package/dist/commands/mail/config/duplicate.d.ts +1 -0
- package/dist/commands/mail/config/duplicate.js +24 -0
- package/dist/commands/mail/config/get.d.ts +1 -0
- package/dist/commands/mail/config/get.js +17 -0
- package/dist/commands/mail/config/list.d.ts +1 -0
- package/dist/commands/mail/config/list.js +14 -0
- package/dist/commands/mail/config/save.d.ts +1 -0
- package/dist/commands/mail/config/save.js +44 -0
- package/dist/commands/mail/mailbox/get.d.ts +1 -0
- package/dist/commands/mail/mailbox/get.js +17 -0
- package/dist/commands/mail/mailbox/list.d.ts +1 -0
- package/dist/commands/mail/mailbox/list.js +24 -0
- package/dist/commands/mail/send.d.ts +1 -0
- package/dist/commands/mail/send.js +40 -0
- package/dist/commands/mail/sendtoany.d.ts +1 -0
- package/dist/commands/mail/sendtoany.js +41 -0
- package/dist/commands/mail/template/clone.d.ts +1 -0
- package/dist/commands/mail/template/clone.js +33 -0
- package/dist/commands/mail/template/delete.d.ts +1 -0
- package/dist/commands/mail/template/delete.js +24 -0
- package/dist/commands/mail/template/get.d.ts +1 -0
- package/dist/commands/mail/template/get.js +17 -0
- package/dist/commands/mail/template/list.d.ts +1 -0
- package/dist/commands/mail/template/list.js +24 -0
- package/dist/commands/mail/template/save.d.ts +1 -0
- package/dist/commands/mail/template/save.js +37 -0
- package/dist/commands/mfa/backup-codes/generate.d.ts +1 -0
- package/dist/commands/mfa/backup-codes/generate.js +22 -0
- package/dist/commands/mfa/backup-codes/list.d.ts +1 -0
- package/dist/commands/mfa/backup-codes/list.js +14 -0
- package/dist/commands/mfa/backup-codes/use.d.ts +1 -0
- package/dist/commands/mfa/backup-codes/use.js +18 -0
- package/dist/commands/mfa/config-get.d.ts +1 -0
- package/dist/commands/mfa/config-get.js +14 -0
- package/dist/commands/mfa/config-save.d.ts +1 -0
- package/dist/commands/mfa/config-save.js +36 -0
- package/dist/commands/mfa/disable.d.ts +1 -0
- package/dist/commands/mfa/disable.js +22 -0
- package/dist/commands/mfa/generate.d.ts +1 -0
- package/dist/commands/mfa/generate.js +22 -0
- package/dist/commands/mfa/method-set.d.ts +1 -0
- package/dist/commands/mfa/method-set.js +20 -0
- package/dist/commands/mfa/resend.d.ts +1 -0
- package/dist/commands/mfa/resend.js +20 -0
- package/dist/commands/mfa/totp-enable.d.ts +10 -0
- package/dist/commands/mfa/totp-enable.js +52 -0
- package/dist/commands/mfa/totp-setup.d.ts +1 -0
- package/dist/commands/mfa/totp-setup.js +15 -0
- package/dist/commands/mfa/totp-verify-setup.d.ts +1 -0
- package/dist/commands/mfa/totp-verify-setup.js +17 -0
- package/dist/commands/mfa/verify.d.ts +1 -0
- package/dist/commands/mfa/verify.js +26 -0
- package/dist/commands/new/web.js +115 -15
- package/dist/commands/notification/delete.d.ts +1 -0
- package/dist/commands/notification/delete.js +24 -0
- package/dist/commands/notification/get.d.ts +1 -0
- package/dist/commands/notification/get.js +17 -0
- package/dist/commands/notification/list.d.ts +1 -0
- package/dist/commands/notification/list.js +22 -0
- package/dist/commands/notification/save.d.ts +1 -0
- package/dist/commands/notification/save.js +34 -0
- package/dist/commands/notifier/list.d.ts +1 -0
- package/dist/commands/notifier/list.js +23 -0
- package/dist/commands/notifier/mark-all-read.d.ts +1 -0
- package/dist/commands/notifier/mark-all-read.js +23 -0
- package/dist/commands/notifier/mark-read.d.ts +1 -0
- package/dist/commands/notifier/mark-read.js +24 -0
- package/dist/commands/notifier/notify.d.ts +1 -0
- package/dist/commands/notifier/notify.js +39 -0
- package/dist/commands/notifier/unread.d.ts +1 -0
- package/dist/commands/notifier/unread.js +25 -0
- package/dist/commands/projects/get.js +16 -14
- package/dist/commands/projects/list.js +2 -7
- package/dist/commands/release/builds/list.js +21 -3
- package/dist/commands/release/deploy.js +121 -30
- package/dist/commands/sdk/client.d.ts +1 -0
- package/dist/commands/sdk/client.js +99 -0
- package/dist/commands/secrets/get.d.ts +1 -0
- package/dist/commands/secrets/get.js +21 -0
- package/dist/commands/secrets/save.d.ts +1 -0
- package/dist/commands/secrets/save.js +51 -0
- package/dist/commands/skill/add.d.ts +1 -0
- package/dist/commands/skill/add.js +19 -0
- package/dist/commands/skill/list.d.ts +1 -0
- package/dist/commands/skill/list.js +15 -0
- package/dist/commands/skill/show.d.ts +1 -0
- package/dist/commands/skill/show.js +15 -0
- package/dist/commands/storage/config/delete.d.ts +1 -0
- package/dist/commands/storage/config/delete.js +24 -0
- package/dist/commands/storage/config/get.d.ts +1 -0
- package/dist/commands/storage/config/get.js +17 -0
- package/dist/commands/storage/config/list.d.ts +1 -0
- package/dist/commands/storage/config/list.js +14 -0
- package/dist/commands/storage/config/save.d.ts +1 -0
- package/dist/commands/storage/config/save.js +49 -0
- package/dist/commands/use.js +18 -3
- package/dist/index.js +965 -160
- package/dist/lib/api.d.ts +2 -1
- package/dist/lib/api.js +64 -20
- package/dist/lib/args.d.ts +3 -0
- package/dist/lib/args.js +15 -0
- package/dist/lib/auth.d.ts +6 -2
- package/dist/lib/auth.js +74 -35
- package/dist/lib/config.js +7 -7
- package/dist/lib/json-flag.d.ts +17 -0
- package/dist/lib/json-flag.js +55 -0
- package/dist/lib/project-info.d.ts +33 -0
- package/dist/lib/project-info.js +43 -0
- package/dist/lib/prompt.d.ts +2 -0
- package/dist/lib/prompt.js +28 -0
- package/dist/lib/scaffold-web/dashboard.js +1 -1
- package/dist/lib/scaffold-web/root-files.js +2 -2
- package/dist/lib/secret-store.js +7 -7
- package/dist/lib/skills.d.ts +17 -0
- package/dist/lib/skills.js +69 -0
- package/dist/lib/token.d.ts +2 -0
- package/dist/lib/token.js +12 -0
- package/dist/lib/workspace.d.ts +0 -4
- package/dist/lib/workspace.js +1 -2
- package/dist/skills/blocks-data-gateway-configuration/SKILL.md +204 -0
- package/dist/skills/blocks-data-gateway-crud/SKILL.md +223 -0
- package/dist/skills/blocks-data-storage/SKILL.md +161 -0
- package/dist/skills/blocks-frontend-local-https/SKILL.md +100 -0
- package/dist/skills/blocks-iam-access-control/SKILL.md +49 -0
- package/dist/skills/blocks-iam-access-control/flows/feature-gating.md +38 -0
- package/dist/skills/blocks-iam-access-control/flows/manage-roles-permissions.md +109 -0
- package/dist/skills/blocks-iam-account/SKILL.md +169 -0
- package/dist/skills/blocks-iam-mfa/SKILL.md +124 -0
- package/dist/skills/blocks-iam-organizations/SKILL.md +43 -0
- package/dist/skills/blocks-iam-organizations/flows/admin-mutations.md +89 -0
- package/dist/skills/blocks-iam-organizations/flows/read-and-switch.md +57 -0
- package/dist/skills/blocks-iam-sso-oidc-configuration/SKILL.md +89 -0
- package/dist/skills/blocks-iam-sso-oidc-implementation/SKILL.md +80 -0
- package/dist/skills/blocks-iam-users/SKILL.md +131 -0
- package/dist/skills/blocks-localization-configuration/SKILL.md +149 -0
- package/dist/skills/blocks-localization-implementation/SKILL.md +63 -0
- package/dist/skills/blocks-mail/SKILL.md +95 -0
- package/dist/skills/blocks-notification/SKILL.md +69 -0
- package/dist/skills/blocks-notifier/SKILL.md +107 -0
- package/dist/skills/blocks-onboarding/SKILL.md +78 -0
- package/dist/skills/blocks-release-deployment/SKILL.md +81 -0
- package/dist/skills/blocks-secrets/SKILL.md +81 -0
- package/dist/skills/blocks-storage-configuration/SKILL.md +93 -0
- package/dist/skills/lint.mjs +168 -0
- package/package.json +4 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { booleanFlag, optionalBooleanFlag, optionalIntegerFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { compact, jsonBodyFlag, listFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamPermissionsUpdate(argv) {
|
|
9
|
+
const { args, flags } = parseCommand(argv);
|
|
10
|
+
const itemId = args[0] || stringFlag(flags, "id", { required: true });
|
|
11
|
+
const body = {
|
|
12
|
+
...(await jsonBodyFlag(flags)),
|
|
13
|
+
...compact({
|
|
14
|
+
dependentPermissions: listFlag(flags, "dependent-permissions"),
|
|
15
|
+
description: stringFlag(flags, "description") || undefined,
|
|
16
|
+
isArchived: optionalBooleanFlag(flags, "is-archived"),
|
|
17
|
+
isBuiltIn: optionalBooleanFlag(flags, "is-built-in"),
|
|
18
|
+
itemId,
|
|
19
|
+
name: stringFlag(flags, "name") || undefined,
|
|
20
|
+
permissionSeverity: optionalIntegerFlag(flags, "severity"),
|
|
21
|
+
resource: stringFlag(flags, "resource") || undefined,
|
|
22
|
+
resourceGroup: stringFlag(flags, "resource-group") || undefined,
|
|
23
|
+
tags: listFlag(flags, "tags"),
|
|
24
|
+
type: optionalIntegerFlag(flags, "type")
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
28
|
+
writeOutput({ dryRun: true, endpoint: `/iam/v4/iam/permissions/${itemId}`, request: body }, flags);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
await confirmMutation(flags, `Update IAM permission '${itemId}'.`);
|
|
32
|
+
const projectKey = await selectedProject(flags);
|
|
33
|
+
const result = await blocksRequest(`/iam/v4/iam/permissions/${encodeURIComponent(itemId)}`, {
|
|
34
|
+
body,
|
|
35
|
+
impersonatedProjectAuth: true,
|
|
36
|
+
...requestContext(flags),
|
|
37
|
+
projectTenantId: projectKey
|
|
38
|
+
});
|
|
39
|
+
writeOutput(result, flags);
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamResourcesFeatures(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { optionalBooleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
4
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
5
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
6
|
+
export async function iamResourcesFeatures(argv) {
|
|
7
|
+
const { flags } = parseCommand(argv);
|
|
8
|
+
const projectKey = await selectedProject(flags);
|
|
9
|
+
const result = await blocksRequest("/iam/v4/iam/resource/features", {
|
|
10
|
+
impersonatedProjectAuth: true,
|
|
11
|
+
...requestContext(flags),
|
|
12
|
+
projectTenantId: projectKey,
|
|
13
|
+
query: {
|
|
14
|
+
IsBuiltIn: optionalBooleanFlag(flags, "is-built-in"),
|
|
15
|
+
Search: stringFlag(flags, "search") || undefined
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
writeOutput(result, flags);
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamResourcesGroups(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
2
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
3
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
4
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
5
|
+
export async function iamResourcesGroups(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/iam/resource-groups", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamRolesAssignPermissions(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { listFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamRolesAssignPermissions(argv) {
|
|
9
|
+
const { args, flags } = parseCommand(argv);
|
|
10
|
+
const slug = args[0] || stringFlag(flags, "slug", { required: true });
|
|
11
|
+
const body = {
|
|
12
|
+
addPermissions: listFlag(flags, "add-permissions"),
|
|
13
|
+
oragnizationId: stringFlag(flags, "organization-id") || undefined,
|
|
14
|
+
removePermissions: listFlag(flags, "remove-permissions"),
|
|
15
|
+
slug
|
|
16
|
+
};
|
|
17
|
+
if (!body.addPermissions && !body.removePermissions) {
|
|
18
|
+
throw new Error("Provide --add-permissions and/or --remove-permissions.");
|
|
19
|
+
}
|
|
20
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
21
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/roles/assign-permissions", request: body }, flags);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
await confirmMutation(flags, `Change permission assignments for IAM role '${slug}'.`);
|
|
25
|
+
const projectKey = await selectedProject(flags);
|
|
26
|
+
const result = await blocksRequest("/iam/v4/iam/roles/assign-permissions", {
|
|
27
|
+
body,
|
|
28
|
+
impersonatedProjectAuth: true,
|
|
29
|
+
...requestContext(flags),
|
|
30
|
+
projectTenantId: projectKey
|
|
31
|
+
});
|
|
32
|
+
writeOutput(result, flags);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamRolesAssignable(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
2
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
3
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
4
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
5
|
+
export async function iamRolesAssignable(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/iam/roles/assignable", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamRolesCreate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { compact, jsonBodyFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamRolesCreate(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
canCreateOwn: booleanFlag(flags, "can-create-own") || undefined,
|
|
14
|
+
description: stringFlag(flags, "description") || undefined,
|
|
15
|
+
name: stringFlag(flags, "name") || undefined,
|
|
16
|
+
parentRoleSlug: stringFlag(flags, "parent-role-slug") || undefined,
|
|
17
|
+
slug: stringFlag(flags, "slug") || undefined
|
|
18
|
+
})
|
|
19
|
+
};
|
|
20
|
+
if (!body.name)
|
|
21
|
+
throw new Error("Provide --name (or set it in --body/--file).");
|
|
22
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
23
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/roles/create", request: body }, flags);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
await confirmMutation(flags, `Create IAM role '${body.name}'.`);
|
|
27
|
+
const projectKey = await selectedProject(flags);
|
|
28
|
+
const result = await blocksRequest("/iam/v4/iam/roles/create", {
|
|
29
|
+
body,
|
|
30
|
+
impersonatedProjectAuth: true,
|
|
31
|
+
...requestContext(flags),
|
|
32
|
+
projectTenantId: projectKey
|
|
33
|
+
});
|
|
34
|
+
writeOutput(result, flags);
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamRolesGet(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
4
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
5
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
6
|
+
export async function iamRolesGet(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const id = args[0] || stringFlag(flags, "id", { required: true });
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const result = await blocksRequest(`/iam/v4/iam/roles/${encodeURIComponent(id)}`, {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey
|
|
14
|
+
});
|
|
15
|
+
writeOutput(result, flags);
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamRolesList(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { integerFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { compact, jsonBodyFlag, listFlag } from "../../../lib/json-flag.js";
|
|
4
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
5
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
6
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
7
|
+
export async function iamRolesList(argv) {
|
|
8
|
+
const { flags } = parseCommand(argv);
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const filter = {
|
|
11
|
+
...(await jsonBodyFlag(flags)).filter,
|
|
12
|
+
...compact({
|
|
13
|
+
search: stringFlag(flags, "search") || undefined,
|
|
14
|
+
slugs: listFlag(flags, "slugs")
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
const body = {
|
|
18
|
+
filter,
|
|
19
|
+
organizationId: stringFlag(flags, "organization-id") || undefined,
|
|
20
|
+
page: integerFlag(flags, "page", 1),
|
|
21
|
+
pageSize: integerFlag(flags, "page-size", 20),
|
|
22
|
+
sort: {
|
|
23
|
+
isDescending: stringFlag(flags, "sort-desc") === "true",
|
|
24
|
+
property: stringFlag(flags, "sort-by") || undefined
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const result = await blocksRequest("/iam/v4/iam/roles", {
|
|
28
|
+
body,
|
|
29
|
+
impersonatedProjectAuth: true,
|
|
30
|
+
...requestContext(flags),
|
|
31
|
+
projectTenantId: projectKey
|
|
32
|
+
});
|
|
33
|
+
writeOutput(result, flags);
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamRolesUpdate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { compact, jsonBodyFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamRolesUpdate(argv) {
|
|
9
|
+
const { args, flags } = parseCommand(argv);
|
|
10
|
+
const itemId = args[0] || stringFlag(flags, "item-id", { required: true });
|
|
11
|
+
const body = {
|
|
12
|
+
...(await jsonBodyFlag(flags)),
|
|
13
|
+
...compact({
|
|
14
|
+
canCreateOwn: booleanFlag(flags, "can-create-own") || undefined,
|
|
15
|
+
description: stringFlag(flags, "description") || undefined,
|
|
16
|
+
itemId,
|
|
17
|
+
name: stringFlag(flags, "name") || undefined,
|
|
18
|
+
parentRoleSlug: stringFlag(flags, "parent-role-slug") || undefined,
|
|
19
|
+
propagateToOtherOrg: booleanFlag(flags, "propagate-to-other-org") || undefined
|
|
20
|
+
})
|
|
21
|
+
};
|
|
22
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
23
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/roles/update", request: body }, flags);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
await confirmMutation(flags, `Update IAM role '${itemId}'.`);
|
|
27
|
+
const projectKey = await selectedProject(flags);
|
|
28
|
+
const result = await blocksRequest("/iam/v4/iam/roles/update", {
|
|
29
|
+
body,
|
|
30
|
+
impersonatedProjectAuth: true,
|
|
31
|
+
...requestContext(flags),
|
|
32
|
+
projectTenantId: projectKey
|
|
33
|
+
});
|
|
34
|
+
writeOutput(result, flags);
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamSignupSettingsGet(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
2
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
3
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
4
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
5
|
+
export async function iamSignupSettingsGet(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/iam/signup-settings", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamSignupSettingsSave(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { booleanFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { compact, jsonBodyFlag, listFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamSignupSettingsSave(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
defaultPermissionsForNewUserOnSignUp: listFlag(flags, "default-permissions"),
|
|
14
|
+
defaultRolesForNewUserOnSignUp: listFlag(flags, "default-roles"),
|
|
15
|
+
isEmailPasswordSignUpEnabled: booleanFlag(flags, "email-password-signup") || undefined,
|
|
16
|
+
isSSoSignUpEnabled: booleanFlag(flags, "sso-signup") || undefined
|
|
17
|
+
})
|
|
18
|
+
};
|
|
19
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
20
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/signup-settings", request: body }, flags);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
await confirmMutation(flags, "Save IAM signup settings for the selected project.");
|
|
24
|
+
const projectKey = await selectedProject(flags);
|
|
25
|
+
const result = await blocksRequest("/iam/v4/iam/signup-settings", {
|
|
26
|
+
body,
|
|
27
|
+
impersonatedProjectAuth: true,
|
|
28
|
+
...requestContext(flags),
|
|
29
|
+
projectTenantId: projectKey
|
|
30
|
+
});
|
|
31
|
+
writeOutput(result, flags);
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersAccessGrant(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { listFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamUsersAccessGrant(argv) {
|
|
9
|
+
const { args, flags } = parseCommand(argv);
|
|
10
|
+
const userId = args[0] || stringFlag(flags, "user-id", { required: true });
|
|
11
|
+
const body = {
|
|
12
|
+
organizationId: stringFlag(flags, "organization-id") || undefined,
|
|
13
|
+
permissions: listFlag(flags, "permissions"),
|
|
14
|
+
roles: listFlag(flags, "roles"),
|
|
15
|
+
userId
|
|
16
|
+
};
|
|
17
|
+
if (!body.roles && !body.permissions)
|
|
18
|
+
throw new Error("Provide --roles and/or --permissions to grant.");
|
|
19
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
20
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/users/access", request: body }, flags);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
await confirmMutation(flags, `Grant access to IAM user '${userId}'.`);
|
|
24
|
+
const projectKey = await selectedProject(flags);
|
|
25
|
+
const result = await blocksRequest("/iam/v4/iam/users/access", {
|
|
26
|
+
body,
|
|
27
|
+
impersonatedProjectAuth: true,
|
|
28
|
+
...requestContext(flags),
|
|
29
|
+
projectTenantId: projectKey
|
|
30
|
+
});
|
|
31
|
+
writeOutput(result, flags);
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersAccessRevoke(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
5
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
6
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
7
|
+
export async function iamUsersAccessRevoke(argv) {
|
|
8
|
+
const { args, flags } = parseCommand(argv);
|
|
9
|
+
const userId = args[0] || stringFlag(flags, "user-id", { required: true });
|
|
10
|
+
const body = { organizationId: stringFlag(flags, "organization-id") || undefined, userId };
|
|
11
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
12
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/users/revoke-access", request: body }, flags);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
await confirmMutation(flags, `Revoke access for IAM user '${userId}'.`);
|
|
16
|
+
const projectKey = await selectedProject(flags);
|
|
17
|
+
const result = await blocksRequest("/iam/v4/iam/users/revoke-access", {
|
|
18
|
+
body,
|
|
19
|
+
impersonatedProjectAuth: true,
|
|
20
|
+
...requestContext(flags),
|
|
21
|
+
projectTenantId: projectKey
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersActivate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
5
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
6
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
7
|
+
export async function iamUsersActivate(argv) {
|
|
8
|
+
const { args, flags } = parseCommand(argv);
|
|
9
|
+
const userId = args[0] || stringFlag(flags, "user-id", { required: true });
|
|
10
|
+
const body = { reason: stringFlag(flags, "reason") || undefined, userId };
|
|
11
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
12
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/users/activate", request: body }, flags);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
await confirmMutation(flags, `Activate IAM user '${userId}'.`);
|
|
16
|
+
const projectKey = await selectedProject(flags);
|
|
17
|
+
const result = await blocksRequest("/iam/v4/iam/users/activate", {
|
|
18
|
+
body,
|
|
19
|
+
impersonatedProjectAuth: true,
|
|
20
|
+
...requestContext(flags),
|
|
21
|
+
projectTenantId: projectKey
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersCreate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { compact, jsonBodyFlag, listFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamUsersCreate(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
email: stringFlag(flags, "email") || undefined,
|
|
14
|
+
firstName: stringFlag(flags, "first-name") || undefined,
|
|
15
|
+
lastName: stringFlag(flags, "last-name") || undefined,
|
|
16
|
+
organizationId: stringFlag(flags, "organization-id") || undefined,
|
|
17
|
+
password: stringFlag(flags, "password") || undefined,
|
|
18
|
+
permissions: listFlag(flags, "permissions"),
|
|
19
|
+
phoneNumber: stringFlag(flags, "phone-number") || undefined,
|
|
20
|
+
roles: listFlag(flags, "roles"),
|
|
21
|
+
userName: stringFlag(flags, "user-name") || undefined
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
if (!body.email && !body.userName)
|
|
25
|
+
throw new Error("Provide --email or --user-name (or set it in --body/--file).");
|
|
26
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
27
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/users/create", request: body }, flags);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
await confirmMutation(flags, `Create IAM user '${body.email ?? body.userName}'.`);
|
|
31
|
+
const projectKey = await selectedProject(flags);
|
|
32
|
+
const result = await blocksRequest("/iam/v4/iam/users/create", {
|
|
33
|
+
body,
|
|
34
|
+
impersonatedProjectAuth: true,
|
|
35
|
+
...requestContext(flags),
|
|
36
|
+
projectTenantId: projectKey
|
|
37
|
+
});
|
|
38
|
+
writeOutput(result, flags);
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersDeactivate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
5
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
6
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
7
|
+
export async function iamUsersDeactivate(argv) {
|
|
8
|
+
const { args, flags } = parseCommand(argv);
|
|
9
|
+
const userId = args[0] || stringFlag(flags, "user-id", { required: true });
|
|
10
|
+
const body = { userId };
|
|
11
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
12
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/users/deactivate", request: body }, flags);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
await confirmMutation(flags, `Deactivate IAM user '${userId}'.`);
|
|
16
|
+
const projectKey = await selectedProject(flags);
|
|
17
|
+
const result = await blocksRequest("/iam/v4/iam/users/deactivate", {
|
|
18
|
+
body,
|
|
19
|
+
impersonatedProjectAuth: true,
|
|
20
|
+
...requestContext(flags),
|
|
21
|
+
projectTenantId: projectKey
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersExists(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
4
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
5
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
6
|
+
export async function iamUsersExists(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const email = args[0] || stringFlag(flags, "email", { required: true });
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const result = await blocksRequest("/iam/v4/iam/users/exists", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { email }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersGet(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
4
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
5
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
6
|
+
export async function iamUsersGet(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const id = args[0] || stringFlag(flags, "id", { required: true });
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const result = await blocksRequest(`/iam/v4/iam/users/${encodeURIComponent(id)}`, {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { organizationId: stringFlag(flags, "organization-id") || undefined }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersList(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { integerFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { compact, jsonBodyFlag } from "../../../lib/json-flag.js";
|
|
4
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
5
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
6
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
7
|
+
export async function iamUsersList(argv) {
|
|
8
|
+
const { flags } = parseCommand(argv);
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const filter = {
|
|
11
|
+
...(await jsonBodyFlag(flags)).filter,
|
|
12
|
+
...compact({
|
|
13
|
+
email: stringFlag(flags, "email") || undefined,
|
|
14
|
+
name: stringFlag(flags, "name") || undefined,
|
|
15
|
+
organizationId: stringFlag(flags, "organization-id") || undefined
|
|
16
|
+
})
|
|
17
|
+
};
|
|
18
|
+
const body = {
|
|
19
|
+
page: integerFlag(flags, "page", 1),
|
|
20
|
+
pageSize: integerFlag(flags, "page-size", 20),
|
|
21
|
+
sort: {
|
|
22
|
+
isDescending: stringFlag(flags, "sort-desc") === "true",
|
|
23
|
+
property: stringFlag(flags, "sort-by") || undefined
|
|
24
|
+
},
|
|
25
|
+
filter
|
|
26
|
+
};
|
|
27
|
+
const result = await blocksRequest("/iam/v4/iam/users", {
|
|
28
|
+
body,
|
|
29
|
+
impersonatedProjectAuth: true,
|
|
30
|
+
...requestContext(flags),
|
|
31
|
+
projectTenantId: projectKey
|
|
32
|
+
});
|
|
33
|
+
writeOutput(result, flags);
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamUsersUpdate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { booleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { confirmMutation } from "../../../lib/confirm.js";
|
|
4
|
+
import { compact, jsonBodyFlag, listFlag } from "../../../lib/json-flag.js";
|
|
5
|
+
import { writeOutput } from "../../../lib/output.js";
|
|
6
|
+
import { requestContext } from "../../../lib/request-context.js";
|
|
7
|
+
import { parseCommand, selectedProject } from "../../../lib/workspace.js";
|
|
8
|
+
export async function iamUsersUpdate(argv) {
|
|
9
|
+
const { args, flags } = parseCommand(argv);
|
|
10
|
+
const id = args[0] || stringFlag(flags, "id", { required: true });
|
|
11
|
+
const body = {
|
|
12
|
+
...(await jsonBodyFlag(flags)),
|
|
13
|
+
...compact({
|
|
14
|
+
firstName: stringFlag(flags, "first-name") || undefined,
|
|
15
|
+
lastName: stringFlag(flags, "last-name") || undefined,
|
|
16
|
+
organizationId: stringFlag(flags, "organization-id") || undefined,
|
|
17
|
+
permissions: listFlag(flags, "permissions"),
|
|
18
|
+
phoneNumber: stringFlag(flags, "phone-number") || undefined,
|
|
19
|
+
roles: listFlag(flags, "roles")
|
|
20
|
+
})
|
|
21
|
+
};
|
|
22
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
23
|
+
writeOutput({ dryRun: true, endpoint: `/iam/v4/iam/users/${id}`, request: body }, flags);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
await confirmMutation(flags, `Update IAM user '${id}'.`);
|
|
27
|
+
const projectKey = await selectedProject(flags);
|
|
28
|
+
const result = await blocksRequest(`/iam/v4/iam/users/${encodeURIComponent(id)}`, {
|
|
29
|
+
body,
|
|
30
|
+
impersonatedProjectAuth: true,
|
|
31
|
+
...requestContext(flags),
|
|
32
|
+
projectTenantId: projectKey
|
|
33
|
+
});
|
|
34
|
+
writeOutput(result, flags);
|
|
35
|
+
}
|