@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,18 @@
|
|
|
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 dataValidationBySchemaField(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const schemaId = args[0] || stringFlag(flags, "schema-id", { required: true });
|
|
9
|
+
const fieldName = args[1] || stringFlag(flags, "field-name", { required: true });
|
|
10
|
+
const projectKey = await selectedProject(flags);
|
|
11
|
+
const result = await blocksRequest("/data/v4/data-validations/by-schema-and-field", {
|
|
12
|
+
impersonatedProjectAuth: true,
|
|
13
|
+
...requestContext(flags),
|
|
14
|
+
projectTenantId: projectKey,
|
|
15
|
+
query: { fieldName, schemaId }
|
|
16
|
+
});
|
|
17
|
+
writeOutput(result, flags);
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dataValidationBySchema(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 dataValidationBySchema(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const schemaId = args[0] || stringFlag(flags, "schema-id", { required: true });
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const result = await blocksRequest("/data/v4/data-validations/by-schema-id", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { schemaId }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dataValidationDelete(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 dataValidationDelete(argv) {
|
|
8
|
+
const { args, flags } = parseCommand(argv);
|
|
9
|
+
const validationId = args[0] || stringFlag(flags, "validation-id", { required: true });
|
|
10
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
11
|
+
writeOutput({ dryRun: true, endpoint: "/data/v4/data-validations", validationId }, flags);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
await confirmMutation(flags, `Delete data validation '${validationId}'.`);
|
|
15
|
+
const projectKey = await selectedProject(flags);
|
|
16
|
+
const result = await blocksRequest("/data/v4/data-validations", {
|
|
17
|
+
impersonatedProjectAuth: true,
|
|
18
|
+
method: "DELETE",
|
|
19
|
+
...requestContext(flags),
|
|
20
|
+
projectTenantId: projectKey,
|
|
21
|
+
query: { validationId }
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dataValidationGet(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 dataValidationGet(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const validationId = args[0] || stringFlag(flags, "validation-id", { required: true });
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const result = await blocksRequest("/data/v4/data-validations/get-by-id", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { validationId }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dataValidationList(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { booleanFlag, integerFlag, 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 dataValidationList(argv) {
|
|
7
|
+
const { flags } = parseCommand(argv);
|
|
8
|
+
const projectKey = await selectedProject(flags);
|
|
9
|
+
const result = await blocksRequest("/data/v4/data-validations", {
|
|
10
|
+
impersonatedProjectAuth: true,
|
|
11
|
+
...requestContext(flags),
|
|
12
|
+
projectTenantId: projectKey,
|
|
13
|
+
query: {
|
|
14
|
+
FieldName: stringFlag(flags, "field-name") || undefined,
|
|
15
|
+
Keyword: stringFlag(flags, "keyword") || undefined,
|
|
16
|
+
PageNo: integerFlag(flags, "page", 1),
|
|
17
|
+
PageSize: integerFlag(flags, "page-size", 100),
|
|
18
|
+
ProjectKey: projectKey,
|
|
19
|
+
SchemaId: stringFlag(flags, "schema-id") || undefined,
|
|
20
|
+
SortBy: stringFlag(flags, "sort-by") || undefined,
|
|
21
|
+
SortDescending: booleanFlag(flags, "sort-desc") || undefined
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
writeOutput(result, flags);
|
|
25
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upsert: omit --item-id to create, pass it to update. `validations` (an array of
|
|
3
|
+
* { type, value, secondaryValue?, errorMessage?, isActive }) has no scalar flag
|
|
4
|
+
* equivalent - pass it via --body/--file, e.g. --body '{"validations":[{"type":1,"value":"^[0-9]+$","isActive":true}]}'.
|
|
5
|
+
*/
|
|
6
|
+
export declare function dataValidationSave(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* Upsert: omit --item-id to create, pass it to update. `validations` (an array of
|
|
10
|
+
* { type, value, secondaryValue?, errorMessage?, isActive }) has no scalar flag
|
|
11
|
+
* equivalent - pass it via --body/--file, e.g. --body '{"validations":[{"type":1,"value":"^[0-9]+$","isActive":true}]}'.
|
|
12
|
+
*/
|
|
13
|
+
export async function dataValidationSave(argv) {
|
|
14
|
+
const { flags } = parseCommand(argv);
|
|
15
|
+
const body = {
|
|
16
|
+
...(await jsonBodyFlag(flags)),
|
|
17
|
+
...compact({
|
|
18
|
+
fieldName: stringFlag(flags, "field-name") || undefined,
|
|
19
|
+
itemId: stringFlag(flags, "item-id") || undefined,
|
|
20
|
+
schemaId: stringFlag(flags, "schema-id") || undefined
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
if (!body.schemaId)
|
|
24
|
+
throw new Error("Provide --schema-id (or set it in --body/--file).");
|
|
25
|
+
if (!body.fieldName)
|
|
26
|
+
throw new Error("Provide --field-name (or set it in --body/--file).");
|
|
27
|
+
if (!Array.isArray(body.validations) || !body.validations.length) {
|
|
28
|
+
throw new Error("Provide validation rules via --body/--file, e.g. { \"validations\": [{ \"type\": 1, \"value\": \"...\", \"isActive\": true }] }.");
|
|
29
|
+
}
|
|
30
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
31
|
+
writeOutput({ dryRun: true, endpoint: "/data/v4/data-validations", request: body }, flags);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
await confirmMutation(flags, `Save data validation for schema '${body.schemaId}' field '${body.fieldName}'.`);
|
|
35
|
+
const projectKey = await selectedProject(flags);
|
|
36
|
+
const result = await blocksRequest("/data/v4/data-validations", {
|
|
37
|
+
body,
|
|
38
|
+
impersonatedProjectAuth: true,
|
|
39
|
+
method: body.itemId ? "PUT" : "POST",
|
|
40
|
+
...requestContext(flags),
|
|
41
|
+
projectTenantId: projectKey
|
|
42
|
+
});
|
|
43
|
+
writeOutput(result, flags);
|
|
44
|
+
}
|
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { stringFlag } from "../lib/args.js";
|
|
2
|
+
import { stopProjectImpersonation } from "../lib/auth.js";
|
|
3
|
+
import { readConfig } from "../lib/config.js";
|
|
4
4
|
import { clearSelectedProject, parseCommand } from "../lib/workspace.js";
|
|
5
5
|
export async function deselectProject(argv) {
|
|
6
6
|
const { flags } = parseCommand(argv);
|
|
7
|
+
const accountName = stringFlag(flags, "account") || undefined;
|
|
7
8
|
const config = await readConfig();
|
|
8
|
-
const
|
|
9
|
-
const account = normalizeAccountName(accountName ?? config.activeAccount);
|
|
10
|
-
const tenantId = await clearSelectedProject();
|
|
9
|
+
const tenantId = config.selectedProject?.tenantId;
|
|
11
10
|
if (!tenantId) {
|
|
12
11
|
console.log("No project is currently selected.");
|
|
13
12
|
return;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[account]: {
|
|
23
|
-
...store.accounts[account],
|
|
24
|
-
projects: remainingProjects
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
console.log(`Deselected project tenant ${tenantId}.`);
|
|
30
|
-
console.log("Run 'blocks-os use <tenantId>' to select a project again.");
|
|
14
|
+
// Stop-impersonation restores a fresh account refresh token and drops the
|
|
15
|
+
// project's cached token from the store, so there's nothing left to clean
|
|
16
|
+
// up here beyond the selection itself.
|
|
17
|
+
await stopProjectImpersonation(accountName, tenantId);
|
|
18
|
+
await clearSelectedProject();
|
|
19
|
+
console.log(`Deselected project tenant ${tenantId}. Account session restored.`);
|
|
20
|
+
console.log("Run 'blocks use <tenantId>' to select a project again.");
|
|
31
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamEmailAvailable(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 iamEmailAvailable(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/email/available", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { Email: email }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
package/dist/commands/iam/me.js
CHANGED
|
@@ -4,8 +4,11 @@ import { requestContext } from "../../lib/request-context.js";
|
|
|
4
4
|
import { parseCommand } from "../../lib/workspace.js";
|
|
5
5
|
export async function iamMe(argv = []) {
|
|
6
6
|
const { flags } = parseCommand(argv);
|
|
7
|
+
// The server resets to the root tenant's identity for this endpoint
|
|
8
|
+
// regardless of which token calls it, so the impersonated project session
|
|
9
|
+
// works fine here too -- prefer it when a project is selected.
|
|
7
10
|
const me = await blocksRequest("/iam/v4/iam/me", {
|
|
8
|
-
|
|
11
|
+
preferImpersonatedProjectAuth: true,
|
|
9
12
|
...requestContext(flags)
|
|
10
13
|
});
|
|
11
14
|
writeOutput(me, { ...flags, json: true });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamOrganizationsConfigGet(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 iamOrganizationsConfigGet(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/iam/organizations/config", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamOrganizationsConfigSave(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 } 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 iamOrganizationsConfigSave(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
allowOrgCreationFromCloud: booleanFlag(flags, "allow-org-creation-from-cloud") || undefined,
|
|
14
|
+
allowOrgCreationFromConstruct: booleanFlag(flags, "allow-org-creation-from-construct") || undefined,
|
|
15
|
+
allowOrgCreationFromPortal: booleanFlag(flags, "allow-org-creation-from-portal") || undefined,
|
|
16
|
+
allowOrgCreationFromSignup: booleanFlag(flags, "allow-org-creation-from-signup") || undefined,
|
|
17
|
+
consentForMultiOrgEnable: booleanFlag(flags, "consent-for-multi-org-enable") || undefined,
|
|
18
|
+
isMultiOrgEnabled: booleanFlag(flags, "multi-org-enabled") || undefined
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
22
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/organizations/config", request: body }, flags);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
await confirmMutation(flags, "Save IAM organization configuration for the selected project.");
|
|
26
|
+
const projectKey = await selectedProject(flags);
|
|
27
|
+
const result = await blocksRequest("/iam/v4/iam/organizations/config", {
|
|
28
|
+
body,
|
|
29
|
+
impersonatedProjectAuth: true,
|
|
30
|
+
...requestContext(flags),
|
|
31
|
+
projectTenantId: projectKey
|
|
32
|
+
});
|
|
33
|
+
writeOutput(result, flags);
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamOrganizationsCreate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,37 @@
|
|
|
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 iamOrganizationsCreate(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
defaultPermissionsForMembers: listFlag(flags, "default-permissions"),
|
|
14
|
+
defaultRoleForMembers: listFlag(flags, "default-roles"),
|
|
15
|
+
description: stringFlag(flags, "description") || undefined,
|
|
16
|
+
email: stringFlag(flags, "email") || undefined,
|
|
17
|
+
name: stringFlag(flags, "name") || undefined,
|
|
18
|
+
phoneNumber: stringFlag(flags, "phone-number") || undefined,
|
|
19
|
+
websiteUrl: stringFlag(flags, "website-url") || undefined
|
|
20
|
+
})
|
|
21
|
+
};
|
|
22
|
+
if (!body.name)
|
|
23
|
+
throw new Error("Provide --name (or set it in --body/--file).");
|
|
24
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
25
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/organizations/create", request: body }, flags);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
await confirmMutation(flags, `Create IAM organization '${body.name}'.`);
|
|
29
|
+
const projectKey = await selectedProject(flags);
|
|
30
|
+
const result = await blocksRequest("/iam/v4/iam/organizations/create", {
|
|
31
|
+
body,
|
|
32
|
+
impersonatedProjectAuth: true,
|
|
33
|
+
...requestContext(flags),
|
|
34
|
+
projectTenantId: projectKey
|
|
35
|
+
});
|
|
36
|
+
writeOutput(result, flags);
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamOrganizationsGet(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 iamOrganizationsGet(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/organizations/${encodeURIComponent(id)}`, {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey
|
|
14
|
+
});
|
|
15
|
+
writeOutput(result, flags);
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamOrganizationsList(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { integerFlag, optionalBooleanFlag, stringFlag } from "../../../lib/args.js";
|
|
2
|
+
import { blocksRequest } from "../../../lib/api.js";
|
|
3
|
+
import { 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 iamOrganizationsList(argv) {
|
|
8
|
+
const { flags } = parseCommand(argv);
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const result = await blocksRequest("/iam/v4/iam/organizations", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: {
|
|
15
|
+
"Filter.Ids": listFlag(flags, "ids")?.join(","),
|
|
16
|
+
"Filter.IsDisabled": optionalBooleanFlag(flags, "is-disabled"),
|
|
17
|
+
"Filter.ParentOrganizationId": stringFlag(flags, "parent-organization-id") || undefined,
|
|
18
|
+
"Filter.Search": stringFlag(flags, "search") || undefined,
|
|
19
|
+
Page: integerFlag(flags, "page", 1),
|
|
20
|
+
PageSize: integerFlag(flags, "page-size", 20),
|
|
21
|
+
"Sort.IsDescending": optionalBooleanFlag(flags, "sort-desc"),
|
|
22
|
+
"Sort.Property": stringFlag(flags, "sort-by") || undefined
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
writeOutput(result, flags);
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamOrganizationsMy(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 iamOrganizationsMy(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/iam/organizations/my", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamOrganizationsUpdate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { booleanFlag, optionalBooleanFlag, 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 iamOrganizationsUpdate(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
|
+
currency: stringFlag(flags, "currency") || undefined,
|
|
15
|
+
description: stringFlag(flags, "description") || undefined,
|
|
16
|
+
email: stringFlag(flags, "email") || undefined,
|
|
17
|
+
industry: stringFlag(flags, "industry") || undefined,
|
|
18
|
+
isEnable: optionalBooleanFlag(flags, "is-enabled"),
|
|
19
|
+
locale: stringFlag(flags, "locale") || undefined,
|
|
20
|
+
name: stringFlag(flags, "name") || undefined,
|
|
21
|
+
phoneNumber: stringFlag(flags, "phone-number") || undefined,
|
|
22
|
+
timeZone: stringFlag(flags, "time-zone") || undefined,
|
|
23
|
+
websiteUrl: stringFlag(flags, "website-url") || undefined
|
|
24
|
+
})
|
|
25
|
+
};
|
|
26
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
27
|
+
writeOutput({ dryRun: true, endpoint: `/iam/v4/iam/organizations/${id}`, request: body }, flags);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
await confirmMutation(flags, `Update IAM organization '${id}'.`);
|
|
31
|
+
const projectKey = await selectedProject(flags);
|
|
32
|
+
const result = await blocksRequest(`/iam/v4/iam/organizations/${encodeURIComponent(id)}`, {
|
|
33
|
+
body,
|
|
34
|
+
impersonatedProjectAuth: true,
|
|
35
|
+
...requestContext(flags),
|
|
36
|
+
projectTenantId: projectKey
|
|
37
|
+
});
|
|
38
|
+
writeOutput(result, flags);
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamPermissionsBySeverity(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 iamPermissionsBySeverity(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/iam/permissions/by-severity", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamPermissionsCreate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 iamPermissionsCreate(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
dependentPermissions: listFlag(flags, "dependent-permissions"),
|
|
14
|
+
description: stringFlag(flags, "description") || undefined,
|
|
15
|
+
isBuiltIn: optionalBooleanFlag(flags, "is-built-in"),
|
|
16
|
+
name: stringFlag(flags, "name") || undefined,
|
|
17
|
+
permissionSeverity: optionalIntegerFlag(flags, "severity"),
|
|
18
|
+
resource: stringFlag(flags, "resource") || undefined,
|
|
19
|
+
resourceGroup: stringFlag(flags, "resource-group") || undefined,
|
|
20
|
+
tags: listFlag(flags, "tags"),
|
|
21
|
+
type: optionalIntegerFlag(flags, "type")
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
if (!body.name)
|
|
25
|
+
throw new Error("Provide --name (or set it in --body/--file).");
|
|
26
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
27
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/iam/permissions/create", request: body }, flags);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
await confirmMutation(flags, `Create IAM permission '${body.name}'.`);
|
|
31
|
+
const projectKey = await selectedProject(flags);
|
|
32
|
+
const result = await blocksRequest("/iam/v4/iam/permissions/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 iamPermissionsGet(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 iamPermissionsGet(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/permissions/${encodeURIComponent(id)}`, {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey
|
|
14
|
+
});
|
|
15
|
+
writeOutput(result, flags);
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamPermissionsList(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { integerFlag, optionalBooleanFlag, optionalIntegerFlag, 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 iamPermissionsList(argv) {
|
|
8
|
+
const { flags } = parseCommand(argv);
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const filter = {
|
|
11
|
+
...(await jsonBodyFlag(flags)).filter,
|
|
12
|
+
...compact({
|
|
13
|
+
isArchived: optionalBooleanFlag(flags, "is-archived"),
|
|
14
|
+
isBuiltIn: stringFlag(flags, "is-built-in") || undefined,
|
|
15
|
+
permissionSeverity: optionalIntegerFlag(flags, "severity"),
|
|
16
|
+
resourceGroup: stringFlag(flags, "resource-group") || undefined,
|
|
17
|
+
resources: listFlag(flags, "resources"),
|
|
18
|
+
search: stringFlag(flags, "search") || undefined,
|
|
19
|
+
tags: listFlag(flags, "tags"),
|
|
20
|
+
type: optionalIntegerFlag(flags, "type")
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
const body = {
|
|
24
|
+
filter,
|
|
25
|
+
organizationId: stringFlag(flags, "organization-id") || undefined,
|
|
26
|
+
page: integerFlag(flags, "page", 1),
|
|
27
|
+
pageSize: integerFlag(flags, "page-size", 20),
|
|
28
|
+
roles: listFlag(flags, "roles"),
|
|
29
|
+
sort: {
|
|
30
|
+
isDescending: stringFlag(flags, "sort-desc") === "true",
|
|
31
|
+
property: stringFlag(flags, "sort-by") || undefined
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const result = await blocksRequest("/iam/v4/iam/permissions", {
|
|
35
|
+
body,
|
|
36
|
+
impersonatedProjectAuth: true,
|
|
37
|
+
...requestContext(flags),
|
|
38
|
+
projectTenantId: projectKey
|
|
39
|
+
});
|
|
40
|
+
writeOutput(result, flags);
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function iamPermissionsUpdate(argv: string[]): Promise<void>;
|