appwrite-cli 13.0.0-rc.2 → 13.0.0-rc.3
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/.github/workflows/{npm-publish.yml → publish.yml} +1 -1
- package/CHANGELOG.md +106 -101
- package/LICENSE.md +2 -2
- package/README.md +36 -59
- package/cli.ts +152 -0
- package/dist/bundle.cjs +4613 -3653
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +145 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -142
- package/dist/index.js.map +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +7 -6
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/commands/config.d.ts +562 -0
- package/dist/lib/commands/config.d.ts.map +1 -0
- package/dist/lib/commands/config.js +416 -0
- package/dist/lib/commands/config.js.map +1 -0
- package/dist/lib/commands/db.d.ts +34 -0
- package/dist/lib/commands/db.d.ts.map +1 -0
- package/dist/lib/commands/db.js +247 -0
- package/dist/lib/commands/db.js.map +1 -0
- package/dist/lib/commands/errors.d.ts +68 -0
- package/dist/lib/commands/errors.d.ts.map +1 -0
- package/dist/lib/commands/errors.js +72 -0
- package/dist/lib/commands/errors.js.map +1 -0
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/init.js +15 -14
- package/dist/lib/commands/init.js.map +1 -1
- package/dist/lib/commands/pull.d.ts +104 -2
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/pull.js +470 -281
- package/dist/lib/commands/pull.js.map +1 -1
- package/dist/lib/commands/push.d.ts +106 -0
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/push.js +1257 -1628
- package/dist/lib/commands/push.js.map +1 -1
- package/dist/lib/commands/run.js +1 -1
- package/dist/lib/commands/run.js.map +1 -1
- package/dist/lib/commands/schema.d.ts +59 -0
- package/dist/lib/commands/schema.d.ts.map +1 -0
- package/dist/lib/commands/schema.js +86 -0
- package/dist/lib/commands/schema.js.map +1 -0
- package/dist/lib/commands/services/account.d.ts.map +1 -1
- package/dist/lib/commands/services/account.js +86 -64
- package/dist/lib/commands/services/account.js.map +1 -1
- package/dist/lib/commands/services/console.d.ts.map +1 -1
- package/dist/lib/commands/services/console.js +4 -17
- package/dist/lib/commands/services/console.js.map +1 -1
- package/dist/lib/commands/services/databases.d.ts.map +1 -1
- package/dist/lib/commands/services/databases.js +160 -152
- package/dist/lib/commands/services/databases.js.map +1 -1
- package/dist/lib/commands/services/functions.d.ts.map +1 -1
- package/dist/lib/commands/services/functions.js +41 -33
- package/dist/lib/commands/services/functions.js.map +1 -1
- package/dist/lib/commands/services/graphql.d.ts.map +1 -1
- package/dist/lib/commands/services/graphql.js +3 -3
- package/dist/lib/commands/services/graphql.js.map +1 -1
- package/dist/lib/commands/services/health.d.ts.map +1 -1
- package/dist/lib/commands/services/health.js +24 -24
- package/dist/lib/commands/services/health.js.map +1 -1
- package/dist/lib/commands/services/locale.d.ts.map +1 -1
- package/dist/lib/commands/services/locale.js +9 -9
- package/dist/lib/commands/services/locale.js.map +1 -1
- package/dist/lib/commands/services/messaging.d.ts.map +1 -1
- package/dist/lib/commands/services/messaging.js +59 -59
- package/dist/lib/commands/services/messaging.js.map +1 -1
- package/dist/lib/commands/services/migrations.d.ts.map +1 -1
- package/dist/lib/commands/services/migrations.js +19 -19
- package/dist/lib/commands/services/migrations.js.map +1 -1
- package/dist/lib/commands/services/project.d.ts.map +1 -1
- package/dist/lib/commands/services/project.js +8 -8
- package/dist/lib/commands/services/project.js.map +1 -1
- package/dist/lib/commands/services/projects.d.ts.map +1 -1
- package/dist/lib/commands/services/projects.js +64 -64
- package/dist/lib/commands/services/projects.js.map +1 -1
- package/dist/lib/commands/services/proxy.d.ts.map +1 -1
- package/dist/lib/commands/services/proxy.js +11 -11
- package/dist/lib/commands/services/proxy.js.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.js +41 -33
- package/dist/lib/commands/services/sites.js.map +1 -1
- package/dist/lib/commands/services/storage.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.js +38 -16
- package/dist/lib/commands/services/storage.js.map +1 -1
- package/dist/lib/commands/services/tables-db.d.ts +3 -0
- package/dist/lib/commands/services/tables-db.d.ts.map +1 -0
- package/dist/lib/commands/services/{tablesdb.js → tables-db.js} +171 -163
- package/dist/lib/commands/services/tables-db.js.map +1 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -1
- package/dist/lib/commands/services/teams.js +16 -16
- package/dist/lib/commands/services/teams.js.map +1 -1
- package/dist/lib/commands/services/tokens.d.ts.map +1 -1
- package/dist/lib/commands/services/tokens.js +6 -6
- package/dist/lib/commands/services/tokens.js.map +1 -1
- package/dist/lib/commands/services/users.d.ts.map +1 -1
- package/dist/lib/commands/services/users.js +54 -54
- package/dist/lib/commands/services/users.js.map +1 -1
- package/dist/lib/commands/services/vcs.d.ts.map +1 -1
- package/dist/lib/commands/services/vcs.js +13 -13
- package/dist/lib/commands/services/vcs.js.map +1 -1
- package/dist/lib/commands/types.d.ts.map +1 -1
- package/dist/lib/commands/types.js +1 -1
- package/dist/lib/commands/types.js.map +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/update.js +9 -8
- package/dist/lib/commands/update.js.map +1 -1
- package/dist/lib/commands/utils/attributes.d.ts +47 -0
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
- package/dist/lib/commands/utils/attributes.js +514 -0
- package/dist/lib/commands/utils/attributes.js.map +1 -0
- package/dist/lib/commands/utils/change-approval.d.ts +25 -0
- package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
- package/dist/lib/commands/utils/change-approval.js +129 -0
- package/dist/lib/commands/utils/change-approval.js.map +1 -0
- package/dist/lib/commands/utils/database-sync.d.ts +10 -0
- package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
- package/dist/lib/commands/utils/database-sync.js +136 -0
- package/dist/lib/commands/utils/database-sync.js.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts +34 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.js +109 -0
- package/dist/lib/commands/utils/deployment.js.map +1 -0
- package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
- package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
- package/dist/lib/commands/utils/error-formatter.js +333 -0
- package/dist/lib/commands/utils/error-formatter.js.map +1 -0
- package/dist/lib/commands/utils/pools.d.ts +16 -0
- package/dist/lib/commands/utils/pools.d.ts.map +1 -0
- package/dist/lib/commands/utils/pools.js +198 -0
- package/dist/lib/commands/utils/pools.js.map +1 -0
- package/dist/lib/config.d.ts +27 -26
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +8 -45
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/constants.d.ts +14 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +19 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts +4 -4
- package/dist/lib/emulation/docker.d.ts.map +1 -1
- package/dist/lib/emulation/docker.js +80 -67
- package/dist/lib/emulation/docker.js.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/parser.js +11 -10
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/questions.js +20 -20
- package/dist/lib/questions.js.map +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/dist/lib/sdks.js +10 -11
- package/dist/lib/sdks.js.map +1 -1
- package/dist/lib/types.d.ts +0 -214
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +42 -2
- package/dist/lib/utils.js.map +1 -1
- package/dist/package.json +12 -11
- package/docs/examples/account/create-anonymous-session.md +1 -0
- package/docs/examples/account/create-email-password-session.md +3 -0
- package/docs/examples/account/create-email-token.md +3 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +1 -0
- package/docs/examples/account/create-magic-url-token.md +3 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/create-o-auth-2-session.md +2 -0
- package/docs/examples/account/create-o-auth-2-token.md +2 -0
- package/docs/examples/account/create-phone-token.md +3 -0
- package/docs/examples/account/create-phone-verification.md +1 -0
- package/docs/examples/account/create-push-target.md +3 -0
- package/docs/examples/account/create-recovery.md +3 -0
- package/docs/examples/account/create-session.md +3 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +4 -0
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/delete-mfa-authenticator.md +2 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +2 -0
- package/docs/examples/account/delete-sessions.md +1 -0
- package/docs/examples/account/delete.md +1 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/get-prefs.md +1 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +1 -0
- package/docs/examples/account/list-identities.md +1 -0
- package/docs/examples/account/list-logs.md +1 -0
- package/docs/examples/account/list-mfa-factors.md +1 -0
- package/docs/examples/account/list-sessions.md +1 -0
- package/docs/examples/account/update-email-verification.md +3 -0
- package/docs/examples/account/update-email.md +3 -0
- package/docs/examples/account/update-magic-url-session.md +3 -0
- package/docs/examples/account/update-mfa-authenticator.md +3 -0
- package/docs/examples/account/update-mfa-challenge.md +3 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -0
- package/docs/examples/account/update-password.md +2 -0
- package/docs/examples/account/update-phone-session.md +3 -0
- package/docs/examples/account/update-phone-verification.md +3 -0
- package/docs/examples/account/update-phone.md +3 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +3 -0
- package/docs/examples/account/update-recovery.md +4 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +1 -0
- package/docs/examples/account/update-verification.md +3 -0
- package/docs/examples/console/get-resource.md +3 -0
- package/docs/examples/console/variables.md +1 -0
- package/docs/examples/databases/create-boolean-attribute.md +5 -0
- package/docs/examples/databases/create-collection.md +4 -0
- package/docs/examples/databases/create-datetime-attribute.md +5 -0
- package/docs/examples/databases/create-document.md +5 -0
- package/docs/examples/databases/create-documents.md +4 -0
- package/docs/examples/databases/create-email-attribute.md +5 -0
- package/docs/examples/databases/create-enum-attribute.md +6 -0
- package/docs/examples/databases/create-float-attribute.md +5 -0
- package/docs/examples/databases/create-index.md +6 -0
- package/docs/examples/databases/create-integer-attribute.md +5 -0
- package/docs/examples/databases/create-ip-attribute.md +5 -0
- package/docs/examples/databases/create-line-attribute.md +5 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +5 -0
- package/docs/examples/databases/create-polygon-attribute.md +5 -0
- package/docs/examples/databases/create-relationship-attribute.md +5 -0
- package/docs/examples/databases/create-string-attribute.md +6 -0
- package/docs/examples/databases/create-transaction.md +1 -0
- package/docs/examples/databases/create-url-attribute.md +5 -0
- package/docs/examples/databases/create.md +3 -0
- package/docs/examples/databases/decrement-document-attribute.md +5 -0
- package/docs/examples/databases/delete-attribute.md +4 -0
- package/docs/examples/databases/delete-collection.md +3 -0
- package/docs/examples/databases/delete-document.md +4 -0
- package/docs/examples/databases/delete-documents.md +3 -0
- package/docs/examples/databases/delete-index.md +4 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +4 -0
- package/docs/examples/databases/get-collection-usage.md +3 -0
- package/docs/examples/databases/get-collection.md +3 -0
- package/docs/examples/databases/get-document.md +4 -0
- package/docs/examples/databases/get-index.md +4 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +5 -0
- package/docs/examples/databases/list-attributes.md +3 -0
- package/docs/examples/databases/list-collection-logs.md +3 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +4 -0
- package/docs/examples/databases/list-documents.md +3 -0
- package/docs/examples/databases/list-indexes.md +3 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +1 -0
- package/docs/examples/databases/list-usage.md +1 -0
- package/docs/examples/databases/list.md +1 -0
- package/docs/examples/databases/update-boolean-attribute.md +6 -0
- package/docs/examples/databases/update-collection.md +4 -0
- package/docs/examples/databases/update-datetime-attribute.md +6 -0
- package/docs/examples/databases/update-document.md +4 -0
- package/docs/examples/databases/update-documents.md +3 -0
- package/docs/examples/databases/update-email-attribute.md +6 -0
- package/docs/examples/databases/update-enum-attribute.md +7 -0
- package/docs/examples/databases/update-float-attribute.md +6 -0
- package/docs/examples/databases/update-integer-attribute.md +6 -0
- package/docs/examples/databases/update-ip-attribute.md +6 -0
- package/docs/examples/databases/update-line-attribute.md +5 -0
- package/docs/examples/databases/update-point-attribute.md +5 -0
- package/docs/examples/databases/update-polygon-attribute.md +5 -0
- package/docs/examples/databases/update-relationship-attribute.md +4 -0
- package/docs/examples/databases/update-string-attribute.md +6 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +6 -0
- package/docs/examples/databases/update.md +3 -0
- package/docs/examples/databases/upsert-document.md +4 -0
- package/docs/examples/databases/upsert-documents.md +4 -0
- package/docs/examples/functions/create-deployment.md +4 -0
- package/docs/examples/functions/create-duplicate-deployment.md +3 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +7 -0
- package/docs/examples/functions/create-variable.md +4 -0
- package/docs/examples/functions/create-vcs-deployment.md +4 -0
- package/docs/examples/functions/create.md +4 -0
- package/docs/examples/functions/delete-deployment.md +3 -0
- package/docs/examples/functions/delete-execution.md +3 -0
- package/docs/examples/functions/delete-variable.md +3 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +3 -0
- package/docs/examples/functions/get-deployment.md +3 -0
- package/docs/examples/functions/get-execution.md +3 -0
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/get-usage.md +2 -0
- package/docs/examples/functions/get-variable.md +3 -0
- package/docs/examples/functions/get.md +2 -0
- package/docs/examples/functions/list-deployments.md +2 -0
- package/docs/examples/functions/list-executions.md +2 -0
- package/docs/examples/functions/list-runtimes.md +1 -0
- package/docs/examples/functions/list-specifications.md +1 -0
- package/docs/examples/functions/list-templates.md +1 -0
- package/docs/examples/functions/list-usage.md +1 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +1 -0
- package/docs/examples/functions/update-deployment-status.md +3 -0
- package/docs/examples/functions/update-function-deployment.md +3 -0
- package/docs/examples/functions/update-variable.md +4 -0
- package/docs/examples/functions/update.md +3 -0
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +1 -0
- package/docs/examples/health/get-cache.md +1 -0
- package/docs/examples/health/get-certificate.md +1 -0
- package/docs/examples/health/get-db.md +1 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +1 -0
- package/docs/examples/health/get-queue-builds.md +1 -0
- package/docs/examples/health/get-queue-certificates.md +1 -0
- package/docs/examples/health/get-queue-databases.md +1 -0
- package/docs/examples/health/get-queue-deletes.md +1 -0
- package/docs/examples/health/get-queue-functions.md +1 -0
- package/docs/examples/health/get-queue-logs.md +1 -0
- package/docs/examples/health/get-queue-mails.md +1 -0
- package/docs/examples/health/get-queue-messaging.md +1 -0
- package/docs/examples/health/get-queue-migrations.md +1 -0
- package/docs/examples/health/get-queue-stats-resources.md +1 -0
- package/docs/examples/health/get-queue-usage.md +1 -0
- package/docs/examples/health/get-queue-webhooks.md +1 -0
- package/docs/examples/health/get-storage-local.md +1 -0
- package/docs/examples/health/get-storage.md +1 -0
- package/docs/examples/health/get-time.md +1 -0
- package/docs/examples/health/get.md +1 -0
- package/docs/examples/locale/get.md +1 -0
- package/docs/examples/locale/list-codes.md +1 -0
- package/docs/examples/locale/list-continents.md +1 -0
- package/docs/examples/locale/list-countries-eu.md +1 -0
- package/docs/examples/locale/list-countries-phones.md +1 -0
- package/docs/examples/locale/list-countries.md +1 -0
- package/docs/examples/locale/list-currencies.md +1 -0
- package/docs/examples/locale/list-languages.md +1 -0
- package/docs/examples/messaging/create-apns-provider.md +3 -0
- package/docs/examples/messaging/create-email.md +4 -0
- package/docs/examples/messaging/create-fcm-provider.md +3 -0
- package/docs/examples/messaging/create-mailgun-provider.md +3 -0
- package/docs/examples/messaging/create-msg-91-provider.md +3 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +3 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +3 -0
- package/docs/examples/messaging/create-sms.md +3 -0
- package/docs/examples/messaging/create-smtp-provider.md +4 -0
- package/docs/examples/messaging/create-subscriber.md +4 -0
- package/docs/examples/messaging/create-telesign-provider.md +3 -0
- package/docs/examples/messaging/create-textmagic-provider.md +3 -0
- package/docs/examples/messaging/create-topic.md +3 -0
- package/docs/examples/messaging/create-twilio-provider.md +3 -0
- package/docs/examples/messaging/create-vonage-provider.md +3 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +3 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +3 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +2 -0
- package/docs/examples/messaging/list-messages.md +1 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +1 -0
- package/docs/examples/messaging/list-subscriber-logs.md +2 -0
- package/docs/examples/messaging/list-subscribers.md +2 -0
- package/docs/examples/messaging/list-targets.md +2 -0
- package/docs/examples/messaging/list-topic-logs.md +2 -0
- package/docs/examples/messaging/list-topics.md +1 -0
- package/docs/examples/messaging/update-apns-provider.md +2 -0
- package/docs/examples/messaging/update-email.md +2 -0
- package/docs/examples/messaging/update-fcm-provider.md +2 -0
- package/docs/examples/messaging/update-mailgun-provider.md +2 -0
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/update-sms.md +2 -0
- package/docs/examples/messaging/update-smtp-provider.md +2 -0
- package/docs/examples/messaging/update-telesign-provider.md +2 -0
- package/docs/examples/messaging/update-textmagic-provider.md +2 -0
- package/docs/examples/messaging/update-topic.md +2 -0
- package/docs/examples/messaging/update-twilio-provider.md +2 -0
- package/docs/examples/messaging/update-vonage-provider.md +2 -0
- package/docs/examples/migrations/create-appwrite-migration.md +5 -0
- package/docs/examples/migrations/create-csv-export.md +3 -0
- package/docs/examples/migrations/create-csv-import.md +4 -0
- package/docs/examples/migrations/create-firebase-migration.md +3 -0
- package/docs/examples/migrations/create-n-host-migration.md +8 -0
- package/docs/examples/migrations/create-supabase-migration.md +7 -0
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +5 -0
- package/docs/examples/migrations/get-firebase-report.md +3 -0
- package/docs/examples/migrations/get-n-host-report.md +8 -0
- package/docs/examples/migrations/get-supabase-report.md +7 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +1 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/project/create-variable.md +3 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +3 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +1 -0
- package/docs/examples/project/update-variable.md +3 -0
- package/docs/examples/projects/create-dev-key.md +4 -0
- package/docs/examples/projects/create-jwt.md +3 -0
- package/docs/examples/projects/create-key.md +4 -0
- package/docs/examples/projects/create-platform.md +4 -0
- package/docs/examples/projects/create-smtp-test.md +6 -0
- package/docs/examples/projects/create-webhook.md +6 -0
- package/docs/examples/projects/create.md +4 -0
- package/docs/examples/projects/delete-dev-key.md +3 -0
- package/docs/examples/projects/delete-email-template.md +4 -0
- package/docs/examples/projects/delete-key.md +3 -0
- package/docs/examples/projects/delete-platform.md +3 -0
- package/docs/examples/projects/delete-sms-template.md +4 -0
- package/docs/examples/projects/delete-webhook.md +3 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +3 -0
- package/docs/examples/projects/get-email-template.md +4 -0
- package/docs/examples/projects/get-key.md +3 -0
- package/docs/examples/projects/get-platform.md +3 -0
- package/docs/examples/projects/get-sms-template.md +4 -0
- package/docs/examples/projects/get-webhook.md +3 -0
- package/docs/examples/projects/get.md +2 -0
- package/docs/examples/projects/list-dev-keys.md +2 -0
- package/docs/examples/projects/list-keys.md +2 -0
- package/docs/examples/projects/list-platforms.md +2 -0
- package/docs/examples/projects/list-webhooks.md +2 -0
- package/docs/examples/projects/list.md +1 -0
- package/docs/examples/projects/update-api-status-all.md +3 -0
- package/docs/examples/projects/update-api-status.md +4 -0
- package/docs/examples/projects/update-auth-duration.md +3 -0
- package/docs/examples/projects/update-auth-limit.md +3 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +3 -0
- package/docs/examples/projects/update-auth-password-history.md +3 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +3 -0
- package/docs/examples/projects/update-auth-status.md +4 -0
- package/docs/examples/projects/update-dev-key.md +5 -0
- package/docs/examples/projects/update-email-template.md +6 -0
- package/docs/examples/projects/update-key.md +5 -0
- package/docs/examples/projects/update-memberships-privacy.md +5 -0
- package/docs/examples/projects/update-mock-numbers.md +3 -0
- package/docs/examples/projects/update-o-auth-2.md +3 -0
- package/docs/examples/projects/update-personal-data-check.md +3 -0
- package/docs/examples/projects/update-platform.md +4 -0
- package/docs/examples/projects/update-service-status-all.md +3 -0
- package/docs/examples/projects/update-service-status.md +4 -0
- package/docs/examples/projects/update-session-alerts.md +3 -0
- package/docs/examples/projects/update-session-invalidation.md +3 -0
- package/docs/examples/projects/update-sms-template.md +5 -0
- package/docs/examples/projects/update-smtp.md +3 -0
- package/docs/examples/projects/update-team.md +3 -0
- package/docs/examples/projects/update-webhook-signature.md +3 -0
- package/docs/examples/projects/update-webhook.md +7 -0
- package/docs/examples/projects/update.md +3 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +3 -0
- package/docs/examples/proxy/create-redirect-rule.md +6 -0
- package/docs/examples/proxy/create-site-rule.md +3 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +1 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +4 -0
- package/docs/examples/sites/create-duplicate-deployment.md +3 -0
- package/docs/examples/sites/create-template-deployment.md +7 -0
- package/docs/examples/sites/create-variable.md +4 -0
- package/docs/examples/sites/create-vcs-deployment.md +4 -0
- package/docs/examples/sites/create.md +5 -0
- package/docs/examples/sites/delete-deployment.md +3 -0
- package/docs/examples/sites/delete-log.md +3 -0
- package/docs/examples/sites/delete-variable.md +3 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +3 -0
- package/docs/examples/sites/get-deployment.md +3 -0
- package/docs/examples/sites/get-log.md +3 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +2 -0
- package/docs/examples/sites/get-variable.md +3 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +2 -0
- package/docs/examples/sites/list-frameworks.md +1 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +1 -0
- package/docs/examples/sites/list-templates.md +1 -0
- package/docs/examples/sites/list-usage.md +1 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +1 -0
- package/docs/examples/sites/update-deployment-status.md +3 -0
- package/docs/examples/sites/update-site-deployment.md +3 -0
- package/docs/examples/sites/update-variable.md +4 -0
- package/docs/examples/sites/update.md +4 -0
- package/docs/examples/storage/create-bucket.md +3 -0
- package/docs/examples/storage/create-file.md +4 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +3 -0
- package/docs/examples/storage/get-bucket-usage.md +2 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +3 -0
- package/docs/examples/storage/get-file-preview.md +3 -0
- package/docs/examples/storage/get-file-view.md +3 -0
- package/docs/examples/storage/get-file.md +3 -0
- package/docs/examples/storage/get-usage.md +1 -0
- package/docs/examples/storage/list-buckets.md +1 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +3 -0
- package/docs/examples/storage/update-file.md +3 -0
- package/docs/examples/tablesdb/create-boolean-column.md +5 -0
- package/docs/examples/tablesdb/create-datetime-column.md +5 -0
- package/docs/examples/tablesdb/create-email-column.md +5 -0
- package/docs/examples/tablesdb/create-enum-column.md +6 -0
- package/docs/examples/tablesdb/create-float-column.md +5 -0
- package/docs/examples/tablesdb/create-index.md +6 -0
- package/docs/examples/tablesdb/create-integer-column.md +5 -0
- package/docs/examples/tablesdb/create-ip-column.md +5 -0
- package/docs/examples/tablesdb/create-line-column.md +5 -0
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +5 -0
- package/docs/examples/tablesdb/create-polygon-column.md +5 -0
- package/docs/examples/tablesdb/create-relationship-column.md +5 -0
- package/docs/examples/tablesdb/create-row.md +5 -0
- package/docs/examples/tablesdb/create-rows.md +4 -0
- package/docs/examples/tablesdb/create-string-column.md +6 -0
- package/docs/examples/tablesdb/create-table.md +4 -0
- package/docs/examples/tablesdb/create-transaction.md +1 -0
- package/docs/examples/tablesdb/create-url-column.md +5 -0
- package/docs/examples/tablesdb/create.md +3 -0
- package/docs/examples/tablesdb/decrement-row-column.md +5 -0
- package/docs/examples/tablesdb/delete-column.md +4 -0
- package/docs/examples/tablesdb/delete-index.md +4 -0
- package/docs/examples/tablesdb/delete-row.md +4 -0
- package/docs/examples/tablesdb/delete-rows.md +3 -0
- package/docs/examples/tablesdb/delete-table.md +3 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +4 -0
- package/docs/examples/tablesdb/get-index.md +4 -0
- package/docs/examples/tablesdb/get-row.md +4 -0
- package/docs/examples/tablesdb/get-table-usage.md +3 -0
- package/docs/examples/tablesdb/get-table.md +3 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +5 -0
- package/docs/examples/tablesdb/list-columns.md +3 -0
- package/docs/examples/tablesdb/list-indexes.md +3 -0
- package/docs/examples/tablesdb/list-row-logs.md +4 -0
- package/docs/examples/tablesdb/list-rows.md +3 -0
- package/docs/examples/tablesdb/list-table-logs.md +3 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +1 -0
- package/docs/examples/tablesdb/list-usage.md +1 -0
- package/docs/examples/tablesdb/list.md +1 -0
- package/docs/examples/tablesdb/update-boolean-column.md +6 -0
- package/docs/examples/tablesdb/update-datetime-column.md +6 -0
- package/docs/examples/tablesdb/update-email-column.md +6 -0
- package/docs/examples/tablesdb/update-enum-column.md +7 -0
- package/docs/examples/tablesdb/update-float-column.md +6 -0
- package/docs/examples/tablesdb/update-integer-column.md +6 -0
- package/docs/examples/tablesdb/update-ip-column.md +6 -0
- package/docs/examples/tablesdb/update-line-column.md +5 -0
- package/docs/examples/tablesdb/update-point-column.md +5 -0
- package/docs/examples/tablesdb/update-polygon-column.md +5 -0
- package/docs/examples/tablesdb/update-relationship-column.md +4 -0
- package/docs/examples/tablesdb/update-row.md +4 -0
- package/docs/examples/tablesdb/update-rows.md +3 -0
- package/docs/examples/tablesdb/update-string-column.md +6 -0
- package/docs/examples/tablesdb/update-table.md +4 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +6 -0
- package/docs/examples/tablesdb/update.md +3 -0
- package/docs/examples/tablesdb/upsert-row.md +4 -0
- package/docs/examples/tablesdb/upsert-rows.md +4 -0
- package/docs/examples/teams/create-membership.md +3 -0
- package/docs/examples/teams/create.md +3 -0
- package/docs/examples/teams/delete-membership.md +3 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +3 -0
- package/docs/examples/teams/get-prefs.md +2 -0
- package/docs/examples/teams/get.md +2 -0
- package/docs/examples/teams/list-logs.md +2 -0
- package/docs/examples/teams/list-memberships.md +2 -0
- package/docs/examples/teams/list.md +1 -0
- package/docs/examples/teams/update-membership-status.md +5 -0
- package/docs/examples/teams/update-membership.md +4 -0
- package/docs/examples/teams/update-name.md +3 -0
- package/docs/examples/teams/update-prefs.md +3 -0
- package/docs/examples/tokens/create-file-token.md +3 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +3 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +4 -0
- package/docs/examples/users/create-bcrypt-user.md +4 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +4 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +4 -0
- package/docs/examples/users/create-scrypt-modified-user.md +7 -0
- package/docs/examples/users/create-scrypt-user.md +9 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +4 -0
- package/docs/examples/users/create-target.md +5 -0
- package/docs/examples/users/create-token.md +2 -0
- package/docs/examples/users/create.md +2 -0
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/delete-mfa-authenticator.md +3 -0
- package/docs/examples/users/delete-session.md +3 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +3 -0
- package/docs/examples/users/delete.md +2 -0
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +2 -0
- package/docs/examples/users/get-target.md +3 -0
- package/docs/examples/users/get-usage.md +1 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +1 -0
- package/docs/examples/users/list-logs.md +2 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list-targets.md +2 -0
- package/docs/examples/users/list.md +1 -0
- package/docs/examples/users/update-email-verification.md +3 -0
- package/docs/examples/users/update-email.md +3 -0
- package/docs/examples/users/update-labels.md +3 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +3 -0
- package/docs/examples/users/update-name.md +3 -0
- package/docs/examples/users/update-password.md +3 -0
- package/docs/examples/users/update-phone-verification.md +3 -0
- package/docs/examples/users/update-phone.md +3 -0
- package/docs/examples/users/update-prefs.md +3 -0
- package/docs/examples/users/update-status.md +3 -0
- package/docs/examples/users/update-target.md +3 -0
- package/docs/examples/vcs/create-repository-detection.md +4 -0
- package/docs/examples/vcs/create-repository.md +4 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository-contents.md +3 -0
- package/docs/examples/vcs/get-repository.md +3 -0
- package/docs/examples/vcs/list-installations.md +1 -0
- package/docs/examples/vcs/list-repositories.md +3 -0
- package/docs/examples/vcs/list-repository-branches.md +3 -0
- package/docs/examples/vcs/update-external-deployments.md +4 -0
- package/index.ts +25 -165
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.ts +14 -6
- package/lib/commands/config.ts +494 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/init.ts +25 -14
- package/lib/commands/pull.ts +683 -420
- package/lib/commands/push.ts +1677 -2404
- package/lib/commands/run.ts +1 -1
- package/lib/commands/schema.ts +122 -0
- package/lib/commands/services/account.ts +200 -385
- package/lib/commands/services/console.ts +13 -34
- package/lib/commands/services/databases.ts +298 -1215
- package/lib/commands/services/functions.ts +115 -434
- package/lib/commands/services/graphql.ts +5 -2
- package/lib/commands/services/health.ts +87 -149
- package/lib/commands/services/locale.ts +36 -33
- package/lib/commands/services/messaging.ts +180 -999
- package/lib/commands/services/migrations.ts +54 -226
- package/lib/commands/services/project.ts +19 -23
- package/lib/commands/services/projects.ts +182 -714
- package/lib/commands/services/proxy.ts +30 -58
- package/lib/commands/services/sites.ts +107 -379
- package/lib/commands/services/storage.ts +93 -302
- package/lib/commands/services/tables-db.ts +1150 -0
- package/lib/commands/services/teams.ts +48 -110
- package/lib/commands/services/tokens.ts +16 -28
- package/lib/commands/services/users.ts +133 -403
- package/lib/commands/services/vcs.ts +48 -151
- package/lib/commands/types.ts +1 -1
- package/lib/commands/update.ts +13 -22
- package/lib/commands/utils/attributes.ts +719 -0
- package/lib/commands/utils/change-approval.ts +186 -0
- package/lib/commands/utils/database-sync.ts +180 -0
- package/lib/commands/utils/deployment.ts +184 -0
- package/lib/commands/utils/error-formatter.ts +417 -0
- package/lib/commands/utils/pools.ts +355 -0
- package/lib/config.ts +46 -82
- package/lib/constants.ts +22 -0
- package/lib/emulation/docker.ts +101 -87
- package/lib/parser.ts +16 -11
- package/lib/questions.ts +20 -21
- package/lib/sdks.ts +15 -11
- package/lib/types.ts +0 -229
- package/lib/utils.ts +45 -4
- package/package.json +12 -11
- package/scoop/appwrite.config.json +29 -19
- package/.github/workflows/build-verify.yml +0 -71
- package/bun.lock +0 -625
- package/dist/lib/commands/services/avatars.d.ts +0 -3
- package/dist/lib/commands/services/avatars.d.ts.map +0 -1
- package/dist/lib/commands/services/avatars.js +0 -118
- package/dist/lib/commands/services/avatars.js.map +0 -1
- package/dist/lib/commands/services/tablesdb.d.ts +0 -3
- package/dist/lib/commands/services/tablesdb.d.ts.map +0 -1
- package/dist/lib/commands/services/tablesdb.js.map +0 -1
- package/dist/scripts/generate-commands.d.ts +0 -2
- package/dist/scripts/generate-commands.d.ts.map +0 -1
- package/dist/scripts/generate-commands.js +0 -398
- package/dist/scripts/generate-commands.js.map +0 -1
- package/lib/commands/services/avatars.ts +0 -400
- package/lib/commands/services/tablesdb.ts +0 -1928
- package/scripts/generate-commands.ts +0 -539
|
@@ -3,6 +3,8 @@ import { sdkForProject } from "../../sdks.js";
|
|
|
3
3
|
import {
|
|
4
4
|
actionRunner,
|
|
5
5
|
commandDescriptions,
|
|
6
|
+
success,
|
|
7
|
+
parse,
|
|
6
8
|
parseBool,
|
|
7
9
|
parseInteger,
|
|
8
10
|
} from "../../parser.js";
|
|
@@ -26,17 +28,9 @@ export const migrations = new Command("migrations")
|
|
|
26
28
|
|
|
27
29
|
migrations
|
|
28
30
|
.command(`list`)
|
|
29
|
-
.description(
|
|
30
|
-
|
|
31
|
-
)
|
|
32
|
-
.option(
|
|
33
|
-
`--queries [queries...]`,
|
|
34
|
-
`Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`,
|
|
35
|
-
)
|
|
36
|
-
.option(
|
|
37
|
-
`--search <search>`,
|
|
38
|
-
`Search term to filter your list results. Max length: 256 chars.`,
|
|
39
|
-
)
|
|
31
|
+
.description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`)
|
|
32
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`)
|
|
33
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
40
34
|
.option(
|
|
41
35
|
`--total [value]`,
|
|
42
36
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -46,15 +40,13 @@ migrations
|
|
|
46
40
|
.action(
|
|
47
41
|
actionRunner(
|
|
48
42
|
async ({ queries, search, total }) =>
|
|
49
|
-
await (await getMigrationsClient()).list(queries, search, total),
|
|
43
|
+
parse(await (await getMigrationsClient()).list(queries, search, total)),
|
|
50
44
|
),
|
|
51
45
|
);
|
|
52
46
|
|
|
53
47
|
migrations
|
|
54
48
|
.command(`create-appwrite-migration`)
|
|
55
|
-
.description(
|
|
56
|
-
`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `,
|
|
57
|
-
)
|
|
49
|
+
.description(`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `)
|
|
58
50
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
59
51
|
.requiredOption(`--endpoint <endpoint>`, `Source Appwrite endpoint`)
|
|
60
52
|
.requiredOption(`--project-id <project-id>`, `Source Project ID`)
|
|
@@ -62,63 +54,34 @@ migrations
|
|
|
62
54
|
.action(
|
|
63
55
|
actionRunner(
|
|
64
56
|
async ({ resources, endpoint, projectId, apiKey }) =>
|
|
65
|
-
await (
|
|
66
|
-
await getMigrationsClient()
|
|
67
|
-
).createAppwriteMigration(resources, endpoint, projectId, apiKey),
|
|
57
|
+
parse(await (await getMigrationsClient()).createAppwriteMigration(resources, endpoint, projectId, apiKey)),
|
|
68
58
|
),
|
|
69
59
|
);
|
|
70
60
|
|
|
71
61
|
migrations
|
|
72
62
|
.command(`get-appwrite-report`)
|
|
73
|
-
.description(
|
|
74
|
-
`Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`,
|
|
75
|
-
)
|
|
63
|
+
.description(`Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
|
|
76
64
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
77
65
|
.requiredOption(`--endpoint <endpoint>`, `Source's Appwrite Endpoint`)
|
|
78
66
|
.requiredOption(`--project-id <project-id>`, `Source's Project ID`)
|
|
79
67
|
.requiredOption(`--key <key>`, `Source's API Key`)
|
|
80
68
|
.action(
|
|
81
69
|
actionRunner(
|
|
82
|
-
async ({ resources, endpoint,
|
|
83
|
-
await (
|
|
84
|
-
await getMigrationsClient()
|
|
85
|
-
).getAppwriteReport(resources, endpoint, projectID, key),
|
|
70
|
+
async ({ resources, endpoint, projectId, key }) =>
|
|
71
|
+
parse(await (await getMigrationsClient()).getAppwriteReport(resources, endpoint, projectId, key)),
|
|
86
72
|
),
|
|
87
73
|
);
|
|
88
74
|
|
|
89
75
|
migrations
|
|
90
|
-
.command(`create-
|
|
91
|
-
.description(
|
|
92
|
-
|
|
93
|
-
)
|
|
94
|
-
.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
)
|
|
98
|
-
.
|
|
99
|
-
`--filename <filename>`,
|
|
100
|
-
`The name of the file to be created for the export, excluding the .csv extension.`,
|
|
101
|
-
)
|
|
102
|
-
.option(
|
|
103
|
-
`--columns [columns...]`,
|
|
104
|
-
`List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`,
|
|
105
|
-
)
|
|
106
|
-
.option(
|
|
107
|
-
`--queries [queries...]`,
|
|
108
|
-
`Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`,
|
|
109
|
-
)
|
|
110
|
-
.option(
|
|
111
|
-
`--delimiter <delimiter>`,
|
|
112
|
-
`The character that separates each column value. Default is comma.`,
|
|
113
|
-
)
|
|
114
|
-
.option(
|
|
115
|
-
`--enclosure <enclosure>`,
|
|
116
|
-
`The character that encloses each column value. Default is double quotes.`,
|
|
117
|
-
)
|
|
118
|
-
.option(
|
|
119
|
-
`--escape <escape>`,
|
|
120
|
-
`The escape character for the enclosure character. Default is double quotes.`,
|
|
121
|
-
)
|
|
76
|
+
.command(`create-csv-export`)
|
|
77
|
+
.description(`Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.`)
|
|
78
|
+
.requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`)
|
|
79
|
+
.requiredOption(`--filename <filename>`, `The name of the file to be created for the export, excluding the .csv extension.`)
|
|
80
|
+
.option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`)
|
|
81
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`)
|
|
82
|
+
.option(`--delimiter <delimiter>`, `The character that separates each column value. Default is comma.`)
|
|
83
|
+
.option(`--enclosure <enclosure>`, `The character that encloses each column value. Default is double quotes.`)
|
|
84
|
+
.option(`--escape <escape>`, `The escape character for the enclosure character. Default is double quotes.`)
|
|
122
85
|
.option(
|
|
123
86
|
`--header [value]`,
|
|
124
87
|
`Whether to include the header row with column names. Default is true.`,
|
|
@@ -133,47 +96,17 @@ migrations
|
|
|
133
96
|
)
|
|
134
97
|
.action(
|
|
135
98
|
actionRunner(
|
|
136
|
-
async ({
|
|
137
|
-
resourceId,
|
|
138
|
-
filename,
|
|
139
|
-
columns,
|
|
140
|
-
queries,
|
|
141
|
-
delimiter,
|
|
142
|
-
enclosure,
|
|
143
|
-
escape,
|
|
144
|
-
header,
|
|
145
|
-
notify,
|
|
146
|
-
}) =>
|
|
147
|
-
await (
|
|
148
|
-
await getMigrationsClient()
|
|
149
|
-
).createCSVExport(
|
|
150
|
-
resourceId,
|
|
151
|
-
filename,
|
|
152
|
-
columns,
|
|
153
|
-
queries,
|
|
154
|
-
delimiter,
|
|
155
|
-
enclosure,
|
|
156
|
-
escape,
|
|
157
|
-
header,
|
|
158
|
-
notify,
|
|
159
|
-
),
|
|
99
|
+
async ({ resourceId, filename, columns, queries, delimiter, enclosure, escape, header, notify }) =>
|
|
100
|
+
parse(await (await getMigrationsClient()).createCSVExport(resourceId, filename, columns, queries, delimiter, enclosure, escape, header, notify)),
|
|
160
101
|
),
|
|
161
102
|
);
|
|
162
103
|
|
|
163
104
|
migrations
|
|
164
|
-
.command(`create-
|
|
165
|
-
.description(
|
|
166
|
-
|
|
167
|
-
)
|
|
168
|
-
.requiredOption(
|
|
169
|
-
`--bucket-id <bucket-id>`,
|
|
170
|
-
`Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`,
|
|
171
|
-
)
|
|
105
|
+
.command(`create-csv-import`)
|
|
106
|
+
.description(`Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.`)
|
|
107
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`)
|
|
172
108
|
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
173
|
-
.requiredOption(
|
|
174
|
-
`--resource-id <resource-id>`,
|
|
175
|
-
`Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`,
|
|
176
|
-
)
|
|
109
|
+
.requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`)
|
|
177
110
|
.option(
|
|
178
111
|
`--internal-file [value]`,
|
|
179
112
|
`Is the file stored in an internal bucket?`,
|
|
@@ -183,55 +116,37 @@ migrations
|
|
|
183
116
|
.action(
|
|
184
117
|
actionRunner(
|
|
185
118
|
async ({ bucketId, fileId, resourceId, internalFile }) =>
|
|
186
|
-
await (
|
|
187
|
-
await getMigrationsClient()
|
|
188
|
-
).createCSVImport(bucketId, fileId, resourceId, internalFile),
|
|
119
|
+
parse(await (await getMigrationsClient()).createCSVImport(bucketId, fileId, resourceId, internalFile)),
|
|
189
120
|
),
|
|
190
121
|
);
|
|
191
122
|
|
|
192
123
|
migrations
|
|
193
124
|
.command(`create-firebase-migration`)
|
|
194
|
-
.description(
|
|
195
|
-
`Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. `,
|
|
196
|
-
)
|
|
125
|
+
.description(`Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. `)
|
|
197
126
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
198
|
-
.requiredOption(
|
|
199
|
-
`--service-account <service-account>`,
|
|
200
|
-
`JSON of the Firebase service account credentials`,
|
|
201
|
-
)
|
|
127
|
+
.requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
|
|
202
128
|
.action(
|
|
203
129
|
actionRunner(
|
|
204
130
|
async ({ resources, serviceAccount }) =>
|
|
205
|
-
await (
|
|
206
|
-
await getMigrationsClient()
|
|
207
|
-
).createFirebaseMigration(resources, serviceAccount),
|
|
131
|
+
parse(await (await getMigrationsClient()).createFirebaseMigration(resources, serviceAccount)),
|
|
208
132
|
),
|
|
209
133
|
);
|
|
210
134
|
|
|
211
135
|
migrations
|
|
212
136
|
.command(`get-firebase-report`)
|
|
213
|
-
.description(
|
|
214
|
-
`Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`,
|
|
215
|
-
)
|
|
137
|
+
.description(`Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
|
|
216
138
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
217
|
-
.requiredOption(
|
|
218
|
-
`--service-account <service-account>`,
|
|
219
|
-
`JSON of the Firebase service account credentials`,
|
|
220
|
-
)
|
|
139
|
+
.requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
|
|
221
140
|
.action(
|
|
222
141
|
actionRunner(
|
|
223
142
|
async ({ resources, serviceAccount }) =>
|
|
224
|
-
await (
|
|
225
|
-
await getMigrationsClient()
|
|
226
|
-
).getFirebaseReport(resources, serviceAccount),
|
|
143
|
+
parse(await (await getMigrationsClient()).getFirebaseReport(resources, serviceAccount)),
|
|
227
144
|
),
|
|
228
145
|
);
|
|
229
146
|
|
|
230
147
|
migrations
|
|
231
|
-
.command(`create-
|
|
232
|
-
.description(
|
|
233
|
-
`Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. `,
|
|
234
|
-
)
|
|
148
|
+
.command(`create-n-host-migration`)
|
|
149
|
+
.description(`Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. `)
|
|
235
150
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
236
151
|
.requiredOption(`--subdomain <subdomain>`, `Source's Subdomain`)
|
|
237
152
|
.requiredOption(`--region <region>`, `Source's Region`)
|
|
@@ -242,36 +157,14 @@ migrations
|
|
|
242
157
|
.option(`--port <port>`, `Source's Database Port`, parseInteger)
|
|
243
158
|
.action(
|
|
244
159
|
actionRunner(
|
|
245
|
-
async ({
|
|
246
|
-
resources,
|
|
247
|
-
subdomain,
|
|
248
|
-
region,
|
|
249
|
-
adminSecret,
|
|
250
|
-
database,
|
|
251
|
-
username,
|
|
252
|
-
password,
|
|
253
|
-
port,
|
|
254
|
-
}) =>
|
|
255
|
-
await (
|
|
256
|
-
await getMigrationsClient()
|
|
257
|
-
).createNHostMigration(
|
|
258
|
-
resources,
|
|
259
|
-
subdomain,
|
|
260
|
-
region,
|
|
261
|
-
adminSecret,
|
|
262
|
-
database,
|
|
263
|
-
username,
|
|
264
|
-
password,
|
|
265
|
-
port,
|
|
266
|
-
),
|
|
160
|
+
async ({ resources, subdomain, region, adminSecret, database, username, password, port }) =>
|
|
161
|
+
parse(await (await getMigrationsClient()).createNHostMigration(resources, subdomain, region, adminSecret, database, username, password, port)),
|
|
267
162
|
),
|
|
268
163
|
);
|
|
269
164
|
|
|
270
165
|
migrations
|
|
271
|
-
.command(`get-
|
|
272
|
-
.description(
|
|
273
|
-
`Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `,
|
|
274
|
-
)
|
|
166
|
+
.command(`get-n-host-report`)
|
|
167
|
+
.description(`Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
|
|
275
168
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate.`)
|
|
276
169
|
.requiredOption(`--subdomain <subdomain>`, `Source's Subdomain.`)
|
|
277
170
|
.requiredOption(`--region <region>`, `Source's Region.`)
|
|
@@ -282,36 +175,14 @@ migrations
|
|
|
282
175
|
.option(`--port <port>`, `Source's Database Port.`, parseInteger)
|
|
283
176
|
.action(
|
|
284
177
|
actionRunner(
|
|
285
|
-
async ({
|
|
286
|
-
resources,
|
|
287
|
-
subdomain,
|
|
288
|
-
region,
|
|
289
|
-
adminSecret,
|
|
290
|
-
database,
|
|
291
|
-
username,
|
|
292
|
-
password,
|
|
293
|
-
port,
|
|
294
|
-
}) =>
|
|
295
|
-
await (
|
|
296
|
-
await getMigrationsClient()
|
|
297
|
-
).getNHostReport(
|
|
298
|
-
resources,
|
|
299
|
-
subdomain,
|
|
300
|
-
region,
|
|
301
|
-
adminSecret,
|
|
302
|
-
database,
|
|
303
|
-
username,
|
|
304
|
-
password,
|
|
305
|
-
port,
|
|
306
|
-
),
|
|
178
|
+
async ({ resources, subdomain, region, adminSecret, database, username, password, port }) =>
|
|
179
|
+
parse(await (await getMigrationsClient()).getNHostReport(resources, subdomain, region, adminSecret, database, username, password, port)),
|
|
307
180
|
),
|
|
308
181
|
);
|
|
309
182
|
|
|
310
183
|
migrations
|
|
311
184
|
.command(`create-supabase-migration`)
|
|
312
|
-
.description(
|
|
313
|
-
`Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. `,
|
|
314
|
-
)
|
|
185
|
+
.description(`Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. `)
|
|
315
186
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
316
187
|
.requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint`)
|
|
317
188
|
.requiredOption(`--api-key <api-key>`, `Source's API Key`)
|
|
@@ -321,34 +192,14 @@ migrations
|
|
|
321
192
|
.option(`--port <port>`, `Source's Database Port`, parseInteger)
|
|
322
193
|
.action(
|
|
323
194
|
actionRunner(
|
|
324
|
-
async ({
|
|
325
|
-
resources,
|
|
326
|
-
endpoint,
|
|
327
|
-
apiKey,
|
|
328
|
-
databaseHost,
|
|
329
|
-
username,
|
|
330
|
-
password,
|
|
331
|
-
port,
|
|
332
|
-
}) =>
|
|
333
|
-
await (
|
|
334
|
-
await getMigrationsClient()
|
|
335
|
-
).createSupabaseMigration(
|
|
336
|
-
resources,
|
|
337
|
-
endpoint,
|
|
338
|
-
apiKey,
|
|
339
|
-
databaseHost,
|
|
340
|
-
username,
|
|
341
|
-
password,
|
|
342
|
-
port,
|
|
343
|
-
),
|
|
195
|
+
async ({ resources, endpoint, apiKey, databaseHost, username, password, port }) =>
|
|
196
|
+
parse(await (await getMigrationsClient()).createSupabaseMigration(resources, endpoint, apiKey, databaseHost, username, password, port)),
|
|
344
197
|
),
|
|
345
198
|
);
|
|
346
199
|
|
|
347
200
|
migrations
|
|
348
201
|
.command(`get-supabase-report`)
|
|
349
|
-
.description(
|
|
350
|
-
`Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `,
|
|
351
|
-
)
|
|
202
|
+
.description(`Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
|
|
352
203
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
353
204
|
.requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint.`)
|
|
354
205
|
.requiredOption(`--api-key <api-key>`, `Source's API Key.`)
|
|
@@ -358,64 +209,41 @@ migrations
|
|
|
358
209
|
.option(`--port <port>`, `Source's Database Port.`, parseInteger)
|
|
359
210
|
.action(
|
|
360
211
|
actionRunner(
|
|
361
|
-
async ({
|
|
362
|
-
resources,
|
|
363
|
-
endpoint,
|
|
364
|
-
apiKey,
|
|
365
|
-
databaseHost,
|
|
366
|
-
username,
|
|
367
|
-
password,
|
|
368
|
-
port,
|
|
369
|
-
}) =>
|
|
370
|
-
await (
|
|
371
|
-
await getMigrationsClient()
|
|
372
|
-
).getSupabaseReport(
|
|
373
|
-
resources,
|
|
374
|
-
endpoint,
|
|
375
|
-
apiKey,
|
|
376
|
-
databaseHost,
|
|
377
|
-
username,
|
|
378
|
-
password,
|
|
379
|
-
port,
|
|
380
|
-
),
|
|
212
|
+
async ({ resources, endpoint, apiKey, databaseHost, username, password, port }) =>
|
|
213
|
+
parse(await (await getMigrationsClient()).getSupabaseReport(resources, endpoint, apiKey, databaseHost, username, password, port)),
|
|
381
214
|
),
|
|
382
215
|
);
|
|
383
216
|
|
|
384
217
|
migrations
|
|
385
218
|
.command(`get`)
|
|
386
|
-
.description(
|
|
387
|
-
`Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. `,
|
|
388
|
-
)
|
|
219
|
+
.description(`Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. `)
|
|
389
220
|
.requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
|
|
390
221
|
.action(
|
|
391
222
|
actionRunner(
|
|
392
223
|
async ({ migrationId }) =>
|
|
393
|
-
await (await getMigrationsClient()).get(migrationId),
|
|
224
|
+
parse(await (await getMigrationsClient()).get(migrationId)),
|
|
394
225
|
),
|
|
395
226
|
);
|
|
396
227
|
|
|
397
228
|
migrations
|
|
398
229
|
.command(`retry`)
|
|
399
|
-
.description(
|
|
400
|
-
`Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.`,
|
|
401
|
-
)
|
|
230
|
+
.description(`Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.`)
|
|
402
231
|
.requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
|
|
403
232
|
.action(
|
|
404
233
|
actionRunner(
|
|
405
234
|
async ({ migrationId }) =>
|
|
406
|
-
await (await getMigrationsClient()).retry(migrationId),
|
|
235
|
+
parse(await (await getMigrationsClient()).retry(migrationId)),
|
|
407
236
|
),
|
|
408
237
|
);
|
|
409
238
|
|
|
410
239
|
migrations
|
|
411
240
|
.command(`delete`)
|
|
412
|
-
.description(
|
|
413
|
-
`Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. `,
|
|
414
|
-
)
|
|
241
|
+
.description(`Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. `)
|
|
415
242
|
.requiredOption(`--migration-id <migration-id>`, `Migration ID.`)
|
|
416
243
|
.action(
|
|
417
244
|
actionRunner(
|
|
418
245
|
async ({ migrationId }) =>
|
|
419
|
-
await (await getMigrationsClient()).delete(migrationId),
|
|
246
|
+
parse(await (await getMigrationsClient()).delete(migrationId)),
|
|
420
247
|
),
|
|
421
248
|
);
|
|
249
|
+
|
|
@@ -3,10 +3,15 @@ import { sdkForProject } from "../../sdks.js";
|
|
|
3
3
|
import {
|
|
4
4
|
actionRunner,
|
|
5
5
|
commandDescriptions,
|
|
6
|
+
success,
|
|
7
|
+
parse,
|
|
6
8
|
parseBool,
|
|
7
9
|
parseInteger,
|
|
8
10
|
} from "../../parser.js";
|
|
9
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
Project,
|
|
13
|
+
ProjectUsageRange,
|
|
14
|
+
} from "@appwrite.io/console";
|
|
10
15
|
|
|
11
16
|
let projectClient: Project | null = null;
|
|
12
17
|
|
|
@@ -26,35 +31,29 @@ export const project = new Command("project")
|
|
|
26
31
|
|
|
27
32
|
project
|
|
28
33
|
.command(`get-usage`)
|
|
29
|
-
.description(
|
|
30
|
-
`Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.`,
|
|
31
|
-
)
|
|
34
|
+
.description(`Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.`)
|
|
32
35
|
.requiredOption(`--start-date <start-date>`, `Starting date for the usage`)
|
|
33
36
|
.requiredOption(`--end-date <end-date>`, `End date for the usage`)
|
|
34
37
|
.option(`--period <period>`, `Period used`)
|
|
35
38
|
.action(
|
|
36
39
|
actionRunner(
|
|
37
40
|
async ({ startDate, endDate, period }) =>
|
|
38
|
-
await (
|
|
39
|
-
await getProjectClient()
|
|
40
|
-
).getUsage(startDate, endDate, period as ProjectUsageRange),
|
|
41
|
+
parse(await (await getProjectClient()).getUsage(startDate, endDate, period as ProjectUsageRange)),
|
|
41
42
|
),
|
|
42
43
|
);
|
|
43
44
|
|
|
44
45
|
project
|
|
45
46
|
.command(`list-variables`)
|
|
46
|
-
.description(
|
|
47
|
-
`Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.`,
|
|
48
|
-
)
|
|
47
|
+
.description(`Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.`)
|
|
49
48
|
.action(
|
|
50
|
-
actionRunner(
|
|
49
|
+
actionRunner(
|
|
50
|
+
async () => parse(await (await getProjectClient()).listVariables()),
|
|
51
|
+
),
|
|
51
52
|
);
|
|
52
53
|
|
|
53
54
|
project
|
|
54
55
|
.command(`create-variable`)
|
|
55
|
-
.description(
|
|
56
|
-
`Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.`,
|
|
57
|
-
)
|
|
56
|
+
.description(`Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.`)
|
|
58
57
|
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
59
58
|
.requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
60
59
|
.option(
|
|
@@ -66,7 +65,7 @@ project
|
|
|
66
65
|
.action(
|
|
67
66
|
actionRunner(
|
|
68
67
|
async ({ key, value, secret }) =>
|
|
69
|
-
await (await getProjectClient()).createVariable(key, value, secret),
|
|
68
|
+
parse(await (await getProjectClient()).createVariable(key, value, secret)),
|
|
70
69
|
),
|
|
71
70
|
);
|
|
72
71
|
|
|
@@ -77,15 +76,13 @@ project
|
|
|
77
76
|
.action(
|
|
78
77
|
actionRunner(
|
|
79
78
|
async ({ variableId }) =>
|
|
80
|
-
await (await getProjectClient()).getVariable(variableId),
|
|
79
|
+
parse(await (await getProjectClient()).getVariable(variableId)),
|
|
81
80
|
),
|
|
82
81
|
);
|
|
83
82
|
|
|
84
83
|
project
|
|
85
84
|
.command(`update-variable`)
|
|
86
|
-
.description(
|
|
87
|
-
`Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime.`,
|
|
88
|
-
)
|
|
85
|
+
.description(`Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime.`)
|
|
89
86
|
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
90
87
|
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
91
88
|
.option(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
@@ -98,9 +95,7 @@ project
|
|
|
98
95
|
.action(
|
|
99
96
|
actionRunner(
|
|
100
97
|
async ({ variableId, key, value, secret }) =>
|
|
101
|
-
await (
|
|
102
|
-
await getProjectClient()
|
|
103
|
-
).updateVariable(variableId, key, value, secret),
|
|
98
|
+
parse(await (await getProjectClient()).updateVariable(variableId, key, value, secret)),
|
|
104
99
|
),
|
|
105
100
|
);
|
|
106
101
|
|
|
@@ -111,6 +106,7 @@ project
|
|
|
111
106
|
.action(
|
|
112
107
|
actionRunner(
|
|
113
108
|
async ({ variableId }) =>
|
|
114
|
-
await (await getProjectClient()).deleteVariable(variableId),
|
|
109
|
+
parse(await (await getProjectClient()).deleteVariable(variableId)),
|
|
115
110
|
),
|
|
116
111
|
);
|
|
112
|
+
|