appwrite-cli 13.1.0-rc.3 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/README.md +2 -2
- package/dist/bundle-win-arm64.mjs +2851 -1365
- package/dist/cli.cjs +2851 -1365
- package/dist/index.js +1825 -606
- package/dist/lib/commands/config-validations.d.ts +3 -1
- package/dist/lib/commands/config-validations.d.ts.map +1 -1
- package/dist/lib/commands/generate.d.ts.map +1 -1
- package/dist/lib/commands/generators/base.d.ts.map +1 -1
- package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
- package/dist/lib/commands/generic.d.ts.map +1 -1
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/run.d.ts.map +1 -1
- package/dist/lib/commands/services/account.d.ts.map +1 -1
- package/dist/lib/commands/services/console.d.ts.map +1 -1
- package/dist/lib/commands/services/databases.d.ts.map +1 -1
- package/dist/lib/commands/services/functions.d.ts.map +1 -1
- package/dist/lib/commands/services/health.d.ts.map +1 -1
- package/dist/lib/commands/services/messaging.d.ts.map +1 -1
- package/dist/lib/commands/services/project.d.ts.map +1 -1
- package/dist/lib/commands/services/projects.d.ts.map +1 -1
- package/dist/lib/commands/services/proxy.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.d.ts.map +1 -1
- package/dist/lib/commands/services/tables-db.d.ts.map +1 -1
- package/dist/lib/commands/services/users.d.ts.map +1 -1
- package/dist/lib/commands/services/vcs.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/emulation/utils.d.ts +2 -1
- package/dist/lib/emulation/utils.d.ts.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/shared/typescript-type-utils.d.ts +2 -1
- package/dist/lib/shared/typescript-type-utils.d.ts.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/docs/examples/account/create-anonymous-session.md +2 -0
- package/docs/examples/account/create-email-password-session.md +2 -0
- package/docs/examples/account/create-email-token.md +2 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +2 -0
- package/docs/examples/account/create-magic-url-token.md +2 -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 +2 -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 +2 -0
- package/docs/examples/account/create-phone-verification.md +2 -0
- package/docs/examples/account/create-push-target.md +2 -0
- package/docs/examples/account/create-recovery.md +2 -0
- package/docs/examples/account/create-session.md +2 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +2 -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 +2 -0
- package/docs/examples/account/delete.md +2 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/get-prefs.md +2 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +2 -0
- package/docs/examples/account/list-identities.md +2 -0
- package/docs/examples/account/list-logs.md +2 -0
- package/docs/examples/account/list-mfa-factors.md +2 -0
- package/docs/examples/account/list-sessions.md +2 -0
- package/docs/examples/account/update-email-verification.md +2 -0
- package/docs/examples/account/update-email.md +2 -0
- package/docs/examples/account/update-magic-url-session.md +2 -0
- package/docs/examples/account/update-mfa-authenticator.md +2 -0
- package/docs/examples/account/update-mfa-challenge.md +2 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +2 -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 +2 -0
- package/docs/examples/account/update-phone-verification.md +2 -0
- package/docs/examples/account/update-phone.md +2 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +2 -0
- package/docs/examples/account/update-recovery.md +2 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +2 -0
- package/docs/examples/account/update-verification.md +2 -0
- package/docs/examples/console/get-resource.md +2 -0
- package/docs/examples/console/variables.md +2 -0
- package/docs/examples/databases/create-boolean-attribute.md +2 -0
- package/docs/examples/databases/create-collection.md +2 -0
- package/docs/examples/databases/create-datetime-attribute.md +2 -0
- package/docs/examples/databases/create-document.md +2 -0
- package/docs/examples/databases/create-documents.md +2 -0
- package/docs/examples/databases/create-email-attribute.md +2 -0
- package/docs/examples/databases/create-enum-attribute.md +2 -0
- package/docs/examples/databases/create-float-attribute.md +2 -0
- package/docs/examples/databases/create-index.md +2 -0
- package/docs/examples/databases/create-integer-attribute.md +2 -0
- package/docs/examples/databases/create-ip-attribute.md +2 -0
- package/docs/examples/databases/create-line-attribute.md +2 -0
- package/docs/examples/databases/create-longtext-attribute.md +7 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +7 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +2 -0
- package/docs/examples/databases/create-polygon-attribute.md +2 -0
- package/docs/examples/databases/create-relationship-attribute.md +2 -0
- package/docs/examples/databases/create-string-attribute.md +2 -0
- package/docs/examples/databases/create-text-attribute.md +7 -0
- package/docs/examples/databases/create-transaction.md +2 -0
- package/docs/examples/databases/create-url-attribute.md +2 -0
- package/docs/examples/databases/create-varchar-attribute.md +8 -0
- package/docs/examples/databases/create.md +2 -0
- package/docs/examples/databases/decrement-document-attribute.md +2 -0
- package/docs/examples/databases/delete-attribute.md +2 -0
- package/docs/examples/databases/delete-collection.md +2 -0
- package/docs/examples/databases/delete-document.md +2 -0
- package/docs/examples/databases/delete-documents.md +2 -0
- package/docs/examples/databases/delete-index.md +2 -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 +2 -0
- package/docs/examples/databases/get-collection-usage.md +2 -0
- package/docs/examples/databases/get-collection.md +2 -0
- package/docs/examples/databases/get-document.md +2 -0
- package/docs/examples/databases/get-index.md +2 -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 +2 -0
- package/docs/examples/databases/list-attributes.md +2 -0
- package/docs/examples/databases/list-collection-logs.md +2 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +2 -0
- package/docs/examples/databases/list-documents.md +2 -0
- package/docs/examples/databases/list-indexes.md +2 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +2 -0
- package/docs/examples/databases/list-usage.md +2 -0
- package/docs/examples/databases/list.md +2 -0
- package/docs/examples/databases/update-boolean-attribute.md +2 -0
- package/docs/examples/databases/update-collection.md +3 -2
- package/docs/examples/databases/update-datetime-attribute.md +2 -0
- package/docs/examples/databases/update-document.md +2 -0
- package/docs/examples/databases/update-documents.md +2 -0
- package/docs/examples/databases/update-email-attribute.md +2 -0
- package/docs/examples/databases/update-enum-attribute.md +2 -0
- package/docs/examples/databases/update-float-attribute.md +2 -0
- package/docs/examples/databases/update-integer-attribute.md +2 -0
- package/docs/examples/databases/update-ip-attribute.md +2 -0
- package/docs/examples/databases/update-line-attribute.md +2 -0
- package/docs/examples/databases/update-longtext-attribute.md +8 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +8 -0
- package/docs/examples/databases/update-point-attribute.md +2 -0
- package/docs/examples/databases/update-polygon-attribute.md +2 -0
- package/docs/examples/databases/update-relationship-attribute.md +2 -0
- package/docs/examples/databases/update-string-attribute.md +2 -0
- package/docs/examples/databases/update-text-attribute.md +8 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +2 -0
- package/docs/examples/databases/update-varchar-attribute.md +8 -0
- package/docs/examples/databases/update.md +3 -2
- package/docs/examples/databases/upsert-document.md +2 -0
- package/docs/examples/databases/upsert-documents.md +2 -0
- package/docs/examples/functions/create-deployment.md +2 -0
- package/docs/examples/functions/create-duplicate-deployment.md +2 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +2 -0
- package/docs/examples/functions/create-variable.md +2 -0
- package/docs/examples/functions/create-vcs-deployment.md +2 -0
- package/docs/examples/functions/create.md +2 -0
- package/docs/examples/functions/delete-deployment.md +2 -0
- package/docs/examples/functions/delete-execution.md +2 -0
- package/docs/examples/functions/delete-variable.md +2 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +2 -0
- package/docs/examples/functions/get-deployment.md +2 -0
- package/docs/examples/functions/get-execution.md +2 -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 +2 -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 +2 -0
- package/docs/examples/functions/list-specifications.md +2 -0
- package/docs/examples/functions/list-templates.md +2 -0
- package/docs/examples/functions/list-usage.md +2 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +2 -0
- package/docs/examples/functions/update-deployment-status.md +2 -0
- package/docs/examples/functions/update-function-deployment.md +2 -0
- package/docs/examples/functions/update-variable.md +2 -0
- package/docs/examples/functions/update.md +2 -0
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +2 -0
- package/docs/examples/health/get-cache.md +2 -0
- package/docs/examples/health/get-certificate.md +2 -0
- package/docs/examples/health/get-db.md +2 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +2 -0
- package/docs/examples/health/get-queue-audits.md +2 -0
- package/docs/examples/health/get-queue-builds.md +2 -0
- package/docs/examples/health/get-queue-certificates.md +2 -0
- package/docs/examples/health/get-queue-databases.md +2 -0
- package/docs/examples/health/get-queue-deletes.md +2 -0
- package/docs/examples/health/get-queue-functions.md +2 -0
- package/docs/examples/health/get-queue-logs.md +2 -0
- package/docs/examples/health/get-queue-mails.md +2 -0
- package/docs/examples/health/get-queue-messaging.md +2 -0
- package/docs/examples/health/get-queue-migrations.md +2 -0
- package/docs/examples/health/get-queue-stats-resources.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-queue-webhooks.md +2 -0
- package/docs/examples/health/get-storage-local.md +2 -0
- package/docs/examples/health/get-storage.md +2 -0
- package/docs/examples/health/get-time.md +2 -0
- package/docs/examples/health/get.md +2 -0
- package/docs/examples/locale/get.md +2 -0
- package/docs/examples/locale/list-codes.md +2 -0
- package/docs/examples/locale/list-continents.md +2 -0
- package/docs/examples/locale/list-countries-eu.md +2 -0
- package/docs/examples/locale/list-countries-phones.md +2 -0
- package/docs/examples/locale/list-countries.md +2 -0
- package/docs/examples/locale/list-currencies.md +2 -0
- package/docs/examples/locale/list-languages.md +2 -0
- package/docs/examples/messaging/create-apns-provider.md +2 -0
- package/docs/examples/messaging/create-email.md +2 -0
- package/docs/examples/messaging/create-fcm-provider.md +2 -0
- package/docs/examples/messaging/create-mailgun-provider.md +2 -0
- package/docs/examples/messaging/create-msg-91-provider.md +2 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +2 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/create-sms.md +2 -0
- package/docs/examples/messaging/create-smtp-provider.md +2 -0
- package/docs/examples/messaging/create-subscriber.md +2 -0
- package/docs/examples/messaging/create-telesign-provider.md +2 -0
- package/docs/examples/messaging/create-textmagic-provider.md +2 -0
- package/docs/examples/messaging/create-topic.md +2 -0
- package/docs/examples/messaging/create-twilio-provider.md +2 -0
- package/docs/examples/messaging/create-vonage-provider.md +2 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +2 -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 +2 -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 +2 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +2 -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 +2 -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 +2 -0
- package/docs/examples/migrations/create-csv-export.md +2 -0
- package/docs/examples/migrations/create-csv-import.md +2 -0
- package/docs/examples/migrations/create-firebase-migration.md +2 -0
- package/docs/examples/migrations/create-n-host-migration.md +2 -0
- package/docs/examples/migrations/create-supabase-migration.md +2 -0
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +2 -0
- package/docs/examples/migrations/get-firebase-report.md +2 -0
- package/docs/examples/migrations/get-n-host-report.md +2 -0
- package/docs/examples/migrations/get-supabase-report.md +2 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +2 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/project/create-variable.md +2 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +2 -0
- package/docs/examples/project/update-variable.md +2 -0
- package/docs/examples/projects/create-dev-key.md +2 -0
- package/docs/examples/projects/create-jwt.md +2 -0
- package/docs/examples/projects/create-key.md +2 -0
- package/docs/examples/projects/create-platform.md +2 -0
- package/docs/examples/projects/create-smtp-test.md +2 -0
- package/docs/examples/projects/create-webhook.md +2 -0
- package/docs/examples/projects/create.md +2 -0
- package/docs/examples/projects/delete-dev-key.md +2 -0
- package/docs/examples/projects/delete-email-template.md +2 -0
- package/docs/examples/projects/delete-key.md +2 -0
- package/docs/examples/projects/delete-platform.md +2 -0
- package/docs/examples/projects/delete-sms-template.md +2 -0
- package/docs/examples/projects/delete-webhook.md +2 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +2 -0
- package/docs/examples/projects/get-email-template.md +2 -0
- package/docs/examples/projects/get-key.md +2 -0
- package/docs/examples/projects/get-platform.md +2 -0
- package/docs/examples/projects/get-sms-template.md +2 -0
- package/docs/examples/projects/get-webhook.md +2 -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 +2 -0
- package/docs/examples/projects/update-api-status-all.md +2 -0
- package/docs/examples/projects/update-api-status.md +2 -0
- package/docs/examples/projects/update-auth-duration.md +2 -0
- package/docs/examples/projects/update-auth-limit.md +2 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +2 -0
- package/docs/examples/projects/update-auth-password-history.md +2 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +2 -0
- package/docs/examples/projects/update-auth-status.md +2 -0
- package/docs/examples/projects/update-dev-key.md +2 -0
- package/docs/examples/projects/update-email-template.md +2 -0
- package/docs/examples/projects/update-key.md +2 -0
- package/docs/examples/projects/update-labels.md +2 -0
- package/docs/examples/projects/update-memberships-privacy.md +2 -0
- package/docs/examples/projects/update-mock-numbers.md +2 -0
- package/docs/examples/projects/update-o-auth-2.md +2 -0
- package/docs/examples/projects/update-personal-data-check.md +2 -0
- package/docs/examples/projects/update-platform.md +2 -0
- package/docs/examples/projects/update-service-status-all.md +2 -0
- package/docs/examples/projects/update-service-status.md +2 -0
- package/docs/examples/projects/update-session-alerts.md +2 -0
- package/docs/examples/projects/update-session-invalidation.md +2 -0
- package/docs/examples/projects/update-sms-template.md +2 -0
- package/docs/examples/projects/update-smtp.md +2 -0
- package/docs/examples/projects/update-team.md +2 -0
- package/docs/examples/projects/update-webhook-signature.md +2 -0
- package/docs/examples/projects/update-webhook.md +2 -0
- package/docs/examples/projects/update.md +2 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +2 -0
- package/docs/examples/proxy/create-redirect-rule.md +2 -0
- package/docs/examples/proxy/create-site-rule.md +2 -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 +2 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +2 -0
- package/docs/examples/sites/create-duplicate-deployment.md +2 -0
- package/docs/examples/sites/create-template-deployment.md +2 -0
- package/docs/examples/sites/create-variable.md +2 -0
- package/docs/examples/sites/create-vcs-deployment.md +2 -0
- package/docs/examples/sites/create.md +2 -0
- package/docs/examples/sites/delete-deployment.md +2 -0
- package/docs/examples/sites/delete-log.md +2 -0
- package/docs/examples/sites/delete-variable.md +2 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +2 -0
- package/docs/examples/sites/get-deployment.md +2 -0
- package/docs/examples/sites/get-log.md +2 -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 +2 -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 +2 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +2 -0
- package/docs/examples/sites/list-templates.md +2 -0
- package/docs/examples/sites/list-usage.md +2 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +2 -0
- package/docs/examples/sites/update-deployment-status.md +2 -0
- package/docs/examples/sites/update-site-deployment.md +2 -0
- package/docs/examples/sites/update-variable.md +2 -0
- package/docs/examples/sites/update.md +2 -0
- package/docs/examples/storage/create-bucket.md +2 -0
- package/docs/examples/storage/create-file.md +2 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +2 -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 +2 -0
- package/docs/examples/storage/get-file-preview.md +2 -0
- package/docs/examples/storage/get-file-view.md +2 -0
- package/docs/examples/storage/get-file.md +2 -0
- package/docs/examples/storage/get-usage.md +2 -0
- package/docs/examples/storage/list-buckets.md +2 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +2 -0
- package/docs/examples/storage/update-file.md +2 -0
- package/docs/examples/tablesdb/create-boolean-column.md +2 -0
- package/docs/examples/tablesdb/create-datetime-column.md +2 -0
- package/docs/examples/tablesdb/create-email-column.md +2 -0
- package/docs/examples/tablesdb/create-enum-column.md +2 -0
- package/docs/examples/tablesdb/create-float-column.md +2 -0
- package/docs/examples/tablesdb/create-index.md +2 -0
- package/docs/examples/tablesdb/create-integer-column.md +2 -0
- package/docs/examples/tablesdb/create-ip-column.md +2 -0
- package/docs/examples/tablesdb/create-line-column.md +2 -0
- package/docs/examples/tablesdb/create-longtext-column.md +7 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +7 -0
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +2 -0
- package/docs/examples/tablesdb/create-polygon-column.md +2 -0
- package/docs/examples/tablesdb/create-relationship-column.md +2 -0
- package/docs/examples/tablesdb/create-row.md +2 -0
- package/docs/examples/tablesdb/create-rows.md +2 -0
- package/docs/examples/tablesdb/create-string-column.md +2 -0
- package/docs/examples/tablesdb/create-table.md +2 -0
- package/docs/examples/tablesdb/create-text-column.md +7 -0
- package/docs/examples/tablesdb/create-transaction.md +2 -0
- package/docs/examples/tablesdb/create-url-column.md +2 -0
- package/docs/examples/tablesdb/create-varchar-column.md +8 -0
- package/docs/examples/tablesdb/create.md +2 -0
- package/docs/examples/tablesdb/decrement-row-column.md +2 -0
- package/docs/examples/tablesdb/delete-column.md +2 -0
- package/docs/examples/tablesdb/delete-index.md +2 -0
- package/docs/examples/tablesdb/delete-row.md +2 -0
- package/docs/examples/tablesdb/delete-rows.md +2 -0
- package/docs/examples/tablesdb/delete-table.md +2 -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 +2 -0
- package/docs/examples/tablesdb/get-index.md +2 -0
- package/docs/examples/tablesdb/get-row.md +2 -0
- package/docs/examples/tablesdb/get-table-usage.md +2 -0
- package/docs/examples/tablesdb/get-table.md +2 -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 +2 -0
- package/docs/examples/tablesdb/list-columns.md +2 -0
- package/docs/examples/tablesdb/list-indexes.md +2 -0
- package/docs/examples/tablesdb/list-row-logs.md +2 -0
- package/docs/examples/tablesdb/list-rows.md +2 -0
- package/docs/examples/tablesdb/list-table-logs.md +2 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +2 -0
- package/docs/examples/tablesdb/list-usage.md +2 -0
- package/docs/examples/tablesdb/list.md +2 -0
- package/docs/examples/tablesdb/update-boolean-column.md +2 -0
- package/docs/examples/tablesdb/update-datetime-column.md +2 -0
- package/docs/examples/tablesdb/update-email-column.md +2 -0
- package/docs/examples/tablesdb/update-enum-column.md +2 -0
- package/docs/examples/tablesdb/update-float-column.md +2 -0
- package/docs/examples/tablesdb/update-integer-column.md +2 -0
- package/docs/examples/tablesdb/update-ip-column.md +2 -0
- package/docs/examples/tablesdb/update-line-column.md +2 -0
- package/docs/examples/tablesdb/update-longtext-column.md +8 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +8 -0
- package/docs/examples/tablesdb/update-point-column.md +2 -0
- package/docs/examples/tablesdb/update-polygon-column.md +2 -0
- package/docs/examples/tablesdb/update-relationship-column.md +2 -0
- package/docs/examples/tablesdb/update-row.md +2 -0
- package/docs/examples/tablesdb/update-rows.md +2 -0
- package/docs/examples/tablesdb/update-string-column.md +2 -0
- package/docs/examples/tablesdb/update-table.md +3 -2
- package/docs/examples/tablesdb/update-text-column.md +8 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +2 -0
- package/docs/examples/tablesdb/update-varchar-column.md +8 -0
- package/docs/examples/tablesdb/update.md +3 -2
- package/docs/examples/tablesdb/upsert-row.md +2 -0
- package/docs/examples/tablesdb/upsert-rows.md +2 -0
- package/docs/examples/teams/create-membership.md +2 -0
- package/docs/examples/teams/create.md +2 -0
- package/docs/examples/teams/delete-membership.md +2 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +2 -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 +2 -0
- package/docs/examples/teams/update-membership-status.md +2 -0
- package/docs/examples/teams/update-membership.md +2 -0
- package/docs/examples/teams/update-name.md +2 -0
- package/docs/examples/teams/update-prefs.md +2 -0
- package/docs/examples/tokens/create-file-token.md +2 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +2 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +2 -0
- package/docs/examples/users/create-bcrypt-user.md +2 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +2 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +2 -0
- package/docs/examples/users/create-scrypt-modified-user.md +2 -0
- package/docs/examples/users/create-scrypt-user.md +2 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +2 -0
- package/docs/examples/users/create-target.md +2 -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 +2 -0
- package/docs/examples/users/delete-session.md +2 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +2 -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 +2 -0
- package/docs/examples/users/get-usage.md +2 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +2 -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 +2 -0
- package/docs/examples/users/update-email-verification.md +2 -0
- package/docs/examples/users/update-email.md +2 -0
- package/docs/examples/users/update-labels.md +2 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +2 -0
- package/docs/examples/users/update-name.md +2 -0
- package/docs/examples/users/update-password.md +2 -0
- package/docs/examples/users/update-phone-verification.md +2 -0
- package/docs/examples/users/update-phone.md +2 -0
- package/docs/examples/users/update-prefs.md +2 -0
- package/docs/examples/users/update-status.md +2 -0
- package/docs/examples/users/update-target.md +2 -0
- package/docs/examples/vcs/create-repository-detection.md +2 -0
- package/docs/examples/vcs/create-repository.md +2 -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 +2 -0
- package/docs/examples/vcs/get-repository.md +2 -0
- package/docs/examples/vcs/list-installations.md +2 -0
- package/docs/examples/vcs/list-repositories.md +2 -0
- package/docs/examples/vcs/list-repository-branches.md +2 -0
- package/docs/examples/vcs/update-external-deployments.md +2 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/commands/config-validations.ts +16 -5
- package/lib/commands/generate.ts +16 -8
- package/lib/commands/generators/base.ts +4 -0
- package/lib/commands/generators/typescript/databases.ts +54 -41
- package/lib/commands/generators/typescript/templates/databases.ts.hbs +53 -34
- package/lib/commands/generators/typescript/templates/types.ts.hbs +24 -1
- package/lib/commands/generic.ts +1 -2
- package/lib/commands/init.ts +27 -38
- package/lib/commands/pull.ts +7 -0
- package/lib/commands/run.ts +2 -1
- package/lib/commands/services/account.ts +7 -12
- package/lib/commands/services/console.ts +2 -5
- package/lib/commands/services/databases.ts +167 -15
- package/lib/commands/services/functions.ts +9 -17
- package/lib/commands/services/health.ts +2 -5
- package/lib/commands/services/messaging.ts +5 -9
- package/lib/commands/services/project.ts +2 -5
- package/lib/commands/services/projects.ts +15 -28
- package/lib/commands/services/proxy.ts +2 -6
- package/lib/commands/services/sites.ts +8 -17
- package/lib/commands/services/storage.ts +6 -12
- package/lib/commands/services/tables-db.ts +167 -15
- package/lib/commands/services/users.ts +5 -11
- package/lib/commands/services/vcs.ts +3 -6
- package/lib/constants.ts +1 -1
- package/lib/emulation/utils.ts +2 -2
- package/lib/parser.ts +1 -0
- package/lib/shared/typescript-type-utils.ts +7 -1
- package/lib/utils.ts +1 -2
- package/package.json +2 -3
- package/scoop/appwrite.config.json +3 -3
package/lib/commands/init.ts
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "../parser.js";
|
|
32
32
|
import { sdkForConsole } from "../sdks.js";
|
|
33
33
|
import { isCloud } from "../utils.js";
|
|
34
|
-
import { Account } from "@appwrite.io/console";
|
|
34
|
+
import { Account, UseCases } from "@appwrite.io/console";
|
|
35
35
|
import { DEFAULT_ENDPOINT, EXECUTABLE_NAME } from "../constants.js";
|
|
36
36
|
|
|
37
37
|
const initResources = async (): Promise<void> => {
|
|
@@ -477,7 +477,7 @@ const initSite = async (): Promise<void> => {
|
|
|
477
477
|
const sitesService = await getSitesService();
|
|
478
478
|
const response = await sitesService.listTemplates(
|
|
479
479
|
[answers.framework.key],
|
|
480
|
-
[
|
|
480
|
+
[UseCases.Starter],
|
|
481
481
|
1,
|
|
482
482
|
);
|
|
483
483
|
if (response.total == 0) {
|
|
@@ -499,7 +499,7 @@ const initSite = async (): Promise<void> => {
|
|
|
499
499
|
template: templateDetails.frameworks[0].providerRootDirectory,
|
|
500
500
|
};
|
|
501
501
|
|
|
502
|
-
let
|
|
502
|
+
let dirSetupCommands = "";
|
|
503
503
|
|
|
504
504
|
const sparse = selected.template.startsWith("./")
|
|
505
505
|
? selected.template.substring(2)
|
|
@@ -508,19 +508,15 @@ const initSite = async (): Promise<void> => {
|
|
|
508
508
|
log("Fetching site code ...");
|
|
509
509
|
|
|
510
510
|
if (selected.template === "./") {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
cd .
|
|
511
|
+
dirSetupCommands = `
|
|
512
|
+
cd ${templatesDir}
|
|
514
513
|
git init
|
|
515
514
|
git remote add origin ${repo}
|
|
516
|
-
git config --global init.defaultBranch main
|
|
517
|
-
git fetch --depth=1 origin refs/tags/$(git ls-remote --tags origin "${templateDetails.providerVersion}" | tail -n 1 | awk -F '/' '{print $3}')
|
|
518
|
-
git checkout FETCH_HEAD
|
|
515
|
+
git config --global init.defaultBranch main
|
|
519
516
|
`.trim();
|
|
520
517
|
} else {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
cd .
|
|
518
|
+
dirSetupCommands = `
|
|
519
|
+
cd ${templatesDir}
|
|
524
520
|
git init
|
|
525
521
|
git remote add origin ${repo}
|
|
526
522
|
git config --global init.defaultBranch main
|
|
@@ -528,21 +524,32 @@ const initSite = async (): Promise<void> => {
|
|
|
528
524
|
echo "${sparse}" >> .git/info/sparse-checkout
|
|
529
525
|
git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
|
|
530
526
|
git config remote.origin.tagopt --no-tags
|
|
531
|
-
git fetch --depth=1 origin refs/tags/$(git ls-remote --tags origin "${templateDetails.providerVersion}" | tail -n 1 | awk -F '/' '{print $3}')
|
|
532
|
-
git checkout FETCH_HEAD
|
|
533
527
|
`.trim();
|
|
534
528
|
}
|
|
529
|
+
let windowsGitCloneCommands = `
|
|
530
|
+
$tag = (git ls-remote --tags origin "${templateDetails.providerVersion}" | Select-Object -Last 1) -replace '.*refs/tags/', ''
|
|
531
|
+
git fetch --depth=1 origin "refs/tags/$tag"
|
|
532
|
+
git checkout FETCH_HEAD
|
|
533
|
+
`.trim();
|
|
534
|
+
let unixGitCloneCommands = `
|
|
535
|
+
git fetch --depth=1 origin refs/tags/$(git ls-remote --tags origin "${templateDetails.providerVersion}" | tail -n 1 | awk -F '/' '{print $3}')
|
|
536
|
+
git checkout FETCH_HEAD
|
|
537
|
+
`.trim();
|
|
535
538
|
|
|
536
|
-
|
|
539
|
+
let usedShell = null;
|
|
537
540
|
if (process.platform === "win32") {
|
|
538
|
-
|
|
541
|
+
dirSetupCommands = dirSetupCommands + "\n" + windowsGitCloneCommands;
|
|
542
|
+
usedShell = "powershell.exe";
|
|
543
|
+
} else {
|
|
544
|
+
dirSetupCommands = dirSetupCommands + "\n" + unixGitCloneCommands;
|
|
539
545
|
}
|
|
540
546
|
|
|
541
547
|
/* Execute the child process but do not print any std output */
|
|
542
548
|
try {
|
|
543
|
-
childProcess.execSync(
|
|
549
|
+
childProcess.execSync(dirSetupCommands, {
|
|
544
550
|
stdio: "pipe",
|
|
545
551
|
cwd: templatesDir,
|
|
552
|
+
shell: usedShell,
|
|
546
553
|
});
|
|
547
554
|
} catch (err: any) {
|
|
548
555
|
/* Specialised errors with recommended actions to take */
|
|
@@ -564,32 +571,14 @@ const initSite = async (): Promise<void> => {
|
|
|
564
571
|
}
|
|
565
572
|
}
|
|
566
573
|
|
|
567
|
-
fs.rmSync(path.join(templatesDir, ".git"), { recursive: true });
|
|
568
|
-
|
|
569
|
-
const copyRecursiveSync = (src: string, dest: string): void => {
|
|
570
|
-
let exists = fs.existsSync(src);
|
|
571
|
-
let stats = exists && fs.statSync(src);
|
|
572
|
-
let isDirectory = exists && stats && stats.isDirectory();
|
|
573
|
-
if (isDirectory) {
|
|
574
|
-
if (!fs.existsSync(dest)) {
|
|
575
|
-
fs.mkdirSync(dest);
|
|
576
|
-
}
|
|
574
|
+
fs.rmSync(path.join(templatesDir, ".git"), { recursive: true, force: true });
|
|
577
575
|
|
|
578
|
-
|
|
579
|
-
copyRecursiveSync(
|
|
580
|
-
path.join(src, childItemName),
|
|
581
|
-
path.join(dest, childItemName),
|
|
582
|
-
);
|
|
583
|
-
});
|
|
584
|
-
} else {
|
|
585
|
-
fs.copyFileSync(src, dest);
|
|
586
|
-
}
|
|
587
|
-
};
|
|
588
|
-
copyRecursiveSync(
|
|
576
|
+
fs.cpSync(
|
|
589
577
|
selected.template === "./"
|
|
590
578
|
? templatesDir
|
|
591
579
|
: path.join(templatesDir, selected.template),
|
|
592
580
|
siteDir,
|
|
581
|
+
{ recursive: true, force: true },
|
|
593
582
|
);
|
|
594
583
|
|
|
595
584
|
fs.rmSync(templatesDir, { recursive: true, force: true });
|
package/lib/commands/pull.ts
CHANGED
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
DatabaseSchema,
|
|
42
42
|
TableSchema,
|
|
43
43
|
ColumnSchema,
|
|
44
|
+
IndexTableSchema,
|
|
44
45
|
BucketSchema,
|
|
45
46
|
TopicSchema,
|
|
46
47
|
} from "./config.js";
|
|
@@ -551,9 +552,15 @@ export class Pull {
|
|
|
551
552
|
filterBySchema(col, ColumnSchema),
|
|
552
553
|
);
|
|
553
554
|
|
|
555
|
+
// Filter indexes to only include schema-defined fields
|
|
556
|
+
const filteredIndexes = table.indexes?.map((idx: any) =>
|
|
557
|
+
filterBySchema(idx, IndexTableSchema),
|
|
558
|
+
);
|
|
559
|
+
|
|
554
560
|
allTables.push({
|
|
555
561
|
...filterBySchema(table, TableSchema),
|
|
556
562
|
columns: filteredColumns || [],
|
|
563
|
+
indexes: filteredIndexes || [],
|
|
557
564
|
});
|
|
558
565
|
}
|
|
559
566
|
}
|
package/lib/commands/run.ts
CHANGED
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
dockerBuild,
|
|
39
39
|
dockerPull,
|
|
40
40
|
} from "../emulation/docker.js";
|
|
41
|
+
import { Scopes } from "@appwrite.io/console";
|
|
41
42
|
|
|
42
43
|
interface RunFunctionOptions {
|
|
43
44
|
port?: string | number;
|
|
@@ -212,7 +213,7 @@ const runFunction = async ({
|
|
|
212
213
|
allVariables["APPWRITE_FUNCTION_RUNTIME_VERSION"] = func.runtime;
|
|
213
214
|
|
|
214
215
|
try {
|
|
215
|
-
await JwtManager.setup(userId, func.scopes ?? []);
|
|
216
|
+
await JwtManager.setup(userId, (func.scopes as Scopes[]) ?? []);
|
|
216
217
|
} catch (err: any) {
|
|
217
218
|
warn(
|
|
218
219
|
"Dynamic API key not generated. Header x-appwrite-key will not be set. Reason: " +
|
|
@@ -8,12 +8,7 @@ import {
|
|
|
8
8
|
parseBool,
|
|
9
9
|
parseInteger,
|
|
10
10
|
} from "../../parser.js";
|
|
11
|
-
import {
|
|
12
|
-
Account,
|
|
13
|
-
AuthenticatorType,
|
|
14
|
-
AuthenticationFactor,
|
|
15
|
-
OAuthProvider,
|
|
16
|
-
} from "@appwrite.io/console";
|
|
11
|
+
import { Account } from "@appwrite.io/console";
|
|
17
12
|
|
|
18
13
|
let accountClient: Account | null = null;
|
|
19
14
|
|
|
@@ -151,7 +146,7 @@ account
|
|
|
151
146
|
.action(
|
|
152
147
|
actionRunner(
|
|
153
148
|
async ({ type }) =>
|
|
154
|
-
parse(await (await getAccountClient()).createMfaAuthenticator(type
|
|
149
|
+
parse(await (await getAccountClient()).createMfaAuthenticator(type)),
|
|
155
150
|
),
|
|
156
151
|
);
|
|
157
152
|
|
|
@@ -163,7 +158,7 @@ account
|
|
|
163
158
|
.action(
|
|
164
159
|
actionRunner(
|
|
165
160
|
async ({ type, otp }) =>
|
|
166
|
-
parse(await (await getAccountClient()).updateMfaAuthenticator(type
|
|
161
|
+
parse(await (await getAccountClient()).updateMfaAuthenticator(type, otp)),
|
|
167
162
|
),
|
|
168
163
|
);
|
|
169
164
|
|
|
@@ -174,7 +169,7 @@ account
|
|
|
174
169
|
.action(
|
|
175
170
|
actionRunner(
|
|
176
171
|
async ({ type }) =>
|
|
177
|
-
parse(await (await getAccountClient()).deleteMfaAuthenticator(type
|
|
172
|
+
parse(await (await getAccountClient()).deleteMfaAuthenticator(type)),
|
|
178
173
|
),
|
|
179
174
|
);
|
|
180
175
|
|
|
@@ -185,7 +180,7 @@ account
|
|
|
185
180
|
.action(
|
|
186
181
|
actionRunner(
|
|
187
182
|
async ({ factor }) =>
|
|
188
|
-
parse(await (await getAccountClient()).createMfaChallenge(factor
|
|
183
|
+
parse(await (await getAccountClient()).createMfaChallenge(factor)),
|
|
189
184
|
),
|
|
190
185
|
);
|
|
191
186
|
|
|
@@ -387,7 +382,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
|
387
382
|
.action(
|
|
388
383
|
actionRunner(
|
|
389
384
|
async ({ provider, success, failure, scopes }) => {
|
|
390
|
-
const url = (await getAccountClient()).createOAuth2Session(provider
|
|
385
|
+
const url = (await getAccountClient()).createOAuth2Session(provider, success, failure, scopes);
|
|
391
386
|
if (url) console.log(url);
|
|
392
387
|
},
|
|
393
388
|
),
|
|
@@ -552,7 +547,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
|
552
547
|
.action(
|
|
553
548
|
actionRunner(
|
|
554
549
|
async ({ provider, success, failure, scopes }) => {
|
|
555
|
-
const url = (await getAccountClient()).createOAuth2Token(provider
|
|
550
|
+
const url = (await getAccountClient()).createOAuth2Token(provider, success, failure, scopes);
|
|
556
551
|
if (url) console.log(url);
|
|
557
552
|
},
|
|
558
553
|
),
|
|
@@ -8,10 +8,7 @@ import {
|
|
|
8
8
|
parseBool,
|
|
9
9
|
parseInteger,
|
|
10
10
|
} from "../../parser.js";
|
|
11
|
-
import {
|
|
12
|
-
Console,
|
|
13
|
-
ConsoleResourceType,
|
|
14
|
-
} from "@appwrite.io/console";
|
|
11
|
+
import { Console } from "@appwrite.io/console";
|
|
15
12
|
|
|
16
13
|
let consoleClient: Console | null = null;
|
|
17
14
|
|
|
@@ -37,7 +34,7 @@ console
|
|
|
37
34
|
.action(
|
|
38
35
|
actionRunner(
|
|
39
36
|
async ({ value, type }) =>
|
|
40
|
-
parse(await (await getConsoleClient()).getResource(value, type
|
|
37
|
+
parse(await (await getConsoleClient()).getResource(value, type)),
|
|
41
38
|
),
|
|
42
39
|
);
|
|
43
40
|
|
|
@@ -8,13 +8,7 @@ import {
|
|
|
8
8
|
parseBool,
|
|
9
9
|
parseInteger,
|
|
10
10
|
} from "../../parser.js";
|
|
11
|
-
import {
|
|
12
|
-
Databases,
|
|
13
|
-
UsageRange,
|
|
14
|
-
RelationshipType,
|
|
15
|
-
RelationMutate,
|
|
16
|
-
IndexType,
|
|
17
|
-
} from "@appwrite.io/console";
|
|
11
|
+
import { Databases } from "@appwrite.io/console";
|
|
18
12
|
|
|
19
13
|
let databasesClient: Databases | null = null;
|
|
20
14
|
|
|
@@ -155,7 +149,7 @@ databases
|
|
|
155
149
|
.action(
|
|
156
150
|
actionRunner(
|
|
157
151
|
async ({ range }) =>
|
|
158
|
-
parse(await (await getDatabasesClient()).listUsage(range
|
|
152
|
+
parse(await (await getDatabasesClient()).listUsage(range)),
|
|
159
153
|
),
|
|
160
154
|
);
|
|
161
155
|
|
|
@@ -174,7 +168,7 @@ databases
|
|
|
174
168
|
.command(`update`)
|
|
175
169
|
.description(`Update a database by its unique ID.`)
|
|
176
170
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
177
|
-
.
|
|
171
|
+
.option(`--name <name>`, `Database name. Max length: 128 chars.`)
|
|
178
172
|
.option(
|
|
179
173
|
`--enabled [value]`,
|
|
180
174
|
`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.`,
|
|
@@ -263,7 +257,7 @@ databases
|
|
|
263
257
|
.description(`Update a collection by its unique ID.`)
|
|
264
258
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
265
259
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
266
|
-
.
|
|
260
|
+
.option(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
267
261
|
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
268
262
|
.option(
|
|
269
263
|
`--document-security [value]`,
|
|
@@ -631,6 +625,84 @@ databases
|
|
|
631
625
|
),
|
|
632
626
|
);
|
|
633
627
|
|
|
628
|
+
databases
|
|
629
|
+
.command(`create-longtext-attribute`)
|
|
630
|
+
.description(`Create a longtext attribute.
|
|
631
|
+
`)
|
|
632
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
633
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
634
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
635
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
636
|
+
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
637
|
+
.option(
|
|
638
|
+
`--array [value]`,
|
|
639
|
+
`Is attribute an array?`,
|
|
640
|
+
(value: string | undefined) =>
|
|
641
|
+
value === undefined ? true : parseBool(value),
|
|
642
|
+
)
|
|
643
|
+
.action(
|
|
644
|
+
actionRunner(
|
|
645
|
+
async ({ databaseId, collectionId, key, required, xdefault, array }) =>
|
|
646
|
+
parse(await (await getDatabasesClient()).createLongtextAttribute(databaseId, collectionId, key, required, xdefault, array)),
|
|
647
|
+
),
|
|
648
|
+
);
|
|
649
|
+
|
|
650
|
+
databases
|
|
651
|
+
.command(`update-longtext-attribute`)
|
|
652
|
+
.description(`Update a longtext attribute. Changing the \`default\` value will not update already existing documents.
|
|
653
|
+
`)
|
|
654
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
655
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
656
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
657
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
658
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
659
|
+
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
660
|
+
.action(
|
|
661
|
+
actionRunner(
|
|
662
|
+
async ({ databaseId, collectionId, key, required, xdefault, newKey }) =>
|
|
663
|
+
parse(await (await getDatabasesClient()).updateLongtextAttribute(databaseId, collectionId, key, required, xdefault, newKey)),
|
|
664
|
+
),
|
|
665
|
+
);
|
|
666
|
+
|
|
667
|
+
databases
|
|
668
|
+
.command(`create-mediumtext-attribute`)
|
|
669
|
+
.description(`Create a mediumtext attribute.
|
|
670
|
+
`)
|
|
671
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
672
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
673
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
674
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
675
|
+
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
676
|
+
.option(
|
|
677
|
+
`--array [value]`,
|
|
678
|
+
`Is attribute an array?`,
|
|
679
|
+
(value: string | undefined) =>
|
|
680
|
+
value === undefined ? true : parseBool(value),
|
|
681
|
+
)
|
|
682
|
+
.action(
|
|
683
|
+
actionRunner(
|
|
684
|
+
async ({ databaseId, collectionId, key, required, xdefault, array }) =>
|
|
685
|
+
parse(await (await getDatabasesClient()).createMediumtextAttribute(databaseId, collectionId, key, required, xdefault, array)),
|
|
686
|
+
),
|
|
687
|
+
);
|
|
688
|
+
|
|
689
|
+
databases
|
|
690
|
+
.command(`update-mediumtext-attribute`)
|
|
691
|
+
.description(`Update a mediumtext attribute. Changing the \`default\` value will not update already existing documents.
|
|
692
|
+
`)
|
|
693
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
694
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
695
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
696
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
697
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
698
|
+
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
699
|
+
.action(
|
|
700
|
+
actionRunner(
|
|
701
|
+
async ({ databaseId, collectionId, key, required, xdefault, newKey }) =>
|
|
702
|
+
parse(await (await getDatabasesClient()).updateMediumtextAttribute(databaseId, collectionId, key, required, xdefault, newKey)),
|
|
703
|
+
),
|
|
704
|
+
);
|
|
705
|
+
|
|
634
706
|
databases
|
|
635
707
|
.command(`create-point-attribute`)
|
|
636
708
|
.description(`Create a geometric point attribute.`)
|
|
@@ -713,7 +785,7 @@ databases
|
|
|
713
785
|
.action(
|
|
714
786
|
actionRunner(
|
|
715
787
|
async ({ databaseId, collectionId, relatedCollectionId, type, twoWay, key, twoWayKey, onDelete }) =>
|
|
716
|
-
parse(await (await getDatabasesClient()).createRelationshipAttribute(databaseId, collectionId, relatedCollectionId, type
|
|
788
|
+
parse(await (await getDatabasesClient()).createRelationshipAttribute(databaseId, collectionId, relatedCollectionId, type, twoWay, key, twoWayKey, onDelete)),
|
|
717
789
|
),
|
|
718
790
|
);
|
|
719
791
|
|
|
@@ -764,6 +836,45 @@ databases
|
|
|
764
836
|
),
|
|
765
837
|
);
|
|
766
838
|
|
|
839
|
+
databases
|
|
840
|
+
.command(`create-text-attribute`)
|
|
841
|
+
.description(`Create a text attribute.
|
|
842
|
+
`)
|
|
843
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
844
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
845
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
846
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
847
|
+
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
848
|
+
.option(
|
|
849
|
+
`--array [value]`,
|
|
850
|
+
`Is attribute an array?`,
|
|
851
|
+
(value: string | undefined) =>
|
|
852
|
+
value === undefined ? true : parseBool(value),
|
|
853
|
+
)
|
|
854
|
+
.action(
|
|
855
|
+
actionRunner(
|
|
856
|
+
async ({ databaseId, collectionId, key, required, xdefault, array }) =>
|
|
857
|
+
parse(await (await getDatabasesClient()).createTextAttribute(databaseId, collectionId, key, required, xdefault, array)),
|
|
858
|
+
),
|
|
859
|
+
);
|
|
860
|
+
|
|
861
|
+
databases
|
|
862
|
+
.command(`update-text-attribute`)
|
|
863
|
+
.description(`Update a text attribute. Changing the \`default\` value will not update already existing documents.
|
|
864
|
+
`)
|
|
865
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
866
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
867
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
868
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
869
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
870
|
+
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
871
|
+
.action(
|
|
872
|
+
actionRunner(
|
|
873
|
+
async ({ databaseId, collectionId, key, required, xdefault, newKey }) =>
|
|
874
|
+
parse(await (await getDatabasesClient()).updateTextAttribute(databaseId, collectionId, key, required, xdefault, newKey)),
|
|
875
|
+
),
|
|
876
|
+
);
|
|
877
|
+
|
|
767
878
|
databases
|
|
768
879
|
.command(`create-url-attribute`)
|
|
769
880
|
.description(`Create a URL attribute.
|
|
@@ -803,6 +914,47 @@ databases
|
|
|
803
914
|
),
|
|
804
915
|
);
|
|
805
916
|
|
|
917
|
+
databases
|
|
918
|
+
.command(`create-varchar-attribute`)
|
|
919
|
+
.description(`Create a varchar attribute.
|
|
920
|
+
`)
|
|
921
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
922
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
923
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
924
|
+
.requiredOption(`--size <size>`, `Attribute size for varchar attributes, in number of characters. Maximum size is 16381.`, parseInteger)
|
|
925
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
926
|
+
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
927
|
+
.option(
|
|
928
|
+
`--array [value]`,
|
|
929
|
+
`Is attribute an array?`,
|
|
930
|
+
(value: string | undefined) =>
|
|
931
|
+
value === undefined ? true : parseBool(value),
|
|
932
|
+
)
|
|
933
|
+
.action(
|
|
934
|
+
actionRunner(
|
|
935
|
+
async ({ databaseId, collectionId, key, size, required, xdefault, array }) =>
|
|
936
|
+
parse(await (await getDatabasesClient()).createVarcharAttribute(databaseId, collectionId, key, size, required, xdefault, array)),
|
|
937
|
+
),
|
|
938
|
+
);
|
|
939
|
+
|
|
940
|
+
databases
|
|
941
|
+
.command(`update-varchar-attribute`)
|
|
942
|
+
.description(`Update a varchar attribute. Changing the \`default\` value will not update already existing documents.
|
|
943
|
+
`)
|
|
944
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
945
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
946
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
947
|
+
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
948
|
+
.requiredOption(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`)
|
|
949
|
+
.option(`--size <size>`, `Maximum size of the varchar attribute.`, parseInteger)
|
|
950
|
+
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
951
|
+
.action(
|
|
952
|
+
actionRunner(
|
|
953
|
+
async ({ databaseId, collectionId, key, required, xdefault, size, newKey }) =>
|
|
954
|
+
parse(await (await getDatabasesClient()).updateVarcharAttribute(databaseId, collectionId, key, required, xdefault, size, newKey)),
|
|
955
|
+
),
|
|
956
|
+
);
|
|
957
|
+
|
|
806
958
|
databases
|
|
807
959
|
.command(`get-attribute`)
|
|
808
960
|
.description(`Get attribute by ID.`)
|
|
@@ -841,7 +993,7 @@ databases
|
|
|
841
993
|
.action(
|
|
842
994
|
actionRunner(
|
|
843
995
|
async ({ databaseId, collectionId, key, onDelete, newKey }) =>
|
|
844
|
-
parse(await (await getDatabasesClient()).updateRelationshipAttribute(databaseId, collectionId, key, onDelete
|
|
996
|
+
parse(await (await getDatabasesClient()).updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey)),
|
|
845
997
|
),
|
|
846
998
|
);
|
|
847
999
|
|
|
@@ -1081,7 +1233,7 @@ Attributes can be \`key\`, \`fulltext\`, and \`unique\`.`)
|
|
|
1081
1233
|
.action(
|
|
1082
1234
|
actionRunner(
|
|
1083
1235
|
async ({ databaseId, collectionId, key, type, attributes, orders, lengths }) =>
|
|
1084
|
-
parse(await (await getDatabasesClient()).createIndex(databaseId, collectionId, key, type
|
|
1236
|
+
parse(await (await getDatabasesClient()).createIndex(databaseId, collectionId, key, type, attributes, orders, lengths)),
|
|
1085
1237
|
),
|
|
1086
1238
|
);
|
|
1087
1239
|
|
|
@@ -1133,7 +1285,7 @@ databases
|
|
|
1133
1285
|
.action(
|
|
1134
1286
|
actionRunner(
|
|
1135
1287
|
async ({ databaseId, collectionId, range }) =>
|
|
1136
|
-
parse(await (await getDatabasesClient()).getCollectionUsage(databaseId, collectionId, range
|
|
1288
|
+
parse(await (await getDatabasesClient()).getCollectionUsage(databaseId, collectionId, range)),
|
|
1137
1289
|
),
|
|
1138
1290
|
);
|
|
1139
1291
|
|
|
@@ -1157,7 +1309,7 @@ databases
|
|
|
1157
1309
|
.action(
|
|
1158
1310
|
actionRunner(
|
|
1159
1311
|
async ({ databaseId, range }) =>
|
|
1160
|
-
parse(await (await getDatabasesClient()).getUsage(databaseId, range
|
|
1312
|
+
parse(await (await getDatabasesClient()).getUsage(databaseId, range)),
|
|
1161
1313
|
),
|
|
1162
1314
|
);
|
|
1163
1315
|
|
|
@@ -9,15 +9,7 @@ import {
|
|
|
9
9
|
parseBool,
|
|
10
10
|
parseInteger,
|
|
11
11
|
} from "../../parser.js";
|
|
12
|
-
import {
|
|
13
|
-
Functions,
|
|
14
|
-
Runtime,
|
|
15
|
-
UsageRange,
|
|
16
|
-
TemplateReferenceType,
|
|
17
|
-
VCSReferenceType,
|
|
18
|
-
DeploymentDownloadType,
|
|
19
|
-
ExecutionMethod,
|
|
20
|
-
} from "@appwrite.io/console";
|
|
12
|
+
import { Functions } from "@appwrite.io/console";
|
|
21
13
|
|
|
22
14
|
let functionsClient: Functions | null = null;
|
|
23
15
|
|
|
@@ -92,7 +84,7 @@ functions
|
|
|
92
84
|
.action(
|
|
93
85
|
actionRunner(
|
|
94
86
|
async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) =>
|
|
95
|
-
parse(await (await getFunctionsClient()).create(functionId, name, runtime
|
|
87
|
+
parse(await (await getFunctionsClient()).create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification)),
|
|
96
88
|
),
|
|
97
89
|
);
|
|
98
90
|
|
|
@@ -152,7 +144,7 @@ functions
|
|
|
152
144
|
.action(
|
|
153
145
|
actionRunner(
|
|
154
146
|
async ({ range }) =>
|
|
155
|
-
parse(await (await getFunctionsClient()).listUsage(range
|
|
147
|
+
parse(await (await getFunctionsClient()).listUsage(range)),
|
|
156
148
|
),
|
|
157
149
|
);
|
|
158
150
|
|
|
@@ -206,7 +198,7 @@ functions
|
|
|
206
198
|
.action(
|
|
207
199
|
actionRunner(
|
|
208
200
|
async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) =>
|
|
209
|
-
parse(await (await getFunctionsClient()).update(functionId, name, runtime
|
|
201
|
+
parse(await (await getFunctionsClient()).update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification)),
|
|
210
202
|
),
|
|
211
203
|
);
|
|
212
204
|
|
|
@@ -304,7 +296,7 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/p
|
|
|
304
296
|
.action(
|
|
305
297
|
actionRunner(
|
|
306
298
|
async ({ functionId, repository, owner, rootDirectory, type, reference, activate }) =>
|
|
307
|
-
parse(await (await getFunctionsClient()).createTemplateDeployment(functionId, repository, owner, rootDirectory, type
|
|
299
|
+
parse(await (await getFunctionsClient()).createTemplateDeployment(functionId, repository, owner, rootDirectory, type, reference, activate)),
|
|
308
300
|
),
|
|
309
301
|
);
|
|
310
302
|
|
|
@@ -325,7 +317,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.`)
|
|
|
325
317
|
.action(
|
|
326
318
|
actionRunner(
|
|
327
319
|
async ({ functionId, type, reference, activate }) =>
|
|
328
|
-
parse(await (await getFunctionsClient()).createVcsDeployment(functionId, type
|
|
320
|
+
parse(await (await getFunctionsClient()).createVcsDeployment(functionId, type, reference, activate)),
|
|
329
321
|
),
|
|
330
322
|
);
|
|
331
323
|
|
|
@@ -363,7 +355,7 @@ functions
|
|
|
363
355
|
.action(
|
|
364
356
|
actionRunner(
|
|
365
357
|
async ({ functionId, deploymentId, type, destination }) => {
|
|
366
|
-
const url = await (await getFunctionsClient()).getDeploymentDownload(functionId, deploymentId, type
|
|
358
|
+
const url = await (await getFunctionsClient()).getDeploymentDownload(functionId, deploymentId, type);
|
|
367
359
|
const response = await fetch(url);
|
|
368
360
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
369
361
|
fs.writeFileSync(destination, buffer);
|
|
@@ -420,7 +412,7 @@ functions
|
|
|
420
412
|
.action(
|
|
421
413
|
actionRunner(
|
|
422
414
|
async ({ functionId, body, async, path, method, headers, scheduledAt }) =>
|
|
423
|
-
parse(await (await getFunctionsClient()).createExecution(functionId, body, async, path, method
|
|
415
|
+
parse(await (await getFunctionsClient()).createExecution(functionId, body, async, path, method, JSON.parse(headers), scheduledAt)),
|
|
424
416
|
),
|
|
425
417
|
);
|
|
426
418
|
|
|
@@ -456,7 +448,7 @@ functions
|
|
|
456
448
|
.action(
|
|
457
449
|
actionRunner(
|
|
458
450
|
async ({ functionId, range }) =>
|
|
459
|
-
parse(await (await getFunctionsClient()).getUsage(functionId, range
|
|
451
|
+
parse(await (await getFunctionsClient()).getUsage(functionId, range)),
|
|
460
452
|
),
|
|
461
453
|
);
|
|
462
454
|
|
|
@@ -8,10 +8,7 @@ import {
|
|
|
8
8
|
parseBool,
|
|
9
9
|
parseInteger,
|
|
10
10
|
} from "../../parser.js";
|
|
11
|
-
import {
|
|
12
|
-
Health,
|
|
13
|
-
Name,
|
|
14
|
-
} from "@appwrite.io/console";
|
|
11
|
+
import { Health } from "@appwrite.io/console";
|
|
15
12
|
|
|
16
13
|
let healthClient: Health | null = null;
|
|
17
14
|
|
|
@@ -150,7 +147,7 @@ health
|
|
|
150
147
|
.action(
|
|
151
148
|
actionRunner(
|
|
152
149
|
async ({ name, threshold }) =>
|
|
153
|
-
parse(await (await getHealthClient()).getFailedJobs(name
|
|
150
|
+
parse(await (await getHealthClient()).getFailedJobs(name, threshold)),
|
|
154
151
|
),
|
|
155
152
|
);
|
|
156
153
|
|
|
@@ -8,11 +8,7 @@ import {
|
|
|
8
8
|
parseBool,
|
|
9
9
|
parseInteger,
|
|
10
10
|
} from "../../parser.js";
|
|
11
|
-
import {
|
|
12
|
-
Messaging,
|
|
13
|
-
MessagePriority,
|
|
14
|
-
SmtpEncryption,
|
|
15
|
-
} from "@appwrite.io/console";
|
|
11
|
+
import { Messaging } from "@appwrite.io/console";
|
|
16
12
|
|
|
17
13
|
let messagingClient: Messaging | null = null;
|
|
18
14
|
|
|
@@ -153,7 +149,7 @@ messaging
|
|
|
153
149
|
.action(
|
|
154
150
|
actionRunner(
|
|
155
151
|
async ({ messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority }) =>
|
|
156
|
-
parse(await (await getMessagingClient()).createPush(messageId, title, body, topics, users, targets, JSON.parse(data), action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority
|
|
152
|
+
parse(await (await getMessagingClient()).createPush(messageId, title, body, topics, users, targets, JSON.parse(data), action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority)),
|
|
157
153
|
),
|
|
158
154
|
);
|
|
159
155
|
|
|
@@ -198,7 +194,7 @@ messaging
|
|
|
198
194
|
.action(
|
|
199
195
|
actionRunner(
|
|
200
196
|
async ({ messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority }) =>
|
|
201
|
-
parse(await (await getMessagingClient()).updatePush(messageId, topics, users, targets, title, body, JSON.parse(data), action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority
|
|
197
|
+
parse(await (await getMessagingClient()).updatePush(messageId, topics, users, targets, title, body, JSON.parse(data), action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority)),
|
|
202
198
|
),
|
|
203
199
|
);
|
|
204
200
|
|
|
@@ -642,7 +638,7 @@ messaging
|
|
|
642
638
|
.action(
|
|
643
639
|
actionRunner(
|
|
644
640
|
async ({ providerId, name, host, port, username, password, encryption, autoTls, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled }) =>
|
|
645
|
-
parse(await (await getMessagingClient()).createSmtpProvider(providerId, name, host, port, username, password, encryption
|
|
641
|
+
parse(await (await getMessagingClient()).createSmtpProvider(providerId, name, host, port, username, password, encryption, autoTls, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled)),
|
|
646
642
|
),
|
|
647
643
|
);
|
|
648
644
|
|
|
@@ -676,7 +672,7 @@ messaging
|
|
|
676
672
|
.action(
|
|
677
673
|
actionRunner(
|
|
678
674
|
async ({ providerId, name, host, port, username, password, encryption, autoTls, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled }) =>
|
|
679
|
-
parse(await (await getMessagingClient()).updateSmtpProvider(providerId, name, host, port, username, password, encryption
|
|
675
|
+
parse(await (await getMessagingClient()).updateSmtpProvider(providerId, name, host, port, username, password, encryption, autoTls, mailer, fromName, fromEmail, replyToName, replyToEmail, enabled)),
|
|
680
676
|
),
|
|
681
677
|
);
|
|
682
678
|
|