appwrite-cli 13.1.0 → 13.2.1
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 +15 -1
- package/README.md +2 -2
- package/dist/bundle-win-arm64.mjs +2775 -1279
- package/dist/cli.cjs +2775 -1279
- package/dist/index.js +1576 -346
- 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/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/push.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/emulation/utils.d.ts +2 -1
- package/dist/lib/emulation/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/generators/typescript/databases.ts +24 -6
- package/lib/commands/generic.ts +1 -2
- package/lib/commands/init.ts +10 -8
- package/lib/commands/pull.ts +7 -0
- package/lib/commands/push.ts +2 -1
- 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/utils.ts +1 -2
- package/package.json +2 -2
- package/scoop/appwrite.config.json +3 -3
package/dist/index.js
CHANGED
|
@@ -54322,7 +54322,7 @@ var require_parse2 = __commonJS({
|
|
|
54322
54322
|
return ch >= "0" && ch <= "9" ? number4() : word();
|
|
54323
54323
|
}
|
|
54324
54324
|
};
|
|
54325
|
-
return function(source,
|
|
54325
|
+
return function(source, reviver3) {
|
|
54326
54326
|
var result;
|
|
54327
54327
|
text = source + "";
|
|
54328
54328
|
at = 0;
|
|
@@ -54332,7 +54332,7 @@ var require_parse2 = __commonJS({
|
|
|
54332
54332
|
if (ch) {
|
|
54333
54333
|
error49("Syntax error");
|
|
54334
54334
|
}
|
|
54335
|
-
return typeof
|
|
54335
|
+
return typeof reviver3 === "function" ? (function walk(holder, key) {
|
|
54336
54336
|
var k, v, value2 = holder[key];
|
|
54337
54337
|
if (value2 && typeof value2 === "object") {
|
|
54338
54338
|
Object.keys(value2).forEach(function(k2) {
|
|
@@ -54344,7 +54344,7 @@ var require_parse2 = __commonJS({
|
|
|
54344
54344
|
}
|
|
54345
54345
|
});
|
|
54346
54346
|
}
|
|
54347
|
-
return
|
|
54347
|
+
return reviver3.call(holder, key, value2);
|
|
54348
54348
|
})({ "": result }, "") : result;
|
|
54349
54349
|
};
|
|
54350
54350
|
};
|
|
@@ -70688,7 +70688,7 @@ var id_default = ID;
|
|
|
70688
70688
|
// lib/constants.ts
|
|
70689
70689
|
var SDK_TITLE = "Appwrite";
|
|
70690
70690
|
var SDK_TITLE_LOWER = "appwrite";
|
|
70691
|
-
var SDK_VERSION = "13.1
|
|
70691
|
+
var SDK_VERSION = "13.2.1";
|
|
70692
70692
|
var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
|
|
70693
70693
|
var EXECUTABLE_NAME = "appwrite";
|
|
70694
70694
|
var NPM_PACKAGE_NAME = "appwrite-cli";
|
|
@@ -84479,7 +84479,13 @@ var validateRequiredDefault = (data) => {
|
|
|
84479
84479
|
return true;
|
|
84480
84480
|
};
|
|
84481
84481
|
var validateStringSize = (data) => {
|
|
84482
|
-
if (data.type
|
|
84482
|
+
if (data.type !== "string") {
|
|
84483
|
+
return true;
|
|
84484
|
+
}
|
|
84485
|
+
if (data.format && data.format !== "") {
|
|
84486
|
+
return true;
|
|
84487
|
+
}
|
|
84488
|
+
if (data.size === void 0 || data.size === null) {
|
|
84483
84489
|
return false;
|
|
84484
84490
|
}
|
|
84485
84491
|
return true;
|
|
@@ -84905,8 +84911,8 @@ var createSettingsObject = (project) => {
|
|
|
84905
84911
|
}
|
|
84906
84912
|
};
|
|
84907
84913
|
};
|
|
84908
|
-
var checkDeployConditions = (
|
|
84909
|
-
if (Object.keys(
|
|
84914
|
+
var checkDeployConditions = (localConfig2) => {
|
|
84915
|
+
if (Object.keys(localConfig2.data).length === 0) {
|
|
84910
84916
|
throw new Error(
|
|
84911
84917
|
"No appwrite.config.json file found in the current directory. Please run this command again in the folder containing your appwrite.config.json file, or run 'appwrite init project' to link current directory to an Appwrite project."
|
|
84912
84918
|
);
|
|
@@ -86949,7 +86955,7 @@ var Global = class _Global extends Config {
|
|
|
86949
86955
|
}
|
|
86950
86956
|
}
|
|
86951
86957
|
};
|
|
86952
|
-
var
|
|
86958
|
+
var localConfig = new Local();
|
|
86953
86959
|
var globalConfig2 = new Global();
|
|
86954
86960
|
|
|
86955
86961
|
// lib/commands/utils/error-formatter.ts
|
|
@@ -87517,12 +87523,7 @@ var JSONbigParser2 = (0, import_json_bigint2.default)({ storeAsString: false });
|
|
|
87517
87523
|
var JSONbigSerializer2 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
|
|
87518
87524
|
var MAX_SAFE2 = BigInt(Number.MAX_SAFE_INTEGER);
|
|
87519
87525
|
var MIN_SAFE2 = BigInt(Number.MIN_SAFE_INTEGER);
|
|
87520
|
-
function
|
|
87521
|
-
if (value === null || value === void 0)
|
|
87522
|
-
return value;
|
|
87523
|
-
if (Array.isArray(value)) {
|
|
87524
|
-
return value.map(convertBigNumbers);
|
|
87525
|
-
}
|
|
87526
|
+
function reviver2(_key, value) {
|
|
87526
87527
|
if (import_bignumber2.default.isBigNumber(value)) {
|
|
87527
87528
|
if (value.isInteger()) {
|
|
87528
87529
|
const str = value.toFixed();
|
|
@@ -87534,17 +87535,10 @@ function convertBigNumbers(value) {
|
|
|
87534
87535
|
}
|
|
87535
87536
|
return value.toNumber();
|
|
87536
87537
|
}
|
|
87537
|
-
if (typeof value === "object") {
|
|
87538
|
-
const result = {};
|
|
87539
|
-
for (const [k, v] of Object.entries(value)) {
|
|
87540
|
-
result[k] = convertBigNumbers(v);
|
|
87541
|
-
}
|
|
87542
|
-
return result;
|
|
87543
|
-
}
|
|
87544
87538
|
return value;
|
|
87545
87539
|
}
|
|
87546
87540
|
var JSONbig = {
|
|
87547
|
-
parse: (text) =>
|
|
87541
|
+
parse: (text) => JSONbigParser2.parse(text, reviver2),
|
|
87548
87542
|
stringify: JSONbigSerializer2.stringify
|
|
87549
87543
|
};
|
|
87550
87544
|
var AppwriteException = class extends Error {
|
|
@@ -87584,7 +87578,7 @@ var Client = class _Client {
|
|
|
87584
87578
|
"x-sdk-name": "Console",
|
|
87585
87579
|
"x-sdk-platform": "console",
|
|
87586
87580
|
"x-sdk-language": "web",
|
|
87587
|
-
"x-sdk-version": "2.
|
|
87581
|
+
"x-sdk-version": "2.2.0",
|
|
87588
87582
|
"X-Appwrite-Response-Format": "1.8.0"
|
|
87589
87583
|
};
|
|
87590
87584
|
this.realtime = {
|
|
@@ -88214,24 +88208,15 @@ var Console = class {
|
|
|
88214
88208
|
};
|
|
88215
88209
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
88216
88210
|
}
|
|
88217
|
-
|
|
88218
|
-
|
|
88219
|
-
|
|
88220
|
-
|
|
88221
|
-
|
|
88222
|
-
|
|
88223
|
-
|
|
88224
|
-
};
|
|
88225
|
-
}
|
|
88226
|
-
const organizationId = params.organizationId;
|
|
88227
|
-
if (typeof organizationId === "undefined") {
|
|
88228
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
88229
|
-
}
|
|
88211
|
+
/**
|
|
88212
|
+
* Get all available regions for the console.
|
|
88213
|
+
*
|
|
88214
|
+
* @throws {AppwriteException}
|
|
88215
|
+
* @returns {Promise<Models.ConsoleRegionList>}
|
|
88216
|
+
*/
|
|
88217
|
+
listRegions() {
|
|
88230
88218
|
const apiPath = "/console/regions";
|
|
88231
88219
|
const payload = {};
|
|
88232
|
-
if (typeof organizationId !== "undefined") {
|
|
88233
|
-
payload["organizationId"] = organizationId;
|
|
88234
|
-
}
|
|
88235
88220
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
88236
88221
|
const apiHeaders = {};
|
|
88237
88222
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
@@ -88668,9 +88653,6 @@ var Databases = class {
|
|
|
88668
88653
|
if (typeof databaseId === "undefined") {
|
|
88669
88654
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
88670
88655
|
}
|
|
88671
|
-
if (typeof name === "undefined") {
|
|
88672
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
88673
|
-
}
|
|
88674
88656
|
const apiPath = "/databases/{databaseId}".replace("{databaseId}", databaseId);
|
|
88675
88657
|
const payload = {};
|
|
88676
88658
|
if (typeof name !== "undefined") {
|
|
@@ -88852,9 +88834,6 @@ var Databases = class {
|
|
|
88852
88834
|
if (typeof collectionId === "undefined") {
|
|
88853
88835
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
88854
88836
|
}
|
|
88855
|
-
if (typeof name === "undefined") {
|
|
88856
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
88857
|
-
}
|
|
88858
88837
|
const apiPath = "/databases/{databaseId}/collections/{collectionId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
88859
88838
|
const payload = {};
|
|
88860
88839
|
if (typeof name !== "undefined") {
|
|
@@ -89815,6 +89794,214 @@ var Databases = class {
|
|
|
89815
89794
|
};
|
|
89816
89795
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
89817
89796
|
}
|
|
89797
|
+
createLongtextAttribute(paramsOrFirst, ...rest) {
|
|
89798
|
+
let params;
|
|
89799
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89800
|
+
params = paramsOrFirst || {};
|
|
89801
|
+
} else {
|
|
89802
|
+
params = {
|
|
89803
|
+
databaseId: paramsOrFirst,
|
|
89804
|
+
collectionId: rest[0],
|
|
89805
|
+
key: rest[1],
|
|
89806
|
+
required: rest[2],
|
|
89807
|
+
xdefault: rest[3],
|
|
89808
|
+
array: rest[4]
|
|
89809
|
+
};
|
|
89810
|
+
}
|
|
89811
|
+
const databaseId = params.databaseId;
|
|
89812
|
+
const collectionId = params.collectionId;
|
|
89813
|
+
const key = params.key;
|
|
89814
|
+
const required2 = params.required;
|
|
89815
|
+
const xdefault = params.xdefault;
|
|
89816
|
+
const array2 = params.array;
|
|
89817
|
+
if (typeof databaseId === "undefined") {
|
|
89818
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
89819
|
+
}
|
|
89820
|
+
if (typeof collectionId === "undefined") {
|
|
89821
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
89822
|
+
}
|
|
89823
|
+
if (typeof key === "undefined") {
|
|
89824
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
89825
|
+
}
|
|
89826
|
+
if (typeof required2 === "undefined") {
|
|
89827
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
89828
|
+
}
|
|
89829
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/longtext".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
89830
|
+
const payload = {};
|
|
89831
|
+
if (typeof key !== "undefined") {
|
|
89832
|
+
payload["key"] = key;
|
|
89833
|
+
}
|
|
89834
|
+
if (typeof required2 !== "undefined") {
|
|
89835
|
+
payload["required"] = required2;
|
|
89836
|
+
}
|
|
89837
|
+
if (typeof xdefault !== "undefined") {
|
|
89838
|
+
payload["default"] = xdefault;
|
|
89839
|
+
}
|
|
89840
|
+
if (typeof array2 !== "undefined") {
|
|
89841
|
+
payload["array"] = array2;
|
|
89842
|
+
}
|
|
89843
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89844
|
+
const apiHeaders = {
|
|
89845
|
+
"content-type": "application/json"
|
|
89846
|
+
};
|
|
89847
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
89848
|
+
}
|
|
89849
|
+
updateLongtextAttribute(paramsOrFirst, ...rest) {
|
|
89850
|
+
let params;
|
|
89851
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89852
|
+
params = paramsOrFirst || {};
|
|
89853
|
+
} else {
|
|
89854
|
+
params = {
|
|
89855
|
+
databaseId: paramsOrFirst,
|
|
89856
|
+
collectionId: rest[0],
|
|
89857
|
+
key: rest[1],
|
|
89858
|
+
required: rest[2],
|
|
89859
|
+
xdefault: rest[3],
|
|
89860
|
+
newKey: rest[4]
|
|
89861
|
+
};
|
|
89862
|
+
}
|
|
89863
|
+
const databaseId = params.databaseId;
|
|
89864
|
+
const collectionId = params.collectionId;
|
|
89865
|
+
const key = params.key;
|
|
89866
|
+
const required2 = params.required;
|
|
89867
|
+
const xdefault = params.xdefault;
|
|
89868
|
+
const newKey = params.newKey;
|
|
89869
|
+
if (typeof databaseId === "undefined") {
|
|
89870
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
89871
|
+
}
|
|
89872
|
+
if (typeof collectionId === "undefined") {
|
|
89873
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
89874
|
+
}
|
|
89875
|
+
if (typeof key === "undefined") {
|
|
89876
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
89877
|
+
}
|
|
89878
|
+
if (typeof required2 === "undefined") {
|
|
89879
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
89880
|
+
}
|
|
89881
|
+
if (typeof xdefault === "undefined") {
|
|
89882
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
89883
|
+
}
|
|
89884
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
89885
|
+
const payload = {};
|
|
89886
|
+
if (typeof required2 !== "undefined") {
|
|
89887
|
+
payload["required"] = required2;
|
|
89888
|
+
}
|
|
89889
|
+
if (typeof xdefault !== "undefined") {
|
|
89890
|
+
payload["default"] = xdefault;
|
|
89891
|
+
}
|
|
89892
|
+
if (typeof newKey !== "undefined") {
|
|
89893
|
+
payload["newKey"] = newKey;
|
|
89894
|
+
}
|
|
89895
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89896
|
+
const apiHeaders = {
|
|
89897
|
+
"content-type": "application/json"
|
|
89898
|
+
};
|
|
89899
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
89900
|
+
}
|
|
89901
|
+
createMediumtextAttribute(paramsOrFirst, ...rest) {
|
|
89902
|
+
let params;
|
|
89903
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89904
|
+
params = paramsOrFirst || {};
|
|
89905
|
+
} else {
|
|
89906
|
+
params = {
|
|
89907
|
+
databaseId: paramsOrFirst,
|
|
89908
|
+
collectionId: rest[0],
|
|
89909
|
+
key: rest[1],
|
|
89910
|
+
required: rest[2],
|
|
89911
|
+
xdefault: rest[3],
|
|
89912
|
+
array: rest[4]
|
|
89913
|
+
};
|
|
89914
|
+
}
|
|
89915
|
+
const databaseId = params.databaseId;
|
|
89916
|
+
const collectionId = params.collectionId;
|
|
89917
|
+
const key = params.key;
|
|
89918
|
+
const required2 = params.required;
|
|
89919
|
+
const xdefault = params.xdefault;
|
|
89920
|
+
const array2 = params.array;
|
|
89921
|
+
if (typeof databaseId === "undefined") {
|
|
89922
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
89923
|
+
}
|
|
89924
|
+
if (typeof collectionId === "undefined") {
|
|
89925
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
89926
|
+
}
|
|
89927
|
+
if (typeof key === "undefined") {
|
|
89928
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
89929
|
+
}
|
|
89930
|
+
if (typeof required2 === "undefined") {
|
|
89931
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
89932
|
+
}
|
|
89933
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
89934
|
+
const payload = {};
|
|
89935
|
+
if (typeof key !== "undefined") {
|
|
89936
|
+
payload["key"] = key;
|
|
89937
|
+
}
|
|
89938
|
+
if (typeof required2 !== "undefined") {
|
|
89939
|
+
payload["required"] = required2;
|
|
89940
|
+
}
|
|
89941
|
+
if (typeof xdefault !== "undefined") {
|
|
89942
|
+
payload["default"] = xdefault;
|
|
89943
|
+
}
|
|
89944
|
+
if (typeof array2 !== "undefined") {
|
|
89945
|
+
payload["array"] = array2;
|
|
89946
|
+
}
|
|
89947
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89948
|
+
const apiHeaders = {
|
|
89949
|
+
"content-type": "application/json"
|
|
89950
|
+
};
|
|
89951
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
89952
|
+
}
|
|
89953
|
+
updateMediumtextAttribute(paramsOrFirst, ...rest) {
|
|
89954
|
+
let params;
|
|
89955
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89956
|
+
params = paramsOrFirst || {};
|
|
89957
|
+
} else {
|
|
89958
|
+
params = {
|
|
89959
|
+
databaseId: paramsOrFirst,
|
|
89960
|
+
collectionId: rest[0],
|
|
89961
|
+
key: rest[1],
|
|
89962
|
+
required: rest[2],
|
|
89963
|
+
xdefault: rest[3],
|
|
89964
|
+
newKey: rest[4]
|
|
89965
|
+
};
|
|
89966
|
+
}
|
|
89967
|
+
const databaseId = params.databaseId;
|
|
89968
|
+
const collectionId = params.collectionId;
|
|
89969
|
+
const key = params.key;
|
|
89970
|
+
const required2 = params.required;
|
|
89971
|
+
const xdefault = params.xdefault;
|
|
89972
|
+
const newKey = params.newKey;
|
|
89973
|
+
if (typeof databaseId === "undefined") {
|
|
89974
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
89975
|
+
}
|
|
89976
|
+
if (typeof collectionId === "undefined") {
|
|
89977
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
89978
|
+
}
|
|
89979
|
+
if (typeof key === "undefined") {
|
|
89980
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
89981
|
+
}
|
|
89982
|
+
if (typeof required2 === "undefined") {
|
|
89983
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
89984
|
+
}
|
|
89985
|
+
if (typeof xdefault === "undefined") {
|
|
89986
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
89987
|
+
}
|
|
89988
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
89989
|
+
const payload = {};
|
|
89990
|
+
if (typeof required2 !== "undefined") {
|
|
89991
|
+
payload["required"] = required2;
|
|
89992
|
+
}
|
|
89993
|
+
if (typeof xdefault !== "undefined") {
|
|
89994
|
+
payload["default"] = xdefault;
|
|
89995
|
+
}
|
|
89996
|
+
if (typeof newKey !== "undefined") {
|
|
89997
|
+
payload["newKey"] = newKey;
|
|
89998
|
+
}
|
|
89999
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90000
|
+
const apiHeaders = {
|
|
90001
|
+
"content-type": "application/json"
|
|
90002
|
+
};
|
|
90003
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
90004
|
+
}
|
|
89818
90005
|
createPointAttribute(paramsOrFirst, ...rest) {
|
|
89819
90006
|
let params;
|
|
89820
90007
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -90171,7 +90358,332 @@ var Databases = class {
|
|
|
90171
90358
|
if (typeof xdefault === "undefined") {
|
|
90172
90359
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
90173
90360
|
}
|
|
90174
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
90361
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
90362
|
+
const payload = {};
|
|
90363
|
+
if (typeof required2 !== "undefined") {
|
|
90364
|
+
payload["required"] = required2;
|
|
90365
|
+
}
|
|
90366
|
+
if (typeof xdefault !== "undefined") {
|
|
90367
|
+
payload["default"] = xdefault;
|
|
90368
|
+
}
|
|
90369
|
+
if (typeof size !== "undefined") {
|
|
90370
|
+
payload["size"] = size;
|
|
90371
|
+
}
|
|
90372
|
+
if (typeof newKey !== "undefined") {
|
|
90373
|
+
payload["newKey"] = newKey;
|
|
90374
|
+
}
|
|
90375
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90376
|
+
const apiHeaders = {
|
|
90377
|
+
"content-type": "application/json"
|
|
90378
|
+
};
|
|
90379
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
90380
|
+
}
|
|
90381
|
+
createTextAttribute(paramsOrFirst, ...rest) {
|
|
90382
|
+
let params;
|
|
90383
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90384
|
+
params = paramsOrFirst || {};
|
|
90385
|
+
} else {
|
|
90386
|
+
params = {
|
|
90387
|
+
databaseId: paramsOrFirst,
|
|
90388
|
+
collectionId: rest[0],
|
|
90389
|
+
key: rest[1],
|
|
90390
|
+
required: rest[2],
|
|
90391
|
+
xdefault: rest[3],
|
|
90392
|
+
array: rest[4]
|
|
90393
|
+
};
|
|
90394
|
+
}
|
|
90395
|
+
const databaseId = params.databaseId;
|
|
90396
|
+
const collectionId = params.collectionId;
|
|
90397
|
+
const key = params.key;
|
|
90398
|
+
const required2 = params.required;
|
|
90399
|
+
const xdefault = params.xdefault;
|
|
90400
|
+
const array2 = params.array;
|
|
90401
|
+
if (typeof databaseId === "undefined") {
|
|
90402
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90403
|
+
}
|
|
90404
|
+
if (typeof collectionId === "undefined") {
|
|
90405
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90406
|
+
}
|
|
90407
|
+
if (typeof key === "undefined") {
|
|
90408
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
90409
|
+
}
|
|
90410
|
+
if (typeof required2 === "undefined") {
|
|
90411
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
90412
|
+
}
|
|
90413
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/text".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
90414
|
+
const payload = {};
|
|
90415
|
+
if (typeof key !== "undefined") {
|
|
90416
|
+
payload["key"] = key;
|
|
90417
|
+
}
|
|
90418
|
+
if (typeof required2 !== "undefined") {
|
|
90419
|
+
payload["required"] = required2;
|
|
90420
|
+
}
|
|
90421
|
+
if (typeof xdefault !== "undefined") {
|
|
90422
|
+
payload["default"] = xdefault;
|
|
90423
|
+
}
|
|
90424
|
+
if (typeof array2 !== "undefined") {
|
|
90425
|
+
payload["array"] = array2;
|
|
90426
|
+
}
|
|
90427
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90428
|
+
const apiHeaders = {
|
|
90429
|
+
"content-type": "application/json"
|
|
90430
|
+
};
|
|
90431
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
90432
|
+
}
|
|
90433
|
+
updateTextAttribute(paramsOrFirst, ...rest) {
|
|
90434
|
+
let params;
|
|
90435
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90436
|
+
params = paramsOrFirst || {};
|
|
90437
|
+
} else {
|
|
90438
|
+
params = {
|
|
90439
|
+
databaseId: paramsOrFirst,
|
|
90440
|
+
collectionId: rest[0],
|
|
90441
|
+
key: rest[1],
|
|
90442
|
+
required: rest[2],
|
|
90443
|
+
xdefault: rest[3],
|
|
90444
|
+
newKey: rest[4]
|
|
90445
|
+
};
|
|
90446
|
+
}
|
|
90447
|
+
const databaseId = params.databaseId;
|
|
90448
|
+
const collectionId = params.collectionId;
|
|
90449
|
+
const key = params.key;
|
|
90450
|
+
const required2 = params.required;
|
|
90451
|
+
const xdefault = params.xdefault;
|
|
90452
|
+
const newKey = params.newKey;
|
|
90453
|
+
if (typeof databaseId === "undefined") {
|
|
90454
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90455
|
+
}
|
|
90456
|
+
if (typeof collectionId === "undefined") {
|
|
90457
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90458
|
+
}
|
|
90459
|
+
if (typeof key === "undefined") {
|
|
90460
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
90461
|
+
}
|
|
90462
|
+
if (typeof required2 === "undefined") {
|
|
90463
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
90464
|
+
}
|
|
90465
|
+
if (typeof xdefault === "undefined") {
|
|
90466
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
90467
|
+
}
|
|
90468
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
90469
|
+
const payload = {};
|
|
90470
|
+
if (typeof required2 !== "undefined") {
|
|
90471
|
+
payload["required"] = required2;
|
|
90472
|
+
}
|
|
90473
|
+
if (typeof xdefault !== "undefined") {
|
|
90474
|
+
payload["default"] = xdefault;
|
|
90475
|
+
}
|
|
90476
|
+
if (typeof newKey !== "undefined") {
|
|
90477
|
+
payload["newKey"] = newKey;
|
|
90478
|
+
}
|
|
90479
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90480
|
+
const apiHeaders = {
|
|
90481
|
+
"content-type": "application/json"
|
|
90482
|
+
};
|
|
90483
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
90484
|
+
}
|
|
90485
|
+
createUrlAttribute(paramsOrFirst, ...rest) {
|
|
90486
|
+
let params;
|
|
90487
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90488
|
+
params = paramsOrFirst || {};
|
|
90489
|
+
} else {
|
|
90490
|
+
params = {
|
|
90491
|
+
databaseId: paramsOrFirst,
|
|
90492
|
+
collectionId: rest[0],
|
|
90493
|
+
key: rest[1],
|
|
90494
|
+
required: rest[2],
|
|
90495
|
+
xdefault: rest[3],
|
|
90496
|
+
array: rest[4]
|
|
90497
|
+
};
|
|
90498
|
+
}
|
|
90499
|
+
const databaseId = params.databaseId;
|
|
90500
|
+
const collectionId = params.collectionId;
|
|
90501
|
+
const key = params.key;
|
|
90502
|
+
const required2 = params.required;
|
|
90503
|
+
const xdefault = params.xdefault;
|
|
90504
|
+
const array2 = params.array;
|
|
90505
|
+
if (typeof databaseId === "undefined") {
|
|
90506
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90507
|
+
}
|
|
90508
|
+
if (typeof collectionId === "undefined") {
|
|
90509
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90510
|
+
}
|
|
90511
|
+
if (typeof key === "undefined") {
|
|
90512
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
90513
|
+
}
|
|
90514
|
+
if (typeof required2 === "undefined") {
|
|
90515
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
90516
|
+
}
|
|
90517
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
90518
|
+
const payload = {};
|
|
90519
|
+
if (typeof key !== "undefined") {
|
|
90520
|
+
payload["key"] = key;
|
|
90521
|
+
}
|
|
90522
|
+
if (typeof required2 !== "undefined") {
|
|
90523
|
+
payload["required"] = required2;
|
|
90524
|
+
}
|
|
90525
|
+
if (typeof xdefault !== "undefined") {
|
|
90526
|
+
payload["default"] = xdefault;
|
|
90527
|
+
}
|
|
90528
|
+
if (typeof array2 !== "undefined") {
|
|
90529
|
+
payload["array"] = array2;
|
|
90530
|
+
}
|
|
90531
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90532
|
+
const apiHeaders = {
|
|
90533
|
+
"content-type": "application/json"
|
|
90534
|
+
};
|
|
90535
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
90536
|
+
}
|
|
90537
|
+
updateUrlAttribute(paramsOrFirst, ...rest) {
|
|
90538
|
+
let params;
|
|
90539
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90540
|
+
params = paramsOrFirst || {};
|
|
90541
|
+
} else {
|
|
90542
|
+
params = {
|
|
90543
|
+
databaseId: paramsOrFirst,
|
|
90544
|
+
collectionId: rest[0],
|
|
90545
|
+
key: rest[1],
|
|
90546
|
+
required: rest[2],
|
|
90547
|
+
xdefault: rest[3],
|
|
90548
|
+
newKey: rest[4]
|
|
90549
|
+
};
|
|
90550
|
+
}
|
|
90551
|
+
const databaseId = params.databaseId;
|
|
90552
|
+
const collectionId = params.collectionId;
|
|
90553
|
+
const key = params.key;
|
|
90554
|
+
const required2 = params.required;
|
|
90555
|
+
const xdefault = params.xdefault;
|
|
90556
|
+
const newKey = params.newKey;
|
|
90557
|
+
if (typeof databaseId === "undefined") {
|
|
90558
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90559
|
+
}
|
|
90560
|
+
if (typeof collectionId === "undefined") {
|
|
90561
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90562
|
+
}
|
|
90563
|
+
if (typeof key === "undefined") {
|
|
90564
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
90565
|
+
}
|
|
90566
|
+
if (typeof required2 === "undefined") {
|
|
90567
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
90568
|
+
}
|
|
90569
|
+
if (typeof xdefault === "undefined") {
|
|
90570
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
90571
|
+
}
|
|
90572
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
90573
|
+
const payload = {};
|
|
90574
|
+
if (typeof required2 !== "undefined") {
|
|
90575
|
+
payload["required"] = required2;
|
|
90576
|
+
}
|
|
90577
|
+
if (typeof xdefault !== "undefined") {
|
|
90578
|
+
payload["default"] = xdefault;
|
|
90579
|
+
}
|
|
90580
|
+
if (typeof newKey !== "undefined") {
|
|
90581
|
+
payload["newKey"] = newKey;
|
|
90582
|
+
}
|
|
90583
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90584
|
+
const apiHeaders = {
|
|
90585
|
+
"content-type": "application/json"
|
|
90586
|
+
};
|
|
90587
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
90588
|
+
}
|
|
90589
|
+
createVarcharAttribute(paramsOrFirst, ...rest) {
|
|
90590
|
+
let params;
|
|
90591
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90592
|
+
params = paramsOrFirst || {};
|
|
90593
|
+
} else {
|
|
90594
|
+
params = {
|
|
90595
|
+
databaseId: paramsOrFirst,
|
|
90596
|
+
collectionId: rest[0],
|
|
90597
|
+
key: rest[1],
|
|
90598
|
+
size: rest[2],
|
|
90599
|
+
required: rest[3],
|
|
90600
|
+
xdefault: rest[4],
|
|
90601
|
+
array: rest[5]
|
|
90602
|
+
};
|
|
90603
|
+
}
|
|
90604
|
+
const databaseId = params.databaseId;
|
|
90605
|
+
const collectionId = params.collectionId;
|
|
90606
|
+
const key = params.key;
|
|
90607
|
+
const size = params.size;
|
|
90608
|
+
const required2 = params.required;
|
|
90609
|
+
const xdefault = params.xdefault;
|
|
90610
|
+
const array2 = params.array;
|
|
90611
|
+
if (typeof databaseId === "undefined") {
|
|
90612
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90613
|
+
}
|
|
90614
|
+
if (typeof collectionId === "undefined") {
|
|
90615
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90616
|
+
}
|
|
90617
|
+
if (typeof key === "undefined") {
|
|
90618
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
90619
|
+
}
|
|
90620
|
+
if (typeof size === "undefined") {
|
|
90621
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
90622
|
+
}
|
|
90623
|
+
if (typeof required2 === "undefined") {
|
|
90624
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
90625
|
+
}
|
|
90626
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/varchar".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
90627
|
+
const payload = {};
|
|
90628
|
+
if (typeof key !== "undefined") {
|
|
90629
|
+
payload["key"] = key;
|
|
90630
|
+
}
|
|
90631
|
+
if (typeof size !== "undefined") {
|
|
90632
|
+
payload["size"] = size;
|
|
90633
|
+
}
|
|
90634
|
+
if (typeof required2 !== "undefined") {
|
|
90635
|
+
payload["required"] = required2;
|
|
90636
|
+
}
|
|
90637
|
+
if (typeof xdefault !== "undefined") {
|
|
90638
|
+
payload["default"] = xdefault;
|
|
90639
|
+
}
|
|
90640
|
+
if (typeof array2 !== "undefined") {
|
|
90641
|
+
payload["array"] = array2;
|
|
90642
|
+
}
|
|
90643
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90644
|
+
const apiHeaders = {
|
|
90645
|
+
"content-type": "application/json"
|
|
90646
|
+
};
|
|
90647
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
90648
|
+
}
|
|
90649
|
+
updateVarcharAttribute(paramsOrFirst, ...rest) {
|
|
90650
|
+
let params;
|
|
90651
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90652
|
+
params = paramsOrFirst || {};
|
|
90653
|
+
} else {
|
|
90654
|
+
params = {
|
|
90655
|
+
databaseId: paramsOrFirst,
|
|
90656
|
+
collectionId: rest[0],
|
|
90657
|
+
key: rest[1],
|
|
90658
|
+
required: rest[2],
|
|
90659
|
+
xdefault: rest[3],
|
|
90660
|
+
size: rest[4],
|
|
90661
|
+
newKey: rest[5]
|
|
90662
|
+
};
|
|
90663
|
+
}
|
|
90664
|
+
const databaseId = params.databaseId;
|
|
90665
|
+
const collectionId = params.collectionId;
|
|
90666
|
+
const key = params.key;
|
|
90667
|
+
const required2 = params.required;
|
|
90668
|
+
const xdefault = params.xdefault;
|
|
90669
|
+
const size = params.size;
|
|
90670
|
+
const newKey = params.newKey;
|
|
90671
|
+
if (typeof databaseId === "undefined") {
|
|
90672
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90673
|
+
}
|
|
90674
|
+
if (typeof collectionId === "undefined") {
|
|
90675
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90676
|
+
}
|
|
90677
|
+
if (typeof key === "undefined") {
|
|
90678
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
90679
|
+
}
|
|
90680
|
+
if (typeof required2 === "undefined") {
|
|
90681
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
90682
|
+
}
|
|
90683
|
+
if (typeof xdefault === "undefined") {
|
|
90684
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
90685
|
+
}
|
|
90686
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
90175
90687
|
const payload = {};
|
|
90176
90688
|
if (typeof required2 !== "undefined") {
|
|
90177
90689
|
payload["required"] = required2;
|
|
@@ -90191,110 +90703,6 @@ var Databases = class {
|
|
|
90191
90703
|
};
|
|
90192
90704
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
90193
90705
|
}
|
|
90194
|
-
createUrlAttribute(paramsOrFirst, ...rest) {
|
|
90195
|
-
let params;
|
|
90196
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90197
|
-
params = paramsOrFirst || {};
|
|
90198
|
-
} else {
|
|
90199
|
-
params = {
|
|
90200
|
-
databaseId: paramsOrFirst,
|
|
90201
|
-
collectionId: rest[0],
|
|
90202
|
-
key: rest[1],
|
|
90203
|
-
required: rest[2],
|
|
90204
|
-
xdefault: rest[3],
|
|
90205
|
-
array: rest[4]
|
|
90206
|
-
};
|
|
90207
|
-
}
|
|
90208
|
-
const databaseId = params.databaseId;
|
|
90209
|
-
const collectionId = params.collectionId;
|
|
90210
|
-
const key = params.key;
|
|
90211
|
-
const required2 = params.required;
|
|
90212
|
-
const xdefault = params.xdefault;
|
|
90213
|
-
const array2 = params.array;
|
|
90214
|
-
if (typeof databaseId === "undefined") {
|
|
90215
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90216
|
-
}
|
|
90217
|
-
if (typeof collectionId === "undefined") {
|
|
90218
|
-
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90219
|
-
}
|
|
90220
|
-
if (typeof key === "undefined") {
|
|
90221
|
-
throw new AppwriteException('Missing required parameter: "key"');
|
|
90222
|
-
}
|
|
90223
|
-
if (typeof required2 === "undefined") {
|
|
90224
|
-
throw new AppwriteException('Missing required parameter: "required"');
|
|
90225
|
-
}
|
|
90226
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
90227
|
-
const payload = {};
|
|
90228
|
-
if (typeof key !== "undefined") {
|
|
90229
|
-
payload["key"] = key;
|
|
90230
|
-
}
|
|
90231
|
-
if (typeof required2 !== "undefined") {
|
|
90232
|
-
payload["required"] = required2;
|
|
90233
|
-
}
|
|
90234
|
-
if (typeof xdefault !== "undefined") {
|
|
90235
|
-
payload["default"] = xdefault;
|
|
90236
|
-
}
|
|
90237
|
-
if (typeof array2 !== "undefined") {
|
|
90238
|
-
payload["array"] = array2;
|
|
90239
|
-
}
|
|
90240
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90241
|
-
const apiHeaders = {
|
|
90242
|
-
"content-type": "application/json"
|
|
90243
|
-
};
|
|
90244
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
90245
|
-
}
|
|
90246
|
-
updateUrlAttribute(paramsOrFirst, ...rest) {
|
|
90247
|
-
let params;
|
|
90248
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90249
|
-
params = paramsOrFirst || {};
|
|
90250
|
-
} else {
|
|
90251
|
-
params = {
|
|
90252
|
-
databaseId: paramsOrFirst,
|
|
90253
|
-
collectionId: rest[0],
|
|
90254
|
-
key: rest[1],
|
|
90255
|
-
required: rest[2],
|
|
90256
|
-
xdefault: rest[3],
|
|
90257
|
-
newKey: rest[4]
|
|
90258
|
-
};
|
|
90259
|
-
}
|
|
90260
|
-
const databaseId = params.databaseId;
|
|
90261
|
-
const collectionId = params.collectionId;
|
|
90262
|
-
const key = params.key;
|
|
90263
|
-
const required2 = params.required;
|
|
90264
|
-
const xdefault = params.xdefault;
|
|
90265
|
-
const newKey = params.newKey;
|
|
90266
|
-
if (typeof databaseId === "undefined") {
|
|
90267
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
90268
|
-
}
|
|
90269
|
-
if (typeof collectionId === "undefined") {
|
|
90270
|
-
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
90271
|
-
}
|
|
90272
|
-
if (typeof key === "undefined") {
|
|
90273
|
-
throw new AppwriteException('Missing required parameter: "key"');
|
|
90274
|
-
}
|
|
90275
|
-
if (typeof required2 === "undefined") {
|
|
90276
|
-
throw new AppwriteException('Missing required parameter: "required"');
|
|
90277
|
-
}
|
|
90278
|
-
if (typeof xdefault === "undefined") {
|
|
90279
|
-
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
90280
|
-
}
|
|
90281
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
90282
|
-
const payload = {};
|
|
90283
|
-
if (typeof required2 !== "undefined") {
|
|
90284
|
-
payload["required"] = required2;
|
|
90285
|
-
}
|
|
90286
|
-
if (typeof xdefault !== "undefined") {
|
|
90287
|
-
payload["default"] = xdefault;
|
|
90288
|
-
}
|
|
90289
|
-
if (typeof newKey !== "undefined") {
|
|
90290
|
-
payload["newKey"] = newKey;
|
|
90291
|
-
}
|
|
90292
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90293
|
-
const apiHeaders = {
|
|
90294
|
-
"content-type": "application/json"
|
|
90295
|
-
};
|
|
90296
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
90297
|
-
}
|
|
90298
90706
|
getAttribute(paramsOrFirst, ...rest) {
|
|
90299
90707
|
let params;
|
|
90300
90708
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -91382,7 +91790,7 @@ var Functions = class {
|
|
|
91382
91790
|
}
|
|
91383
91791
|
listTemplates(paramsOrFirst, ...rest) {
|
|
91384
91792
|
let params;
|
|
91385
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
91793
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "runtimes" in paramsOrFirst) {
|
|
91386
91794
|
params = paramsOrFirst || {};
|
|
91387
91795
|
} else {
|
|
91388
91796
|
params = {
|
|
@@ -95150,7 +95558,7 @@ var Organizations = class {
|
|
|
95150
95558
|
}
|
|
95151
95559
|
estimationCreateOrganization(paramsOrFirst, ...rest) {
|
|
95152
95560
|
let params;
|
|
95153
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)
|
|
95561
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95154
95562
|
params = paramsOrFirst || {};
|
|
95155
95563
|
} else {
|
|
95156
95564
|
params = {
|
|
@@ -95773,6 +96181,169 @@ var Organizations = class {
|
|
|
95773
96181
|
const apiHeaders = {};
|
|
95774
96182
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
95775
96183
|
}
|
|
96184
|
+
listKeys(paramsOrFirst, ...rest) {
|
|
96185
|
+
let params;
|
|
96186
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
96187
|
+
params = paramsOrFirst || {};
|
|
96188
|
+
} else {
|
|
96189
|
+
params = {
|
|
96190
|
+
organizationId: paramsOrFirst,
|
|
96191
|
+
total: rest[0]
|
|
96192
|
+
};
|
|
96193
|
+
}
|
|
96194
|
+
const organizationId = params.organizationId;
|
|
96195
|
+
const total = params.total;
|
|
96196
|
+
if (typeof organizationId === "undefined") {
|
|
96197
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
96198
|
+
}
|
|
96199
|
+
const apiPath = "/organizations/{organizationId}/keys".replace("{organizationId}", organizationId);
|
|
96200
|
+
const payload = {};
|
|
96201
|
+
if (typeof total !== "undefined") {
|
|
96202
|
+
payload["total"] = total;
|
|
96203
|
+
}
|
|
96204
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
96205
|
+
const apiHeaders = {};
|
|
96206
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
96207
|
+
}
|
|
96208
|
+
createKey(paramsOrFirst, ...rest) {
|
|
96209
|
+
let params;
|
|
96210
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
96211
|
+
params = paramsOrFirst || {};
|
|
96212
|
+
} else {
|
|
96213
|
+
params = {
|
|
96214
|
+
organizationId: paramsOrFirst,
|
|
96215
|
+
name: rest[0],
|
|
96216
|
+
scopes: rest[1],
|
|
96217
|
+
expire: rest[2]
|
|
96218
|
+
};
|
|
96219
|
+
}
|
|
96220
|
+
const organizationId = params.organizationId;
|
|
96221
|
+
const name = params.name;
|
|
96222
|
+
const scopes = params.scopes;
|
|
96223
|
+
const expire = params.expire;
|
|
96224
|
+
if (typeof organizationId === "undefined") {
|
|
96225
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
96226
|
+
}
|
|
96227
|
+
if (typeof name === "undefined") {
|
|
96228
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
96229
|
+
}
|
|
96230
|
+
if (typeof scopes === "undefined") {
|
|
96231
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
96232
|
+
}
|
|
96233
|
+
const apiPath = "/organizations/{organizationId}/keys".replace("{organizationId}", organizationId);
|
|
96234
|
+
const payload = {};
|
|
96235
|
+
if (typeof name !== "undefined") {
|
|
96236
|
+
payload["name"] = name;
|
|
96237
|
+
}
|
|
96238
|
+
if (typeof scopes !== "undefined") {
|
|
96239
|
+
payload["scopes"] = scopes;
|
|
96240
|
+
}
|
|
96241
|
+
if (typeof expire !== "undefined") {
|
|
96242
|
+
payload["expire"] = expire;
|
|
96243
|
+
}
|
|
96244
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
96245
|
+
const apiHeaders = {
|
|
96246
|
+
"content-type": "application/json"
|
|
96247
|
+
};
|
|
96248
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
96249
|
+
}
|
|
96250
|
+
getKey(paramsOrFirst, ...rest) {
|
|
96251
|
+
let params;
|
|
96252
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
96253
|
+
params = paramsOrFirst || {};
|
|
96254
|
+
} else {
|
|
96255
|
+
params = {
|
|
96256
|
+
organizationId: paramsOrFirst,
|
|
96257
|
+
keyId: rest[0]
|
|
96258
|
+
};
|
|
96259
|
+
}
|
|
96260
|
+
const organizationId = params.organizationId;
|
|
96261
|
+
const keyId = params.keyId;
|
|
96262
|
+
if (typeof organizationId === "undefined") {
|
|
96263
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
96264
|
+
}
|
|
96265
|
+
if (typeof keyId === "undefined") {
|
|
96266
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
96267
|
+
}
|
|
96268
|
+
const apiPath = "/organizations/{organizationId}/keys/{keyId}".replace("{organizationId}", organizationId).replace("{keyId}", keyId);
|
|
96269
|
+
const payload = {};
|
|
96270
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
96271
|
+
const apiHeaders = {};
|
|
96272
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
96273
|
+
}
|
|
96274
|
+
updateKey(paramsOrFirst, ...rest) {
|
|
96275
|
+
let params;
|
|
96276
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
96277
|
+
params = paramsOrFirst || {};
|
|
96278
|
+
} else {
|
|
96279
|
+
params = {
|
|
96280
|
+
organizationId: paramsOrFirst,
|
|
96281
|
+
keyId: rest[0],
|
|
96282
|
+
name: rest[1],
|
|
96283
|
+
scopes: rest[2],
|
|
96284
|
+
expire: rest[3]
|
|
96285
|
+
};
|
|
96286
|
+
}
|
|
96287
|
+
const organizationId = params.organizationId;
|
|
96288
|
+
const keyId = params.keyId;
|
|
96289
|
+
const name = params.name;
|
|
96290
|
+
const scopes = params.scopes;
|
|
96291
|
+
const expire = params.expire;
|
|
96292
|
+
if (typeof organizationId === "undefined") {
|
|
96293
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
96294
|
+
}
|
|
96295
|
+
if (typeof keyId === "undefined") {
|
|
96296
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
96297
|
+
}
|
|
96298
|
+
if (typeof name === "undefined") {
|
|
96299
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
96300
|
+
}
|
|
96301
|
+
if (typeof scopes === "undefined") {
|
|
96302
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
96303
|
+
}
|
|
96304
|
+
const apiPath = "/organizations/{organizationId}/keys/{keyId}".replace("{organizationId}", organizationId).replace("{keyId}", keyId);
|
|
96305
|
+
const payload = {};
|
|
96306
|
+
if (typeof name !== "undefined") {
|
|
96307
|
+
payload["name"] = name;
|
|
96308
|
+
}
|
|
96309
|
+
if (typeof scopes !== "undefined") {
|
|
96310
|
+
payload["scopes"] = scopes;
|
|
96311
|
+
}
|
|
96312
|
+
if (typeof expire !== "undefined") {
|
|
96313
|
+
payload["expire"] = expire;
|
|
96314
|
+
}
|
|
96315
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
96316
|
+
const apiHeaders = {
|
|
96317
|
+
"content-type": "application/json"
|
|
96318
|
+
};
|
|
96319
|
+
return this.client.call("put", uri, apiHeaders, payload);
|
|
96320
|
+
}
|
|
96321
|
+
deleteKey(paramsOrFirst, ...rest) {
|
|
96322
|
+
let params;
|
|
96323
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
96324
|
+
params = paramsOrFirst || {};
|
|
96325
|
+
} else {
|
|
96326
|
+
params = {
|
|
96327
|
+
organizationId: paramsOrFirst,
|
|
96328
|
+
keyId: rest[0]
|
|
96329
|
+
};
|
|
96330
|
+
}
|
|
96331
|
+
const organizationId = params.organizationId;
|
|
96332
|
+
const keyId = params.keyId;
|
|
96333
|
+
if (typeof organizationId === "undefined") {
|
|
96334
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
96335
|
+
}
|
|
96336
|
+
if (typeof keyId === "undefined") {
|
|
96337
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
96338
|
+
}
|
|
96339
|
+
const apiPath = "/organizations/{organizationId}/keys/{keyId}".replace("{organizationId}", organizationId).replace("{keyId}", keyId);
|
|
96340
|
+
const payload = {};
|
|
96341
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
96342
|
+
const apiHeaders = {
|
|
96343
|
+
"content-type": "application/json"
|
|
96344
|
+
};
|
|
96345
|
+
return this.client.call("delete", uri, apiHeaders, payload);
|
|
96346
|
+
}
|
|
95776
96347
|
setDefaultPaymentMethod(paramsOrFirst, ...rest) {
|
|
95777
96348
|
let params;
|
|
95778
96349
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -96022,6 +96593,25 @@ var Organizations = class {
|
|
|
96022
96593
|
};
|
|
96023
96594
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
96024
96595
|
}
|
|
96596
|
+
listRegions(paramsOrFirst) {
|
|
96597
|
+
let params;
|
|
96598
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
96599
|
+
params = paramsOrFirst || {};
|
|
96600
|
+
} else {
|
|
96601
|
+
params = {
|
|
96602
|
+
organizationId: paramsOrFirst
|
|
96603
|
+
};
|
|
96604
|
+
}
|
|
96605
|
+
const organizationId = params.organizationId;
|
|
96606
|
+
if (typeof organizationId === "undefined") {
|
|
96607
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
96608
|
+
}
|
|
96609
|
+
const apiPath = "/organizations/{organizationId}/regions".replace("{organizationId}", organizationId);
|
|
96610
|
+
const payload = {};
|
|
96611
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
96612
|
+
const apiHeaders = {};
|
|
96613
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
96614
|
+
}
|
|
96025
96615
|
getScopes(paramsOrFirst) {
|
|
96026
96616
|
let params;
|
|
96027
96617
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -98841,7 +99431,7 @@ var Sites = class {
|
|
|
98841
99431
|
}
|
|
98842
99432
|
listTemplates(paramsOrFirst, ...rest) {
|
|
98843
99433
|
let params;
|
|
98844
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
99434
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "frameworks" in paramsOrFirst) {
|
|
98845
99435
|
params = paramsOrFirst || {};
|
|
98846
99436
|
} else {
|
|
98847
99437
|
params = {
|
|
@@ -100531,9 +101121,6 @@ var TablesDB = class {
|
|
|
100531
101121
|
if (typeof databaseId === "undefined") {
|
|
100532
101122
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
100533
101123
|
}
|
|
100534
|
-
if (typeof name === "undefined") {
|
|
100535
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
100536
|
-
}
|
|
100537
101124
|
const apiPath = "/tablesdb/{databaseId}".replace("{databaseId}", databaseId);
|
|
100538
101125
|
const payload = {};
|
|
100539
101126
|
if (typeof name !== "undefined") {
|
|
@@ -100715,9 +101302,6 @@ var TablesDB = class {
|
|
|
100715
101302
|
if (typeof tableId === "undefined") {
|
|
100716
101303
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
100717
101304
|
}
|
|
100718
|
-
if (typeof name === "undefined") {
|
|
100719
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
100720
|
-
}
|
|
100721
101305
|
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
100722
101306
|
const payload = {};
|
|
100723
101307
|
if (typeof name !== "undefined") {
|
|
@@ -101678,6 +102262,214 @@ var TablesDB = class {
|
|
|
101678
102262
|
};
|
|
101679
102263
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
101680
102264
|
}
|
|
102265
|
+
createLongtextColumn(paramsOrFirst, ...rest) {
|
|
102266
|
+
let params;
|
|
102267
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102268
|
+
params = paramsOrFirst || {};
|
|
102269
|
+
} else {
|
|
102270
|
+
params = {
|
|
102271
|
+
databaseId: paramsOrFirst,
|
|
102272
|
+
tableId: rest[0],
|
|
102273
|
+
key: rest[1],
|
|
102274
|
+
required: rest[2],
|
|
102275
|
+
xdefault: rest[3],
|
|
102276
|
+
array: rest[4]
|
|
102277
|
+
};
|
|
102278
|
+
}
|
|
102279
|
+
const databaseId = params.databaseId;
|
|
102280
|
+
const tableId = params.tableId;
|
|
102281
|
+
const key = params.key;
|
|
102282
|
+
const required2 = params.required;
|
|
102283
|
+
const xdefault = params.xdefault;
|
|
102284
|
+
const array2 = params.array;
|
|
102285
|
+
if (typeof databaseId === "undefined") {
|
|
102286
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102287
|
+
}
|
|
102288
|
+
if (typeof tableId === "undefined") {
|
|
102289
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102290
|
+
}
|
|
102291
|
+
if (typeof key === "undefined") {
|
|
102292
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
102293
|
+
}
|
|
102294
|
+
if (typeof required2 === "undefined") {
|
|
102295
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
102296
|
+
}
|
|
102297
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/longtext".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
102298
|
+
const payload = {};
|
|
102299
|
+
if (typeof key !== "undefined") {
|
|
102300
|
+
payload["key"] = key;
|
|
102301
|
+
}
|
|
102302
|
+
if (typeof required2 !== "undefined") {
|
|
102303
|
+
payload["required"] = required2;
|
|
102304
|
+
}
|
|
102305
|
+
if (typeof xdefault !== "undefined") {
|
|
102306
|
+
payload["default"] = xdefault;
|
|
102307
|
+
}
|
|
102308
|
+
if (typeof array2 !== "undefined") {
|
|
102309
|
+
payload["array"] = array2;
|
|
102310
|
+
}
|
|
102311
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102312
|
+
const apiHeaders = {
|
|
102313
|
+
"content-type": "application/json"
|
|
102314
|
+
};
|
|
102315
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
102316
|
+
}
|
|
102317
|
+
updateLongtextColumn(paramsOrFirst, ...rest) {
|
|
102318
|
+
let params;
|
|
102319
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102320
|
+
params = paramsOrFirst || {};
|
|
102321
|
+
} else {
|
|
102322
|
+
params = {
|
|
102323
|
+
databaseId: paramsOrFirst,
|
|
102324
|
+
tableId: rest[0],
|
|
102325
|
+
key: rest[1],
|
|
102326
|
+
required: rest[2],
|
|
102327
|
+
xdefault: rest[3],
|
|
102328
|
+
newKey: rest[4]
|
|
102329
|
+
};
|
|
102330
|
+
}
|
|
102331
|
+
const databaseId = params.databaseId;
|
|
102332
|
+
const tableId = params.tableId;
|
|
102333
|
+
const key = params.key;
|
|
102334
|
+
const required2 = params.required;
|
|
102335
|
+
const xdefault = params.xdefault;
|
|
102336
|
+
const newKey = params.newKey;
|
|
102337
|
+
if (typeof databaseId === "undefined") {
|
|
102338
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102339
|
+
}
|
|
102340
|
+
if (typeof tableId === "undefined") {
|
|
102341
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102342
|
+
}
|
|
102343
|
+
if (typeof key === "undefined") {
|
|
102344
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
102345
|
+
}
|
|
102346
|
+
if (typeof required2 === "undefined") {
|
|
102347
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
102348
|
+
}
|
|
102349
|
+
if (typeof xdefault === "undefined") {
|
|
102350
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
102351
|
+
}
|
|
102352
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
102353
|
+
const payload = {};
|
|
102354
|
+
if (typeof required2 !== "undefined") {
|
|
102355
|
+
payload["required"] = required2;
|
|
102356
|
+
}
|
|
102357
|
+
if (typeof xdefault !== "undefined") {
|
|
102358
|
+
payload["default"] = xdefault;
|
|
102359
|
+
}
|
|
102360
|
+
if (typeof newKey !== "undefined") {
|
|
102361
|
+
payload["newKey"] = newKey;
|
|
102362
|
+
}
|
|
102363
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102364
|
+
const apiHeaders = {
|
|
102365
|
+
"content-type": "application/json"
|
|
102366
|
+
};
|
|
102367
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
102368
|
+
}
|
|
102369
|
+
createMediumtextColumn(paramsOrFirst, ...rest) {
|
|
102370
|
+
let params;
|
|
102371
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102372
|
+
params = paramsOrFirst || {};
|
|
102373
|
+
} else {
|
|
102374
|
+
params = {
|
|
102375
|
+
databaseId: paramsOrFirst,
|
|
102376
|
+
tableId: rest[0],
|
|
102377
|
+
key: rest[1],
|
|
102378
|
+
required: rest[2],
|
|
102379
|
+
xdefault: rest[3],
|
|
102380
|
+
array: rest[4]
|
|
102381
|
+
};
|
|
102382
|
+
}
|
|
102383
|
+
const databaseId = params.databaseId;
|
|
102384
|
+
const tableId = params.tableId;
|
|
102385
|
+
const key = params.key;
|
|
102386
|
+
const required2 = params.required;
|
|
102387
|
+
const xdefault = params.xdefault;
|
|
102388
|
+
const array2 = params.array;
|
|
102389
|
+
if (typeof databaseId === "undefined") {
|
|
102390
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102391
|
+
}
|
|
102392
|
+
if (typeof tableId === "undefined") {
|
|
102393
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102394
|
+
}
|
|
102395
|
+
if (typeof key === "undefined") {
|
|
102396
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
102397
|
+
}
|
|
102398
|
+
if (typeof required2 === "undefined") {
|
|
102399
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
102400
|
+
}
|
|
102401
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
102402
|
+
const payload = {};
|
|
102403
|
+
if (typeof key !== "undefined") {
|
|
102404
|
+
payload["key"] = key;
|
|
102405
|
+
}
|
|
102406
|
+
if (typeof required2 !== "undefined") {
|
|
102407
|
+
payload["required"] = required2;
|
|
102408
|
+
}
|
|
102409
|
+
if (typeof xdefault !== "undefined") {
|
|
102410
|
+
payload["default"] = xdefault;
|
|
102411
|
+
}
|
|
102412
|
+
if (typeof array2 !== "undefined") {
|
|
102413
|
+
payload["array"] = array2;
|
|
102414
|
+
}
|
|
102415
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102416
|
+
const apiHeaders = {
|
|
102417
|
+
"content-type": "application/json"
|
|
102418
|
+
};
|
|
102419
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
102420
|
+
}
|
|
102421
|
+
updateMediumtextColumn(paramsOrFirst, ...rest) {
|
|
102422
|
+
let params;
|
|
102423
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102424
|
+
params = paramsOrFirst || {};
|
|
102425
|
+
} else {
|
|
102426
|
+
params = {
|
|
102427
|
+
databaseId: paramsOrFirst,
|
|
102428
|
+
tableId: rest[0],
|
|
102429
|
+
key: rest[1],
|
|
102430
|
+
required: rest[2],
|
|
102431
|
+
xdefault: rest[3],
|
|
102432
|
+
newKey: rest[4]
|
|
102433
|
+
};
|
|
102434
|
+
}
|
|
102435
|
+
const databaseId = params.databaseId;
|
|
102436
|
+
const tableId = params.tableId;
|
|
102437
|
+
const key = params.key;
|
|
102438
|
+
const required2 = params.required;
|
|
102439
|
+
const xdefault = params.xdefault;
|
|
102440
|
+
const newKey = params.newKey;
|
|
102441
|
+
if (typeof databaseId === "undefined") {
|
|
102442
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102443
|
+
}
|
|
102444
|
+
if (typeof tableId === "undefined") {
|
|
102445
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102446
|
+
}
|
|
102447
|
+
if (typeof key === "undefined") {
|
|
102448
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
102449
|
+
}
|
|
102450
|
+
if (typeof required2 === "undefined") {
|
|
102451
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
102452
|
+
}
|
|
102453
|
+
if (typeof xdefault === "undefined") {
|
|
102454
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
102455
|
+
}
|
|
102456
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
102457
|
+
const payload = {};
|
|
102458
|
+
if (typeof required2 !== "undefined") {
|
|
102459
|
+
payload["required"] = required2;
|
|
102460
|
+
}
|
|
102461
|
+
if (typeof xdefault !== "undefined") {
|
|
102462
|
+
payload["default"] = xdefault;
|
|
102463
|
+
}
|
|
102464
|
+
if (typeof newKey !== "undefined") {
|
|
102465
|
+
payload["newKey"] = newKey;
|
|
102466
|
+
}
|
|
102467
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102468
|
+
const apiHeaders = {
|
|
102469
|
+
"content-type": "application/json"
|
|
102470
|
+
};
|
|
102471
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
102472
|
+
}
|
|
101681
102473
|
createPointColumn(paramsOrFirst, ...rest) {
|
|
101682
102474
|
let params;
|
|
101683
102475
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -101757,7 +102549,103 @@ var TablesDB = class {
|
|
|
101757
102549
|
if (typeof required2 === "undefined") {
|
|
101758
102550
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
101759
102551
|
}
|
|
101760
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
102552
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
102553
|
+
const payload = {};
|
|
102554
|
+
if (typeof required2 !== "undefined") {
|
|
102555
|
+
payload["required"] = required2;
|
|
102556
|
+
}
|
|
102557
|
+
if (typeof xdefault !== "undefined") {
|
|
102558
|
+
payload["default"] = xdefault;
|
|
102559
|
+
}
|
|
102560
|
+
if (typeof newKey !== "undefined") {
|
|
102561
|
+
payload["newKey"] = newKey;
|
|
102562
|
+
}
|
|
102563
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102564
|
+
const apiHeaders = {
|
|
102565
|
+
"content-type": "application/json"
|
|
102566
|
+
};
|
|
102567
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
102568
|
+
}
|
|
102569
|
+
createPolygonColumn(paramsOrFirst, ...rest) {
|
|
102570
|
+
let params;
|
|
102571
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102572
|
+
params = paramsOrFirst || {};
|
|
102573
|
+
} else {
|
|
102574
|
+
params = {
|
|
102575
|
+
databaseId: paramsOrFirst,
|
|
102576
|
+
tableId: rest[0],
|
|
102577
|
+
key: rest[1],
|
|
102578
|
+
required: rest[2],
|
|
102579
|
+
xdefault: rest[3]
|
|
102580
|
+
};
|
|
102581
|
+
}
|
|
102582
|
+
const databaseId = params.databaseId;
|
|
102583
|
+
const tableId = params.tableId;
|
|
102584
|
+
const key = params.key;
|
|
102585
|
+
const required2 = params.required;
|
|
102586
|
+
const xdefault = params.xdefault;
|
|
102587
|
+
if (typeof databaseId === "undefined") {
|
|
102588
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102589
|
+
}
|
|
102590
|
+
if (typeof tableId === "undefined") {
|
|
102591
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102592
|
+
}
|
|
102593
|
+
if (typeof key === "undefined") {
|
|
102594
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
102595
|
+
}
|
|
102596
|
+
if (typeof required2 === "undefined") {
|
|
102597
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
102598
|
+
}
|
|
102599
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
102600
|
+
const payload = {};
|
|
102601
|
+
if (typeof key !== "undefined") {
|
|
102602
|
+
payload["key"] = key;
|
|
102603
|
+
}
|
|
102604
|
+
if (typeof required2 !== "undefined") {
|
|
102605
|
+
payload["required"] = required2;
|
|
102606
|
+
}
|
|
102607
|
+
if (typeof xdefault !== "undefined") {
|
|
102608
|
+
payload["default"] = xdefault;
|
|
102609
|
+
}
|
|
102610
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102611
|
+
const apiHeaders = {
|
|
102612
|
+
"content-type": "application/json"
|
|
102613
|
+
};
|
|
102614
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
102615
|
+
}
|
|
102616
|
+
updatePolygonColumn(paramsOrFirst, ...rest) {
|
|
102617
|
+
let params;
|
|
102618
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102619
|
+
params = paramsOrFirst || {};
|
|
102620
|
+
} else {
|
|
102621
|
+
params = {
|
|
102622
|
+
databaseId: paramsOrFirst,
|
|
102623
|
+
tableId: rest[0],
|
|
102624
|
+
key: rest[1],
|
|
102625
|
+
required: rest[2],
|
|
102626
|
+
xdefault: rest[3],
|
|
102627
|
+
newKey: rest[4]
|
|
102628
|
+
};
|
|
102629
|
+
}
|
|
102630
|
+
const databaseId = params.databaseId;
|
|
102631
|
+
const tableId = params.tableId;
|
|
102632
|
+
const key = params.key;
|
|
102633
|
+
const required2 = params.required;
|
|
102634
|
+
const xdefault = params.xdefault;
|
|
102635
|
+
const newKey = params.newKey;
|
|
102636
|
+
if (typeof databaseId === "undefined") {
|
|
102637
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102638
|
+
}
|
|
102639
|
+
if (typeof tableId === "undefined") {
|
|
102640
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102641
|
+
}
|
|
102642
|
+
if (typeof key === "undefined") {
|
|
102643
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
102644
|
+
}
|
|
102645
|
+
if (typeof required2 === "undefined") {
|
|
102646
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
102647
|
+
}
|
|
102648
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
101761
102649
|
const payload = {};
|
|
101762
102650
|
if (typeof required2 !== "undefined") {
|
|
101763
102651
|
payload["required"] = required2;
|
|
@@ -101774,7 +102662,69 @@ var TablesDB = class {
|
|
|
101774
102662
|
};
|
|
101775
102663
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
101776
102664
|
}
|
|
101777
|
-
|
|
102665
|
+
createRelationshipColumn(paramsOrFirst, ...rest) {
|
|
102666
|
+
let params;
|
|
102667
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102668
|
+
params = paramsOrFirst || {};
|
|
102669
|
+
} else {
|
|
102670
|
+
params = {
|
|
102671
|
+
databaseId: paramsOrFirst,
|
|
102672
|
+
tableId: rest[0],
|
|
102673
|
+
relatedTableId: rest[1],
|
|
102674
|
+
type: rest[2],
|
|
102675
|
+
twoWay: rest[3],
|
|
102676
|
+
key: rest[4],
|
|
102677
|
+
twoWayKey: rest[5],
|
|
102678
|
+
onDelete: rest[6]
|
|
102679
|
+
};
|
|
102680
|
+
}
|
|
102681
|
+
const databaseId = params.databaseId;
|
|
102682
|
+
const tableId = params.tableId;
|
|
102683
|
+
const relatedTableId = params.relatedTableId;
|
|
102684
|
+
const type = params.type;
|
|
102685
|
+
const twoWay = params.twoWay;
|
|
102686
|
+
const key = params.key;
|
|
102687
|
+
const twoWayKey = params.twoWayKey;
|
|
102688
|
+
const onDelete = params.onDelete;
|
|
102689
|
+
if (typeof databaseId === "undefined") {
|
|
102690
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102691
|
+
}
|
|
102692
|
+
if (typeof tableId === "undefined") {
|
|
102693
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102694
|
+
}
|
|
102695
|
+
if (typeof relatedTableId === "undefined") {
|
|
102696
|
+
throw new AppwriteException('Missing required parameter: "relatedTableId"');
|
|
102697
|
+
}
|
|
102698
|
+
if (typeof type === "undefined") {
|
|
102699
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
102700
|
+
}
|
|
102701
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/relationship".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
102702
|
+
const payload = {};
|
|
102703
|
+
if (typeof relatedTableId !== "undefined") {
|
|
102704
|
+
payload["relatedTableId"] = relatedTableId;
|
|
102705
|
+
}
|
|
102706
|
+
if (typeof type !== "undefined") {
|
|
102707
|
+
payload["type"] = type;
|
|
102708
|
+
}
|
|
102709
|
+
if (typeof twoWay !== "undefined") {
|
|
102710
|
+
payload["twoWay"] = twoWay;
|
|
102711
|
+
}
|
|
102712
|
+
if (typeof key !== "undefined") {
|
|
102713
|
+
payload["key"] = key;
|
|
102714
|
+
}
|
|
102715
|
+
if (typeof twoWayKey !== "undefined") {
|
|
102716
|
+
payload["twoWayKey"] = twoWayKey;
|
|
102717
|
+
}
|
|
102718
|
+
if (typeof onDelete !== "undefined") {
|
|
102719
|
+
payload["onDelete"] = onDelete;
|
|
102720
|
+
}
|
|
102721
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102722
|
+
const apiHeaders = {
|
|
102723
|
+
"content-type": "application/json"
|
|
102724
|
+
};
|
|
102725
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
102726
|
+
}
|
|
102727
|
+
createStringColumn(paramsOrFirst, ...rest) {
|
|
101778
102728
|
let params;
|
|
101779
102729
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
101780
102730
|
params = paramsOrFirst || {};
|
|
@@ -101783,15 +102733,21 @@ var TablesDB = class {
|
|
|
101783
102733
|
databaseId: paramsOrFirst,
|
|
101784
102734
|
tableId: rest[0],
|
|
101785
102735
|
key: rest[1],
|
|
101786
|
-
|
|
101787
|
-
|
|
102736
|
+
size: rest[2],
|
|
102737
|
+
required: rest[3],
|
|
102738
|
+
xdefault: rest[4],
|
|
102739
|
+
array: rest[5],
|
|
102740
|
+
encrypt: rest[6]
|
|
101788
102741
|
};
|
|
101789
102742
|
}
|
|
101790
102743
|
const databaseId = params.databaseId;
|
|
101791
102744
|
const tableId = params.tableId;
|
|
101792
102745
|
const key = params.key;
|
|
102746
|
+
const size = params.size;
|
|
101793
102747
|
const required2 = params.required;
|
|
101794
102748
|
const xdefault = params.xdefault;
|
|
102749
|
+
const array2 = params.array;
|
|
102750
|
+
const encrypt = params.encrypt;
|
|
101795
102751
|
if (typeof databaseId === "undefined") {
|
|
101796
102752
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
101797
102753
|
}
|
|
@@ -101801,27 +102757,39 @@ var TablesDB = class {
|
|
|
101801
102757
|
if (typeof key === "undefined") {
|
|
101802
102758
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
101803
102759
|
}
|
|
102760
|
+
if (typeof size === "undefined") {
|
|
102761
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
102762
|
+
}
|
|
101804
102763
|
if (typeof required2 === "undefined") {
|
|
101805
102764
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
101806
102765
|
}
|
|
101807
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
102766
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
101808
102767
|
const payload = {};
|
|
101809
102768
|
if (typeof key !== "undefined") {
|
|
101810
102769
|
payload["key"] = key;
|
|
101811
102770
|
}
|
|
102771
|
+
if (typeof size !== "undefined") {
|
|
102772
|
+
payload["size"] = size;
|
|
102773
|
+
}
|
|
101812
102774
|
if (typeof required2 !== "undefined") {
|
|
101813
102775
|
payload["required"] = required2;
|
|
101814
102776
|
}
|
|
101815
102777
|
if (typeof xdefault !== "undefined") {
|
|
101816
102778
|
payload["default"] = xdefault;
|
|
101817
102779
|
}
|
|
102780
|
+
if (typeof array2 !== "undefined") {
|
|
102781
|
+
payload["array"] = array2;
|
|
102782
|
+
}
|
|
102783
|
+
if (typeof encrypt !== "undefined") {
|
|
102784
|
+
payload["encrypt"] = encrypt;
|
|
102785
|
+
}
|
|
101818
102786
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
101819
102787
|
const apiHeaders = {
|
|
101820
102788
|
"content-type": "application/json"
|
|
101821
102789
|
};
|
|
101822
102790
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
101823
102791
|
}
|
|
101824
|
-
|
|
102792
|
+
updateStringColumn(paramsOrFirst, ...rest) {
|
|
101825
102793
|
let params;
|
|
101826
102794
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
101827
102795
|
params = paramsOrFirst || {};
|
|
@@ -101832,7 +102800,8 @@ var TablesDB = class {
|
|
|
101832
102800
|
key: rest[1],
|
|
101833
102801
|
required: rest[2],
|
|
101834
102802
|
xdefault: rest[3],
|
|
101835
|
-
|
|
102803
|
+
size: rest[4],
|
|
102804
|
+
newKey: rest[5]
|
|
101836
102805
|
};
|
|
101837
102806
|
}
|
|
101838
102807
|
const databaseId = params.databaseId;
|
|
@@ -101840,6 +102809,7 @@ var TablesDB = class {
|
|
|
101840
102809
|
const key = params.key;
|
|
101841
102810
|
const required2 = params.required;
|
|
101842
102811
|
const xdefault = params.xdefault;
|
|
102812
|
+
const size = params.size;
|
|
101843
102813
|
const newKey = params.newKey;
|
|
101844
102814
|
if (typeof databaseId === "undefined") {
|
|
101845
102815
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -101853,7 +102823,10 @@ var TablesDB = class {
|
|
|
101853
102823
|
if (typeof required2 === "undefined") {
|
|
101854
102824
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
101855
102825
|
}
|
|
101856
|
-
|
|
102826
|
+
if (typeof xdefault === "undefined") {
|
|
102827
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
102828
|
+
}
|
|
102829
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
101857
102830
|
const payload = {};
|
|
101858
102831
|
if (typeof required2 !== "undefined") {
|
|
101859
102832
|
payload["required"] = required2;
|
|
@@ -101861,6 +102834,9 @@ var TablesDB = class {
|
|
|
101861
102834
|
if (typeof xdefault !== "undefined") {
|
|
101862
102835
|
payload["default"] = xdefault;
|
|
101863
102836
|
}
|
|
102837
|
+
if (typeof size !== "undefined") {
|
|
102838
|
+
payload["size"] = size;
|
|
102839
|
+
}
|
|
101864
102840
|
if (typeof newKey !== "undefined") {
|
|
101865
102841
|
payload["newKey"] = newKey;
|
|
101866
102842
|
}
|
|
@@ -101870,7 +102846,7 @@ var TablesDB = class {
|
|
|
101870
102846
|
};
|
|
101871
102847
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
101872
102848
|
}
|
|
101873
|
-
|
|
102849
|
+
createTextColumn(paramsOrFirst, ...rest) {
|
|
101874
102850
|
let params;
|
|
101875
102851
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
101876
102852
|
params = paramsOrFirst || {};
|
|
@@ -101878,53 +102854,43 @@ var TablesDB = class {
|
|
|
101878
102854
|
params = {
|
|
101879
102855
|
databaseId: paramsOrFirst,
|
|
101880
102856
|
tableId: rest[0],
|
|
101881
|
-
|
|
101882
|
-
|
|
101883
|
-
|
|
101884
|
-
|
|
101885
|
-
twoWayKey: rest[5],
|
|
101886
|
-
onDelete: rest[6]
|
|
102857
|
+
key: rest[1],
|
|
102858
|
+
required: rest[2],
|
|
102859
|
+
xdefault: rest[3],
|
|
102860
|
+
array: rest[4]
|
|
101887
102861
|
};
|
|
101888
102862
|
}
|
|
101889
102863
|
const databaseId = params.databaseId;
|
|
101890
102864
|
const tableId = params.tableId;
|
|
101891
|
-
const relatedTableId = params.relatedTableId;
|
|
101892
|
-
const type = params.type;
|
|
101893
|
-
const twoWay = params.twoWay;
|
|
101894
102865
|
const key = params.key;
|
|
101895
|
-
const
|
|
101896
|
-
const
|
|
102866
|
+
const required2 = params.required;
|
|
102867
|
+
const xdefault = params.xdefault;
|
|
102868
|
+
const array2 = params.array;
|
|
101897
102869
|
if (typeof databaseId === "undefined") {
|
|
101898
102870
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
101899
102871
|
}
|
|
101900
102872
|
if (typeof tableId === "undefined") {
|
|
101901
102873
|
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
101902
102874
|
}
|
|
101903
|
-
if (typeof
|
|
101904
|
-
throw new AppwriteException('Missing required parameter: "
|
|
102875
|
+
if (typeof key === "undefined") {
|
|
102876
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
101905
102877
|
}
|
|
101906
|
-
if (typeof
|
|
101907
|
-
throw new AppwriteException('Missing required parameter: "
|
|
102878
|
+
if (typeof required2 === "undefined") {
|
|
102879
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
101908
102880
|
}
|
|
101909
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
102881
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/text".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
101910
102882
|
const payload = {};
|
|
101911
|
-
if (typeof relatedTableId !== "undefined") {
|
|
101912
|
-
payload["relatedTableId"] = relatedTableId;
|
|
101913
|
-
}
|
|
101914
|
-
if (typeof type !== "undefined") {
|
|
101915
|
-
payload["type"] = type;
|
|
101916
|
-
}
|
|
101917
|
-
if (typeof twoWay !== "undefined") {
|
|
101918
|
-
payload["twoWay"] = twoWay;
|
|
101919
|
-
}
|
|
101920
102883
|
if (typeof key !== "undefined") {
|
|
101921
102884
|
payload["key"] = key;
|
|
101922
102885
|
}
|
|
101923
|
-
if (typeof
|
|
101924
|
-
payload["
|
|
102886
|
+
if (typeof required2 !== "undefined") {
|
|
102887
|
+
payload["required"] = required2;
|
|
101925
102888
|
}
|
|
101926
|
-
if (typeof
|
|
101927
|
-
payload["
|
|
102889
|
+
if (typeof xdefault !== "undefined") {
|
|
102890
|
+
payload["default"] = xdefault;
|
|
102891
|
+
}
|
|
102892
|
+
if (typeof array2 !== "undefined") {
|
|
102893
|
+
payload["array"] = array2;
|
|
101928
102894
|
}
|
|
101929
102895
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
101930
102896
|
const apiHeaders = {
|
|
@@ -101932,7 +102898,7 @@ var TablesDB = class {
|
|
|
101932
102898
|
};
|
|
101933
102899
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
101934
102900
|
}
|
|
101935
|
-
|
|
102901
|
+
updateTextColumn(paramsOrFirst, ...rest) {
|
|
101936
102902
|
let params;
|
|
101937
102903
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
101938
102904
|
params = paramsOrFirst || {};
|
|
@@ -101941,21 +102907,17 @@ var TablesDB = class {
|
|
|
101941
102907
|
databaseId: paramsOrFirst,
|
|
101942
102908
|
tableId: rest[0],
|
|
101943
102909
|
key: rest[1],
|
|
101944
|
-
|
|
101945
|
-
|
|
101946
|
-
|
|
101947
|
-
array: rest[5],
|
|
101948
|
-
encrypt: rest[6]
|
|
102910
|
+
required: rest[2],
|
|
102911
|
+
xdefault: rest[3],
|
|
102912
|
+
newKey: rest[4]
|
|
101949
102913
|
};
|
|
101950
102914
|
}
|
|
101951
102915
|
const databaseId = params.databaseId;
|
|
101952
102916
|
const tableId = params.tableId;
|
|
101953
102917
|
const key = params.key;
|
|
101954
|
-
const size = params.size;
|
|
101955
102918
|
const required2 = params.required;
|
|
101956
102919
|
const xdefault = params.xdefault;
|
|
101957
|
-
const
|
|
101958
|
-
const encrypt = params.encrypt;
|
|
102920
|
+
const newKey = params.newKey;
|
|
101959
102921
|
if (typeof databaseId === "undefined") {
|
|
101960
102922
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
101961
102923
|
}
|
|
@@ -101965,20 +102927,66 @@ var TablesDB = class {
|
|
|
101965
102927
|
if (typeof key === "undefined") {
|
|
101966
102928
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
101967
102929
|
}
|
|
101968
|
-
if (typeof
|
|
101969
|
-
throw new AppwriteException('Missing required parameter: "
|
|
102930
|
+
if (typeof required2 === "undefined") {
|
|
102931
|
+
throw new AppwriteException('Missing required parameter: "required"');
|
|
102932
|
+
}
|
|
102933
|
+
if (typeof xdefault === "undefined") {
|
|
102934
|
+
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
102935
|
+
}
|
|
102936
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
102937
|
+
const payload = {};
|
|
102938
|
+
if (typeof required2 !== "undefined") {
|
|
102939
|
+
payload["required"] = required2;
|
|
102940
|
+
}
|
|
102941
|
+
if (typeof xdefault !== "undefined") {
|
|
102942
|
+
payload["default"] = xdefault;
|
|
102943
|
+
}
|
|
102944
|
+
if (typeof newKey !== "undefined") {
|
|
102945
|
+
payload["newKey"] = newKey;
|
|
102946
|
+
}
|
|
102947
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
102948
|
+
const apiHeaders = {
|
|
102949
|
+
"content-type": "application/json"
|
|
102950
|
+
};
|
|
102951
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
102952
|
+
}
|
|
102953
|
+
createUrlColumn(paramsOrFirst, ...rest) {
|
|
102954
|
+
let params;
|
|
102955
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102956
|
+
params = paramsOrFirst || {};
|
|
102957
|
+
} else {
|
|
102958
|
+
params = {
|
|
102959
|
+
databaseId: paramsOrFirst,
|
|
102960
|
+
tableId: rest[0],
|
|
102961
|
+
key: rest[1],
|
|
102962
|
+
required: rest[2],
|
|
102963
|
+
xdefault: rest[3],
|
|
102964
|
+
array: rest[4]
|
|
102965
|
+
};
|
|
102966
|
+
}
|
|
102967
|
+
const databaseId = params.databaseId;
|
|
102968
|
+
const tableId = params.tableId;
|
|
102969
|
+
const key = params.key;
|
|
102970
|
+
const required2 = params.required;
|
|
102971
|
+
const xdefault = params.xdefault;
|
|
102972
|
+
const array2 = params.array;
|
|
102973
|
+
if (typeof databaseId === "undefined") {
|
|
102974
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
102975
|
+
}
|
|
102976
|
+
if (typeof tableId === "undefined") {
|
|
102977
|
+
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
102978
|
+
}
|
|
102979
|
+
if (typeof key === "undefined") {
|
|
102980
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
101970
102981
|
}
|
|
101971
102982
|
if (typeof required2 === "undefined") {
|
|
101972
102983
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
101973
102984
|
}
|
|
101974
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
102985
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
101975
102986
|
const payload = {};
|
|
101976
102987
|
if (typeof key !== "undefined") {
|
|
101977
102988
|
payload["key"] = key;
|
|
101978
102989
|
}
|
|
101979
|
-
if (typeof size !== "undefined") {
|
|
101980
|
-
payload["size"] = size;
|
|
101981
|
-
}
|
|
101982
102990
|
if (typeof required2 !== "undefined") {
|
|
101983
102991
|
payload["required"] = required2;
|
|
101984
102992
|
}
|
|
@@ -101988,16 +102996,13 @@ var TablesDB = class {
|
|
|
101988
102996
|
if (typeof array2 !== "undefined") {
|
|
101989
102997
|
payload["array"] = array2;
|
|
101990
102998
|
}
|
|
101991
|
-
if (typeof encrypt !== "undefined") {
|
|
101992
|
-
payload["encrypt"] = encrypt;
|
|
101993
|
-
}
|
|
101994
102999
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
101995
103000
|
const apiHeaders = {
|
|
101996
103001
|
"content-type": "application/json"
|
|
101997
103002
|
};
|
|
101998
103003
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
101999
103004
|
}
|
|
102000
|
-
|
|
103005
|
+
updateUrlColumn(paramsOrFirst, ...rest) {
|
|
102001
103006
|
let params;
|
|
102002
103007
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102003
103008
|
params = paramsOrFirst || {};
|
|
@@ -102008,8 +103013,7 @@ var TablesDB = class {
|
|
|
102008
103013
|
key: rest[1],
|
|
102009
103014
|
required: rest[2],
|
|
102010
103015
|
xdefault: rest[3],
|
|
102011
|
-
|
|
102012
|
-
newKey: rest[5]
|
|
103016
|
+
newKey: rest[4]
|
|
102013
103017
|
};
|
|
102014
103018
|
}
|
|
102015
103019
|
const databaseId = params.databaseId;
|
|
@@ -102017,7 +103021,6 @@ var TablesDB = class {
|
|
|
102017
103021
|
const key = params.key;
|
|
102018
103022
|
const required2 = params.required;
|
|
102019
103023
|
const xdefault = params.xdefault;
|
|
102020
|
-
const size = params.size;
|
|
102021
103024
|
const newKey = params.newKey;
|
|
102022
103025
|
if (typeof databaseId === "undefined") {
|
|
102023
103026
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -102034,7 +103037,7 @@ var TablesDB = class {
|
|
|
102034
103037
|
if (typeof xdefault === "undefined") {
|
|
102035
103038
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
102036
103039
|
}
|
|
102037
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
103040
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
102038
103041
|
const payload = {};
|
|
102039
103042
|
if (typeof required2 !== "undefined") {
|
|
102040
103043
|
payload["required"] = required2;
|
|
@@ -102042,9 +103045,6 @@ var TablesDB = class {
|
|
|
102042
103045
|
if (typeof xdefault !== "undefined") {
|
|
102043
103046
|
payload["default"] = xdefault;
|
|
102044
103047
|
}
|
|
102045
|
-
if (typeof size !== "undefined") {
|
|
102046
|
-
payload["size"] = size;
|
|
102047
|
-
}
|
|
102048
103048
|
if (typeof newKey !== "undefined") {
|
|
102049
103049
|
payload["newKey"] = newKey;
|
|
102050
103050
|
}
|
|
@@ -102054,7 +103054,7 @@ var TablesDB = class {
|
|
|
102054
103054
|
};
|
|
102055
103055
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
102056
103056
|
}
|
|
102057
|
-
|
|
103057
|
+
createVarcharColumn(paramsOrFirst, ...rest) {
|
|
102058
103058
|
let params;
|
|
102059
103059
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102060
103060
|
params = paramsOrFirst || {};
|
|
@@ -102063,14 +103063,16 @@ var TablesDB = class {
|
|
|
102063
103063
|
databaseId: paramsOrFirst,
|
|
102064
103064
|
tableId: rest[0],
|
|
102065
103065
|
key: rest[1],
|
|
102066
|
-
|
|
102067
|
-
|
|
102068
|
-
|
|
103066
|
+
size: rest[2],
|
|
103067
|
+
required: rest[3],
|
|
103068
|
+
xdefault: rest[4],
|
|
103069
|
+
array: rest[5]
|
|
102069
103070
|
};
|
|
102070
103071
|
}
|
|
102071
103072
|
const databaseId = params.databaseId;
|
|
102072
103073
|
const tableId = params.tableId;
|
|
102073
103074
|
const key = params.key;
|
|
103075
|
+
const size = params.size;
|
|
102074
103076
|
const required2 = params.required;
|
|
102075
103077
|
const xdefault = params.xdefault;
|
|
102076
103078
|
const array2 = params.array;
|
|
@@ -102083,14 +103085,20 @@ var TablesDB = class {
|
|
|
102083
103085
|
if (typeof key === "undefined") {
|
|
102084
103086
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
102085
103087
|
}
|
|
103088
|
+
if (typeof size === "undefined") {
|
|
103089
|
+
throw new AppwriteException('Missing required parameter: "size"');
|
|
103090
|
+
}
|
|
102086
103091
|
if (typeof required2 === "undefined") {
|
|
102087
103092
|
throw new AppwriteException('Missing required parameter: "required"');
|
|
102088
103093
|
}
|
|
102089
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
103094
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/varchar".replace("{databaseId}", databaseId).replace("{tableId}", tableId);
|
|
102090
103095
|
const payload = {};
|
|
102091
103096
|
if (typeof key !== "undefined") {
|
|
102092
103097
|
payload["key"] = key;
|
|
102093
103098
|
}
|
|
103099
|
+
if (typeof size !== "undefined") {
|
|
103100
|
+
payload["size"] = size;
|
|
103101
|
+
}
|
|
102094
103102
|
if (typeof required2 !== "undefined") {
|
|
102095
103103
|
payload["required"] = required2;
|
|
102096
103104
|
}
|
|
@@ -102106,7 +103114,7 @@ var TablesDB = class {
|
|
|
102106
103114
|
};
|
|
102107
103115
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
102108
103116
|
}
|
|
102109
|
-
|
|
103117
|
+
updateVarcharColumn(paramsOrFirst, ...rest) {
|
|
102110
103118
|
let params;
|
|
102111
103119
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
102112
103120
|
params = paramsOrFirst || {};
|
|
@@ -102117,7 +103125,8 @@ var TablesDB = class {
|
|
|
102117
103125
|
key: rest[1],
|
|
102118
103126
|
required: rest[2],
|
|
102119
103127
|
xdefault: rest[3],
|
|
102120
|
-
|
|
103128
|
+
size: rest[4],
|
|
103129
|
+
newKey: rest[5]
|
|
102121
103130
|
};
|
|
102122
103131
|
}
|
|
102123
103132
|
const databaseId = params.databaseId;
|
|
@@ -102125,6 +103134,7 @@ var TablesDB = class {
|
|
|
102125
103134
|
const key = params.key;
|
|
102126
103135
|
const required2 = params.required;
|
|
102127
103136
|
const xdefault = params.xdefault;
|
|
103137
|
+
const size = params.size;
|
|
102128
103138
|
const newKey = params.newKey;
|
|
102129
103139
|
if (typeof databaseId === "undefined") {
|
|
102130
103140
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -102141,7 +103151,7 @@ var TablesDB = class {
|
|
|
102141
103151
|
if (typeof xdefault === "undefined") {
|
|
102142
103152
|
throw new AppwriteException('Missing required parameter: "xdefault"');
|
|
102143
103153
|
}
|
|
102144
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/
|
|
103154
|
+
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}".replace("{databaseId}", databaseId).replace("{tableId}", tableId).replace("{key}", key);
|
|
102145
103155
|
const payload = {};
|
|
102146
103156
|
if (typeof required2 !== "undefined") {
|
|
102147
103157
|
payload["required"] = required2;
|
|
@@ -102149,6 +103159,9 @@ var TablesDB = class {
|
|
|
102149
103159
|
if (typeof xdefault !== "undefined") {
|
|
102150
103160
|
payload["default"] = xdefault;
|
|
102151
103161
|
}
|
|
103162
|
+
if (typeof size !== "undefined") {
|
|
103163
|
+
payload["size"] = size;
|
|
103164
|
+
}
|
|
102152
103165
|
if (typeof newKey !== "undefined") {
|
|
102153
103166
|
payload["newKey"] = newKey;
|
|
102154
103167
|
}
|
|
@@ -103669,6 +104682,72 @@ Operator.toggle = () => new Operator("toggle", []).toString();
|
|
|
103669
104682
|
Operator.dateAddDays = (days) => new Operator("dateAddDays", [days]).toString();
|
|
103670
104683
|
Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
|
|
103671
104684
|
Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
|
|
104685
|
+
var Scopes;
|
|
104686
|
+
(function(Scopes2) {
|
|
104687
|
+
Scopes2["SessionsWrite"] = "sessions.write";
|
|
104688
|
+
Scopes2["UsersRead"] = "users.read";
|
|
104689
|
+
Scopes2["UsersWrite"] = "users.write";
|
|
104690
|
+
Scopes2["TeamsRead"] = "teams.read";
|
|
104691
|
+
Scopes2["TeamsWrite"] = "teams.write";
|
|
104692
|
+
Scopes2["DatabasesRead"] = "databases.read";
|
|
104693
|
+
Scopes2["DatabasesWrite"] = "databases.write";
|
|
104694
|
+
Scopes2["CollectionsRead"] = "collections.read";
|
|
104695
|
+
Scopes2["CollectionsWrite"] = "collections.write";
|
|
104696
|
+
Scopes2["TablesRead"] = "tables.read";
|
|
104697
|
+
Scopes2["TablesWrite"] = "tables.write";
|
|
104698
|
+
Scopes2["AttributesRead"] = "attributes.read";
|
|
104699
|
+
Scopes2["AttributesWrite"] = "attributes.write";
|
|
104700
|
+
Scopes2["ColumnsRead"] = "columns.read";
|
|
104701
|
+
Scopes2["ColumnsWrite"] = "columns.write";
|
|
104702
|
+
Scopes2["IndexesRead"] = "indexes.read";
|
|
104703
|
+
Scopes2["IndexesWrite"] = "indexes.write";
|
|
104704
|
+
Scopes2["DocumentsRead"] = "documents.read";
|
|
104705
|
+
Scopes2["DocumentsWrite"] = "documents.write";
|
|
104706
|
+
Scopes2["RowsRead"] = "rows.read";
|
|
104707
|
+
Scopes2["RowsWrite"] = "rows.write";
|
|
104708
|
+
Scopes2["FilesRead"] = "files.read";
|
|
104709
|
+
Scopes2["FilesWrite"] = "files.write";
|
|
104710
|
+
Scopes2["BucketsRead"] = "buckets.read";
|
|
104711
|
+
Scopes2["BucketsWrite"] = "buckets.write";
|
|
104712
|
+
Scopes2["FunctionsRead"] = "functions.read";
|
|
104713
|
+
Scopes2["FunctionsWrite"] = "functions.write";
|
|
104714
|
+
Scopes2["SitesRead"] = "sites.read";
|
|
104715
|
+
Scopes2["SitesWrite"] = "sites.write";
|
|
104716
|
+
Scopes2["LogRead"] = "log.read";
|
|
104717
|
+
Scopes2["LogWrite"] = "log.write";
|
|
104718
|
+
Scopes2["ExecutionRead"] = "execution.read";
|
|
104719
|
+
Scopes2["ExecutionWrite"] = "execution.write";
|
|
104720
|
+
Scopes2["LocaleRead"] = "locale.read";
|
|
104721
|
+
Scopes2["AvatarsRead"] = "avatars.read";
|
|
104722
|
+
Scopes2["HealthRead"] = "health.read";
|
|
104723
|
+
Scopes2["ProvidersRead"] = "providers.read";
|
|
104724
|
+
Scopes2["ProvidersWrite"] = "providers.write";
|
|
104725
|
+
Scopes2["MessagesRead"] = "messages.read";
|
|
104726
|
+
Scopes2["MessagesWrite"] = "messages.write";
|
|
104727
|
+
Scopes2["TopicsRead"] = "topics.read";
|
|
104728
|
+
Scopes2["TopicsWrite"] = "topics.write";
|
|
104729
|
+
Scopes2["SubscribersRead"] = "subscribers.read";
|
|
104730
|
+
Scopes2["SubscribersWrite"] = "subscribers.write";
|
|
104731
|
+
Scopes2["TargetsRead"] = "targets.read";
|
|
104732
|
+
Scopes2["TargetsWrite"] = "targets.write";
|
|
104733
|
+
Scopes2["RulesRead"] = "rules.read";
|
|
104734
|
+
Scopes2["RulesWrite"] = "rules.write";
|
|
104735
|
+
Scopes2["MigrationsRead"] = "migrations.read";
|
|
104736
|
+
Scopes2["MigrationsWrite"] = "migrations.write";
|
|
104737
|
+
Scopes2["VcsRead"] = "vcs.read";
|
|
104738
|
+
Scopes2["VcsWrite"] = "vcs.write";
|
|
104739
|
+
Scopes2["AssistantRead"] = "assistant.read";
|
|
104740
|
+
Scopes2["TokensRead"] = "tokens.read";
|
|
104741
|
+
Scopes2["TokensWrite"] = "tokens.write";
|
|
104742
|
+
Scopes2["PoliciesWrite"] = "policies.write";
|
|
104743
|
+
Scopes2["PoliciesRead"] = "policies.read";
|
|
104744
|
+
Scopes2["ArchivesRead"] = "archives.read";
|
|
104745
|
+
Scopes2["ArchivesWrite"] = "archives.write";
|
|
104746
|
+
Scopes2["RestorationsRead"] = "restorations.read";
|
|
104747
|
+
Scopes2["RestorationsWrite"] = "restorations.write";
|
|
104748
|
+
Scopes2["DomainsRead"] = "domains.read";
|
|
104749
|
+
Scopes2["DomainsWrite"] = "domains.write";
|
|
104750
|
+
})(Scopes || (Scopes = {}));
|
|
103672
104751
|
var AuthenticatorType;
|
|
103673
104752
|
(function(AuthenticatorType2) {
|
|
103674
104753
|
AuthenticatorType2["Totp"] = "totp";
|
|
@@ -104386,6 +105465,29 @@ var Timezone;
|
|
|
104386
105465
|
Timezone2["PacificWallis"] = "pacific/wallis";
|
|
104387
105466
|
Timezone2["Utc"] = "utc";
|
|
104388
105467
|
})(Timezone || (Timezone = {}));
|
|
105468
|
+
var BrowserPermission;
|
|
105469
|
+
(function(BrowserPermission2) {
|
|
105470
|
+
BrowserPermission2["Geolocation"] = "geolocation";
|
|
105471
|
+
BrowserPermission2["Camera"] = "camera";
|
|
105472
|
+
BrowserPermission2["Microphone"] = "microphone";
|
|
105473
|
+
BrowserPermission2["Notifications"] = "notifications";
|
|
105474
|
+
BrowserPermission2["Midi"] = "midi";
|
|
105475
|
+
BrowserPermission2["Push"] = "push";
|
|
105476
|
+
BrowserPermission2["Clipboardread"] = "clipboard-read";
|
|
105477
|
+
BrowserPermission2["Clipboardwrite"] = "clipboard-write";
|
|
105478
|
+
BrowserPermission2["Paymenthandler"] = "payment-handler";
|
|
105479
|
+
BrowserPermission2["Usb"] = "usb";
|
|
105480
|
+
BrowserPermission2["Bluetooth"] = "bluetooth";
|
|
105481
|
+
BrowserPermission2["Accelerometer"] = "accelerometer";
|
|
105482
|
+
BrowserPermission2["Gyroscope"] = "gyroscope";
|
|
105483
|
+
BrowserPermission2["Magnetometer"] = "magnetometer";
|
|
105484
|
+
BrowserPermission2["Ambientlightsensor"] = "ambient-light-sensor";
|
|
105485
|
+
BrowserPermission2["Backgroundsync"] = "background-sync";
|
|
105486
|
+
BrowserPermission2["Persistentstorage"] = "persistent-storage";
|
|
105487
|
+
BrowserPermission2["Screenwakelock"] = "screen-wake-lock";
|
|
105488
|
+
BrowserPermission2["Webshare"] = "web-share";
|
|
105489
|
+
BrowserPermission2["Xrspatialtracking"] = "xr-spatial-tracking";
|
|
105490
|
+
})(BrowserPermission || (BrowserPermission = {}));
|
|
104389
105491
|
var ImageFormat;
|
|
104390
105492
|
(function(ImageFormat2) {
|
|
104391
105493
|
ImageFormat2["Jpg"] = "jpg";
|
|
@@ -104396,6 +105498,12 @@ var ImageFormat;
|
|
|
104396
105498
|
ImageFormat2["Avif"] = "avif";
|
|
104397
105499
|
ImageFormat2["Gif"] = "gif";
|
|
104398
105500
|
})(ImageFormat || (ImageFormat = {}));
|
|
105501
|
+
var Services;
|
|
105502
|
+
(function(Services2) {
|
|
105503
|
+
Services2["Databases"] = "databases";
|
|
105504
|
+
Services2["Functions"] = "functions";
|
|
105505
|
+
Services2["Storage"] = "storage";
|
|
105506
|
+
})(Services || (Services = {}));
|
|
104399
105507
|
var Platform;
|
|
104400
105508
|
(function(Platform2) {
|
|
104401
105509
|
Platform2["Appwrite"] = "appwrite";
|
|
@@ -104431,6 +105539,11 @@ var IndexType;
|
|
|
104431
105539
|
IndexType2["Unique"] = "unique";
|
|
104432
105540
|
IndexType2["Spatial"] = "spatial";
|
|
104433
105541
|
})(IndexType || (IndexType = {}));
|
|
105542
|
+
var OrderBy;
|
|
105543
|
+
(function(OrderBy2) {
|
|
105544
|
+
OrderBy2["Asc"] = "asc";
|
|
105545
|
+
OrderBy2["Desc"] = "desc";
|
|
105546
|
+
})(OrderBy || (OrderBy = {}));
|
|
104434
105547
|
var FilterType;
|
|
104435
105548
|
(function(FilterType2) {
|
|
104436
105549
|
FilterType2["Premium"] = "premium";
|
|
@@ -104503,6 +105616,85 @@ var Runtime;
|
|
|
104503
105616
|
Runtime2["Flutter332"] = "flutter-3.32";
|
|
104504
105617
|
Runtime2["Flutter335"] = "flutter-3.35";
|
|
104505
105618
|
})(Runtime || (Runtime = {}));
|
|
105619
|
+
var Runtimes;
|
|
105620
|
+
(function(Runtimes2) {
|
|
105621
|
+
Runtimes2["Node145"] = "node-14.5";
|
|
105622
|
+
Runtimes2["Node160"] = "node-16.0";
|
|
105623
|
+
Runtimes2["Node180"] = "node-18.0";
|
|
105624
|
+
Runtimes2["Node190"] = "node-19.0";
|
|
105625
|
+
Runtimes2["Node200"] = "node-20.0";
|
|
105626
|
+
Runtimes2["Node210"] = "node-21.0";
|
|
105627
|
+
Runtimes2["Node22"] = "node-22";
|
|
105628
|
+
Runtimes2["Php80"] = "php-8.0";
|
|
105629
|
+
Runtimes2["Php81"] = "php-8.1";
|
|
105630
|
+
Runtimes2["Php82"] = "php-8.2";
|
|
105631
|
+
Runtimes2["Php83"] = "php-8.3";
|
|
105632
|
+
Runtimes2["Ruby30"] = "ruby-3.0";
|
|
105633
|
+
Runtimes2["Ruby31"] = "ruby-3.1";
|
|
105634
|
+
Runtimes2["Ruby32"] = "ruby-3.2";
|
|
105635
|
+
Runtimes2["Ruby33"] = "ruby-3.3";
|
|
105636
|
+
Runtimes2["Python38"] = "python-3.8";
|
|
105637
|
+
Runtimes2["Python39"] = "python-3.9";
|
|
105638
|
+
Runtimes2["Python310"] = "python-3.10";
|
|
105639
|
+
Runtimes2["Python311"] = "python-3.11";
|
|
105640
|
+
Runtimes2["Python312"] = "python-3.12";
|
|
105641
|
+
Runtimes2["Pythonml311"] = "python-ml-3.11";
|
|
105642
|
+
Runtimes2["Pythonml312"] = "python-ml-3.12";
|
|
105643
|
+
Runtimes2["Deno140"] = "deno-1.40";
|
|
105644
|
+
Runtimes2["Deno146"] = "deno-1.46";
|
|
105645
|
+
Runtimes2["Deno20"] = "deno-2.0";
|
|
105646
|
+
Runtimes2["Dart215"] = "dart-2.15";
|
|
105647
|
+
Runtimes2["Dart216"] = "dart-2.16";
|
|
105648
|
+
Runtimes2["Dart217"] = "dart-2.17";
|
|
105649
|
+
Runtimes2["Dart218"] = "dart-2.18";
|
|
105650
|
+
Runtimes2["Dart219"] = "dart-2.19";
|
|
105651
|
+
Runtimes2["Dart30"] = "dart-3.0";
|
|
105652
|
+
Runtimes2["Dart31"] = "dart-3.1";
|
|
105653
|
+
Runtimes2["Dart33"] = "dart-3.3";
|
|
105654
|
+
Runtimes2["Dart35"] = "dart-3.5";
|
|
105655
|
+
Runtimes2["Dart38"] = "dart-3.8";
|
|
105656
|
+
Runtimes2["Dart39"] = "dart-3.9";
|
|
105657
|
+
Runtimes2["Dotnet60"] = "dotnet-6.0";
|
|
105658
|
+
Runtimes2["Dotnet70"] = "dotnet-7.0";
|
|
105659
|
+
Runtimes2["Dotnet80"] = "dotnet-8.0";
|
|
105660
|
+
Runtimes2["Java80"] = "java-8.0";
|
|
105661
|
+
Runtimes2["Java110"] = "java-11.0";
|
|
105662
|
+
Runtimes2["Java170"] = "java-17.0";
|
|
105663
|
+
Runtimes2["Java180"] = "java-18.0";
|
|
105664
|
+
Runtimes2["Java210"] = "java-21.0";
|
|
105665
|
+
Runtimes2["Java22"] = "java-22";
|
|
105666
|
+
Runtimes2["Swift55"] = "swift-5.5";
|
|
105667
|
+
Runtimes2["Swift58"] = "swift-5.8";
|
|
105668
|
+
Runtimes2["Swift59"] = "swift-5.9";
|
|
105669
|
+
Runtimes2["Swift510"] = "swift-5.10";
|
|
105670
|
+
Runtimes2["Kotlin16"] = "kotlin-1.6";
|
|
105671
|
+
Runtimes2["Kotlin18"] = "kotlin-1.8";
|
|
105672
|
+
Runtimes2["Kotlin19"] = "kotlin-1.9";
|
|
105673
|
+
Runtimes2["Kotlin20"] = "kotlin-2.0";
|
|
105674
|
+
Runtimes2["Cpp17"] = "cpp-17";
|
|
105675
|
+
Runtimes2["Cpp20"] = "cpp-20";
|
|
105676
|
+
Runtimes2["Bun10"] = "bun-1.0";
|
|
105677
|
+
Runtimes2["Bun11"] = "bun-1.1";
|
|
105678
|
+
Runtimes2["Go123"] = "go-1.23";
|
|
105679
|
+
Runtimes2["Static1"] = "static-1";
|
|
105680
|
+
Runtimes2["Flutter324"] = "flutter-3.24";
|
|
105681
|
+
Runtimes2["Flutter327"] = "flutter-3.27";
|
|
105682
|
+
Runtimes2["Flutter329"] = "flutter-3.29";
|
|
105683
|
+
Runtimes2["Flutter332"] = "flutter-3.32";
|
|
105684
|
+
Runtimes2["Flutter335"] = "flutter-3.35";
|
|
105685
|
+
})(Runtimes || (Runtimes = {}));
|
|
105686
|
+
var UseCases;
|
|
105687
|
+
(function(UseCases2) {
|
|
105688
|
+
UseCases2["Portfolio"] = "portfolio";
|
|
105689
|
+
UseCases2["Starter"] = "starter";
|
|
105690
|
+
UseCases2["Events"] = "events";
|
|
105691
|
+
UseCases2["Ecommerce"] = "ecommerce";
|
|
105692
|
+
UseCases2["Documentation"] = "documentation";
|
|
105693
|
+
UseCases2["Blog"] = "blog";
|
|
105694
|
+
UseCases2["Ai"] = "ai";
|
|
105695
|
+
UseCases2["Forms"] = "forms";
|
|
105696
|
+
UseCases2["Dashboard"] = "dashboard";
|
|
105697
|
+
})(UseCases || (UseCases = {}));
|
|
104506
105698
|
var TemplateReferenceType;
|
|
104507
105699
|
(function(TemplateReferenceType2) {
|
|
104508
105700
|
TemplateReferenceType2["Branch"] = "branch";
|
|
@@ -104557,24 +105749,20 @@ var SmtpEncryption;
|
|
|
104557
105749
|
SmtpEncryption2["Ssl"] = "ssl";
|
|
104558
105750
|
SmtpEncryption2["Tls"] = "tls";
|
|
104559
105751
|
})(SmtpEncryption || (SmtpEncryption = {}));
|
|
104560
|
-
var
|
|
104561
|
-
(function(
|
|
104562
|
-
|
|
104563
|
-
|
|
104564
|
-
|
|
104565
|
-
|
|
104566
|
-
|
|
104567
|
-
|
|
104568
|
-
|
|
104569
|
-
|
|
104570
|
-
|
|
104571
|
-
|
|
104572
|
-
|
|
104573
|
-
|
|
104574
|
-
BillingPlan2["Imaginetier11100"] = "imagine-tier-1-1100";
|
|
104575
|
-
BillingPlan2["Imaginetier11650"] = "imagine-tier-1-1650";
|
|
104576
|
-
BillingPlan2["Imaginetier12200"] = "imagine-tier-1-2200";
|
|
104577
|
-
})(BillingPlan || (BillingPlan = {}));
|
|
105752
|
+
var Resources;
|
|
105753
|
+
(function(Resources2) {
|
|
105754
|
+
Resources2["User"] = "user";
|
|
105755
|
+
Resources2["Database"] = "database";
|
|
105756
|
+
Resources2["Table"] = "table";
|
|
105757
|
+
Resources2["Column"] = "column";
|
|
105758
|
+
Resources2["Index"] = "index";
|
|
105759
|
+
Resources2["Row"] = "row";
|
|
105760
|
+
Resources2["Document"] = "document";
|
|
105761
|
+
Resources2["Attribute"] = "attribute";
|
|
105762
|
+
Resources2["Collection"] = "collection";
|
|
105763
|
+
Resources2["Bucket"] = "bucket";
|
|
105764
|
+
Resources2["File"] = "file";
|
|
105765
|
+
})(Resources || (Resources = {}));
|
|
104578
105766
|
var ProjectUsageRange;
|
|
104579
105767
|
(function(ProjectUsageRange2) {
|
|
104580
105768
|
ProjectUsageRange2["OneHour"] = "1h";
|
|
@@ -105036,6 +106224,24 @@ var Adapter;
|
|
|
105036
106224
|
Adapter2["Static"] = "static";
|
|
105037
106225
|
Adapter2["Ssr"] = "ssr";
|
|
105038
106226
|
})(Adapter || (Adapter = {}));
|
|
106227
|
+
var Frameworks;
|
|
106228
|
+
(function(Frameworks2) {
|
|
106229
|
+
Frameworks2["Analog"] = "analog";
|
|
106230
|
+
Frameworks2["Angular"] = "angular";
|
|
106231
|
+
Frameworks2["Nextjs"] = "nextjs";
|
|
106232
|
+
Frameworks2["React"] = "react";
|
|
106233
|
+
Frameworks2["Nuxt"] = "nuxt";
|
|
106234
|
+
Frameworks2["Vue"] = "vue";
|
|
106235
|
+
Frameworks2["Sveltekit"] = "sveltekit";
|
|
106236
|
+
Frameworks2["Astro"] = "astro";
|
|
106237
|
+
Frameworks2["Tanstackstart"] = "tanstack-start";
|
|
106238
|
+
Frameworks2["Remix"] = "remix";
|
|
106239
|
+
Frameworks2["Lynx"] = "lynx";
|
|
106240
|
+
Frameworks2["Flutter"] = "flutter";
|
|
106241
|
+
Frameworks2["Reactnative"] = "react-native";
|
|
106242
|
+
Frameworks2["Vite"] = "vite";
|
|
106243
|
+
Frameworks2["Other"] = "other";
|
|
106244
|
+
})(Frameworks || (Frameworks = {}));
|
|
105039
106245
|
var Compression;
|
|
105040
106246
|
(function(Compression2) {
|
|
105041
106247
|
Compression2["None"] = "none";
|
|
@@ -105054,6 +106260,14 @@ var ImageGravity;
|
|
|
105054
106260
|
ImageGravity2["Bottom"] = "bottom";
|
|
105055
106261
|
ImageGravity2["Bottomright"] = "bottom-right";
|
|
105056
106262
|
})(ImageGravity || (ImageGravity = {}));
|
|
106263
|
+
var Roles;
|
|
106264
|
+
(function(Roles2) {
|
|
106265
|
+
Roles2["Developer"] = "developer";
|
|
106266
|
+
Roles2["Editor"] = "editor";
|
|
106267
|
+
Roles2["Analyst"] = "analyst";
|
|
106268
|
+
Roles2["Billing"] = "billing";
|
|
106269
|
+
Roles2["Owner"] = "owner";
|
|
106270
|
+
})(Roles || (Roles = {}));
|
|
105057
106271
|
var PasswordHash;
|
|
105058
106272
|
(function(PasswordHash2) {
|
|
105059
106273
|
PasswordHash2["Sha1"] = "sha1";
|
|
@@ -105114,6 +106328,7 @@ var DeploymentStatus;
|
|
|
105114
106328
|
DeploymentStatus2["Processing"] = "processing";
|
|
105115
106329
|
DeploymentStatus2["Building"] = "building";
|
|
105116
106330
|
DeploymentStatus2["Ready"] = "ready";
|
|
106331
|
+
DeploymentStatus2["Canceled"] = "canceled";
|
|
105117
106332
|
DeploymentStatus2["Failed"] = "failed";
|
|
105118
106333
|
})(DeploymentStatus || (DeploymentStatus = {}));
|
|
105119
106334
|
var ExecutionTrigger;
|
|
@@ -105178,7 +106393,7 @@ var package_default = {
|
|
|
105178
106393
|
type: "module",
|
|
105179
106394
|
homepage: "https://appwrite.io/support",
|
|
105180
106395
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
105181
|
-
version: "13.1
|
|
106396
|
+
version: "13.2.1",
|
|
105182
106397
|
license: "BSD-3-Clause",
|
|
105183
106398
|
main: "dist/index.js",
|
|
105184
106399
|
types: "dist/index.d.ts",
|
|
@@ -105207,7 +106422,7 @@ var package_default = {
|
|
|
105207
106422
|
"windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
|
|
105208
106423
|
},
|
|
105209
106424
|
dependencies: {
|
|
105210
|
-
"@appwrite.io/console": "^2.
|
|
106425
|
+
"@appwrite.io/console": "^2.2.0",
|
|
105211
106426
|
"bignumber.js": "^9.0.0",
|
|
105212
106427
|
chalk: "4.1.2",
|
|
105213
106428
|
chokidar: "^3.6.0",
|
|
@@ -105579,8 +106794,8 @@ var sdkForConsole = async (requiresAuth = true) => {
|
|
|
105579
106794
|
};
|
|
105580
106795
|
var sdkForProject = async () => {
|
|
105581
106796
|
const client = new Client();
|
|
105582
|
-
const endpoint =
|
|
105583
|
-
const project =
|
|
106797
|
+
const endpoint = localConfig.getEndpoint() || globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
|
|
106798
|
+
const project = localConfig.getProject().projectId ? localConfig.getProject().projectId : globalConfig2.getProject();
|
|
105584
106799
|
const key = globalConfig2.getKey();
|
|
105585
106800
|
const cookie = globalConfig2.getCookie();
|
|
105586
106801
|
const selfSigned = globalConfig2.getSelfSigned();
|
|
@@ -105674,9 +106889,9 @@ var questionsInitProject = [
|
|
|
105674
106889
|
{
|
|
105675
106890
|
type: "confirm",
|
|
105676
106891
|
name: "override",
|
|
105677
|
-
message: `An ${SDK_TITLE} project ( ${
|
|
106892
|
+
message: `An ${SDK_TITLE} project ( ${localConfig.getProject()["projectId"]} ) is already associated with the current directory. Would you like to override it?`,
|
|
105678
106893
|
when() {
|
|
105679
|
-
return Object.keys(
|
|
106894
|
+
return Object.keys(localConfig.getProject()).length !== 0;
|
|
105680
106895
|
}
|
|
105681
106896
|
},
|
|
105682
106897
|
{
|
|
@@ -105960,10 +107175,10 @@ var questionsPushSites = [
|
|
|
105960
107175
|
name: "sites",
|
|
105961
107176
|
message: "Which sites would you like to push?",
|
|
105962
107177
|
validate: (value) => validateRequired("site", value),
|
|
105963
|
-
when: () =>
|
|
107178
|
+
when: () => localConfig.getSites().length > 0,
|
|
105964
107179
|
choices: () => {
|
|
105965
|
-
let sites =
|
|
105966
|
-
checkDeployConditions(
|
|
107180
|
+
let sites = localConfig.getSites();
|
|
107181
|
+
checkDeployConditions(localConfig);
|
|
105967
107182
|
let choices = sites.map((site, idx) => {
|
|
105968
107183
|
return {
|
|
105969
107184
|
name: `${site.name} (${site.$id})`,
|
|
@@ -105980,10 +107195,10 @@ var questionsPushFunctions = [
|
|
|
105980
107195
|
name: "functions",
|
|
105981
107196
|
message: "Which functions would you like to push?",
|
|
105982
107197
|
validate: (value) => validateRequired("function", value),
|
|
105983
|
-
when: () =>
|
|
107198
|
+
when: () => localConfig.getFunctions().length > 0,
|
|
105984
107199
|
choices: () => {
|
|
105985
|
-
let functions =
|
|
105986
|
-
checkDeployConditions(
|
|
107200
|
+
let functions = localConfig.getFunctions();
|
|
107201
|
+
checkDeployConditions(localConfig);
|
|
105987
107202
|
let choices = functions.map((func, idx) => {
|
|
105988
107203
|
return {
|
|
105989
107204
|
name: `${func.name} (${func.$id})`,
|
|
@@ -106000,10 +107215,10 @@ var questionsPushCollections = [
|
|
|
106000
107215
|
name: "collections",
|
|
106001
107216
|
message: "Which collections would you like to push?",
|
|
106002
107217
|
validate: (value) => validateRequired("collection", value),
|
|
106003
|
-
when: () =>
|
|
107218
|
+
when: () => localConfig.getCollections().length > 0,
|
|
106004
107219
|
choices: () => {
|
|
106005
|
-
let collections =
|
|
106006
|
-
checkDeployConditions(
|
|
107220
|
+
let collections = localConfig.getCollections();
|
|
107221
|
+
checkDeployConditions(localConfig);
|
|
106007
107222
|
return collections.map((collection) => {
|
|
106008
107223
|
return {
|
|
106009
107224
|
name: `${collection.name} (${collection["databaseId"]} - ${collection["$id"]})`,
|
|
@@ -106019,10 +107234,10 @@ var questionsPushTables = [
|
|
|
106019
107234
|
name: "tables",
|
|
106020
107235
|
message: "Which tables would you like to push?",
|
|
106021
107236
|
validate: (value) => validateRequired("table", value),
|
|
106022
|
-
when: () =>
|
|
107237
|
+
when: () => localConfig.getTables().length > 0,
|
|
106023
107238
|
choices: () => {
|
|
106024
|
-
let tables =
|
|
106025
|
-
checkDeployConditions(
|
|
107239
|
+
let tables = localConfig.getTables();
|
|
107240
|
+
checkDeployConditions(localConfig);
|
|
106026
107241
|
return tables.map((table) => {
|
|
106027
107242
|
return {
|
|
106028
107243
|
name: `${table.name} (${table["databaseId"]} - ${table["$id"]})`,
|
|
@@ -106052,10 +107267,10 @@ var questionsPushBuckets = [
|
|
|
106052
107267
|
name: "buckets",
|
|
106053
107268
|
message: "Which buckets would you like to push?",
|
|
106054
107269
|
validate: (value) => validateRequired("bucket", value),
|
|
106055
|
-
when: () =>
|
|
107270
|
+
when: () => localConfig.getBuckets().length > 0,
|
|
106056
107271
|
choices: () => {
|
|
106057
|
-
let buckets =
|
|
106058
|
-
checkDeployConditions(
|
|
107272
|
+
let buckets = localConfig.getBuckets();
|
|
107273
|
+
checkDeployConditions(localConfig);
|
|
106059
107274
|
return buckets.map((bucket) => {
|
|
106060
107275
|
return {
|
|
106061
107276
|
name: `${bucket.name} (${bucket["$id"]})`,
|
|
@@ -106071,9 +107286,9 @@ var questionsPushMessagingTopics = [
|
|
|
106071
107286
|
name: "topics",
|
|
106072
107287
|
message: "Which messaging topic would you like to push?",
|
|
106073
107288
|
validate: (value) => validateRequired("topics", value),
|
|
106074
|
-
when: () =>
|
|
107289
|
+
when: () => localConfig.getMessagingTopics().length > 0,
|
|
106075
107290
|
choices: () => {
|
|
106076
|
-
let topics =
|
|
107291
|
+
let topics = localConfig.getMessagingTopics();
|
|
106077
107292
|
return topics.map((topic) => {
|
|
106078
107293
|
return {
|
|
106079
107294
|
name: `${topic.name} (${topic["$id"]})`,
|
|
@@ -106102,10 +107317,10 @@ var questionsPushTeams = [
|
|
|
106102
107317
|
name: "teams",
|
|
106103
107318
|
message: "Which teams would you like to push?",
|
|
106104
107319
|
validate: (value) => validateRequired("team", value),
|
|
106105
|
-
when: () =>
|
|
107320
|
+
when: () => localConfig.getTeams().length > 0,
|
|
106106
107321
|
choices: () => {
|
|
106107
|
-
let teams =
|
|
106108
|
-
checkDeployConditions(
|
|
107322
|
+
let teams = localConfig.getTeams();
|
|
107323
|
+
checkDeployConditions(localConfig);
|
|
106109
107324
|
return teams.map((team) => {
|
|
106110
107325
|
return {
|
|
106111
107326
|
name: `${team.name} (${team["$id"]})`,
|
|
@@ -107035,7 +108250,7 @@ var approveChanges = async (resource, resourceGetFunction, keys, resourceName, r
|
|
|
107035
108250
|
var import_chalk6 = __toESM(require_source(), 1);
|
|
107036
108251
|
var checkAndApplyTablesDBChanges = async () => {
|
|
107037
108252
|
log("Checking for tablesDB changes ...");
|
|
107038
|
-
const localTablesDBs =
|
|
108253
|
+
const localTablesDBs = localConfig.getTablesDBs();
|
|
107039
108254
|
const { databases: remoteTablesDBs } = await paginate(
|
|
107040
108255
|
async (args) => {
|
|
107041
108256
|
const tablesDBService = await getTablesDBService();
|
|
@@ -107946,7 +109161,8 @@ var Push = class {
|
|
|
107946
109161
|
this.consoleClient
|
|
107947
109162
|
);
|
|
107948
109163
|
const variables = await consoleService.variables();
|
|
107949
|
-
|
|
109164
|
+
const domains = variables["_APP_DOMAIN_SITES"].split(",");
|
|
109165
|
+
domain2 = id_default.unique() + "." + domains[0].trim();
|
|
107950
109166
|
} catch (err) {
|
|
107951
109167
|
this.error("Error fetching console variables.");
|
|
107952
109168
|
throw err;
|
|
@@ -108418,14 +109634,14 @@ var pushResources = async ({
|
|
|
108418
109634
|
skipDeprecated = false
|
|
108419
109635
|
} = {}) => {
|
|
108420
109636
|
if (cliConfig.all) {
|
|
108421
|
-
checkDeployConditions(
|
|
108422
|
-
const functions =
|
|
109637
|
+
checkDeployConditions(localConfig);
|
|
109638
|
+
const functions = localConfig.getFunctions();
|
|
108423
109639
|
let allowFunctionsCodePush = cliConfig.force === true ? true : null;
|
|
108424
109640
|
if (functions.length > 0 && allowFunctionsCodePush === null) {
|
|
108425
109641
|
const codeAnswer = await import_inquirer3.default.prompt(questionsPushFunctionsCode);
|
|
108426
109642
|
allowFunctionsCodePush = codeAnswer.override;
|
|
108427
109643
|
}
|
|
108428
|
-
const sites =
|
|
109644
|
+
const sites = localConfig.getSites();
|
|
108429
109645
|
let allowSitesCodePush = cliConfig.force === true ? true : null;
|
|
108430
109646
|
if (sites.length > 0 && allowSitesCodePush === null) {
|
|
108431
109647
|
const codeAnswer = await import_inquirer3.default.prompt(questionsPushSitesCode);
|
|
@@ -108434,20 +109650,20 @@ var pushResources = async ({
|
|
|
108434
109650
|
const pushInstance = await createPushInstance({
|
|
108435
109651
|
requiresConsoleAuth: true
|
|
108436
109652
|
});
|
|
108437
|
-
const project =
|
|
109653
|
+
const project = localConfig.getProject();
|
|
108438
109654
|
const config2 = {
|
|
108439
109655
|
projectId: project.projectId ?? "",
|
|
108440
109656
|
projectName: project.projectName,
|
|
108441
109657
|
settings: project.projectSettings,
|
|
108442
109658
|
functions,
|
|
108443
109659
|
sites,
|
|
108444
|
-
collections:
|
|
108445
|
-
databases:
|
|
108446
|
-
tables:
|
|
108447
|
-
tablesDB:
|
|
108448
|
-
buckets:
|
|
108449
|
-
teams:
|
|
108450
|
-
topics:
|
|
109660
|
+
collections: localConfig.getCollections(),
|
|
109661
|
+
databases: localConfig.getDatabases(),
|
|
109662
|
+
tables: localConfig.getTables(),
|
|
109663
|
+
tablesDB: localConfig.getTablesDBs(),
|
|
109664
|
+
buckets: localConfig.getBuckets(),
|
|
109665
|
+
teams: localConfig.getTeams(),
|
|
109666
|
+
topics: localConfig.getMessagingTopics()
|
|
108451
109667
|
};
|
|
108452
109668
|
parseWithBetterErrors(
|
|
108453
109669
|
ConfigSchema,
|
|
@@ -108486,14 +109702,14 @@ var pushResources = async ({
|
|
|
108486
109702
|
}
|
|
108487
109703
|
};
|
|
108488
109704
|
var pushSettings = async () => {
|
|
108489
|
-
checkDeployConditions(
|
|
109705
|
+
checkDeployConditions(localConfig);
|
|
108490
109706
|
try {
|
|
108491
109707
|
const projectsService = await getProjectsService();
|
|
108492
109708
|
let response = await projectsService.get(
|
|
108493
|
-
|
|
109709
|
+
localConfig.getProject().projectId
|
|
108494
109710
|
);
|
|
108495
109711
|
const remoteSettings = createSettingsObject(response);
|
|
108496
|
-
const localSettings =
|
|
109712
|
+
const localSettings = localConfig.getProject().projectSettings ?? {};
|
|
108497
109713
|
log("Checking for changes ...");
|
|
108498
109714
|
const changes = [];
|
|
108499
109715
|
changes.push(
|
|
@@ -108529,7 +109745,7 @@ var pushSettings = async () => {
|
|
|
108529
109745
|
const pushInstance = await createPushInstance({
|
|
108530
109746
|
requiresConsoleAuth: true
|
|
108531
109747
|
});
|
|
108532
|
-
const config2 =
|
|
109748
|
+
const config2 = localConfig.getProject();
|
|
108533
109749
|
await pushInstance.pushSettings({
|
|
108534
109750
|
projectId: config2.projectId,
|
|
108535
109751
|
projectName: config2.projectName,
|
|
@@ -108546,13 +109762,13 @@ var pushSite = async ({
|
|
|
108546
109762
|
code,
|
|
108547
109763
|
withVariables
|
|
108548
109764
|
} = {}) => {
|
|
108549
|
-
process.chdir(
|
|
109765
|
+
process.chdir(localConfig.configDirectoryPath);
|
|
108550
109766
|
const siteIds = [];
|
|
108551
109767
|
if (siteId) {
|
|
108552
109768
|
siteIds.push(siteId);
|
|
108553
109769
|
} else if (cliConfig.all) {
|
|
108554
|
-
checkDeployConditions(
|
|
108555
|
-
const sites2 =
|
|
109770
|
+
checkDeployConditions(localConfig);
|
|
109771
|
+
const sites2 = localConfig.getSites();
|
|
108556
109772
|
siteIds.push(
|
|
108557
109773
|
...sites2.map((site) => {
|
|
108558
109774
|
return site.$id;
|
|
@@ -108573,7 +109789,7 @@ var pushSite = async ({
|
|
|
108573
109789
|
return;
|
|
108574
109790
|
}
|
|
108575
109791
|
let sites = siteIds.map((id) => {
|
|
108576
|
-
const sites2 =
|
|
109792
|
+
const sites2 = localConfig.getSites();
|
|
108577
109793
|
const site = sites2.find((s) => s.$id === id);
|
|
108578
109794
|
if (!site) {
|
|
108579
109795
|
throw new Error("Site '" + id + "' not found.");
|
|
@@ -108586,7 +109802,7 @@ var pushSite = async ({
|
|
|
108586
109802
|
log(`Site ${site.name} is missing build command.`);
|
|
108587
109803
|
const answers = await import_inquirer3.default.prompt(questionsGetEntrypoint);
|
|
108588
109804
|
site.buildCommand = answers.entrypoint;
|
|
108589
|
-
|
|
109805
|
+
localConfig.addSite(site);
|
|
108590
109806
|
}
|
|
108591
109807
|
}
|
|
108592
109808
|
if (!await approveChanges(
|
|
@@ -108623,7 +109839,7 @@ var pushSite = async ({
|
|
|
108623
109839
|
} = result;
|
|
108624
109840
|
failedDeployments.forEach((failed) => {
|
|
108625
109841
|
const { name, deployment, $id } = failed;
|
|
108626
|
-
const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${
|
|
109842
|
+
const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${localConfig.getProject().projectId}/sites/site-${$id}/deployments/deployment-${deployment}`;
|
|
108627
109843
|
error48(
|
|
108628
109844
|
`Deployment of ${name} has failed. Check at ${failUrl} for more details
|
|
108629
109845
|
`
|
|
@@ -108654,13 +109870,13 @@ var pushFunction = async ({
|
|
|
108654
109870
|
code,
|
|
108655
109871
|
withVariables
|
|
108656
109872
|
} = {}) => {
|
|
108657
|
-
process.chdir(
|
|
109873
|
+
process.chdir(localConfig.configDirectoryPath);
|
|
108658
109874
|
const functionIds = [];
|
|
108659
109875
|
if (functionId) {
|
|
108660
109876
|
functionIds.push(functionId);
|
|
108661
109877
|
} else if (cliConfig.all) {
|
|
108662
|
-
checkDeployConditions(
|
|
108663
|
-
const functions2 =
|
|
109878
|
+
checkDeployConditions(localConfig);
|
|
109879
|
+
const functions2 = localConfig.getFunctions();
|
|
108664
109880
|
functionIds.push(
|
|
108665
109881
|
...functions2.map((func) => {
|
|
108666
109882
|
return func.$id;
|
|
@@ -108681,7 +109897,7 @@ var pushFunction = async ({
|
|
|
108681
109897
|
return;
|
|
108682
109898
|
}
|
|
108683
109899
|
let functions = functionIds.map((id) => {
|
|
108684
|
-
const functions2 =
|
|
109900
|
+
const functions2 = localConfig.getFunctions();
|
|
108685
109901
|
const func = functions2.find((f) => f.$id === id);
|
|
108686
109902
|
if (!func) {
|
|
108687
109903
|
throw new Error("Function '" + id + "' not found.");
|
|
@@ -108694,7 +109910,7 @@ var pushFunction = async ({
|
|
|
108694
109910
|
log(`Function ${func.name} is missing an entrypoint.`);
|
|
108695
109911
|
const answers = await import_inquirer3.default.prompt(questionsGetEntrypoint);
|
|
108696
109912
|
func.entrypoint = answers.entrypoint;
|
|
108697
|
-
|
|
109913
|
+
localConfig.addFunction(func);
|
|
108698
109914
|
}
|
|
108699
109915
|
}
|
|
108700
109916
|
if (!await approveChanges(
|
|
@@ -108731,7 +109947,7 @@ var pushFunction = async ({
|
|
|
108731
109947
|
} = result;
|
|
108732
109948
|
failedDeployments.forEach((failed) => {
|
|
108733
109949
|
const { name, deployment, $id } = failed;
|
|
108734
|
-
const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${
|
|
109950
|
+
const failUrl = `${globalConfig2.getEndpoint().slice(0, -3)}/console/project-${localConfig.getProject().projectId}/functions/function-${$id}/deployment-${deployment}`;
|
|
108735
109951
|
error48(
|
|
108736
109952
|
`Deployment of ${name} has failed. Check at ${failUrl} for more details
|
|
108737
109953
|
`
|
|
@@ -108772,23 +109988,23 @@ var pushTable = async ({
|
|
|
108772
109988
|
100,
|
|
108773
109989
|
"databases"
|
|
108774
109990
|
)).databases;
|
|
108775
|
-
const localTablesDBs2 =
|
|
109991
|
+
const localTablesDBs2 = localConfig.getTablesDBs();
|
|
108776
109992
|
const remoteDatabaseIds = new Set(remoteTablesDBs.map((db) => db.$id));
|
|
108777
|
-
const localTables2 =
|
|
109993
|
+
const localTables2 = localConfig.getTables();
|
|
108778
109994
|
const validTables = localTables2.filter(
|
|
108779
109995
|
(table) => remoteDatabaseIds.has(table.databaseId)
|
|
108780
109996
|
);
|
|
108781
|
-
|
|
109997
|
+
localConfig.set("tables", validTables);
|
|
108782
109998
|
const validTablesDBs = localTablesDBs2.filter(
|
|
108783
109999
|
(db) => remoteDatabaseIds.has(db.$id)
|
|
108784
110000
|
);
|
|
108785
|
-
|
|
110001
|
+
localConfig.set("tablesDB", validTablesDBs);
|
|
108786
110002
|
success2("Configuration resynced successfully.");
|
|
108787
110003
|
console.log();
|
|
108788
110004
|
}
|
|
108789
110005
|
log("Checking for deleted tables ...");
|
|
108790
|
-
const localTablesDBs =
|
|
108791
|
-
const localTables =
|
|
110006
|
+
const localTablesDBs = localConfig.getTablesDBs();
|
|
110007
|
+
const localTables = localConfig.getTables();
|
|
108792
110008
|
const tablesToDelete = [];
|
|
108793
110009
|
for (const db of localTablesDBs) {
|
|
108794
110010
|
try {
|
|
@@ -108850,13 +110066,13 @@ var pushTable = async ({
|
|
|
108850
110066
|
}
|
|
108851
110067
|
}
|
|
108852
110068
|
if (cliConfig.all) {
|
|
108853
|
-
checkDeployConditions(
|
|
108854
|
-
tables.push(...
|
|
110069
|
+
checkDeployConditions(localConfig);
|
|
110070
|
+
tables.push(...localConfig.getTables());
|
|
108855
110071
|
} else {
|
|
108856
110072
|
const answers = await import_inquirer3.default.prompt(questionsPushTables);
|
|
108857
110073
|
if (answers.tables) {
|
|
108858
110074
|
const configTables = /* @__PURE__ */ new Map();
|
|
108859
|
-
|
|
110075
|
+
localConfig.getTables().forEach((c) => {
|
|
108860
110076
|
configTables.set(`${c["databaseId"]}|${c["$id"]}`, c);
|
|
108861
110077
|
});
|
|
108862
110078
|
answers.tables.forEach((a) => {
|
|
@@ -108906,13 +110122,13 @@ var pushCollection = async () => {
|
|
|
108906
110122
|
);
|
|
108907
110123
|
const collections = [];
|
|
108908
110124
|
if (cliConfig.all) {
|
|
108909
|
-
checkDeployConditions(
|
|
108910
|
-
collections.push(...
|
|
110125
|
+
checkDeployConditions(localConfig);
|
|
110126
|
+
collections.push(...localConfig.getCollections());
|
|
108911
110127
|
} else {
|
|
108912
110128
|
const answers = await import_inquirer3.default.prompt(questionsPushCollections);
|
|
108913
110129
|
if (answers.collections) {
|
|
108914
110130
|
const configCollections = /* @__PURE__ */ new Map();
|
|
108915
|
-
|
|
110131
|
+
localConfig.getCollections().forEach((c) => {
|
|
108916
110132
|
configCollections.set(`${c["databaseId"]}|${c["$id"]}`, c);
|
|
108917
110133
|
});
|
|
108918
110134
|
answers.collections.forEach((a) => {
|
|
@@ -108929,7 +110145,7 @@ var pushCollection = async () => {
|
|
|
108929
110145
|
return;
|
|
108930
110146
|
}
|
|
108931
110147
|
collections.forEach((collection) => {
|
|
108932
|
-
const localDatabase =
|
|
110148
|
+
const localDatabase = localConfig.getDatabase(collection.databaseId);
|
|
108933
110149
|
collection.databaseName = localDatabase.name ?? collection.databaseId;
|
|
108934
110150
|
});
|
|
108935
110151
|
if (!await approveChanges(
|
|
@@ -108965,9 +110181,9 @@ var pushCollection = async () => {
|
|
|
108965
110181
|
};
|
|
108966
110182
|
var pushBucket = async () => {
|
|
108967
110183
|
let bucketIds = [];
|
|
108968
|
-
const configBuckets =
|
|
110184
|
+
const configBuckets = localConfig.getBuckets();
|
|
108969
110185
|
if (cliConfig.all) {
|
|
108970
|
-
checkDeployConditions(
|
|
110186
|
+
checkDeployConditions(localConfig);
|
|
108971
110187
|
bucketIds.push(...configBuckets.map((b) => b.$id));
|
|
108972
110188
|
}
|
|
108973
110189
|
if (bucketIds.length === 0) {
|
|
@@ -109015,9 +110231,9 @@ var pushBucket = async () => {
|
|
|
109015
110231
|
};
|
|
109016
110232
|
var pushTeam = async () => {
|
|
109017
110233
|
let teamIds = [];
|
|
109018
|
-
const configTeams =
|
|
110234
|
+
const configTeams = localConfig.getTeams();
|
|
109019
110235
|
if (cliConfig.all) {
|
|
109020
|
-
checkDeployConditions(
|
|
110236
|
+
checkDeployConditions(localConfig);
|
|
109021
110237
|
teamIds.push(...configTeams.map((t) => t.$id));
|
|
109022
110238
|
}
|
|
109023
110239
|
if (teamIds.length === 0) {
|
|
@@ -109065,9 +110281,9 @@ var pushTeam = async () => {
|
|
|
109065
110281
|
};
|
|
109066
110282
|
var pushMessagingTopic = async () => {
|
|
109067
110283
|
let topicsIds = [];
|
|
109068
|
-
const configTopics =
|
|
110284
|
+
const configTopics = localConfig.getMessagingTopics();
|
|
109069
110285
|
if (cliConfig.all) {
|
|
109070
|
-
checkDeployConditions(
|
|
110286
|
+
checkDeployConditions(localConfig);
|
|
109071
110287
|
topicsIds.push(...configTopics.map((b) => b.$id));
|
|
109072
110288
|
}
|
|
109073
110289
|
if (topicsIds.length === 0) {
|
|
@@ -109168,7 +110384,7 @@ async function createPullInstance(options = {
|
|
|
109168
110384
|
const projectClient = await sdkForProject();
|
|
109169
110385
|
const consoleClient = await sdkForConsole(requiresConsoleAuth);
|
|
109170
110386
|
const pullInstance = new Pull(projectClient, consoleClient, silent);
|
|
109171
|
-
pullInstance.setConfigDirectoryPath(
|
|
110387
|
+
pullInstance.setConfigDirectoryPath(localConfig.configDirectoryPath);
|
|
109172
110388
|
return pullInstance;
|
|
109173
110389
|
}
|
|
109174
110390
|
var Pull = class {
|
|
@@ -109538,9 +110754,13 @@ var Pull = class {
|
|
|
109538
110754
|
const filteredColumns = table.columns?.map(
|
|
109539
110755
|
(col) => filterBySchema(col, ColumnSchema)
|
|
109540
110756
|
);
|
|
110757
|
+
const filteredIndexes = table.indexes?.map(
|
|
110758
|
+
(idx) => filterBySchema(idx, IndexTableSchema)
|
|
110759
|
+
);
|
|
109541
110760
|
allTables.push({
|
|
109542
110761
|
...filterBySchema(table, TableSchema),
|
|
109543
|
-
columns: filteredColumns || []
|
|
110762
|
+
columns: filteredColumns || [],
|
|
110763
|
+
indexes: filteredIndexes || []
|
|
109544
110764
|
});
|
|
109545
110765
|
}
|
|
109546
110766
|
}
|
|
@@ -109642,7 +110862,7 @@ var Pull = class {
|
|
|
109642
110862
|
var pullResources = async ({
|
|
109643
110863
|
skipDeprecated = true
|
|
109644
110864
|
} = {}) => {
|
|
109645
|
-
const project =
|
|
110865
|
+
const project = localConfig.getProject();
|
|
109646
110866
|
if (!project.projectId) {
|
|
109647
110867
|
error48(
|
|
109648
110868
|
"Project configuration not found. Please run 'appwrite init project' to initialize your project first."
|
|
@@ -109679,9 +110899,9 @@ var pullSettings = async () => {
|
|
|
109679
110899
|
const pullInstance = await createPullInstance({
|
|
109680
110900
|
requiresConsoleAuth: true
|
|
109681
110901
|
});
|
|
109682
|
-
const projectId =
|
|
110902
|
+
const projectId = localConfig.getProject().projectId;
|
|
109683
110903
|
const settings = await pullInstance.pullSettings(projectId);
|
|
109684
|
-
|
|
110904
|
+
localConfig.setProject(projectId, settings.projectName, settings.project);
|
|
109685
110905
|
};
|
|
109686
110906
|
var pullFunctions = async ({
|
|
109687
110907
|
code,
|
|
@@ -109714,9 +110934,9 @@ var pullFunctions = async ({
|
|
|
109714
110934
|
functionIds: selectedFunctionIds
|
|
109715
110935
|
});
|
|
109716
110936
|
for (const func of functions) {
|
|
109717
|
-
const localFunction =
|
|
110937
|
+
const localFunction = localConfig.getFunction(func.$id);
|
|
109718
110938
|
func["path"] = localFunction["path"] || func["path"];
|
|
109719
|
-
|
|
110939
|
+
localConfig.addFunction(func);
|
|
109720
110940
|
}
|
|
109721
110941
|
};
|
|
109722
110942
|
var pullSites = async ({
|
|
@@ -109752,15 +110972,15 @@ var pullSites = async ({
|
|
|
109752
110972
|
siteIds: selectedSiteIds
|
|
109753
110973
|
});
|
|
109754
110974
|
for (const site of sites) {
|
|
109755
|
-
const localSite =
|
|
110975
|
+
const localSite = localConfig.getSite(site.$id);
|
|
109756
110976
|
site["path"] = localSite["path"] || site["path"];
|
|
109757
|
-
|
|
110977
|
+
localConfig.addSite(site);
|
|
109758
110978
|
}
|
|
109759
110979
|
};
|
|
109760
110980
|
var pullCollection = async () => {
|
|
109761
110981
|
const pullInstance = await createPullInstance();
|
|
109762
110982
|
const { databases, collections } = await pullInstance.pullCollections();
|
|
109763
|
-
const localCollections =
|
|
110983
|
+
const localCollections = localConfig.getCollections();
|
|
109764
110984
|
const remoteCollectionIds = new Set(collections.map((c) => c.$id));
|
|
109765
110985
|
const collectionsToRemove = localCollections.filter(
|
|
109766
110986
|
(c) => !remoteCollectionIds.has(c.$id)
|
|
@@ -109774,13 +110994,13 @@ var pullCollection = async () => {
|
|
|
109774
110994
|
return;
|
|
109775
110995
|
}
|
|
109776
110996
|
}
|
|
109777
|
-
|
|
109778
|
-
|
|
110997
|
+
localConfig.set("databases", databases);
|
|
110998
|
+
localConfig.set("collections", collections);
|
|
109779
110999
|
};
|
|
109780
111000
|
var pullTable = async () => {
|
|
109781
111001
|
const pullInstance = await createPullInstance();
|
|
109782
111002
|
const { databases, tables } = await pullInstance.pullTables();
|
|
109783
|
-
const localTables =
|
|
111003
|
+
const localTables = localConfig.getTables();
|
|
109784
111004
|
const remoteTableIds = new Set(tables.map((t) => t.$id));
|
|
109785
111005
|
const tablesToRemove = localTables.filter(
|
|
109786
111006
|
(t) => !remoteTableIds.has(t.$id)
|
|
@@ -109794,13 +111014,13 @@ var pullTable = async () => {
|
|
|
109794
111014
|
return;
|
|
109795
111015
|
}
|
|
109796
111016
|
}
|
|
109797
|
-
|
|
109798
|
-
|
|
111017
|
+
localConfig.set("tablesDB", databases);
|
|
111018
|
+
localConfig.set("tables", tables);
|
|
109799
111019
|
};
|
|
109800
111020
|
var pullBucket = async () => {
|
|
109801
111021
|
const pullInstance = await createPullInstance();
|
|
109802
111022
|
const buckets = await pullInstance.pullBuckets();
|
|
109803
|
-
const localBuckets =
|
|
111023
|
+
const localBuckets = localConfig.getBuckets();
|
|
109804
111024
|
const remoteBucketIds = new Set(buckets.map((b) => b.$id));
|
|
109805
111025
|
const bucketsToRemove = localBuckets.filter(
|
|
109806
111026
|
(b) => !remoteBucketIds.has(b.$id)
|
|
@@ -109814,12 +111034,12 @@ var pullBucket = async () => {
|
|
|
109814
111034
|
return;
|
|
109815
111035
|
}
|
|
109816
111036
|
}
|
|
109817
|
-
|
|
111037
|
+
localConfig.set("buckets", buckets);
|
|
109818
111038
|
};
|
|
109819
111039
|
var pullTeam = async () => {
|
|
109820
111040
|
const pullInstance = await createPullInstance();
|
|
109821
111041
|
const teams = await pullInstance.pullTeams();
|
|
109822
|
-
const localTeams =
|
|
111042
|
+
const localTeams = localConfig.getTeams();
|
|
109823
111043
|
const remoteTeamIds = new Set(teams.map((t) => t.$id));
|
|
109824
111044
|
const teamsToRemove = localTeams.filter(
|
|
109825
111045
|
(t) => !remoteTeamIds.has(t.$id)
|
|
@@ -109833,12 +111053,12 @@ var pullTeam = async () => {
|
|
|
109833
111053
|
return;
|
|
109834
111054
|
}
|
|
109835
111055
|
}
|
|
109836
|
-
|
|
111056
|
+
localConfig.set("teams", teams);
|
|
109837
111057
|
};
|
|
109838
111058
|
var pullMessagingTopic = async () => {
|
|
109839
111059
|
const pullInstance = await createPullInstance();
|
|
109840
111060
|
const topics = await pullInstance.pullMessagingTopics();
|
|
109841
|
-
const localTopics =
|
|
111061
|
+
const localTopics = localConfig.getMessagingTopics();
|
|
109842
111062
|
const remoteTopicIds = new Set(topics.map((t) => t.$id));
|
|
109843
111063
|
const topicsToRemove = localTopics.filter(
|
|
109844
111064
|
(t) => !remoteTopicIds.has(t.$id)
|
|
@@ -109852,7 +111072,7 @@ var pullMessagingTopic = async () => {
|
|
|
109852
111072
|
return;
|
|
109853
111073
|
}
|
|
109854
111074
|
}
|
|
109855
|
-
|
|
111075
|
+
localConfig.set("topics", topics);
|
|
109856
111076
|
};
|
|
109857
111077
|
var pull = new Command("pull").description(commandDescriptions["pull"]).action(actionRunner(() => pullResources({ skipDeprecated: true })));
|
|
109858
111078
|
pull.command("all").description("Pull all resources").action(
|
|
@@ -110196,8 +111416,18 @@ var TypeScriptDatabasesGenerator = class extends BaseDatabasesGenerator {
|
|
|
110196
111416
|
$id: e.$id,
|
|
110197
111417
|
name: e.name
|
|
110198
111418
|
}));
|
|
110199
|
-
const createAttributes = this.buildAttributes(
|
|
110200
|
-
|
|
111419
|
+
const createAttributes = this.buildAttributes(
|
|
111420
|
+
entity,
|
|
111421
|
+
typeEntities,
|
|
111422
|
+
" ",
|
|
111423
|
+
true
|
|
111424
|
+
);
|
|
111425
|
+
const rowAttributes = this.buildAttributes(
|
|
111426
|
+
entity,
|
|
111427
|
+
typeEntities,
|
|
111428
|
+
" ",
|
|
111429
|
+
false
|
|
111430
|
+
);
|
|
110201
111431
|
const createType = createAttributes.trim().length === 0 ? `export type ${typeName}Create = Record<string, never>` : `export type ${typeName}Create = {
|
|
110202
111432
|
${createAttributes}
|
|
110203
111433
|
}`;
|