@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 @@
|
|
|
1
|
+
export declare function localizationModuleTagGlossary(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 localizationModuleTagGlossary(argv) {
|
|
9
|
+
const { args, flags } = parseCommand(argv);
|
|
10
|
+
const moduleId = args[0] || stringFlag(flags, "module-id", { required: true });
|
|
11
|
+
const glossaryIds = listFlag(flags, "glossary-ids");
|
|
12
|
+
if (!glossaryIds?.length)
|
|
13
|
+
throw new Error("Provide --glossary-ids a,b.");
|
|
14
|
+
const body = { glossaryIds, moduleId };
|
|
15
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
16
|
+
writeOutput({ dryRun: true, endpoint: "/localization/v4/Module/TagGlossary", request: body }, flags);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
await confirmMutation(flags, `Tag ${glossaryIds.length} glossary term(s) to module '${moduleId}'.`);
|
|
20
|
+
const projectTenantId = await selectedProject(flags);
|
|
21
|
+
const result = await blocksRequest("/localization/v4/Module/TagGlossary", {
|
|
22
|
+
body,
|
|
23
|
+
impersonatedProjectAuth: true,
|
|
24
|
+
...requestContext(flags),
|
|
25
|
+
projectTenantId
|
|
26
|
+
});
|
|
27
|
+
writeOutput(result, flags);
|
|
28
|
+
}
|
package/dist/commands/login.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { parseFlags, stringFlag } from "../lib/args.js";
|
|
2
|
-
import { pollDeviceToken, requestDeviceAuthorization } from "../lib/auth.js";
|
|
2
|
+
import { getImpersonatedProjectSession, pollDeviceToken, requestDeviceAuthorization } from "../lib/auth.js";
|
|
3
3
|
import { getAccountProfile, readConfig, writeConfig } from "../lib/config.js";
|
|
4
4
|
import { openBrowser } from "../lib/open-browser.js";
|
|
5
|
+
import { listProjectGroups } from "../lib/project-info.js";
|
|
5
6
|
import { applyAccountToken } from "../lib/token.js";
|
|
6
7
|
import { readTokenStore, writeTokenStore } from "../lib/token-store.js";
|
|
8
|
+
import { readWorkspaceConfig } from "../lib/workspace.js";
|
|
7
9
|
export async function login(argv) {
|
|
8
10
|
const { flags } = parseFlags(argv);
|
|
9
11
|
const accountOverride = stringFlag(flags, "account");
|
|
@@ -32,4 +34,33 @@ export async function login(argv) {
|
|
|
32
34
|
await writeConfig(next.config);
|
|
33
35
|
await writeTokenStore(next.store);
|
|
34
36
|
console.log("Login done.");
|
|
37
|
+
const workspace = await readWorkspaceConfig();
|
|
38
|
+
const rememberedTenantId = workspace.project?.tenantId ?? next.config.selectedProject?.tenantId;
|
|
39
|
+
if (rememberedTenantId) {
|
|
40
|
+
try {
|
|
41
|
+
await getImpersonatedProjectSession(name, rememberedTenantId);
|
|
42
|
+
console.log(`Re-selected project tenant ${rememberedTenantId}.`);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
console.log(`Could not re-select project tenant ${rememberedTenantId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
46
|
+
console.log("Run 'blocks use <tenantId>' to select a project.");
|
|
47
|
+
}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
const groups = await listProjectGroups(flags);
|
|
52
|
+
const projects = groups.flatMap((group) => group.projects ?? []);
|
|
53
|
+
if (projects.length === 0) {
|
|
54
|
+
console.log("No projects found for this account.");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
console.log("Available projects:");
|
|
58
|
+
for (const project of projects) {
|
|
59
|
+
console.log(` ${project.tenantId ?? "-"} ${project.name ?? "-"} ${project.environment ?? "-"}`);
|
|
60
|
+
}
|
|
61
|
+
console.log("Run 'blocks use <tenantId>' to select one.");
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.log(`Could not list projects: ${error instanceof Error ? error.message : String(error)}`);
|
|
65
|
+
}
|
|
35
66
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailConfigDelete(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 mailConfigDelete(argv) {
|
|
8
|
+
const { args, flags } = parseCommand(argv);
|
|
9
|
+
const id = args[0] || stringFlag(flags, "id", { required: true });
|
|
10
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
11
|
+
writeOutput({ dryRun: true, endpoint: "/os/v4/Mail/Delete", query: { ConfigurationId: id } }, flags);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
await confirmMutation(flags, `Delete mail configuration '${id}'.`);
|
|
15
|
+
const projectKey = await selectedProject(flags);
|
|
16
|
+
const result = await blocksRequest("/os/v4/Mail/Delete", {
|
|
17
|
+
impersonatedProjectAuth: true,
|
|
18
|
+
method: "DELETE",
|
|
19
|
+
...requestContext(flags),
|
|
20
|
+
projectTenantId: projectKey,
|
|
21
|
+
query: { ConfigurationId: id }
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailConfigDuplicate(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 mailConfigDuplicate(argv) {
|
|
8
|
+
const { args, flags } = parseCommand(argv);
|
|
9
|
+
const id = args[0] || stringFlag(flags, "id", { required: true });
|
|
10
|
+
const body = { configurationId: id };
|
|
11
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
12
|
+
writeOutput({ dryRun: true, endpoint: "/os/v4/Mail/Duplicate", request: body }, flags);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
await confirmMutation(flags, `Duplicate mail configuration '${id}'.`);
|
|
16
|
+
const projectKey = await selectedProject(flags);
|
|
17
|
+
const result = await blocksRequest("/os/v4/Mail/Duplicate", {
|
|
18
|
+
body,
|
|
19
|
+
impersonatedProjectAuth: true,
|
|
20
|
+
...requestContext(flags),
|
|
21
|
+
projectTenantId: projectKey
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailConfigGet(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 mailConfigGet(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const name = args[0] || stringFlag(flags, "name", { required: true });
|
|
9
|
+
const projectKey = await selectedProject(flags);
|
|
10
|
+
const result = await blocksRequest("/os/v4/Mail/Get", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { ConfigurationName: name }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailConfigList(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 mailConfigList(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/os/v4/Mail/Gets", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailConfigSave(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { booleanFlag, optionalIntegerFlag, 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 mailConfigSave(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
accountPassword: stringFlag(flags, "account-password") || undefined,
|
|
14
|
+
configurationId: stringFlag(flags, "configuration-id") || undefined,
|
|
15
|
+
configurationName: stringFlag(flags, "name") || undefined,
|
|
16
|
+
enableSSL: booleanFlag(flags, "enable-ssl") || undefined,
|
|
17
|
+
host: stringFlag(flags, "host") || undefined,
|
|
18
|
+
isInbound: booleanFlag(flags, "inbound") || undefined,
|
|
19
|
+
port: optionalIntegerFlag(flags, "port"),
|
|
20
|
+
provider: optionalIntegerFlag(flags, "provider"),
|
|
21
|
+
senderAddress: stringFlag(flags, "sender-address") || undefined,
|
|
22
|
+
senderName: stringFlag(flags, "sender-name") || undefined,
|
|
23
|
+
senderUserName: stringFlag(flags, "sender-username") || undefined
|
|
24
|
+
})
|
|
25
|
+
};
|
|
26
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
27
|
+
writeOutput({ dryRun: true, endpoint: "/os/v4/Mail/Save", request: redactSecret(body) }, flags);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
await confirmMutation(flags, `Save mail configuration '${body.configurationName ?? body.configurationId ?? ""}'.`);
|
|
31
|
+
const projectKey = await selectedProject(flags);
|
|
32
|
+
const result = await blocksRequest("/os/v4/Mail/Save", {
|
|
33
|
+
body,
|
|
34
|
+
impersonatedProjectAuth: true,
|
|
35
|
+
...requestContext(flags),
|
|
36
|
+
projectTenantId: projectKey
|
|
37
|
+
});
|
|
38
|
+
writeOutput(result, flags);
|
|
39
|
+
}
|
|
40
|
+
function redactSecret(body) {
|
|
41
|
+
if (!body.accountPassword)
|
|
42
|
+
return body;
|
|
43
|
+
return { ...body, accountPassword: "***" };
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailMailboxGet(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 mailMailboxGet(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("/os/v4/Mail/GetMailBoxMail", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { MessageId: id }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailMailboxList(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { integerFlag, 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 mailMailboxList(argv) {
|
|
7
|
+
const { flags } = parseCommand(argv);
|
|
8
|
+
const projectKey = await selectedProject(flags);
|
|
9
|
+
const result = await blocksRequest("/os/v4/Mail/GetMailBoxMails", {
|
|
10
|
+
impersonatedProjectAuth: true,
|
|
11
|
+
...requestContext(flags),
|
|
12
|
+
projectTenantId: projectKey,
|
|
13
|
+
query: {
|
|
14
|
+
IsInbound: optionalBooleanFlag(flags, "inbound"),
|
|
15
|
+
PageNumber: integerFlag(flags, "page-number", 1),
|
|
16
|
+
PageSize: integerFlag(flags, "page-size", 20),
|
|
17
|
+
SearchText: stringFlag(flags, "search") || undefined,
|
|
18
|
+
"SendDateRange.EndDate": stringFlag(flags, "end-date") || undefined,
|
|
19
|
+
"SendDateRange.StartDate": stringFlag(flags, "start-date") || undefined,
|
|
20
|
+
Status: stringFlag(flags, "status") || undefined
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailSend(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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, jsonFlag, 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
|
+
const MAIL_SEND_API = "/logic/v4/Mail/Send";
|
|
9
|
+
export async function mailSend(argv) {
|
|
10
|
+
const { flags } = parseCommand(argv);
|
|
11
|
+
const projectKey = await selectedProject(flags);
|
|
12
|
+
const body = {
|
|
13
|
+
...(await jsonBodyFlag(flags)),
|
|
14
|
+
...compact({
|
|
15
|
+
attachments: jsonFlag(flags, "attachments"),
|
|
16
|
+
bcc: listFlag(flags, "bcc"),
|
|
17
|
+
bodyDataContext: jsonFlag(flags, "body-data-context"),
|
|
18
|
+
cc: listFlag(flags, "cc"),
|
|
19
|
+
language: stringFlag(flags, "language") || undefined,
|
|
20
|
+
projectKey: stringFlag(flags, "project-key") || projectKey,
|
|
21
|
+
purpose: stringFlag(flags, "purpose") || undefined,
|
|
22
|
+
replyTo: listFlag(flags, "reply-to"),
|
|
23
|
+
sendPhoneNumberAsEmail: booleanFlag(flags, "send-phone-number-as-email") || undefined,
|
|
24
|
+
subjectDataContext: jsonFlag(flags, "subject-data-context"),
|
|
25
|
+
to: listFlag(flags, "to")
|
|
26
|
+
})
|
|
27
|
+
};
|
|
28
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
29
|
+
writeOutput({ dryRun: true, endpoint: MAIL_SEND_API, request: body }, flags);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
await confirmMutation(flags, `Send mail to ${(body.to ?? []).join(", ") || "recipient(s)"}.`);
|
|
33
|
+
const result = await blocksRequest(MAIL_SEND_API, {
|
|
34
|
+
body,
|
|
35
|
+
impersonatedProjectAuth: true,
|
|
36
|
+
...requestContext(flags),
|
|
37
|
+
projectTenantId: projectKey
|
|
38
|
+
});
|
|
39
|
+
writeOutput(result, flags);
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailSendToAny(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,41 @@
|
|
|
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, jsonFlag, 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
|
+
const MAIL_SENDTOANY_API = "/logic/v4/Mail/SendToAny";
|
|
9
|
+
export async function mailSendToAny(argv) {
|
|
10
|
+
const { flags } = parseCommand(argv);
|
|
11
|
+
const projectKey = await selectedProject(flags);
|
|
12
|
+
const body = {
|
|
13
|
+
...(await jsonBodyFlag(flags)),
|
|
14
|
+
...compact({
|
|
15
|
+
attachments: jsonFlag(flags, "attachments"),
|
|
16
|
+
bcc: listFlag(flags, "bcc"),
|
|
17
|
+
bodyDataContext: jsonFlag(flags, "body-data-context"),
|
|
18
|
+
cc: listFlag(flags, "cc"),
|
|
19
|
+
isTestMail: booleanFlag(flags, "is-test-mail") || undefined,
|
|
20
|
+
language: stringFlag(flags, "language") || undefined,
|
|
21
|
+
projectKey: stringFlag(flags, "project-key") || projectKey,
|
|
22
|
+
purpose: stringFlag(flags, "purpose") || undefined,
|
|
23
|
+
replyTo: listFlag(flags, "reply-to"),
|
|
24
|
+
sendPhoneNumberAsEmail: booleanFlag(flags, "send-phone-number-as-email") || undefined,
|
|
25
|
+
subjectDataContext: jsonFlag(flags, "subject-data-context"),
|
|
26
|
+
to: listFlag(flags, "to")
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
30
|
+
writeOutput({ dryRun: true, endpoint: MAIL_SENDTOANY_API, request: body }, flags);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
await confirmMutation(flags, `Send mail to ${(body.to ?? []).join(", ") || "recipient(s)"}.`);
|
|
34
|
+
const result = await blocksRequest(MAIL_SENDTOANY_API, {
|
|
35
|
+
body,
|
|
36
|
+
impersonatedProjectAuth: true,
|
|
37
|
+
...requestContext(flags),
|
|
38
|
+
projectTenantId: projectKey
|
|
39
|
+
});
|
|
40
|
+
writeOutput(result, flags);
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailTemplateClone(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 { compact } 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 mailTemplateClone(argv) {
|
|
9
|
+
const { args, flags } = parseCommand(argv);
|
|
10
|
+
const id = args[0] || stringFlag(flags, "id", { required: true });
|
|
11
|
+
const body = {
|
|
12
|
+
itemId: id,
|
|
13
|
+
...compact({
|
|
14
|
+
language: stringFlag(flags, "language") || undefined,
|
|
15
|
+
mailConfigurationId: stringFlag(flags, "configuration-id") || undefined,
|
|
16
|
+
name: stringFlag(flags, "name") || undefined,
|
|
17
|
+
templateSubject: stringFlag(flags, "subject") || undefined
|
|
18
|
+
})
|
|
19
|
+
};
|
|
20
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
21
|
+
writeOutput({ dryRun: true, endpoint: "/os/v4/Mail/CloneTemplate", request: body }, flags);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
await confirmMutation(flags, `Clone mail template '${id}'.`);
|
|
25
|
+
const projectKey = await selectedProject(flags);
|
|
26
|
+
const result = await blocksRequest("/os/v4/Mail/CloneTemplate", {
|
|
27
|
+
body,
|
|
28
|
+
impersonatedProjectAuth: true,
|
|
29
|
+
...requestContext(flags),
|
|
30
|
+
projectTenantId: projectKey
|
|
31
|
+
});
|
|
32
|
+
writeOutput(result, flags);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailTemplateDelete(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 mailTemplateDelete(argv) {
|
|
8
|
+
const { args, flags } = parseCommand(argv);
|
|
9
|
+
const id = args[0] || stringFlag(flags, "id", { required: true });
|
|
10
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
11
|
+
writeOutput({ dryRun: true, endpoint: "/os/v4/Mail/DeleteTemplate", query: { ItemId: id } }, flags);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
await confirmMutation(flags, `Delete mail template '${id}'.`);
|
|
15
|
+
const projectKey = await selectedProject(flags);
|
|
16
|
+
const result = await blocksRequest("/os/v4/Mail/DeleteTemplate", {
|
|
17
|
+
impersonatedProjectAuth: true,
|
|
18
|
+
method: "DELETE",
|
|
19
|
+
...requestContext(flags),
|
|
20
|
+
projectTenantId: projectKey,
|
|
21
|
+
query: { ItemId: id }
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailTemplateGet(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 mailTemplateGet(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("/os/v4/Mail/GetTemplate", {
|
|
11
|
+
impersonatedProjectAuth: true,
|
|
12
|
+
...requestContext(flags),
|
|
13
|
+
projectTenantId: projectKey,
|
|
14
|
+
query: { ItemId: id }
|
|
15
|
+
});
|
|
16
|
+
writeOutput(result, flags);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailTemplateList(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { integerFlag, 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 mailTemplateList(argv) {
|
|
7
|
+
const { flags } = parseCommand(argv);
|
|
8
|
+
const projectKey = await selectedProject(flags);
|
|
9
|
+
const result = await blocksRequest("/os/v4/Mail/GetTemplates", {
|
|
10
|
+
impersonatedProjectAuth: true,
|
|
11
|
+
...requestContext(flags),
|
|
12
|
+
projectTenantId: projectKey,
|
|
13
|
+
query: {
|
|
14
|
+
IsDescending: optionalBooleanFlag(flags, "sort-desc"),
|
|
15
|
+
Language: stringFlag(flags, "language") || undefined,
|
|
16
|
+
MailConfigurationId: stringFlag(flags, "configuration-id") || undefined,
|
|
17
|
+
PageNumber: integerFlag(flags, "page-number", 1),
|
|
18
|
+
PageSize: integerFlag(flags, "page-size", 20),
|
|
19
|
+
SearchKey: stringFlag(flags, "search") || undefined,
|
|
20
|
+
SortProperty: stringFlag(flags, "sort-by") || undefined
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
writeOutput(result, flags);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mailTemplateSave(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 } 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 mailTemplateSave(argv) {
|
|
9
|
+
const { flags } = parseCommand(argv);
|
|
10
|
+
const body = {
|
|
11
|
+
...(await jsonBodyFlag(flags)),
|
|
12
|
+
...compact({
|
|
13
|
+
imageId: stringFlag(flags, "image-id") || undefined,
|
|
14
|
+
imageUrl: stringFlag(flags, "image-url") || undefined,
|
|
15
|
+
itemId: stringFlag(flags, "item-id") || undefined,
|
|
16
|
+
jsonContent: stringFlag(flags, "json-content") || undefined,
|
|
17
|
+
language: stringFlag(flags, "language") || undefined,
|
|
18
|
+
mailConfigurationId: stringFlag(flags, "configuration-id") || undefined,
|
|
19
|
+
name: stringFlag(flags, "name") || undefined,
|
|
20
|
+
templateBody: stringFlag(flags, "template-body") || undefined,
|
|
21
|
+
templateSubject: stringFlag(flags, "subject") || undefined
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
25
|
+
writeOutput({ dryRun: true, endpoint: "/os/v4/Mail/SaveTemplate", request: body }, flags);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
await confirmMutation(flags, `Save mail template '${body.name ?? body.itemId ?? ""}'.`);
|
|
29
|
+
const projectKey = await selectedProject(flags);
|
|
30
|
+
const result = await blocksRequest("/os/v4/Mail/SaveTemplate", {
|
|
31
|
+
body,
|
|
32
|
+
impersonatedProjectAuth: true,
|
|
33
|
+
...requestContext(flags),
|
|
34
|
+
projectTenantId: projectKey
|
|
35
|
+
});
|
|
36
|
+
writeOutput(result, flags);
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mfaBackupCodesGenerate(argv: string[]): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { booleanFlag } 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 mfaBackupCodesGenerate(argv) {
|
|
8
|
+
const { flags } = parseCommand(argv);
|
|
9
|
+
if (booleanFlag(flags, "dry-run")) {
|
|
10
|
+
writeOutput({ dryRun: true, endpoint: "/iam/v4/mfa/backup-codes/generate" }, flags);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
await confirmMutation(flags, "Generate a fresh set of MFA backup codes, invalidating any existing ones.");
|
|
14
|
+
const projectKey = await selectedProject(flags);
|
|
15
|
+
const result = await blocksRequest("/iam/v4/mfa/backup-codes/generate", {
|
|
16
|
+
impersonatedProjectAuth: true,
|
|
17
|
+
method: "POST",
|
|
18
|
+
...requestContext(flags),
|
|
19
|
+
projectTenantId: projectKey
|
|
20
|
+
});
|
|
21
|
+
writeOutput(result, flags);
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mfaBackupCodesList(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 mfaBackupCodesList(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/mfa/backup-codes", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mfaBackupCodesUse(argv: string[]): Promise<void>;
|
|
@@ -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 mfaBackupCodesUse(argv) {
|
|
7
|
+
const { args, flags } = parseCommand(argv);
|
|
8
|
+
const userId = args[0] || stringFlag(flags, "user-id", { required: true });
|
|
9
|
+
const code = args[1] || stringFlag(flags, "code", { required: true });
|
|
10
|
+
const projectKey = await selectedProject(flags);
|
|
11
|
+
const result = await blocksRequest("/iam/v4/mfa/backup-codes/use", {
|
|
12
|
+
body: { code, userId },
|
|
13
|
+
impersonatedProjectAuth: true,
|
|
14
|
+
...requestContext(flags),
|
|
15
|
+
projectTenantId: projectKey
|
|
16
|
+
});
|
|
17
|
+
writeOutput(result, flags);
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mfaConfigGet(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 mfaConfigGet(argv) {
|
|
6
|
+
const { flags } = parseCommand(argv);
|
|
7
|
+
const projectKey = await selectedProject(flags);
|
|
8
|
+
const result = await blocksRequest("/iam/v4/mfa/config", {
|
|
9
|
+
impersonatedProjectAuth: true,
|
|
10
|
+
...requestContext(flags),
|
|
11
|
+
projectTenantId: projectKey
|
|
12
|
+
});
|
|
13
|
+
writeOutput(result, flags);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mfaConfigSave(argv: string[]): Promise<void>;
|