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
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { sdkForProject } from "../../sdks.js";
|
|
3
|
-
import { actionRunner, commandDescriptions, parseBool, parseInteger, } from "../../parser.js";
|
|
3
|
+
import { actionRunner, commandDescriptions, parse, parseBool, parseInteger, } from "../../parser.js";
|
|
4
4
|
import { TablesDB, } from "@appwrite.io/console";
|
|
5
|
-
let
|
|
5
|
+
let tablesDBClient = null;
|
|
6
6
|
const getTablesDBClient = async () => {
|
|
7
|
-
if (!
|
|
7
|
+
if (!tablesDBClient) {
|
|
8
8
|
const sdkClient = await sdkForProject();
|
|
9
|
-
|
|
9
|
+
tablesDBClient = new TablesDB(sdkClient);
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return tablesDBClient;
|
|
12
12
|
};
|
|
13
|
-
export const
|
|
14
|
-
.description(commandDescriptions["
|
|
13
|
+
export const tablesDB = new Command("tables-db")
|
|
14
|
+
.description(commandDescriptions["tablesDB"] ?? "")
|
|
15
15
|
.configureHelp({
|
|
16
16
|
helpWidth: process.stdout.columns || 80,
|
|
17
17
|
});
|
|
18
|
-
|
|
18
|
+
tablesDB
|
|
19
19
|
.command(`list`)
|
|
20
20
|
.description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`)
|
|
21
21
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name`)
|
|
22
22
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
23
23
|
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
24
|
-
.action(actionRunner(async ({ queries, search, total }) => await (await getTablesDBClient()).list(queries, search, total)));
|
|
25
|
-
|
|
24
|
+
.action(actionRunner(async ({ queries, search, total }) => parse(await (await getTablesDBClient()).list(queries, search, total))));
|
|
25
|
+
tablesDB
|
|
26
26
|
.command(`create`)
|
|
27
27
|
.description(`Create a new Database.
|
|
28
28
|
`)
|
|
29
29
|
.requiredOption(`--database-id <database-id>`, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
30
30
|
.requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
|
|
31
31
|
.option(`--enabled [value]`, `Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
32
|
-
.action(actionRunner(async ({ databaseId, name, enabled }) => await (await getTablesDBClient()).create(databaseId, name, enabled)));
|
|
33
|
-
|
|
32
|
+
.action(actionRunner(async ({ databaseId, name, enabled }) => parse(await (await getTablesDBClient()).create(databaseId, name, enabled))));
|
|
33
|
+
tablesDB
|
|
34
34
|
.command(`list-transactions`)
|
|
35
35
|
.description(`List transactions across all databases.`)
|
|
36
36
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).`)
|
|
37
|
-
.action(actionRunner(async ({ queries }) => await (await getTablesDBClient()).listTransactions(queries)));
|
|
38
|
-
|
|
37
|
+
.action(actionRunner(async ({ queries }) => parse(await (await getTablesDBClient()).listTransactions(queries))));
|
|
38
|
+
tablesDB
|
|
39
39
|
.command(`create-transaction`)
|
|
40
40
|
.description(`Create a new transaction.`)
|
|
41
41
|
.option(`--ttl <ttl>`, `Seconds before the transaction expires.`, parseInteger)
|
|
42
|
-
.action(actionRunner(async ({ ttl }) => await (await getTablesDBClient()).createTransaction(ttl)));
|
|
43
|
-
|
|
42
|
+
.action(actionRunner(async ({ ttl }) => parse(await (await getTablesDBClient()).createTransaction(ttl))));
|
|
43
|
+
tablesDB
|
|
44
44
|
.command(`get-transaction`)
|
|
45
45
|
.description(`Get a transaction by its unique ID.`)
|
|
46
46
|
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
47
|
-
.action(actionRunner(async ({ transactionId }) => await (await getTablesDBClient()).getTransaction(transactionId)));
|
|
48
|
-
|
|
47
|
+
.action(actionRunner(async ({ transactionId }) => parse(await (await getTablesDBClient()).getTransaction(transactionId))));
|
|
48
|
+
tablesDB
|
|
49
49
|
.command(`update-transaction`)
|
|
50
50
|
.description(`Update a transaction, to either commit or roll back its operations.`)
|
|
51
51
|
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
52
52
|
.option(`--commit [value]`, `Commit transaction?`, (value) => value === undefined ? true : parseBool(value))
|
|
53
53
|
.option(`--rollback [value]`, `Rollback transaction?`, (value) => value === undefined ? true : parseBool(value))
|
|
54
|
-
.action(actionRunner(async ({ transactionId, commit, rollback }) => await (await getTablesDBClient()).updateTransaction(transactionId, commit, rollback)));
|
|
55
|
-
|
|
54
|
+
.action(actionRunner(async ({ transactionId, commit, rollback }) => parse(await (await getTablesDBClient()).updateTransaction(transactionId, commit, rollback))));
|
|
55
|
+
tablesDB
|
|
56
56
|
.command(`delete-transaction`)
|
|
57
57
|
.description(`Delete a transaction by its unique ID.`)
|
|
58
58
|
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
59
|
-
.action(actionRunner(async ({ transactionId }) => await (await getTablesDBClient()).deleteTransaction(transactionId)));
|
|
60
|
-
|
|
59
|
+
.action(actionRunner(async ({ transactionId }) => parse(await (await getTablesDBClient()).deleteTransaction(transactionId))));
|
|
60
|
+
tablesDB
|
|
61
61
|
.command(`create-operations`)
|
|
62
62
|
.description(`Create multiple operations in a single transaction.`)
|
|
63
63
|
.requiredOption(`--transaction-id <transaction-id>`, `Transaction ID.`)
|
|
64
64
|
.option(`--operations [operations...]`, `Array of staged operations.`)
|
|
65
|
-
.action(actionRunner(async ({ transactionId, operations }) => await (await getTablesDBClient()).createOperations(transactionId, operations)));
|
|
66
|
-
|
|
65
|
+
.action(actionRunner(async ({ transactionId, operations }) => parse(await (await getTablesDBClient()).createOperations(transactionId, operations))));
|
|
66
|
+
tablesDB
|
|
67
67
|
.command(`list-usage`)
|
|
68
68
|
.description(`List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
|
|
69
69
|
.option(`--range <range>`, `Date range.`)
|
|
70
|
-
.action(actionRunner(async ({ range }) => await (await getTablesDBClient()).listUsage(range)));
|
|
71
|
-
|
|
70
|
+
.action(actionRunner(async ({ range }) => parse(await (await getTablesDBClient()).listUsage(range))));
|
|
71
|
+
tablesDB
|
|
72
72
|
.command(`get`)
|
|
73
73
|
.description(`Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.`)
|
|
74
74
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
75
|
-
.action(actionRunner(async ({ databaseId }) => await (await getTablesDBClient()).get(databaseId)));
|
|
76
|
-
|
|
75
|
+
.action(actionRunner(async ({ databaseId }) => parse(await (await getTablesDBClient()).get(databaseId))));
|
|
76
|
+
tablesDB
|
|
77
77
|
.command(`update`)
|
|
78
78
|
.description(`Update a database by its unique ID.`)
|
|
79
79
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
80
80
|
.requiredOption(`--name <name>`, `Database name. Max length: 128 chars.`)
|
|
81
81
|
.option(`--enabled [value]`, `Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
82
|
-
.action(actionRunner(async ({ databaseId, name, enabled }) => await (await getTablesDBClient()).update(databaseId, name, enabled)));
|
|
83
|
-
|
|
82
|
+
.action(actionRunner(async ({ databaseId, name, enabled }) => parse(await (await getTablesDBClient()).update(databaseId, name, enabled))));
|
|
83
|
+
tablesDB
|
|
84
84
|
.command(`delete`)
|
|
85
85
|
.description(`Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.`)
|
|
86
86
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
87
|
-
.action(actionRunner(async ({ databaseId }) => await (await getTablesDBClient()).delete(databaseId)));
|
|
88
|
-
|
|
87
|
+
.action(actionRunner(async ({ databaseId }) => parse(await (await getTablesDBClient()).delete(databaseId))));
|
|
88
|
+
tablesDB
|
|
89
89
|
.command(`list-tables`)
|
|
90
90
|
.description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`)
|
|
91
91
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
92
92
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity`)
|
|
93
93
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
94
94
|
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
95
|
-
.action(actionRunner(async ({ databaseId, queries, search, total }) => await (await getTablesDBClient()).listTables(databaseId, queries, search, total)));
|
|
96
|
-
|
|
95
|
+
.action(actionRunner(async ({ databaseId, queries, search, total }) => parse(await (await getTablesDBClient()).listTables(databaseId, queries, search, total))));
|
|
96
|
+
tablesDB
|
|
97
97
|
.command(`create-table`)
|
|
98
98
|
.description(`Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
|
|
99
99
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -104,14 +104,14 @@ tablesdb
|
|
|
104
104
|
.option(`--enabled [value]`, `Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
105
105
|
.option(`--columns [columns...]`, `Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.`)
|
|
106
106
|
.option(`--indexes [indexes...]`, `Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).`)
|
|
107
|
-
.action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled, columns, indexes
|
|
108
|
-
|
|
107
|
+
.action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled, columns, indexes }) => parse(await (await getTablesDBClient()).createTable(databaseId, tableId, name, permissions, rowSecurity, enabled, columns, indexes))));
|
|
108
|
+
tablesDB
|
|
109
109
|
.command(`get-table`)
|
|
110
110
|
.description(`Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.`)
|
|
111
111
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
112
112
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
113
|
-
.action(actionRunner(async ({ databaseId, tableId }) => await (await getTablesDBClient()).getTable(databaseId, tableId)));
|
|
114
|
-
|
|
113
|
+
.action(actionRunner(async ({ databaseId, tableId }) => parse(await (await getTablesDBClient()).getTable(databaseId, tableId))));
|
|
114
|
+
tablesDB
|
|
115
115
|
.command(`update-table`)
|
|
116
116
|
.description(`Update a table by its unique ID.`)
|
|
117
117
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -120,22 +120,22 @@ tablesdb
|
|
|
120
120
|
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
121
121
|
.option(`--row-security [value]`, `Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value) => value === undefined ? true : parseBool(value))
|
|
122
122
|
.option(`--enabled [value]`, `Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
123
|
-
.action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled
|
|
124
|
-
|
|
123
|
+
.action(actionRunner(async ({ databaseId, tableId, name, permissions, rowSecurity, enabled }) => parse(await (await getTablesDBClient()).updateTable(databaseId, tableId, name, permissions, rowSecurity, enabled))));
|
|
124
|
+
tablesDB
|
|
125
125
|
.command(`delete-table`)
|
|
126
126
|
.description(`Delete a table by its unique ID. Only users with write permissions have access to delete this resource.`)
|
|
127
127
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
128
128
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
129
|
-
.action(actionRunner(async ({ databaseId, tableId }) => await (await getTablesDBClient()).deleteTable(databaseId, tableId)));
|
|
130
|
-
|
|
129
|
+
.action(actionRunner(async ({ databaseId, tableId }) => parse(await (await getTablesDBClient()).deleteTable(databaseId, tableId))));
|
|
130
|
+
tablesDB
|
|
131
131
|
.command(`list-columns`)
|
|
132
132
|
.description(`List columns in the table.`)
|
|
133
133
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
134
134
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
135
135
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error`)
|
|
136
136
|
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
137
|
-
.action(actionRunner(async ({ databaseId, tableId, queries, total }) => await (await getTablesDBClient()).listColumns(databaseId, tableId, queries, total)));
|
|
138
|
-
|
|
137
|
+
.action(actionRunner(async ({ databaseId, tableId, queries, total }) => parse(await (await getTablesDBClient()).listColumns(databaseId, tableId, queries, total))));
|
|
138
|
+
tablesDB
|
|
139
139
|
.command(`create-boolean-column`)
|
|
140
140
|
.description(`Create a boolean column.
|
|
141
141
|
`)
|
|
@@ -143,40 +143,40 @@ tablesdb
|
|
|
143
143
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
144
144
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
145
145
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
146
|
-
.option(`--
|
|
146
|
+
.option(`--xdefault [value]`, `Default value for column when not provided. Cannot be set when column is required.`, (value) => value === undefined ? true : parseBool(value))
|
|
147
147
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
148
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
149
|
-
|
|
148
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createBooleanColumn(databaseId, tableId, key, required, xdefault, array))));
|
|
149
|
+
tablesDB
|
|
150
150
|
.command(`update-boolean-column`)
|
|
151
151
|
.description(`Update a boolean column. Changing the \`default\` value will not update already existing rows.`)
|
|
152
152
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
153
153
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
154
154
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
155
155
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
156
|
-
.requiredOption(`--
|
|
156
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`, parseBool)
|
|
157
157
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
158
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
159
|
-
|
|
158
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateBooleanColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
159
|
+
tablesDB
|
|
160
160
|
.command(`create-datetime-column`)
|
|
161
161
|
.description(`Create a date time column according to the ISO 8601 standard.`)
|
|
162
162
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
163
163
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
164
164
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
165
165
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
166
|
-
.option(`--
|
|
166
|
+
.option(`--xdefault <xdefault>`, `Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.`)
|
|
167
167
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
168
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
169
|
-
|
|
168
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createDatetimeColumn(databaseId, tableId, key, required, xdefault, array))));
|
|
169
|
+
tablesDB
|
|
170
170
|
.command(`update-datetime-column`)
|
|
171
171
|
.description(`Update a date time column. Changing the \`default\` value will not update already existing rows.`)
|
|
172
172
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
173
173
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
174
174
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
175
175
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
176
|
-
.requiredOption(`--
|
|
176
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
177
177
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
178
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
179
|
-
|
|
178
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateDatetimeColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
179
|
+
tablesDB
|
|
180
180
|
.command(`create-email-column`)
|
|
181
181
|
.description(`Create an email column.
|
|
182
182
|
`)
|
|
@@ -184,10 +184,10 @@ tablesdb
|
|
|
184
184
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
185
185
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
186
186
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
187
|
-
.option(`--
|
|
187
|
+
.option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
188
188
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
189
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
190
|
-
|
|
189
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createEmailColumn(databaseId, tableId, key, required, xdefault, array))));
|
|
190
|
+
tablesDB
|
|
191
191
|
.command(`update-email-column`)
|
|
192
192
|
.description(`Update an email column. Changing the \`default\` value will not update already existing rows.
|
|
193
193
|
`)
|
|
@@ -195,10 +195,10 @@ tablesdb
|
|
|
195
195
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
196
196
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
197
197
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
198
|
-
.requiredOption(`--
|
|
198
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
199
199
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
200
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
201
|
-
|
|
200
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateEmailColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
201
|
+
tablesDB
|
|
202
202
|
.command(`create-enum-column`)
|
|
203
203
|
.description(`Create an enumeration column. The \`elements\` param acts as a white-list of accepted values for this column.`)
|
|
204
204
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -206,10 +206,10 @@ tablesdb
|
|
|
206
206
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
207
207
|
.requiredOption(`--elements [elements...]`, `Array of enum values.`)
|
|
208
208
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
209
|
-
.option(`--
|
|
209
|
+
.option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
210
210
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
211
|
-
.action(actionRunner(async ({ databaseId, tableId, key, elements, required,
|
|
212
|
-
|
|
211
|
+
.action(actionRunner(async ({ databaseId, tableId, key, elements, required, xdefault, array }) => parse(await (await getTablesDBClient()).createEnumColumn(databaseId, tableId, key, elements, required, xdefault, array))));
|
|
212
|
+
tablesDB
|
|
213
213
|
.command(`update-enum-column`)
|
|
214
214
|
.description(`Update an enum column. Changing the \`default\` value will not update already existing rows.
|
|
215
215
|
`)
|
|
@@ -218,10 +218,10 @@ tablesdb
|
|
|
218
218
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
219
219
|
.requiredOption(`--elements [elements...]`, `Updated list of enum values.`)
|
|
220
220
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
221
|
-
.requiredOption(`--
|
|
221
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
222
222
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
223
|
-
.action(actionRunner(async ({ databaseId, tableId, key, elements, required,
|
|
224
|
-
|
|
223
|
+
.action(actionRunner(async ({ databaseId, tableId, key, elements, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateEnumColumn(databaseId, tableId, key, elements, required, xdefault, newKey))));
|
|
224
|
+
tablesDB
|
|
225
225
|
.command(`create-float-column`)
|
|
226
226
|
.description(`Create a float column. Optionally, minimum and maximum values can be provided.
|
|
227
227
|
`)
|
|
@@ -231,10 +231,10 @@ tablesdb
|
|
|
231
231
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
232
232
|
.option(`--min <min>`, `Minimum value`, parseInteger)
|
|
233
233
|
.option(`--max <max>`, `Maximum value`, parseInteger)
|
|
234
|
-
.option(`--
|
|
234
|
+
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
|
|
235
235
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
236
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required, min, max,
|
|
237
|
-
|
|
236
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xdefault, array }) => parse(await (await getTablesDBClient()).createFloatColumn(databaseId, tableId, key, required, min, max, xdefault, array))));
|
|
237
|
+
tablesDB
|
|
238
238
|
.command(`update-float-column`)
|
|
239
239
|
.description(`Update a float column. Changing the \`default\` value will not update already existing rows.
|
|
240
240
|
`)
|
|
@@ -242,12 +242,12 @@ tablesdb
|
|
|
242
242
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
243
243
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
244
244
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
245
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when required.`, parseInteger)
|
|
245
246
|
.option(`--min <min>`, `Minimum value`, parseInteger)
|
|
246
247
|
.option(`--max <max>`, `Maximum value`, parseInteger)
|
|
247
|
-
.requiredOption(`--default <default>`, `Default value. Cannot be set when required.`, parseInteger)
|
|
248
248
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
249
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required, min, max,
|
|
250
|
-
|
|
249
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, min, max, newKey }) => parse(await (await getTablesDBClient()).updateFloatColumn(databaseId, tableId, key, required, xdefault, min, max, newKey))));
|
|
250
|
+
tablesDB
|
|
251
251
|
.command(`create-integer-column`)
|
|
252
252
|
.description(`Create an integer column. Optionally, minimum and maximum values can be provided.
|
|
253
253
|
`)
|
|
@@ -257,10 +257,10 @@ tablesdb
|
|
|
257
257
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
258
258
|
.option(`--min <min>`, `Minimum value`, parseInteger)
|
|
259
259
|
.option(`--max <max>`, `Maximum value`, parseInteger)
|
|
260
|
-
.option(`--
|
|
260
|
+
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`, parseInteger)
|
|
261
261
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
262
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required, min, max,
|
|
263
|
-
|
|
262
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, min, max, xdefault, array }) => parse(await (await getTablesDBClient()).createIntegerColumn(databaseId, tableId, key, required, min, max, xdefault, array))));
|
|
263
|
+
tablesDB
|
|
264
264
|
.command(`update-integer-column`)
|
|
265
265
|
.description(`Update an integer column. Changing the \`default\` value will not update already existing rows.
|
|
266
266
|
`)
|
|
@@ -268,12 +268,12 @@ tablesdb
|
|
|
268
268
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
269
269
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
270
270
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
271
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`, parseInteger)
|
|
271
272
|
.option(`--min <min>`, `Minimum value`, parseInteger)
|
|
272
273
|
.option(`--max <max>`, `Maximum value`, parseInteger)
|
|
273
|
-
.requiredOption(`--default <default>`, `Default value. Cannot be set when column is required.`, parseInteger)
|
|
274
274
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
275
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required, min, max,
|
|
276
|
-
|
|
275
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, min, max, newKey }) => parse(await (await getTablesDBClient()).updateIntegerColumn(databaseId, tableId, key, required, xdefault, min, max, newKey))));
|
|
276
|
+
tablesDB
|
|
277
277
|
.command(`create-ip-column`)
|
|
278
278
|
.description(`Create IP address column.
|
|
279
279
|
`)
|
|
@@ -281,10 +281,10 @@ tablesdb
|
|
|
281
281
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
282
282
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
283
283
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
284
|
-
.option(`--
|
|
284
|
+
.option(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`)
|
|
285
285
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
286
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
287
|
-
|
|
286
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createIpColumn(databaseId, tableId, key, required, xdefault, array))));
|
|
287
|
+
tablesDB
|
|
288
288
|
.command(`update-ip-column`)
|
|
289
289
|
.description(`Update an ip column. Changing the \`default\` value will not update already existing rows.
|
|
290
290
|
`)
|
|
@@ -292,67 +292,67 @@ tablesdb
|
|
|
292
292
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
293
293
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
294
294
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
295
|
-
.requiredOption(`--
|
|
295
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when column is required.`)
|
|
296
296
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
297
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
298
|
-
|
|
297
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateIpColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
298
|
+
tablesDB
|
|
299
299
|
.command(`create-line-column`)
|
|
300
300
|
.description(`Create a geometric line column.`)
|
|
301
301
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
302
302
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
303
303
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
304
304
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
305
|
-
.option(`--
|
|
306
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
307
|
-
|
|
305
|
+
.option(`--xdefault [xdefault...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
|
|
306
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault }) => parse(await (await getTablesDBClient()).createLineColumn(databaseId, tableId, key, required, xdefault))));
|
|
307
|
+
tablesDB
|
|
308
308
|
.command(`update-line-column`)
|
|
309
309
|
.description(`Update a line column. Changing the \`default\` value will not update already existing rows.`)
|
|
310
310
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
311
311
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
312
312
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
313
313
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
314
|
-
.option(`--
|
|
314
|
+
.option(`--xdefault [xdefault...]`, `Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.`)
|
|
315
315
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
316
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
317
|
-
|
|
316
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateLineColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
317
|
+
tablesDB
|
|
318
318
|
.command(`create-point-column`)
|
|
319
319
|
.description(`Create a geometric point column.`)
|
|
320
320
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
321
321
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
322
322
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
323
323
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
324
|
-
.option(`--
|
|
325
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
326
|
-
|
|
324
|
+
.option(`--xdefault [xdefault...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
|
|
325
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault }) => parse(await (await getTablesDBClient()).createPointColumn(databaseId, tableId, key, required, xdefault))));
|
|
326
|
+
tablesDB
|
|
327
327
|
.command(`update-point-column`)
|
|
328
328
|
.description(`Update a point column. Changing the \`default\` value will not update already existing rows.`)
|
|
329
329
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
330
330
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
331
331
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
332
332
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
333
|
-
.option(`--
|
|
333
|
+
.option(`--xdefault [xdefault...]`, `Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.`)
|
|
334
334
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
335
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
336
|
-
|
|
335
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updatePointColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
336
|
+
tablesDB
|
|
337
337
|
.command(`create-polygon-column`)
|
|
338
338
|
.description(`Create a geometric polygon column.`)
|
|
339
339
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
340
340
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
341
341
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
342
342
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
343
|
-
.option(`--
|
|
344
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
345
|
-
|
|
343
|
+
.option(`--xdefault [xdefault...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
|
|
344
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault }) => parse(await (await getTablesDBClient()).createPolygonColumn(databaseId, tableId, key, required, xdefault))));
|
|
345
|
+
tablesDB
|
|
346
346
|
.command(`update-polygon-column`)
|
|
347
347
|
.description(`Update a polygon column. Changing the \`default\` value will not update already existing rows.`)
|
|
348
348
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
349
349
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
350
350
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
351
351
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
352
|
-
.option(`--
|
|
352
|
+
.option(`--xdefault [xdefault...]`, `Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.`)
|
|
353
353
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
354
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
355
|
-
|
|
354
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updatePolygonColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
355
|
+
tablesDB
|
|
356
356
|
.command(`create-relationship-column`)
|
|
357
357
|
.description(`Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
358
358
|
`)
|
|
@@ -364,8 +364,8 @@ tablesdb
|
|
|
364
364
|
.option(`--key <key>`, `Column Key.`)
|
|
365
365
|
.option(`--two-way-key <two-way-key>`, `Two Way Column Key.`)
|
|
366
366
|
.option(`--on-delete <on-delete>`, `Constraints option`)
|
|
367
|
-
.action(actionRunner(async ({ databaseId, tableId, relatedTableId,
|
|
368
|
-
|
|
367
|
+
.action(actionRunner(async ({ databaseId, tableId, relatedTableId, type, twoWay, key, twoWayKey, onDelete }) => parse(await (await getTablesDBClient()).createRelationshipColumn(databaseId, tableId, relatedTableId, type, twoWay, key, twoWayKey, onDelete))));
|
|
368
|
+
tablesDB
|
|
369
369
|
.command(`create-string-column`)
|
|
370
370
|
.description(`Create a string column.
|
|
371
371
|
`)
|
|
@@ -374,11 +374,11 @@ tablesdb
|
|
|
374
374
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
375
375
|
.requiredOption(`--size <size>`, `Column size for text columns, in number of characters.`, parseInteger)
|
|
376
376
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
377
|
-
.option(`--
|
|
377
|
+
.option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
378
378
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
379
379
|
.option(`--encrypt [value]`, `Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.`, (value) => value === undefined ? true : parseBool(value))
|
|
380
|
-
.action(actionRunner(async ({ databaseId, tableId, key, size, required,
|
|
381
|
-
|
|
380
|
+
.action(actionRunner(async ({ databaseId, tableId, key, size, required, xdefault, array, encrypt }) => parse(await (await getTablesDBClient()).createStringColumn(databaseId, tableId, key, size, required, xdefault, array, encrypt))));
|
|
381
|
+
tablesDB
|
|
382
382
|
.command(`update-string-column`)
|
|
383
383
|
.description(`Update a string column. Changing the \`default\` value will not update already existing rows.
|
|
384
384
|
`)
|
|
@@ -386,11 +386,11 @@ tablesdb
|
|
|
386
386
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
387
387
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
388
388
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
389
|
-
.requiredOption(`--
|
|
389
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
390
390
|
.option(`--size <size>`, `Maximum size of the string column.`, parseInteger)
|
|
391
391
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
392
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
393
|
-
|
|
392
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, size, newKey }) => parse(await (await getTablesDBClient()).updateStringColumn(databaseId, tableId, key, required, xdefault, size, newKey))));
|
|
393
|
+
tablesDB
|
|
394
394
|
.command(`create-url-column`)
|
|
395
395
|
.description(`Create a URL column.
|
|
396
396
|
`)
|
|
@@ -398,10 +398,10 @@ tablesdb
|
|
|
398
398
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
399
399
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
400
400
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
401
|
-
.option(`--
|
|
401
|
+
.option(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
402
402
|
.option(`--array [value]`, `Is column an array?`, (value) => value === undefined ? true : parseBool(value))
|
|
403
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
404
|
-
|
|
403
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, array }) => parse(await (await getTablesDBClient()).createUrlColumn(databaseId, tableId, key, required, xdefault, array))));
|
|
404
|
+
tablesDB
|
|
405
405
|
.command(`update-url-column`)
|
|
406
406
|
.description(`Update an url column. Changing the \`default\` value will not update already existing rows.
|
|
407
407
|
`)
|
|
@@ -409,24 +409,24 @@ tablesdb
|
|
|
409
409
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
410
410
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
411
411
|
.requiredOption(`--required <required>`, `Is column required?`, parseBool)
|
|
412
|
-
.requiredOption(`--
|
|
412
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for column when not provided. Cannot be set when column is required.`)
|
|
413
413
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
414
|
-
.action(actionRunner(async ({ databaseId, tableId, key, required,
|
|
415
|
-
|
|
414
|
+
.action(actionRunner(async ({ databaseId, tableId, key, required, xdefault, newKey }) => parse(await (await getTablesDBClient()).updateUrlColumn(databaseId, tableId, key, required, xdefault, newKey))));
|
|
415
|
+
tablesDB
|
|
416
416
|
.command(`get-column`)
|
|
417
417
|
.description(`Get column by ID.`)
|
|
418
418
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
419
419
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
420
420
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
421
|
-
.action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).getColumn(databaseId, tableId, key)));
|
|
422
|
-
|
|
421
|
+
.action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).getColumn(databaseId, tableId, key))));
|
|
422
|
+
tablesDB
|
|
423
423
|
.command(`delete-column`)
|
|
424
424
|
.description(`Deletes a column.`)
|
|
425
425
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
426
426
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
427
427
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
428
|
-
.action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).deleteColumn(databaseId, tableId, key)));
|
|
429
|
-
|
|
428
|
+
.action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).deleteColumn(databaseId, tableId, key))));
|
|
429
|
+
tablesDB
|
|
430
430
|
.command(`update-relationship-column`)
|
|
431
431
|
.description(`Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
432
432
|
`)
|
|
@@ -435,16 +435,16 @@ tablesdb
|
|
|
435
435
|
.requiredOption(`--key <key>`, `Column Key.`)
|
|
436
436
|
.option(`--on-delete <on-delete>`, `Constraints option`)
|
|
437
437
|
.option(`--new-key <new-key>`, `New Column Key.`)
|
|
438
|
-
.action(actionRunner(async ({ databaseId, tableId, key, onDelete, newKey }) => await (await getTablesDBClient()).updateRelationshipColumn(databaseId, tableId, key, onDelete, newKey)));
|
|
439
|
-
|
|
438
|
+
.action(actionRunner(async ({ databaseId, tableId, key, onDelete, newKey }) => parse(await (await getTablesDBClient()).updateRelationshipColumn(databaseId, tableId, key, onDelete, newKey))));
|
|
439
|
+
tablesDB
|
|
440
440
|
.command(`list-indexes`)
|
|
441
441
|
.description(`List indexes on the table.`)
|
|
442
442
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
443
443
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
444
444
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error`)
|
|
445
445
|
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
446
|
-
.action(actionRunner(async ({ databaseId, tableId, queries, total }) => await (await getTablesDBClient()).listIndexes(databaseId, tableId, queries, total)));
|
|
447
|
-
|
|
446
|
+
.action(actionRunner(async ({ databaseId, tableId, queries, total }) => parse(await (await getTablesDBClient()).listIndexes(databaseId, tableId, queries, total))));
|
|
447
|
+
tablesDB
|
|
448
448
|
.command(`create-index`)
|
|
449
449
|
.description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request.
|
|
450
450
|
Type can be \`key\`, \`fulltext\`, or \`unique\`.`)
|
|
@@ -455,29 +455,29 @@ Type can be \`key\`, \`fulltext\`, or \`unique\`.`)
|
|
|
455
455
|
.requiredOption(`--columns [columns...]`, `Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.`)
|
|
456
456
|
.option(`--orders [orders...]`, `Array of index orders. Maximum of 100 orders are allowed.`)
|
|
457
457
|
.option(`--lengths [lengths...]`, `Length of index. Maximum of 100`)
|
|
458
|
-
.action(actionRunner(async ({ databaseId, tableId, key,
|
|
459
|
-
|
|
458
|
+
.action(actionRunner(async ({ databaseId, tableId, key, type, columns, orders, lengths }) => parse(await (await getTablesDBClient()).createIndex(databaseId, tableId, key, type, columns, orders, lengths))));
|
|
459
|
+
tablesDB
|
|
460
460
|
.command(`get-index`)
|
|
461
461
|
.description(`Get index by ID.`)
|
|
462
462
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
463
463
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
464
464
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
465
|
-
.action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).getIndex(databaseId, tableId, key)));
|
|
466
|
-
|
|
465
|
+
.action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).getIndex(databaseId, tableId, key))));
|
|
466
|
+
tablesDB
|
|
467
467
|
.command(`delete-index`)
|
|
468
468
|
.description(`Delete an index.`)
|
|
469
469
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
470
470
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
471
471
|
.requiredOption(`--key <key>`, `Index Key.`)
|
|
472
|
-
.action(actionRunner(async ({ databaseId, tableId, key }) => await (await getTablesDBClient()).deleteIndex(databaseId, tableId, key)));
|
|
473
|
-
|
|
472
|
+
.action(actionRunner(async ({ databaseId, tableId, key }) => parse(await (await getTablesDBClient()).deleteIndex(databaseId, tableId, key))));
|
|
473
|
+
tablesDB
|
|
474
474
|
.command(`list-table-logs`)
|
|
475
475
|
.description(`Get the table activity logs list by its unique ID.`)
|
|
476
476
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
477
477
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
478
478
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
479
|
-
.action(actionRunner(async ({ databaseId, tableId, queries }) => await (await getTablesDBClient()).listTableLogs(databaseId, tableId, queries)));
|
|
480
|
-
|
|
479
|
+
.action(actionRunner(async ({ databaseId, tableId, queries }) => parse(await (await getTablesDBClient()).listTableLogs(databaseId, tableId, queries))));
|
|
480
|
+
tablesDB
|
|
481
481
|
.command(`list-rows`)
|
|
482
482
|
.description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`)
|
|
483
483
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -485,8 +485,8 @@ tablesdb
|
|
|
485
485
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`)
|
|
486
486
|
.option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
|
|
487
487
|
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
488
|
-
.action(actionRunner(async ({ databaseId, tableId, queries, transactionId, total }) => await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total)));
|
|
489
|
-
|
|
488
|
+
.action(actionRunner(async ({ databaseId, tableId, queries, transactionId, total }) => parse(await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total))));
|
|
489
|
+
tablesDB
|
|
490
490
|
.command(`create-row`)
|
|
491
491
|
.description(`Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
|
|
492
492
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -495,8 +495,16 @@ tablesdb
|
|
|
495
495
|
.requiredOption(`--data <data>`, `Row data as JSON object.`)
|
|
496
496
|
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
497
497
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
498
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId
|
|
499
|
-
|
|
498
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId }) => parse(await (await getTablesDBClient()).createRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId))));
|
|
499
|
+
tablesDB
|
|
500
|
+
.command(`create-rows`)
|
|
501
|
+
.description(`Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
|
|
502
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
503
|
+
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`)
|
|
504
|
+
.requiredOption(`--rows [rows...]`, `Array of rows data as JSON objects.`)
|
|
505
|
+
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
506
|
+
.action(actionRunner(async ({ databaseId, tableId, rows, transactionId }) => parse(await (await getTablesDBClient()).createRows(databaseId, tableId, rows, transactionId))));
|
|
507
|
+
tablesDB
|
|
500
508
|
.command(`upsert-rows`)
|
|
501
509
|
.description(`Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
502
510
|
`)
|
|
@@ -504,8 +512,8 @@ tablesdb
|
|
|
504
512
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
505
513
|
.requiredOption(`--rows [rows...]`, `Array of row data as JSON objects. May contain partial rows.`)
|
|
506
514
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
507
|
-
.action(actionRunner(async ({ databaseId, tableId, rows, transactionId }) => await (await getTablesDBClient()).upsertRows(databaseId, tableId, rows, transactionId)));
|
|
508
|
-
|
|
515
|
+
.action(actionRunner(async ({ databaseId, tableId, rows, transactionId }) => parse(await (await getTablesDBClient()).upsertRows(databaseId, tableId, rows, transactionId))));
|
|
516
|
+
tablesDB
|
|
509
517
|
.command(`update-rows`)
|
|
510
518
|
.description(`Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.`)
|
|
511
519
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -513,16 +521,16 @@ tablesdb
|
|
|
513
521
|
.option(`--data <data>`, `Row data as JSON object. Include only column and value pairs to be updated.`)
|
|
514
522
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`)
|
|
515
523
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
516
|
-
.action(actionRunner(async ({ databaseId, tableId, data, queries, transactionId }) => await (await getTablesDBClient()).updateRows(databaseId, tableId, JSON.parse(data), queries, transactionId)));
|
|
517
|
-
|
|
524
|
+
.action(actionRunner(async ({ databaseId, tableId, data, queries, transactionId }) => parse(await (await getTablesDBClient()).updateRows(databaseId, tableId, JSON.parse(data), queries, transactionId))));
|
|
525
|
+
tablesDB
|
|
518
526
|
.command(`delete-rows`)
|
|
519
527
|
.description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`)
|
|
520
528
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
521
529
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
522
530
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`)
|
|
523
531
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
524
|
-
.action(actionRunner(async ({ databaseId, tableId, queries, transactionId }) => await (await getTablesDBClient()).deleteRows(databaseId, tableId, queries, transactionId)));
|
|
525
|
-
|
|
532
|
+
.action(actionRunner(async ({ databaseId, tableId, queries, transactionId }) => parse(await (await getTablesDBClient()).deleteRows(databaseId, tableId, queries, transactionId))));
|
|
533
|
+
tablesDB
|
|
526
534
|
.command(`get-row`)
|
|
527
535
|
.description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`)
|
|
528
536
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -530,8 +538,8 @@ tablesdb
|
|
|
530
538
|
.requiredOption(`--row-id <row-id>`, `Row ID.`)
|
|
531
539
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`)
|
|
532
540
|
.option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
|
|
533
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, queries, transactionId }) => await (await getTablesDBClient()).getRow(databaseId, tableId, rowId, queries, transactionId)));
|
|
534
|
-
|
|
541
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, queries, transactionId }) => parse(await (await getTablesDBClient()).getRow(databaseId, tableId, rowId, queries, transactionId))));
|
|
542
|
+
tablesDB
|
|
535
543
|
.command(`upsert-row`)
|
|
536
544
|
.description(`Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`)
|
|
537
545
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -540,8 +548,8 @@ tablesdb
|
|
|
540
548
|
.option(`--data <data>`, `Row data as JSON object. Include all required columns of the row to be created or updated.`)
|
|
541
549
|
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
542
550
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
543
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId
|
|
544
|
-
|
|
551
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId }) => parse(await (await getTablesDBClient()).upsertRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId))));
|
|
552
|
+
tablesDB
|
|
545
553
|
.command(`update-row`)
|
|
546
554
|
.description(`Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.`)
|
|
547
555
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -550,24 +558,24 @@ tablesdb
|
|
|
550
558
|
.option(`--data <data>`, `Row data as JSON object. Include only columns and value pairs to be updated.`)
|
|
551
559
|
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
552
560
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
553
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId
|
|
554
|
-
|
|
561
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, data, permissions, transactionId }) => parse(await (await getTablesDBClient()).updateRow(databaseId, tableId, rowId, JSON.parse(data), permissions, transactionId))));
|
|
562
|
+
tablesDB
|
|
555
563
|
.command(`delete-row`)
|
|
556
564
|
.description(`Delete a row by its unique ID.`)
|
|
557
565
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
558
566
|
.requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`)
|
|
559
567
|
.requiredOption(`--row-id <row-id>`, `Row ID.`)
|
|
560
568
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
561
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, transactionId }) => await (await getTablesDBClient()).deleteRow(databaseId, tableId, rowId, transactionId)));
|
|
562
|
-
|
|
569
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, transactionId }) => parse(await (await getTablesDBClient()).deleteRow(databaseId, tableId, rowId, transactionId))));
|
|
570
|
+
tablesDB
|
|
563
571
|
.command(`list-row-logs`)
|
|
564
572
|
.description(`Get the row activity logs list by its unique ID.`)
|
|
565
573
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
566
574
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
567
575
|
.requiredOption(`--row-id <row-id>`, `Row ID.`)
|
|
568
576
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
569
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, queries }) => await (await getTablesDBClient()).listRowLogs(databaseId, tableId, rowId, queries)));
|
|
570
|
-
|
|
577
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, queries }) => parse(await (await getTablesDBClient()).listRowLogs(databaseId, tableId, rowId, queries))));
|
|
578
|
+
tablesDB
|
|
571
579
|
.command(`decrement-row-column`)
|
|
572
580
|
.description(`Decrement a specific column of a row by a given value.`)
|
|
573
581
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -577,8 +585,8 @@ tablesdb
|
|
|
577
585
|
.option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger)
|
|
578
586
|
.option(`--min <min>`, `Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.`, parseInteger)
|
|
579
587
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
580
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, column, value, min, transactionId
|
|
581
|
-
|
|
588
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, column, value, min, transactionId }) => parse(await (await getTablesDBClient()).decrementRowColumn(databaseId, tableId, rowId, column, value, min, transactionId))));
|
|
589
|
+
tablesDB
|
|
582
590
|
.command(`increment-row-column`)
|
|
583
591
|
.description(`Increment a specific column of a row by a given value.`)
|
|
584
592
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
@@ -588,18 +596,18 @@ tablesdb
|
|
|
588
596
|
.option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger)
|
|
589
597
|
.option(`--max <max>`, `Maximum value for the column. If the current value is greater than this value, an error will be thrown.`, parseInteger)
|
|
590
598
|
.option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`)
|
|
591
|
-
.action(actionRunner(async ({ databaseId, tableId, rowId, column, value, max, transactionId
|
|
592
|
-
|
|
599
|
+
.action(actionRunner(async ({ databaseId, tableId, rowId, column, value, max, transactionId }) => parse(await (await getTablesDBClient()).incrementRowColumn(databaseId, tableId, rowId, column, value, max, transactionId))));
|
|
600
|
+
tablesDB
|
|
593
601
|
.command(`get-table-usage`)
|
|
594
602
|
.description(`Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
|
|
595
603
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
596
|
-
.option(`--range <range>`, `Date range.`)
|
|
597
604
|
.requiredOption(`--table-id <table-id>`, `Table ID.`)
|
|
598
|
-
.
|
|
599
|
-
|
|
605
|
+
.option(`--range <range>`, `Date range.`)
|
|
606
|
+
.action(actionRunner(async ({ databaseId, tableId, range }) => parse(await (await getTablesDBClient()).getTableUsage(databaseId, tableId, range))));
|
|
607
|
+
tablesDB
|
|
600
608
|
.command(`get-usage`)
|
|
601
609
|
.description(`Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
|
|
602
610
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
603
611
|
.option(`--range <range>`, `Date range.`)
|
|
604
|
-
.action(actionRunner(async ({ databaseId, range }) => await (await getTablesDBClient()).getUsage(databaseId, range)));
|
|
605
|
-
//# sourceMappingURL=
|
|
612
|
+
.action(actionRunner(async ({ databaseId, range }) => parse(await (await getTablesDBClient()).getUsage(databaseId, range))));
|
|
613
|
+
//# sourceMappingURL=tables-db.js.map
|