@appwrite.io/console 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +9 -8
- package/CHANGELOG.md +51 -6
- package/LICENSE +1 -1
- package/README.md +84 -4
- package/dist/cjs/sdk.js +15258 -6036
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +15256 -6037
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +15258 -6036
- package/docs/examples/account/create-billing-address.md +8 -8
- package/docs/examples/account/create-email-password-session.md +4 -4
- package/docs/examples/account/create-email-token.md +5 -5
- package/docs/examples/account/{update-magic-u-r-l-session.md → create-email-verification.md} +3 -4
- package/docs/examples/account/{update-m-f-a.md → create-jwt.md} +3 -3
- package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
- package/docs/examples/account/create-mfa-authenticator.md +3 -3
- package/docs/examples/account/create-mfa-challenge.md +3 -3
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
- package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
- package/docs/examples/account/create-phone-token.md +4 -4
- package/docs/examples/account/create-push-target.md +5 -5
- package/docs/examples/account/create-recovery.md +4 -4
- package/docs/examples/account/create-session.md +4 -4
- package/docs/examples/account/create-verification.md +3 -3
- package/docs/examples/account/create.md +6 -6
- package/docs/examples/account/delete-billing-address.md +3 -3
- package/docs/examples/account/delete-identity.md +3 -3
- package/docs/examples/account/delete-mfa-authenticator.md +3 -3
- package/docs/examples/account/delete-payment-method.md +3 -3
- package/docs/examples/account/delete-push-target.md +3 -3
- package/docs/examples/account/delete-session.md +3 -3
- package/docs/examples/account/get-billing-address.md +3 -3
- package/docs/examples/account/get-coupon.md +3 -3
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-payment-method.md +3 -3
- package/docs/examples/account/get-session.md +3 -3
- package/docs/examples/account/list-billing-addresses.md +3 -3
- package/docs/examples/account/list-identities.md +4 -3
- package/docs/examples/account/list-invoices.md +3 -3
- package/docs/examples/account/list-logs.md +4 -3
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/list-payment-methods.md +3 -3
- package/docs/examples/account/update-billing-address.md +9 -9
- package/docs/examples/account/update-email-verification.md +14 -0
- package/docs/examples/account/update-email.md +4 -4
- package/docs/examples/account/update-magic-url-session.md +14 -0
- package/docs/examples/account/update-mfa-authenticator.md +4 -4
- package/docs/examples/account/update-mfa-challenge.md +4 -4
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{create-j-w-t.md → update-mfa.md} +3 -1
- package/docs/examples/account/update-name.md +3 -3
- package/docs/examples/account/update-password.md +4 -4
- package/docs/examples/account/update-payment-method-mandate-options.md +3 -3
- package/docs/examples/account/update-payment-method-provider.md +6 -5
- package/docs/examples/account/update-payment-method.md +6 -5
- package/docs/examples/account/update-phone-session.md +4 -4
- package/docs/examples/account/update-phone-verification.md +4 -4
- package/docs/examples/account/update-phone.md +4 -4
- package/docs/examples/account/update-prefs.md +7 -3
- package/docs/examples/account/update-push-target.md +4 -4
- package/docs/examples/account/update-recovery.md +5 -5
- package/docs/examples/account/update-session.md +3 -3
- package/docs/examples/account/update-verification.md +4 -4
- package/docs/examples/assistant/chat.md +3 -3
- package/docs/examples/avatars/get-browser.md +6 -6
- package/docs/examples/avatars/get-credit-card.md +6 -6
- package/docs/examples/avatars/get-favicon.md +3 -3
- package/docs/examples/avatars/get-flag.md +6 -6
- package/docs/examples/avatars/get-image.md +5 -5
- package/docs/examples/avatars/get-initials.md +6 -6
- package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
- package/docs/examples/avatars/get-screenshot.md +35 -0
- package/docs/examples/backups/create-archive.md +4 -4
- package/docs/examples/backups/create-policy.md +9 -9
- package/docs/examples/backups/create-restoration.md +6 -6
- package/docs/examples/backups/delete-archive.md +3 -3
- package/docs/examples/backups/delete-policy.md +3 -3
- package/docs/examples/backups/get-archive.md +3 -3
- package/docs/examples/backups/get-policy.md +3 -3
- package/docs/examples/backups/get-restoration.md +3 -3
- package/docs/examples/backups/list-archives.md +3 -3
- package/docs/examples/backups/list-policies.md +3 -3
- package/docs/examples/backups/list-restorations.md +3 -3
- package/docs/examples/backups/update-policy.md +7 -7
- package/docs/examples/console/create-program-membership.md +3 -3
- package/docs/examples/console/create-source.md +7 -7
- package/docs/examples/console/get-campaign.md +3 -3
- package/docs/examples/console/get-coupon.md +3 -3
- package/docs/examples/console/{plans.md → get-plan.md} +3 -1
- package/docs/examples/console/get-plans.md +13 -0
- package/docs/examples/console/{regions.md → get-program.md} +3 -1
- package/docs/examples/console/get-regions.md +13 -0
- package/docs/examples/console/get-resource.md +4 -4
- package/docs/examples/console/suggest-columns.md +17 -0
- package/docs/examples/console/suggest-indexes.md +16 -0
- package/docs/examples/databases/create-boolean-attribute.md +8 -8
- package/docs/examples/databases/create-collection.md +11 -9
- package/docs/examples/databases/create-datetime-attribute.md +8 -8
- package/docs/examples/databases/create-document.md +16 -11
- package/docs/examples/databases/create-documents.md +7 -6
- package/docs/examples/databases/create-email-attribute.md +8 -8
- package/docs/examples/databases/create-enum-attribute.md +9 -9
- package/docs/examples/databases/create-float-attribute.md +10 -10
- package/docs/examples/databases/create-index.md +9 -9
- package/docs/examples/databases/create-integer-attribute.md +10 -10
- package/docs/examples/databases/create-ip-attribute.md +8 -8
- package/docs/examples/databases/create-line-attribute.md +17 -0
- package/docs/examples/databases/create-operations.md +24 -0
- package/docs/examples/databases/create-point-attribute.md +17 -0
- package/docs/examples/databases/create-polygon-attribute.md +17 -0
- package/docs/examples/databases/create-relationship-attribute.md +10 -10
- package/docs/examples/databases/create-string-attribute.md +10 -10
- package/docs/examples/databases/create-transaction.md +13 -0
- package/docs/examples/databases/create-url-attribute.md +8 -8
- package/docs/examples/databases/create.md +5 -5
- package/docs/examples/databases/decrement-document-attribute.md +9 -8
- package/docs/examples/databases/delete-attribute.md +5 -5
- package/docs/examples/databases/delete-collection.md +4 -4
- package/docs/examples/databases/delete-document.md +6 -5
- package/docs/examples/databases/delete-documents.md +6 -5
- package/docs/examples/databases/delete-index.md +5 -5
- package/docs/examples/databases/{get-database-usage.md → delete-transaction.md} +4 -5
- package/docs/examples/databases/delete.md +3 -3
- package/docs/examples/databases/get-attribute.md +5 -5
- package/docs/examples/databases/get-collection-usage.md +6 -6
- package/docs/examples/databases/get-collection.md +4 -4
- package/docs/examples/databases/get-document.md +7 -6
- package/docs/examples/databases/get-index.md +5 -5
- package/docs/examples/databases/get-transaction.md +13 -0
- package/docs/examples/databases/get-usage.md +5 -4
- package/docs/examples/databases/get.md +3 -3
- package/docs/examples/databases/increment-document-attribute.md +9 -8
- package/docs/examples/databases/list-attributes.md +6 -5
- package/docs/examples/databases/list-collection-logs.md +5 -5
- package/docs/examples/databases/list-collections.md +6 -5
- package/docs/examples/databases/list-document-logs.md +6 -6
- package/docs/examples/databases/list-documents.md +7 -5
- package/docs/examples/databases/list-indexes.md +6 -5
- package/docs/examples/databases/list-logs.md +4 -4
- package/docs/examples/databases/list-transactions.md +13 -0
- package/docs/examples/databases/list-usage.md +13 -0
- package/docs/examples/databases/list.md +5 -4
- package/docs/examples/databases/update-boolean-attribute.md +8 -8
- package/docs/examples/databases/update-collection.md +9 -9
- package/docs/examples/databases/update-datetime-attribute.md +8 -8
- package/docs/examples/databases/update-document.md +15 -8
- package/docs/examples/databases/update-documents.md +13 -6
- package/docs/examples/databases/update-email-attribute.md +8 -8
- package/docs/examples/databases/update-enum-attribute.md +9 -9
- package/docs/examples/databases/update-float-attribute.md +10 -10
- package/docs/examples/databases/update-integer-attribute.md +10 -10
- package/docs/examples/databases/update-ip-attribute.md +8 -8
- package/docs/examples/databases/update-line-attribute.md +18 -0
- package/docs/examples/databases/update-point-attribute.md +18 -0
- package/docs/examples/databases/update-polygon-attribute.md +18 -0
- package/docs/examples/databases/update-relationship-attribute.md +7 -7
- package/docs/examples/databases/update-string-attribute.md +9 -9
- package/docs/examples/databases/update-transaction.md +15 -0
- package/docs/examples/databases/update-url-attribute.md +8 -8
- package/docs/examples/databases/update.md +5 -5
- package/docs/examples/databases/upsert-document.md +15 -8
- package/docs/examples/databases/upsert-documents.md +6 -5
- package/docs/examples/domains/create-preset-google-workspace.md +3 -3
- package/docs/examples/domains/create-preset-i-cloud.md +3 -3
- package/docs/examples/domains/create-preset-mailgun.md +3 -3
- package/docs/examples/domains/create-preset-outlook.md +3 -3
- package/docs/examples/domains/create-preset-proton-mail.md +3 -3
- package/docs/examples/domains/create-preset-zoho.md +3 -3
- package/docs/examples/domains/create-record-a.md +7 -7
- package/docs/examples/domains/{create-record-a-a-a-a.md → create-record-aaaa.md} +7 -7
- package/docs/examples/domains/create-record-alias.md +7 -7
- package/docs/examples/domains/{create-record-n-s.md → create-record-caa.md} +7 -7
- package/docs/examples/domains/{create-record-c-a-a.md → create-record-cname.md} +7 -7
- package/docs/examples/domains/{create-record-h-t-t-p-s.md → create-record-https.md} +7 -7
- package/docs/examples/domains/create-record-mx.md +18 -0
- package/docs/examples/domains/create-record-ns.md +17 -0
- package/docs/examples/domains/create-record-srv.md +20 -0
- package/docs/examples/domains/{create-record-c-n-a-m-e.md → create-record-txt.md} +7 -7
- package/docs/examples/domains/create.md +4 -4
- package/docs/examples/domains/delete-record.md +4 -4
- package/docs/examples/domains/delete.md +3 -3
- package/docs/examples/domains/get-preset-google-workspace.md +3 -3
- package/docs/examples/domains/get-preset-i-cloud.md +3 -3
- package/docs/examples/domains/get-preset-mailgun.md +3 -3
- package/docs/examples/domains/get-preset-outlook.md +3 -3
- package/docs/examples/domains/get-preset-proton-mail.md +3 -3
- package/docs/examples/domains/get-preset-zoho.md +3 -3
- package/docs/examples/domains/get-record.md +4 -4
- package/docs/examples/domains/get-zone.md +3 -3
- package/docs/examples/domains/get.md +3 -3
- package/docs/examples/domains/list-records.md +4 -4
- package/docs/examples/domains/list.md +4 -4
- package/docs/examples/domains/update-nameservers.md +3 -3
- package/docs/examples/domains/update-record-a.md +8 -8
- package/docs/examples/domains/update-record-aaaa.md +18 -0
- package/docs/examples/domains/update-record-alias.md +8 -8
- package/docs/examples/domains/update-record-caa.md +18 -0
- package/docs/examples/domains/update-record-cname.md +18 -0
- package/docs/examples/domains/update-record-https.md +18 -0
- package/docs/examples/domains/update-record-mx.md +19 -0
- package/docs/examples/domains/update-record-ns.md +18 -0
- package/docs/examples/domains/update-record-srv.md +21 -0
- package/docs/examples/domains/update-record-txt.md +18 -0
- package/docs/examples/domains/update-team.md +4 -4
- package/docs/examples/domains/update-zone.md +4 -4
- package/docs/examples/functions/create-deployment.md +7 -7
- package/docs/examples/functions/create-duplicate-deployment.md +5 -5
- package/docs/examples/functions/create-execution.md +9 -9
- package/docs/examples/functions/create-template-deployment.md +10 -9
- package/docs/examples/functions/create-variable.md +6 -6
- package/docs/examples/functions/create-vcs-deployment.md +7 -7
- package/docs/examples/functions/create.md +21 -21
- package/docs/examples/functions/delete-deployment.md +4 -4
- package/docs/examples/functions/delete-execution.md +4 -4
- package/docs/examples/functions/delete-variable.md +4 -4
- package/docs/examples/functions/delete.md +3 -3
- package/docs/examples/functions/get-deployment-download.md +5 -5
- package/docs/examples/functions/get-deployment.md +4 -4
- package/docs/examples/functions/get-execution.md +4 -4
- package/docs/examples/functions/get-template.md +3 -3
- package/docs/examples/functions/get-usage.md +5 -5
- package/docs/examples/functions/get-variable.md +4 -4
- package/docs/examples/functions/get.md +3 -3
- package/docs/examples/functions/list-deployments.md +6 -5
- package/docs/examples/functions/list-executions.md +5 -4
- package/docs/examples/functions/list-templates.md +7 -6
- package/docs/examples/functions/list-usage.md +4 -4
- package/docs/examples/functions/list-variables.md +3 -3
- package/docs/examples/functions/list.md +5 -4
- package/docs/examples/functions/update-deployment-status.md +4 -4
- package/docs/examples/functions/update-function-deployment.md +4 -4
- package/docs/examples/functions/update-variable.md +7 -7
- package/docs/examples/functions/update.md +21 -21
- package/docs/examples/graphql/mutation.md +3 -3
- package/docs/examples/graphql/query.md +3 -3
- package/docs/examples/health/get-certificate.md +3 -3
- package/docs/examples/health/get-failed-jobs.md +5 -5
- package/docs/examples/health/get-queue-billing-project-aggregation.md +3 -3
- package/docs/examples/health/get-queue-billing-team-aggregation.md +3 -3
- package/docs/examples/health/get-queue-builds.md +3 -3
- package/docs/examples/health/get-queue-certificates.md +3 -3
- package/docs/examples/health/get-queue-databases.md +4 -4
- package/docs/examples/health/get-queue-deletes.md +3 -3
- package/docs/examples/health/get-queue-functions.md +3 -3
- package/docs/examples/health/get-queue-logs.md +3 -3
- package/docs/examples/health/get-queue-mails.md +3 -3
- package/docs/examples/health/get-queue-messaging.md +3 -3
- package/docs/examples/health/get-queue-migrations.md +3 -3
- package/docs/examples/health/get-queue-priority-builds.md +3 -3
- package/docs/examples/health/get-queue-region-manager.md +3 -3
- package/docs/examples/health/get-queue-stats-resources.md +3 -3
- package/docs/examples/health/get-queue-threats.md +13 -0
- package/docs/examples/health/get-queue-usage.md +3 -3
- package/docs/examples/health/get-queue-webhooks.md +3 -3
- package/docs/examples/messaging/create-apns-provider.md +10 -10
- package/docs/examples/messaging/create-email.md +14 -14
- package/docs/examples/messaging/create-fcm-provider.md +6 -6
- package/docs/examples/messaging/create-mailgun-provider.md +12 -12
- package/docs/examples/messaging/{create-msg91provider.md → create-msg-91-provider.md} +8 -8
- package/docs/examples/messaging/create-push.md +21 -21
- package/docs/examples/messaging/create-resend-provider.md +20 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +10 -10
- package/docs/examples/messaging/create-sms.md +9 -9
- package/docs/examples/messaging/create-smtp-provider.md +16 -16
- package/docs/examples/messaging/create-subscriber.md +5 -5
- package/docs/examples/messaging/create-telesign-provider.md +8 -8
- package/docs/examples/messaging/create-textmagic-provider.md +8 -8
- package/docs/examples/messaging/create-topic.md +5 -5
- package/docs/examples/messaging/create-twilio-provider.md +8 -8
- package/docs/examples/messaging/create-vonage-provider.md +8 -8
- package/docs/examples/messaging/delete-provider.md +3 -3
- package/docs/examples/messaging/delete-subscriber.md +4 -4
- package/docs/examples/messaging/delete-topic.md +3 -3
- package/docs/examples/messaging/delete.md +3 -3
- package/docs/examples/messaging/get-message.md +3 -3
- package/docs/examples/messaging/get-provider.md +3 -3
- package/docs/examples/messaging/get-subscriber.md +4 -4
- package/docs/examples/messaging/get-topic.md +3 -3
- package/docs/examples/messaging/list-message-logs.md +5 -4
- package/docs/examples/messaging/list-messages.md +5 -4
- package/docs/examples/messaging/list-provider-logs.md +5 -4
- package/docs/examples/messaging/list-providers.md +5 -4
- package/docs/examples/messaging/list-subscriber-logs.md +5 -4
- package/docs/examples/messaging/list-subscribers.md +6 -5
- package/docs/examples/messaging/list-targets.md +5 -4
- package/docs/examples/messaging/list-topic-logs.md +5 -4
- package/docs/examples/messaging/list-topics.md +5 -4
- package/docs/examples/messaging/update-apns-provider.md +10 -10
- package/docs/examples/messaging/update-email.md +14 -14
- package/docs/examples/messaging/update-fcm-provider.md +6 -6
- package/docs/examples/messaging/update-mailgun-provider.md +12 -12
- package/docs/examples/messaging/{update-msg91provider.md → update-msg-91-provider.md} +8 -8
- package/docs/examples/messaging/update-push.md +21 -21
- package/docs/examples/messaging/update-resend-provider.md +20 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +10 -10
- package/docs/examples/messaging/update-sms.md +9 -9
- package/docs/examples/messaging/update-smtp-provider.md +16 -16
- package/docs/examples/messaging/update-telesign-provider.md +8 -8
- package/docs/examples/messaging/update-textmagic-provider.md +8 -8
- package/docs/examples/messaging/update-topic.md +5 -5
- package/docs/examples/messaging/update-twilio-provider.md +8 -8
- package/docs/examples/messaging/update-vonage-provider.md +8 -8
- package/docs/examples/migrations/create-appwrite-migration.md +6 -6
- package/docs/examples/migrations/create-csv-export.md +21 -0
- package/docs/examples/migrations/{create-csv-migration.md → create-csv-import.md} +6 -5
- package/docs/examples/migrations/create-firebase-migration.md +4 -4
- package/docs/examples/migrations/create-n-host-migration.md +10 -10
- package/docs/examples/migrations/create-supabase-migration.md +9 -9
- package/docs/examples/migrations/delete.md +3 -3
- package/docs/examples/migrations/get-appwrite-report.md +6 -6
- package/docs/examples/migrations/get-firebase-report.md +4 -4
- package/docs/examples/migrations/get-n-host-report.md +10 -10
- package/docs/examples/migrations/get-supabase-report.md +9 -9
- package/docs/examples/migrations/get.md +3 -3
- package/docs/examples/migrations/list.md +5 -4
- package/docs/examples/migrations/retry.md +3 -3
- package/docs/examples/organizations/add-credit.md +4 -4
- package/docs/examples/organizations/cancel-downgrade.md +3 -3
- package/docs/examples/organizations/create-downgrade-feedback.md +17 -0
- package/docs/examples/organizations/create-invoice-payment.md +5 -5
- package/docs/examples/organizations/create.md +13 -12
- package/docs/examples/organizations/delete-backup-payment-method.md +3 -3
- package/docs/examples/organizations/delete-billing-address.md +3 -3
- package/docs/examples/organizations/delete-default-payment-method.md +3 -3
- package/docs/examples/organizations/delete.md +3 -3
- package/docs/examples/organizations/estimation-create-organization.md +8 -7
- package/docs/examples/organizations/estimation-delete-organization.md +3 -3
- package/docs/examples/organizations/estimation-update-plan.md +7 -7
- package/docs/examples/organizations/get-aggregation.md +6 -4
- package/docs/examples/organizations/get-available-credits.md +13 -0
- package/docs/examples/organizations/get-billing-address.md +4 -4
- package/docs/examples/organizations/get-credit.md +4 -4
- package/docs/examples/organizations/get-invoice-download.md +4 -4
- package/docs/examples/organizations/get-invoice-view.md +4 -4
- package/docs/examples/organizations/get-invoice.md +4 -4
- package/docs/examples/organizations/get-payment-method.md +4 -4
- package/docs/examples/organizations/get-plan.md +3 -3
- package/docs/examples/organizations/get-scopes.md +3 -3
- package/docs/examples/organizations/get-usage.md +5 -5
- package/docs/examples/organizations/list-aggregations.md +4 -4
- package/docs/examples/organizations/list-credits.md +4 -4
- package/docs/examples/organizations/list-invoices.md +4 -4
- package/docs/examples/organizations/list.md +4 -4
- package/docs/examples/organizations/set-backup-payment-method.md +4 -4
- package/docs/examples/organizations/set-billing-address.md +4 -4
- package/docs/examples/organizations/set-billing-email.md +4 -4
- package/docs/examples/organizations/set-billing-tax-id.md +4 -4
- package/docs/examples/organizations/set-default-payment-method.md +4 -4
- package/docs/examples/organizations/update-budget.md +5 -5
- package/docs/examples/organizations/update-plan.md +11 -11
- package/docs/examples/organizations/update-projects.md +14 -0
- package/docs/examples/organizations/validate-invoice.md +4 -4
- package/docs/examples/organizations/validate-payment.md +4 -4
- package/docs/examples/project/create-variable.md +5 -5
- package/docs/examples/project/delete-variable.md +3 -3
- package/docs/examples/project/get-usage.md +5 -5
- package/docs/examples/project/get-variable.md +3 -3
- package/docs/examples/project/update-variable.md +6 -6
- package/docs/examples/projects/create-dev-key.md +5 -5
- package/docs/examples/projects/{create-j-w-t.md → create-jwt.md} +5 -5
- package/docs/examples/projects/create-key.md +6 -6
- package/docs/examples/projects/create-platform.md +8 -8
- package/docs/examples/projects/create-smtp-test.md +12 -12
- package/docs/examples/projects/create-webhook.md +10 -10
- package/docs/examples/projects/create.md +16 -16
- package/docs/examples/projects/delete-dev-key.md +4 -4
- package/docs/examples/projects/delete-email-template.md +5 -5
- package/docs/examples/projects/delete-key.md +4 -4
- package/docs/examples/projects/delete-platform.md +4 -4
- package/docs/examples/projects/delete-sms-template.md +5 -5
- package/docs/examples/projects/delete-webhook.md +4 -4
- package/docs/examples/projects/delete.md +3 -3
- package/docs/examples/projects/get-dev-key.md +4 -4
- package/docs/examples/projects/get-email-template.md +5 -5
- package/docs/examples/projects/get-key.md +4 -4
- package/docs/examples/projects/get-platform.md +4 -4
- package/docs/examples/projects/get-sms-template.md +5 -5
- package/docs/examples/projects/get-webhook.md +4 -4
- package/docs/examples/projects/get.md +3 -3
- package/docs/examples/projects/list-dev-keys.md +4 -4
- package/docs/examples/projects/list-keys.md +4 -3
- package/docs/examples/projects/list-platforms.md +4 -3
- package/docs/examples/projects/list-webhooks.md +4 -3
- package/docs/examples/projects/list.md +5 -4
- package/docs/examples/projects/update-api-status-all.md +4 -4
- package/docs/examples/projects/update-api-status.md +6 -6
- package/docs/examples/projects/update-auth-duration.md +4 -4
- package/docs/examples/projects/update-auth-limit.md +4 -4
- package/docs/examples/projects/update-auth-password-dictionary.md +4 -4
- package/docs/examples/projects/update-auth-password-history.md +4 -4
- package/docs/examples/projects/update-auth-sessions-limit.md +4 -4
- package/docs/examples/projects/update-auth-status.md +5 -5
- package/docs/examples/projects/update-dev-key.md +6 -6
- package/docs/examples/projects/update-email-template.md +10 -10
- package/docs/examples/projects/update-key.md +7 -7
- package/docs/examples/projects/update-memberships-privacy.md +6 -6
- package/docs/examples/projects/update-mock-numbers.md +4 -4
- package/docs/examples/projects/{update-o-auth2.md → update-o-auth-2.md} +7 -7
- package/docs/examples/projects/update-personal-data-check.md +4 -4
- package/docs/examples/projects/update-platform.md +8 -8
- package/docs/examples/projects/update-service-status-all.md +4 -4
- package/docs/examples/projects/update-service-status.md +5 -5
- package/docs/examples/projects/update-session-alerts.md +4 -4
- package/docs/examples/projects/update-session-invalidation.md +14 -0
- package/docs/examples/projects/update-sms-template.md +6 -6
- package/docs/examples/projects/update-smtp.md +12 -12
- package/docs/examples/projects/update-status.md +14 -0
- package/docs/examples/projects/update-team.md +4 -4
- package/docs/examples/projects/update-webhook-signature.md +4 -4
- package/docs/examples/projects/update-webhook.md +11 -11
- package/docs/examples/projects/update.md +13 -13
- package/docs/examples/proxy/{create-a-p-i-rule.md → create-api-rule.md} +3 -3
- package/docs/examples/proxy/create-function-rule.md +5 -5
- package/docs/examples/proxy/create-redirect-rule.md +8 -8
- package/docs/examples/proxy/create-site-rule.md +5 -5
- package/docs/examples/proxy/delete-rule.md +3 -3
- package/docs/examples/proxy/get-rule.md +3 -3
- package/docs/examples/proxy/list-rules.md +5 -4
- package/docs/examples/proxy/update-rule-verification.md +3 -3
- package/docs/examples/sites/create-deployment.md +8 -8
- package/docs/examples/sites/create-duplicate-deployment.md +4 -4
- package/docs/examples/sites/create-template-deployment.md +10 -9
- package/docs/examples/sites/create-variable.md +6 -6
- package/docs/examples/sites/create-vcs-deployment.md +7 -7
- package/docs/examples/sites/create.md +21 -21
- package/docs/examples/sites/delete-deployment.md +4 -4
- package/docs/examples/sites/delete-log.md +4 -4
- package/docs/examples/sites/delete-variable.md +4 -4
- package/docs/examples/sites/delete.md +3 -3
- package/docs/examples/sites/get-deployment-download.md +5 -5
- package/docs/examples/sites/get-deployment.md +4 -4
- package/docs/examples/sites/get-log.md +4 -4
- package/docs/examples/sites/get-template.md +3 -3
- package/docs/examples/sites/get-usage.md +5 -5
- package/docs/examples/sites/get-variable.md +4 -4
- package/docs/examples/sites/get.md +3 -3
- package/docs/examples/sites/list-deployments.md +6 -5
- package/docs/examples/sites/list-logs.md +5 -4
- package/docs/examples/sites/list-templates.md +6 -6
- package/docs/examples/sites/list-usage.md +4 -4
- package/docs/examples/sites/list-variables.md +3 -3
- package/docs/examples/sites/list.md +5 -4
- package/docs/examples/sites/update-deployment-status.md +4 -4
- package/docs/examples/sites/update-site-deployment.md +4 -4
- package/docs/examples/sites/update-variable.md +7 -7
- package/docs/examples/sites/update.md +21 -21
- package/docs/examples/storage/create-bucket.md +14 -13
- package/docs/examples/storage/create-file.md +7 -7
- package/docs/examples/storage/delete-bucket.md +3 -3
- package/docs/examples/storage/delete-file.md +4 -4
- package/docs/examples/storage/get-bucket-usage.md +5 -5
- package/docs/examples/storage/get-bucket.md +3 -3
- package/docs/examples/storage/get-file-download.md +5 -5
- package/docs/examples/storage/get-file-preview.md +16 -16
- package/docs/examples/storage/get-file-view.md +5 -5
- package/docs/examples/storage/get-file.md +4 -4
- package/docs/examples/storage/get-usage.md +4 -4
- package/docs/examples/storage/list-buckets.md +5 -4
- package/docs/examples/storage/list-files.md +6 -5
- package/docs/examples/storage/update-bucket.md +14 -13
- package/docs/examples/storage/update-file.md +7 -7
- package/docs/examples/tablesdb/create-boolean-column.md +18 -0
- package/docs/examples/tablesdb/create-datetime-column.md +18 -0
- package/docs/examples/tablesdb/create-email-column.md +18 -0
- package/docs/examples/tablesdb/create-enum-column.md +19 -0
- package/docs/examples/tablesdb/create-float-column.md +20 -0
- package/docs/examples/tablesdb/create-index.md +19 -0
- package/docs/examples/tablesdb/create-integer-column.md +20 -0
- package/docs/examples/tablesdb/create-ip-column.md +18 -0
- package/docs/examples/tablesdb/create-line-column.md +17 -0
- package/docs/examples/tablesdb/create-operations.md +24 -0
- package/docs/examples/tablesdb/create-point-column.md +17 -0
- package/docs/examples/tablesdb/create-polygon-column.md +17 -0
- package/docs/examples/tablesdb/create-relationship-column.md +20 -0
- package/docs/examples/tablesdb/create-row.md +24 -0
- package/docs/examples/tablesdb/create-rows.md +16 -0
- package/docs/examples/tablesdb/create-string-column.md +20 -0
- package/docs/examples/tablesdb/create-table.md +20 -0
- package/docs/examples/tablesdb/create-transaction.md +13 -0
- package/docs/examples/tablesdb/create-url-column.md +18 -0
- package/docs/examples/tablesdb/create.md +15 -0
- package/docs/examples/tablesdb/decrement-row-column.md +19 -0
- package/docs/examples/tablesdb/delete-column.md +15 -0
- package/docs/examples/tablesdb/delete-index.md +15 -0
- package/docs/examples/tablesdb/delete-row.md +16 -0
- package/docs/examples/tablesdb/delete-rows.md +16 -0
- package/docs/examples/tablesdb/delete-table.md +14 -0
- package/docs/examples/tablesdb/delete-transaction.md +13 -0
- package/docs/examples/tablesdb/delete.md +13 -0
- package/docs/examples/tablesdb/get-column.md +15 -0
- package/docs/examples/tablesdb/get-index.md +15 -0
- package/docs/examples/tablesdb/get-row.md +17 -0
- package/docs/examples/tablesdb/get-table-usage.md +15 -0
- package/docs/examples/tablesdb/get-table.md +14 -0
- package/docs/examples/tablesdb/get-transaction.md +13 -0
- package/docs/examples/tablesdb/get-usage.md +14 -0
- package/docs/examples/tablesdb/get.md +13 -0
- package/docs/examples/tablesdb/increment-row-column.md +19 -0
- package/docs/examples/tablesdb/list-columns.md +16 -0
- package/docs/examples/tablesdb/list-indexes.md +16 -0
- package/docs/examples/tablesdb/list-row-logs.md +16 -0
- package/docs/examples/tablesdb/list-rows.md +17 -0
- package/docs/examples/tablesdb/list-table-logs.md +15 -0
- package/docs/examples/tablesdb/list-tables.md +16 -0
- package/docs/examples/tablesdb/list-transactions.md +13 -0
- package/docs/examples/tablesdb/list-usage.md +13 -0
- package/docs/examples/tablesdb/list.md +15 -0
- package/docs/examples/tablesdb/update-boolean-column.md +18 -0
- package/docs/examples/tablesdb/update-datetime-column.md +18 -0
- package/docs/examples/tablesdb/update-email-column.md +18 -0
- package/docs/examples/tablesdb/update-enum-column.md +19 -0
- package/docs/examples/tablesdb/update-float-column.md +20 -0
- package/docs/examples/tablesdb/update-integer-column.md +20 -0
- package/docs/examples/tablesdb/update-ip-column.md +18 -0
- package/docs/examples/tablesdb/update-line-column.md +18 -0
- package/docs/examples/tablesdb/update-point-column.md +18 -0
- package/docs/examples/tablesdb/update-polygon-column.md +18 -0
- package/docs/examples/tablesdb/update-relationship-column.md +17 -0
- package/docs/examples/tablesdb/update-row.md +24 -0
- package/docs/examples/tablesdb/update-rows.md +23 -0
- package/docs/examples/tablesdb/update-string-column.md +19 -0
- package/docs/examples/tablesdb/update-table.md +18 -0
- package/docs/examples/tablesdb/update-transaction.md +15 -0
- package/docs/examples/tablesdb/update-url-column.md +18 -0
- package/docs/examples/tablesdb/update.md +15 -0
- package/docs/examples/tablesdb/upsert-row.md +24 -0
- package/docs/examples/tablesdb/upsert-rows.md +16 -0
- package/docs/examples/teams/create-membership.md +9 -9
- package/docs/examples/teams/create.md +5 -5
- package/docs/examples/teams/delete-membership.md +4 -4
- package/docs/examples/teams/delete.md +3 -3
- package/docs/examples/teams/get-membership.md +4 -4
- package/docs/examples/teams/get-prefs.md +3 -3
- package/docs/examples/teams/get.md +3 -3
- package/docs/examples/teams/list-logs.md +5 -4
- package/docs/examples/teams/list-memberships.md +6 -5
- package/docs/examples/teams/list.md +5 -4
- package/docs/examples/teams/update-membership-status.md +6 -6
- package/docs/examples/teams/update-membership.md +5 -5
- package/docs/examples/teams/update-name.md +4 -4
- package/docs/examples/teams/update-prefs.md +4 -4
- package/docs/examples/tokens/create-file-token.md +5 -5
- package/docs/examples/tokens/delete.md +3 -3
- package/docs/examples/tokens/get.md +3 -3
- package/docs/examples/tokens/list.md +6 -5
- package/docs/examples/tokens/update.md +4 -4
- package/docs/examples/users/{create-m-d5user.md → create-argon-2-user.md} +6 -6
- package/docs/examples/users/create-bcrypt-user.md +6 -6
- package/docs/examples/users/{create-j-w-t.md → create-jwt.md} +5 -5
- package/docs/examples/users/{create-argon2user.md → create-md-5-user.md} +6 -6
- package/docs/examples/users/create-mfa-recovery-codes.md +3 -3
- package/docs/examples/users/{create-p-h-pass-user.md → create-ph-pass-user.md} +6 -6
- package/docs/examples/users/create-scrypt-modified-user.md +9 -9
- package/docs/examples/users/create-scrypt-user.md +11 -11
- package/docs/examples/users/create-session.md +3 -3
- package/docs/examples/users/{create-s-h-a-user.md → create-sha-user.md} +7 -7
- package/docs/examples/users/create-target.md +8 -8
- package/docs/examples/users/create-token.md +5 -5
- package/docs/examples/users/create.md +7 -7
- package/docs/examples/users/delete-identity.md +3 -3
- package/docs/examples/users/delete-mfa-authenticator.md +4 -4
- package/docs/examples/users/delete-session.md +4 -4
- package/docs/examples/users/delete-sessions.md +3 -3
- package/docs/examples/users/delete-target.md +4 -4
- package/docs/examples/users/delete.md +3 -3
- package/docs/examples/users/get-mfa-recovery-codes.md +3 -3
- package/docs/examples/users/get-prefs.md +3 -3
- package/docs/examples/users/get-target.md +4 -4
- package/docs/examples/users/get-usage.md +4 -4
- package/docs/examples/users/get.md +3 -3
- package/docs/examples/users/list-identities.md +5 -4
- package/docs/examples/users/list-logs.md +5 -4
- package/docs/examples/users/list-memberships.md +6 -5
- package/docs/examples/users/list-mfa-factors.md +3 -3
- package/docs/examples/users/list-sessions.md +4 -3
- package/docs/examples/users/list-targets.md +5 -4
- package/docs/examples/users/list.md +5 -4
- package/docs/examples/users/update-email-verification.md +4 -4
- package/docs/examples/users/update-email.md +4 -4
- package/docs/examples/users/update-labels.md +4 -4
- package/docs/examples/users/update-mfa-recovery-codes.md +3 -3
- package/docs/examples/users/update-mfa.md +4 -4
- package/docs/examples/users/update-name.md +4 -4
- package/docs/examples/users/update-password.md +4 -4
- package/docs/examples/users/update-phone-verification.md +4 -4
- package/docs/examples/users/update-phone.md +4 -4
- package/docs/examples/users/update-prefs.md +4 -4
- package/docs/examples/users/update-status.md +4 -4
- package/docs/examples/users/update-target.md +7 -7
- package/docs/examples/vcs/create-repository-detection.md +6 -6
- package/docs/examples/vcs/create-repository.md +5 -5
- package/docs/examples/vcs/delete-installation.md +3 -3
- package/docs/examples/vcs/get-installation.md +3 -3
- package/docs/examples/vcs/get-repository-contents.md +6 -5
- package/docs/examples/vcs/get-repository.md +4 -4
- package/docs/examples/vcs/list-installations.md +5 -4
- package/docs/examples/vcs/list-repositories.md +6 -5
- package/docs/examples/vcs/list-repository-branches.md +4 -4
- package/docs/examples/vcs/update-external-deployments.md +5 -5
- package/package.json +4 -4
- package/src/client.ts +42 -7
- package/src/enums/api-service.ts +1 -0
- package/src/enums/attribute-status.ts +7 -0
- package/src/enums/billing-plan-group.ts +5 -0
- package/src/enums/build-runtime.ts +2 -0
- package/src/enums/column-status.ts +7 -0
- package/src/enums/credit-card.ts +1 -1
- package/src/enums/database-type.ts +4 -0
- package/src/enums/deployment-status.ts +7 -0
- package/src/enums/execution-method.ts +1 -0
- package/src/enums/execution-status.ts +7 -0
- package/src/enums/execution-trigger.ts +5 -0
- package/src/enums/framework.ts +1 -0
- package/src/enums/health-antivirus-status.ts +5 -0
- package/src/enums/health-check-status.ts +4 -0
- package/src/enums/index-status.ts +7 -0
- package/src/enums/index-type.ts +1 -0
- package/src/enums/message-status.ts +7 -0
- package/src/enums/o-auth-provider.ts +3 -0
- package/src/enums/platform.ts +4 -0
- package/src/enums/proxy-rule-deployment-resource-type.ts +4 -0
- package/src/enums/proxy-rule-status.ts +6 -0
- package/src/enums/region.ts +3 -0
- package/src/enums/runtime.ts +2 -0
- package/src/enums/status.ts +4 -0
- package/src/enums/template-reference-type.ts +5 -0
- package/src/enums/theme.ts +4 -0
- package/src/enums/timezone.ts +421 -0
- package/src/enums/{user-usage-range.ts → usage-range.ts} +1 -1
- package/src/enums/{v-c-s-deployment-type.ts → vcs-reference-type.ts} +1 -1
- package/src/index.ts +27 -11
- package/src/models.ts +1925 -239
- package/src/operator.ts +308 -0
- package/src/query.ts +246 -2
- package/src/services/account.ts +2278 -235
- package/src/services/assistant.ts +29 -3
- package/src/services/avatars.ts +511 -52
- package/src/services/backups.ts +400 -42
- package/src/services/console.ts +499 -19
- package/src/services/databases.ts +3584 -430
- package/src/services/domains.ts +1795 -266
- package/src/services/functions.ts +1197 -155
- package/src/services/graphql.ts +56 -4
- package/src/services/health.ts +586 -42
- package/src/services/locale.ts +18 -2
- package/src/services/messaging.ts +3418 -386
- package/src/services/migrations.ts +653 -65
- package/src/services/organizations.ts +1411 -126
- package/src/services/project.ts +173 -17
- package/src/services/projects.ts +2808 -282
- package/src/services/proxy.ts +272 -26
- package/src/services/realtime.ts +437 -0
- package/src/services/sites.ts +1129 -143
- package/src/services/storage.ts +672 -89
- package/src/services/tables-db.ts +5439 -0
- package/src/services/teams.ts +535 -65
- package/src/services/tokens.ts +171 -16
- package/src/services/users.ts +1916 -182
- package/src/services/vcs.ts +373 -41
- package/types/client.d.ts +14 -5
- package/types/enums/api-service.d.ts +1 -0
- package/types/enums/attribute-status.d.ts +7 -0
- package/types/enums/billing-plan-group.d.ts +5 -0
- package/types/enums/build-runtime.d.ts +3 -1
- package/types/enums/column-status.d.ts +7 -0
- package/types/enums/credit-card.d.ts +1 -1
- package/types/enums/database-type.d.ts +4 -0
- package/types/enums/deployment-status.d.ts +7 -0
- package/types/enums/execution-method.d.ts +2 -1
- package/types/enums/execution-status.d.ts +7 -0
- package/types/enums/execution-trigger.d.ts +5 -0
- package/types/enums/framework.d.ts +1 -0
- package/types/enums/health-antivirus-status.d.ts +5 -0
- package/types/enums/health-check-status.d.ts +4 -0
- package/types/enums/index-status.d.ts +7 -0
- package/types/enums/index-type.d.ts +2 -1
- package/types/enums/message-status.d.ts +7 -0
- package/types/enums/o-auth-provider.d.ts +4 -1
- package/types/enums/platform.d.ts +4 -0
- package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
- package/types/enums/proxy-rule-status.d.ts +6 -0
- package/types/enums/region.d.ts +4 -1
- package/types/enums/runtime.d.ts +3 -1
- package/types/enums/status.d.ts +4 -0
- package/types/enums/template-reference-type.d.ts +5 -0
- package/types/enums/theme.d.ts +4 -0
- package/types/enums/timezone.d.ts +421 -0
- package/types/enums/{site-usage-range.d.ts → usage-range.d.ts} +1 -1
- package/types/enums/{v-c-s-deployment-type.d.ts → vcs-reference-type.d.ts} +1 -1
- package/types/index.d.ts +27 -11
- package/types/models.d.ts +1877 -422
- package/types/operator.d.ts +180 -0
- package/types/query.d.ts +198 -2
- package/types/services/account.d.ts +1020 -158
- package/types/services/assistant.d.ts +13 -2
- package/types/services/avatars.d.ts +263 -45
- package/types/services/backups.d.ts +190 -30
- package/types/services/console.d.ts +202 -15
- package/types/services/databases.d.ts +1756 -299
- package/types/services/domains.d.ts +971 -219
- package/types/services/functions.d.ts +622 -131
- package/types/services/graphql.d.ts +24 -2
- package/types/services/health.d.ts +246 -24
- package/types/services/locale.d.ts +2 -2
- package/types/services/messaging.d.ts +1670 -281
- package/types/services/migrations.d.ts +319 -53
- package/types/services/organizations.d.ts +664 -109
- package/types/services/project.d.ts +81 -12
- package/types/services/projects.d.ts +1308 -202
- package/types/services/proxy.d.ts +128 -19
- package/types/services/realtime.d.ts +118 -0
- package/types/services/sites.d.ts +580 -119
- package/types/services/storage.d.ts +362 -81
- package/types/services/tables-db.d.ts +2040 -0
- package/types/services/teams.d.ts +277 -61
- package/types/services/tokens.d.ts +80 -12
- package/types/services/users.d.ts +906 -149
- package/types/services/vcs.d.ts +182 -34
- package/docs/examples/domains/create-record-m-x.md +0 -18
- package/docs/examples/domains/create-record-s-r-v.md +0 -20
- package/docs/examples/domains/create-record-t-x-t.md +0 -17
- package/docs/examples/domains/update-record-a-a-a-a.md +0 -18
- package/docs/examples/domains/update-record-c-a-a.md +0 -18
- package/docs/examples/domains/update-record-c-n-a-m-e.md +0 -18
- package/docs/examples/domains/update-record-h-t-t-p-s.md +0 -18
- package/docs/examples/domains/update-record-m-x.md +0 -19
- package/docs/examples/domains/update-record-n-s.md +0 -18
- package/docs/examples/domains/update-record-s-r-v.md +0 -21
- package/docs/examples/domains/update-record-t-x-t.md +0 -18
- package/src/enums/billing-plan.ts +0 -5
- package/src/enums/database-usage-range.ts +0 -5
- package/src/enums/function-usage-range.ts +0 -5
- package/src/enums/site-usage-range.ts +0 -5
- package/src/enums/storage-usage-range.ts +0 -5
- package/types/enums/billing-plan.d.ts +0 -5
- package/types/enums/database-usage-range.d.ts +0 -5
- package/types/enums/function-usage-range.d.ts +0 -5
- package/types/enums/storage-usage-range.d.ts +0 -5
- package/types/enums/user-usage-range.d.ts +0 -5
- /package/docs/examples/health/{get-d-b.md → get-db.md} +0 -0
- /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
- /package/src/enums/{s-m-t-p-secure.ts → smtp-secure.ts} +0 -0
- /package/src/enums/{v-c-s-detection-type.ts → vcs-detection-type.ts} +0 -0
- /package/types/enums/{s-m-t-p-secure.d.ts → smtp-secure.d.ts} +0 -0
- /package/types/enums/{v-c-s-detection-type.d.ts → vcs-detection-type.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { UsageRange } from '../enums/usage-range';
|
|
4
4
|
import { RelationshipType } from '../enums/relationship-type';
|
|
5
5
|
import { RelationMutate } from '../enums/relation-mutate';
|
|
6
6
|
import { IndexType } from '../enums/index-type';
|
|
@@ -10,659 +10,2116 @@ export declare class Databases {
|
|
|
10
10
|
/**
|
|
11
11
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
12
12
|
*
|
|
13
|
-
* @param {string[]} queries
|
|
14
|
-
* @param {string} search
|
|
13
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name
|
|
14
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
15
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
15
16
|
* @throws {AppwriteException}
|
|
16
17
|
* @returns {Promise<Models.DatabaseList>}
|
|
18
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
|
|
17
19
|
*/
|
|
18
|
-
list(
|
|
20
|
+
list(params?: {
|
|
21
|
+
queries?: string[];
|
|
22
|
+
search?: string;
|
|
23
|
+
total?: boolean;
|
|
24
|
+
}): Promise<Models.DatabaseList>;
|
|
25
|
+
/**
|
|
26
|
+
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
27
|
+
*
|
|
28
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name
|
|
29
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
30
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
31
|
+
* @throws {AppwriteException}
|
|
32
|
+
* @returns {Promise<Models.DatabaseList>}
|
|
33
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
34
|
+
*/
|
|
35
|
+
list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
|
|
19
36
|
/**
|
|
20
37
|
* Create a new Database.
|
|
21
|
-
|
|
22
38
|
*
|
|
23
|
-
*
|
|
24
|
-
* @param {string}
|
|
25
|
-
* @param {
|
|
39
|
+
*
|
|
40
|
+
* @param {string} params.databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
41
|
+
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
42
|
+
* @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
26
43
|
* @throws {AppwriteException}
|
|
27
44
|
* @returns {Promise<Models.Database>}
|
|
45
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.create` instead.
|
|
46
|
+
*/
|
|
47
|
+
create(params: {
|
|
48
|
+
databaseId: string;
|
|
49
|
+
name: string;
|
|
50
|
+
enabled?: boolean;
|
|
51
|
+
}): Promise<Models.Database>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a new Database.
|
|
54
|
+
*
|
|
55
|
+
*
|
|
56
|
+
* @param {string} databaseId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
57
|
+
* @param {string} name - Database name. Max length: 128 chars.
|
|
58
|
+
* @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
59
|
+
* @throws {AppwriteException}
|
|
60
|
+
* @returns {Promise<Models.Database>}
|
|
61
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
28
62
|
*/
|
|
29
63
|
create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
30
64
|
/**
|
|
31
|
-
*
|
|
65
|
+
* List transactions across all databases.
|
|
66
|
+
*
|
|
67
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
68
|
+
* @throws {AppwriteException}
|
|
69
|
+
* @returns {Promise<Models.TransactionList>}
|
|
70
|
+
*/
|
|
71
|
+
listTransactions(params?: {
|
|
72
|
+
queries?: string[];
|
|
73
|
+
}): Promise<Models.TransactionList>;
|
|
74
|
+
/**
|
|
75
|
+
* List transactions across all databases.
|
|
76
|
+
*
|
|
77
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
78
|
+
* @throws {AppwriteException}
|
|
79
|
+
* @returns {Promise<Models.TransactionList>}
|
|
80
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
81
|
+
*/
|
|
82
|
+
listTransactions(queries?: string[]): Promise<Models.TransactionList>;
|
|
83
|
+
/**
|
|
84
|
+
* Create a new transaction.
|
|
85
|
+
*
|
|
86
|
+
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
87
|
+
* @throws {AppwriteException}
|
|
88
|
+
* @returns {Promise<Models.Transaction>}
|
|
89
|
+
*/
|
|
90
|
+
createTransaction(params?: {
|
|
91
|
+
ttl?: number;
|
|
92
|
+
}): Promise<Models.Transaction>;
|
|
93
|
+
/**
|
|
94
|
+
* Create a new transaction.
|
|
95
|
+
*
|
|
96
|
+
* @param {number} ttl - Seconds before the transaction expires.
|
|
97
|
+
* @throws {AppwriteException}
|
|
98
|
+
* @returns {Promise<Models.Transaction>}
|
|
99
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
100
|
+
*/
|
|
101
|
+
createTransaction(ttl?: number): Promise<Models.Transaction>;
|
|
102
|
+
/**
|
|
103
|
+
* Get a transaction by its unique ID.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
106
|
+
* @throws {AppwriteException}
|
|
107
|
+
* @returns {Promise<Models.Transaction>}
|
|
108
|
+
*/
|
|
109
|
+
getTransaction(params: {
|
|
110
|
+
transactionId: string;
|
|
111
|
+
}): Promise<Models.Transaction>;
|
|
112
|
+
/**
|
|
113
|
+
* Get a transaction by its unique ID.
|
|
32
114
|
*
|
|
33
|
-
* @param {
|
|
115
|
+
* @param {string} transactionId - Transaction ID.
|
|
116
|
+
* @throws {AppwriteException}
|
|
117
|
+
* @returns {Promise<Models.Transaction>}
|
|
118
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
119
|
+
*/
|
|
120
|
+
getTransaction(transactionId: string): Promise<Models.Transaction>;
|
|
121
|
+
/**
|
|
122
|
+
* Update a transaction, to either commit or roll back its operations.
|
|
123
|
+
*
|
|
124
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
125
|
+
* @param {boolean} params.commit - Commit transaction?
|
|
126
|
+
* @param {boolean} params.rollback - Rollback transaction?
|
|
127
|
+
* @throws {AppwriteException}
|
|
128
|
+
* @returns {Promise<Models.Transaction>}
|
|
129
|
+
*/
|
|
130
|
+
updateTransaction(params: {
|
|
131
|
+
transactionId: string;
|
|
132
|
+
commit?: boolean;
|
|
133
|
+
rollback?: boolean;
|
|
134
|
+
}): Promise<Models.Transaction>;
|
|
135
|
+
/**
|
|
136
|
+
* Update a transaction, to either commit or roll back its operations.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} transactionId - Transaction ID.
|
|
139
|
+
* @param {boolean} commit - Commit transaction?
|
|
140
|
+
* @param {boolean} rollback - Rollback transaction?
|
|
141
|
+
* @throws {AppwriteException}
|
|
142
|
+
* @returns {Promise<Models.Transaction>}
|
|
143
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
144
|
+
*/
|
|
145
|
+
updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
|
|
146
|
+
/**
|
|
147
|
+
* Delete a transaction by its unique ID.
|
|
148
|
+
*
|
|
149
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
150
|
+
* @throws {AppwriteException}
|
|
151
|
+
* @returns {Promise<{}>}
|
|
152
|
+
*/
|
|
153
|
+
deleteTransaction(params: {
|
|
154
|
+
transactionId: string;
|
|
155
|
+
}): Promise<{}>;
|
|
156
|
+
/**
|
|
157
|
+
* Delete a transaction by its unique ID.
|
|
158
|
+
*
|
|
159
|
+
* @param {string} transactionId - Transaction ID.
|
|
160
|
+
* @throws {AppwriteException}
|
|
161
|
+
* @returns {Promise<{}>}
|
|
162
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
163
|
+
*/
|
|
164
|
+
deleteTransaction(transactionId: string): Promise<{}>;
|
|
165
|
+
/**
|
|
166
|
+
* Create multiple operations in a single transaction.
|
|
167
|
+
*
|
|
168
|
+
* @param {string} params.transactionId - Transaction ID.
|
|
169
|
+
* @param {object[]} params.operations - Array of staged operations.
|
|
170
|
+
* @throws {AppwriteException}
|
|
171
|
+
* @returns {Promise<Models.Transaction>}
|
|
172
|
+
*/
|
|
173
|
+
createOperations(params: {
|
|
174
|
+
transactionId: string;
|
|
175
|
+
operations?: object[];
|
|
176
|
+
}): Promise<Models.Transaction>;
|
|
177
|
+
/**
|
|
178
|
+
* Create multiple operations in a single transaction.
|
|
179
|
+
*
|
|
180
|
+
* @param {string} transactionId - Transaction ID.
|
|
181
|
+
* @param {object[]} operations - Array of staged operations.
|
|
182
|
+
* @throws {AppwriteException}
|
|
183
|
+
* @returns {Promise<Models.Transaction>}
|
|
184
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
185
|
+
*/
|
|
186
|
+
createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
|
|
187
|
+
/**
|
|
188
|
+
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
189
|
+
*
|
|
190
|
+
* @param {UsageRange} params.range - Date range.
|
|
34
191
|
* @throws {AppwriteException}
|
|
35
192
|
* @returns {Promise<Models.UsageDatabases>}
|
|
193
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listUsage` instead.
|
|
36
194
|
*/
|
|
37
|
-
|
|
195
|
+
listUsage(params?: {
|
|
196
|
+
range?: UsageRange;
|
|
197
|
+
}): Promise<Models.UsageDatabases>;
|
|
198
|
+
/**
|
|
199
|
+
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
200
|
+
*
|
|
201
|
+
* @param {UsageRange} range - Date range.
|
|
202
|
+
* @throws {AppwriteException}
|
|
203
|
+
* @returns {Promise<Models.UsageDatabases>}
|
|
204
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
205
|
+
*/
|
|
206
|
+
listUsage(range?: UsageRange): Promise<Models.UsageDatabases>;
|
|
38
207
|
/**
|
|
39
208
|
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
40
209
|
*
|
|
41
|
-
* @param {string} databaseId
|
|
210
|
+
* @param {string} params.databaseId - Database ID.
|
|
42
211
|
* @throws {AppwriteException}
|
|
43
212
|
* @returns {Promise<Models.Database>}
|
|
213
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.get` instead.
|
|
214
|
+
*/
|
|
215
|
+
get(params: {
|
|
216
|
+
databaseId: string;
|
|
217
|
+
}): Promise<Models.Database>;
|
|
218
|
+
/**
|
|
219
|
+
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
220
|
+
*
|
|
221
|
+
* @param {string} databaseId - Database ID.
|
|
222
|
+
* @throws {AppwriteException}
|
|
223
|
+
* @returns {Promise<Models.Database>}
|
|
224
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
44
225
|
*/
|
|
45
226
|
get(databaseId: string): Promise<Models.Database>;
|
|
46
227
|
/**
|
|
47
228
|
* Update a database by its unique ID.
|
|
48
229
|
*
|
|
49
|
-
* @param {string} databaseId
|
|
50
|
-
* @param {string} name
|
|
51
|
-
* @param {boolean} enabled
|
|
230
|
+
* @param {string} params.databaseId - Database ID.
|
|
231
|
+
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
232
|
+
* @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
233
|
+
* @throws {AppwriteException}
|
|
234
|
+
* @returns {Promise<Models.Database>}
|
|
235
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.update` instead.
|
|
236
|
+
*/
|
|
237
|
+
update(params: {
|
|
238
|
+
databaseId: string;
|
|
239
|
+
name: string;
|
|
240
|
+
enabled?: boolean;
|
|
241
|
+
}): Promise<Models.Database>;
|
|
242
|
+
/**
|
|
243
|
+
* Update a database by its unique ID.
|
|
244
|
+
*
|
|
245
|
+
* @param {string} databaseId - Database ID.
|
|
246
|
+
* @param {string} name - Database name. Max length: 128 chars.
|
|
247
|
+
* @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
52
248
|
* @throws {AppwriteException}
|
|
53
249
|
* @returns {Promise<Models.Database>}
|
|
250
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
54
251
|
*/
|
|
55
252
|
update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
56
253
|
/**
|
|
57
254
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
58
255
|
*
|
|
59
|
-
* @param {string} databaseId
|
|
256
|
+
* @param {string} params.databaseId - Database ID.
|
|
257
|
+
* @throws {AppwriteException}
|
|
258
|
+
* @returns {Promise<{}>}
|
|
259
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.delete` instead.
|
|
260
|
+
*/
|
|
261
|
+
delete(params: {
|
|
262
|
+
databaseId: string;
|
|
263
|
+
}): Promise<{}>;
|
|
264
|
+
/**
|
|
265
|
+
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
266
|
+
*
|
|
267
|
+
* @param {string} databaseId - Database ID.
|
|
60
268
|
* @throws {AppwriteException}
|
|
61
269
|
* @returns {Promise<{}>}
|
|
270
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
62
271
|
*/
|
|
63
272
|
delete(databaseId: string): Promise<{}>;
|
|
64
273
|
/**
|
|
65
274
|
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
66
275
|
*
|
|
67
|
-
* @param {string} databaseId
|
|
68
|
-
* @param {string[]} queries
|
|
69
|
-
* @param {string} search
|
|
276
|
+
* @param {string} params.databaseId - Database ID.
|
|
277
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity
|
|
278
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
279
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
70
280
|
* @throws {AppwriteException}
|
|
71
281
|
* @returns {Promise<Models.CollectionList>}
|
|
282
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
|
|
72
283
|
*/
|
|
73
|
-
listCollections(
|
|
284
|
+
listCollections(params: {
|
|
285
|
+
databaseId: string;
|
|
286
|
+
queries?: string[];
|
|
287
|
+
search?: string;
|
|
288
|
+
total?: boolean;
|
|
289
|
+
}): Promise<Models.CollectionList>;
|
|
290
|
+
/**
|
|
291
|
+
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
292
|
+
*
|
|
293
|
+
* @param {string} databaseId - Database ID.
|
|
294
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity
|
|
295
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
296
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
297
|
+
* @throws {AppwriteException}
|
|
298
|
+
* @returns {Promise<Models.CollectionList>}
|
|
299
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
300
|
+
*/
|
|
301
|
+
listCollections(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.CollectionList>;
|
|
302
|
+
/**
|
|
303
|
+
* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
304
|
+
*
|
|
305
|
+
* @param {string} params.databaseId - Database ID.
|
|
306
|
+
* @param {string} params.collectionId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
307
|
+
* @param {string} params.name - Collection name. Max length: 128 chars.
|
|
308
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
309
|
+
* @param {boolean} params.documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
310
|
+
* @param {boolean} params.enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
311
|
+
* @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
|
|
312
|
+
* @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
|
|
313
|
+
* @throws {AppwriteException}
|
|
314
|
+
* @returns {Promise<Models.Collection>}
|
|
315
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTable` instead.
|
|
316
|
+
*/
|
|
317
|
+
createCollection(params: {
|
|
318
|
+
databaseId: string;
|
|
319
|
+
collectionId: string;
|
|
320
|
+
name: string;
|
|
321
|
+
permissions?: string[];
|
|
322
|
+
documentSecurity?: boolean;
|
|
323
|
+
enabled?: boolean;
|
|
324
|
+
attributes?: object[];
|
|
325
|
+
indexes?: object[];
|
|
326
|
+
}): Promise<Models.Collection>;
|
|
74
327
|
/**
|
|
75
328
|
* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
76
329
|
*
|
|
77
|
-
* @param {string} databaseId
|
|
78
|
-
* @param {string} collectionId
|
|
79
|
-
* @param {string} name
|
|
80
|
-
* @param {string[]} permissions
|
|
81
|
-
* @param {boolean} documentSecurity
|
|
82
|
-
* @param {boolean} enabled
|
|
330
|
+
* @param {string} databaseId - Database ID.
|
|
331
|
+
* @param {string} collectionId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
332
|
+
* @param {string} name - Collection name. Max length: 128 chars.
|
|
333
|
+
* @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
334
|
+
* @param {boolean} documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
335
|
+
* @param {boolean} enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
336
|
+
* @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
|
|
337
|
+
* @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
|
|
338
|
+
* @throws {AppwriteException}
|
|
339
|
+
* @returns {Promise<Models.Collection>}
|
|
340
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
341
|
+
*/
|
|
342
|
+
createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean, attributes?: object[], indexes?: object[]): Promise<Models.Collection>;
|
|
343
|
+
/**
|
|
344
|
+
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
345
|
+
*
|
|
346
|
+
* @param {string} params.databaseId - Database ID.
|
|
347
|
+
* @param {string} params.collectionId - Collection ID.
|
|
83
348
|
* @throws {AppwriteException}
|
|
84
349
|
* @returns {Promise<Models.Collection>}
|
|
350
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTable` instead.
|
|
85
351
|
*/
|
|
86
|
-
|
|
352
|
+
getCollection(params: {
|
|
353
|
+
databaseId: string;
|
|
354
|
+
collectionId: string;
|
|
355
|
+
}): Promise<Models.Collection>;
|
|
87
356
|
/**
|
|
88
357
|
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
89
358
|
*
|
|
90
|
-
* @param {string} databaseId
|
|
91
|
-
* @param {string} collectionId
|
|
359
|
+
* @param {string} databaseId - Database ID.
|
|
360
|
+
* @param {string} collectionId - Collection ID.
|
|
92
361
|
* @throws {AppwriteException}
|
|
93
362
|
* @returns {Promise<Models.Collection>}
|
|
363
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
94
364
|
*/
|
|
95
365
|
getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
|
|
96
366
|
/**
|
|
97
367
|
* Update a collection by its unique ID.
|
|
98
368
|
*
|
|
99
|
-
* @param {string} databaseId
|
|
100
|
-
* @param {string} collectionId
|
|
101
|
-
* @param {string} name
|
|
102
|
-
* @param {string[]} permissions
|
|
103
|
-
* @param {boolean} documentSecurity
|
|
104
|
-
* @param {boolean} enabled
|
|
369
|
+
* @param {string} params.databaseId - Database ID.
|
|
370
|
+
* @param {string} params.collectionId - Collection ID.
|
|
371
|
+
* @param {string} params.name - Collection name. Max length: 128 chars.
|
|
372
|
+
* @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
373
|
+
* @param {boolean} params.documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
374
|
+
* @param {boolean} params.enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
375
|
+
* @throws {AppwriteException}
|
|
376
|
+
* @returns {Promise<Models.Collection>}
|
|
377
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTable` instead.
|
|
378
|
+
*/
|
|
379
|
+
updateCollection(params: {
|
|
380
|
+
databaseId: string;
|
|
381
|
+
collectionId: string;
|
|
382
|
+
name: string;
|
|
383
|
+
permissions?: string[];
|
|
384
|
+
documentSecurity?: boolean;
|
|
385
|
+
enabled?: boolean;
|
|
386
|
+
}): Promise<Models.Collection>;
|
|
387
|
+
/**
|
|
388
|
+
* Update a collection by its unique ID.
|
|
389
|
+
*
|
|
390
|
+
* @param {string} databaseId - Database ID.
|
|
391
|
+
* @param {string} collectionId - Collection ID.
|
|
392
|
+
* @param {string} name - Collection name. Max length: 128 chars.
|
|
393
|
+
* @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
394
|
+
* @param {boolean} documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
395
|
+
* @param {boolean} enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
105
396
|
* @throws {AppwriteException}
|
|
106
397
|
* @returns {Promise<Models.Collection>}
|
|
398
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
107
399
|
*/
|
|
108
400
|
updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
109
401
|
/**
|
|
110
402
|
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
111
403
|
*
|
|
112
|
-
* @param {string} databaseId
|
|
113
|
-
* @param {string} collectionId
|
|
404
|
+
* @param {string} params.databaseId - Database ID.
|
|
405
|
+
* @param {string} params.collectionId - Collection ID.
|
|
406
|
+
* @throws {AppwriteException}
|
|
407
|
+
* @returns {Promise<{}>}
|
|
408
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteTable` instead.
|
|
409
|
+
*/
|
|
410
|
+
deleteCollection(params: {
|
|
411
|
+
databaseId: string;
|
|
412
|
+
collectionId: string;
|
|
413
|
+
}): Promise<{}>;
|
|
414
|
+
/**
|
|
415
|
+
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
416
|
+
*
|
|
417
|
+
* @param {string} databaseId - Database ID.
|
|
418
|
+
* @param {string} collectionId - Collection ID.
|
|
114
419
|
* @throws {AppwriteException}
|
|
115
420
|
* @returns {Promise<{}>}
|
|
421
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
116
422
|
*/
|
|
117
423
|
deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
|
|
118
424
|
/**
|
|
119
425
|
* List attributes in the collection.
|
|
120
426
|
*
|
|
121
|
-
* @param {string} databaseId
|
|
122
|
-
* @param {string} collectionId
|
|
123
|
-
* @param {string[]} queries
|
|
427
|
+
* @param {string} params.databaseId - Database ID.
|
|
428
|
+
* @param {string} params.collectionId - Collection ID.
|
|
429
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error
|
|
430
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
431
|
+
* @throws {AppwriteException}
|
|
432
|
+
* @returns {Promise<Models.AttributeList>}
|
|
433
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
|
|
434
|
+
*/
|
|
435
|
+
listAttributes(params: {
|
|
436
|
+
databaseId: string;
|
|
437
|
+
collectionId: string;
|
|
438
|
+
queries?: string[];
|
|
439
|
+
total?: boolean;
|
|
440
|
+
}): Promise<Models.AttributeList>;
|
|
441
|
+
/**
|
|
442
|
+
* List attributes in the collection.
|
|
443
|
+
*
|
|
444
|
+
* @param {string} databaseId - Database ID.
|
|
445
|
+
* @param {string} collectionId - Collection ID.
|
|
446
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error
|
|
447
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
124
448
|
* @throws {AppwriteException}
|
|
125
449
|
* @returns {Promise<Models.AttributeList>}
|
|
450
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
126
451
|
*/
|
|
127
|
-
listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
|
|
452
|
+
listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
|
|
128
453
|
/**
|
|
129
454
|
* Create a boolean attribute.
|
|
130
|
-
|
|
131
455
|
*
|
|
132
|
-
*
|
|
133
|
-
* @param {string}
|
|
134
|
-
* @param {string}
|
|
135
|
-
* @param {
|
|
136
|
-
* @param {boolean}
|
|
137
|
-
* @param {boolean}
|
|
456
|
+
*
|
|
457
|
+
* @param {string} params.databaseId - Database ID.
|
|
458
|
+
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
459
|
+
* @param {string} params.key - Attribute Key.
|
|
460
|
+
* @param {boolean} params.required - Is attribute required?
|
|
461
|
+
* @param {boolean} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
462
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
138
463
|
* @throws {AppwriteException}
|
|
139
464
|
* @returns {Promise<Models.AttributeBoolean>}
|
|
465
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead.
|
|
466
|
+
*/
|
|
467
|
+
createBooleanAttribute(params: {
|
|
468
|
+
databaseId: string;
|
|
469
|
+
collectionId: string;
|
|
470
|
+
key: string;
|
|
471
|
+
required: boolean;
|
|
472
|
+
xdefault?: boolean;
|
|
473
|
+
array?: boolean;
|
|
474
|
+
}): Promise<Models.AttributeBoolean>;
|
|
475
|
+
/**
|
|
476
|
+
* Create a boolean attribute.
|
|
477
|
+
*
|
|
478
|
+
*
|
|
479
|
+
* @param {string} databaseId - Database ID.
|
|
480
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
481
|
+
* @param {string} key - Attribute Key.
|
|
482
|
+
* @param {boolean} required - Is attribute required?
|
|
483
|
+
* @param {boolean} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
484
|
+
* @param {boolean} array - Is attribute an array?
|
|
485
|
+
* @throws {AppwriteException}
|
|
486
|
+
* @returns {Promise<Models.AttributeBoolean>}
|
|
487
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
140
488
|
*/
|
|
141
489
|
createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
|
|
142
490
|
/**
|
|
143
491
|
* Update a boolean attribute. Changing the `default` value will not update already existing documents.
|
|
144
492
|
*
|
|
145
|
-
* @param {string} databaseId
|
|
146
|
-
* @param {string} collectionId
|
|
147
|
-
* @param {string} key
|
|
148
|
-
* @param {boolean} required
|
|
149
|
-
* @param {boolean} xdefault
|
|
150
|
-
* @param {string} newKey
|
|
493
|
+
* @param {string} params.databaseId - Database ID.
|
|
494
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
495
|
+
* @param {string} params.key - Attribute Key.
|
|
496
|
+
* @param {boolean} params.required - Is attribute required?
|
|
497
|
+
* @param {boolean} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
498
|
+
* @param {string} params.newKey - New attribute key.
|
|
499
|
+
* @throws {AppwriteException}
|
|
500
|
+
* @returns {Promise<Models.AttributeBoolean>}
|
|
501
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBooleanColumn` instead.
|
|
502
|
+
*/
|
|
503
|
+
updateBooleanAttribute(params: {
|
|
504
|
+
databaseId: string;
|
|
505
|
+
collectionId: string;
|
|
506
|
+
key: string;
|
|
507
|
+
required: boolean;
|
|
508
|
+
xdefault?: boolean;
|
|
509
|
+
newKey?: string;
|
|
510
|
+
}): Promise<Models.AttributeBoolean>;
|
|
511
|
+
/**
|
|
512
|
+
* Update a boolean attribute. Changing the `default` value will not update already existing documents.
|
|
513
|
+
*
|
|
514
|
+
* @param {string} databaseId - Database ID.
|
|
515
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
516
|
+
* @param {string} key - Attribute Key.
|
|
517
|
+
* @param {boolean} required - Is attribute required?
|
|
518
|
+
* @param {boolean} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
519
|
+
* @param {string} newKey - New attribute key.
|
|
151
520
|
* @throws {AppwriteException}
|
|
152
521
|
* @returns {Promise<Models.AttributeBoolean>}
|
|
522
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
153
523
|
*/
|
|
154
524
|
updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean>;
|
|
155
525
|
/**
|
|
156
526
|
* Create a date time attribute according to the ISO 8601 standard.
|
|
157
527
|
*
|
|
158
|
-
* @param {string} databaseId
|
|
159
|
-
* @param {string} collectionId
|
|
160
|
-
* @param {string} key
|
|
161
|
-
* @param {boolean} required
|
|
162
|
-
* @param {string} xdefault
|
|
163
|
-
* @param {boolean} array
|
|
528
|
+
* @param {string} params.databaseId - Database ID.
|
|
529
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
530
|
+
* @param {string} params.key - Attribute Key.
|
|
531
|
+
* @param {boolean} params.required - Is attribute required?
|
|
532
|
+
* @param {string} params.xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.
|
|
533
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
164
534
|
* @throws {AppwriteException}
|
|
165
535
|
* @returns {Promise<Models.AttributeDatetime>}
|
|
536
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatetimeColumn` instead.
|
|
537
|
+
*/
|
|
538
|
+
createDatetimeAttribute(params: {
|
|
539
|
+
databaseId: string;
|
|
540
|
+
collectionId: string;
|
|
541
|
+
key: string;
|
|
542
|
+
required: boolean;
|
|
543
|
+
xdefault?: string;
|
|
544
|
+
array?: boolean;
|
|
545
|
+
}): Promise<Models.AttributeDatetime>;
|
|
546
|
+
/**
|
|
547
|
+
* Create a date time attribute according to the ISO 8601 standard.
|
|
548
|
+
*
|
|
549
|
+
* @param {string} databaseId - Database ID.
|
|
550
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
551
|
+
* @param {string} key - Attribute Key.
|
|
552
|
+
* @param {boolean} required - Is attribute required?
|
|
553
|
+
* @param {string} xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.
|
|
554
|
+
* @param {boolean} array - Is attribute an array?
|
|
555
|
+
* @throws {AppwriteException}
|
|
556
|
+
* @returns {Promise<Models.AttributeDatetime>}
|
|
557
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
166
558
|
*/
|
|
167
559
|
createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
|
|
168
560
|
/**
|
|
169
561
|
* Update a date time attribute. Changing the `default` value will not update already existing documents.
|
|
170
562
|
*
|
|
171
|
-
* @param {string} databaseId
|
|
172
|
-
* @param {string} collectionId
|
|
173
|
-
* @param {string} key
|
|
174
|
-
* @param {boolean} required
|
|
175
|
-
* @param {string} xdefault
|
|
176
|
-
* @param {string} newKey
|
|
563
|
+
* @param {string} params.databaseId - Database ID.
|
|
564
|
+
* @param {string} params.collectionId - Collection ID.
|
|
565
|
+
* @param {string} params.key - Attribute Key.
|
|
566
|
+
* @param {boolean} params.required - Is attribute required?
|
|
567
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
568
|
+
* @param {string} params.newKey - New attribute key.
|
|
569
|
+
* @throws {AppwriteException}
|
|
570
|
+
* @returns {Promise<Models.AttributeDatetime>}
|
|
571
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateDatetimeColumn` instead.
|
|
572
|
+
*/
|
|
573
|
+
updateDatetimeAttribute(params: {
|
|
574
|
+
databaseId: string;
|
|
575
|
+
collectionId: string;
|
|
576
|
+
key: string;
|
|
577
|
+
required: boolean;
|
|
578
|
+
xdefault?: string;
|
|
579
|
+
newKey?: string;
|
|
580
|
+
}): Promise<Models.AttributeDatetime>;
|
|
581
|
+
/**
|
|
582
|
+
* Update a date time attribute. Changing the `default` value will not update already existing documents.
|
|
583
|
+
*
|
|
584
|
+
* @param {string} databaseId - Database ID.
|
|
585
|
+
* @param {string} collectionId - Collection ID.
|
|
586
|
+
* @param {string} key - Attribute Key.
|
|
587
|
+
* @param {boolean} required - Is attribute required?
|
|
588
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
589
|
+
* @param {string} newKey - New attribute key.
|
|
177
590
|
* @throws {AppwriteException}
|
|
178
591
|
* @returns {Promise<Models.AttributeDatetime>}
|
|
592
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
179
593
|
*/
|
|
180
594
|
updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime>;
|
|
181
595
|
/**
|
|
182
596
|
* Create an email attribute.
|
|
183
|
-
|
|
184
597
|
*
|
|
185
|
-
*
|
|
186
|
-
* @param {string}
|
|
187
|
-
* @param {string}
|
|
188
|
-
* @param {
|
|
189
|
-
* @param {
|
|
190
|
-
* @param {
|
|
598
|
+
*
|
|
599
|
+
* @param {string} params.databaseId - Database ID.
|
|
600
|
+
* @param {string} params.collectionId - Collection ID.
|
|
601
|
+
* @param {string} params.key - Attribute Key.
|
|
602
|
+
* @param {boolean} params.required - Is attribute required?
|
|
603
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
604
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
191
605
|
* @throws {AppwriteException}
|
|
192
606
|
* @returns {Promise<Models.AttributeEmail>}
|
|
607
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead.
|
|
608
|
+
*/
|
|
609
|
+
createEmailAttribute(params: {
|
|
610
|
+
databaseId: string;
|
|
611
|
+
collectionId: string;
|
|
612
|
+
key: string;
|
|
613
|
+
required: boolean;
|
|
614
|
+
xdefault?: string;
|
|
615
|
+
array?: boolean;
|
|
616
|
+
}): Promise<Models.AttributeEmail>;
|
|
617
|
+
/**
|
|
618
|
+
* Create an email attribute.
|
|
619
|
+
*
|
|
620
|
+
*
|
|
621
|
+
* @param {string} databaseId - Database ID.
|
|
622
|
+
* @param {string} collectionId - Collection ID.
|
|
623
|
+
* @param {string} key - Attribute Key.
|
|
624
|
+
* @param {boolean} required - Is attribute required?
|
|
625
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
626
|
+
* @param {boolean} array - Is attribute an array?
|
|
627
|
+
* @throws {AppwriteException}
|
|
628
|
+
* @returns {Promise<Models.AttributeEmail>}
|
|
629
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
193
630
|
*/
|
|
194
631
|
createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
|
|
195
632
|
/**
|
|
196
633
|
* Update an email attribute. Changing the `default` value will not update already existing documents.
|
|
197
|
-
|
|
198
634
|
*
|
|
199
|
-
*
|
|
200
|
-
* @param {string}
|
|
201
|
-
* @param {string}
|
|
202
|
-
* @param {
|
|
203
|
-
* @param {
|
|
204
|
-
* @param {string}
|
|
635
|
+
*
|
|
636
|
+
* @param {string} params.databaseId - Database ID.
|
|
637
|
+
* @param {string} params.collectionId - Collection ID.
|
|
638
|
+
* @param {string} params.key - Attribute Key.
|
|
639
|
+
* @param {boolean} params.required - Is attribute required?
|
|
640
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
641
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
205
642
|
* @throws {AppwriteException}
|
|
206
643
|
* @returns {Promise<Models.AttributeEmail>}
|
|
644
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEmailColumn` instead.
|
|
645
|
+
*/
|
|
646
|
+
updateEmailAttribute(params: {
|
|
647
|
+
databaseId: string;
|
|
648
|
+
collectionId: string;
|
|
649
|
+
key: string;
|
|
650
|
+
required: boolean;
|
|
651
|
+
xdefault?: string;
|
|
652
|
+
newKey?: string;
|
|
653
|
+
}): Promise<Models.AttributeEmail>;
|
|
654
|
+
/**
|
|
655
|
+
* Update an email attribute. Changing the `default` value will not update already existing documents.
|
|
656
|
+
*
|
|
657
|
+
*
|
|
658
|
+
* @param {string} databaseId - Database ID.
|
|
659
|
+
* @param {string} collectionId - Collection ID.
|
|
660
|
+
* @param {string} key - Attribute Key.
|
|
661
|
+
* @param {boolean} required - Is attribute required?
|
|
662
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
663
|
+
* @param {string} newKey - New Attribute Key.
|
|
664
|
+
* @throws {AppwriteException}
|
|
665
|
+
* @returns {Promise<Models.AttributeEmail>}
|
|
666
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
207
667
|
*/
|
|
208
668
|
updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail>;
|
|
209
669
|
/**
|
|
210
|
-
* Create an
|
|
211
|
-
|
|
670
|
+
* Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute.
|
|
671
|
+
*
|
|
672
|
+
*
|
|
673
|
+
* @param {string} params.databaseId - Database ID.
|
|
674
|
+
* @param {string} params.collectionId - Collection ID.
|
|
675
|
+
* @param {string} params.key - Attribute Key.
|
|
676
|
+
* @param {string[]} params.elements - Array of enum values.
|
|
677
|
+
* @param {boolean} params.required - Is attribute required?
|
|
678
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
679
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
680
|
+
* @throws {AppwriteException}
|
|
681
|
+
* @returns {Promise<Models.AttributeEnum>}
|
|
682
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead.
|
|
683
|
+
*/
|
|
684
|
+
createEnumAttribute(params: {
|
|
685
|
+
databaseId: string;
|
|
686
|
+
collectionId: string;
|
|
687
|
+
key: string;
|
|
688
|
+
elements: string[];
|
|
689
|
+
required: boolean;
|
|
690
|
+
xdefault?: string;
|
|
691
|
+
array?: boolean;
|
|
692
|
+
}): Promise<Models.AttributeEnum>;
|
|
693
|
+
/**
|
|
694
|
+
* Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute.
|
|
695
|
+
*
|
|
212
696
|
*
|
|
213
|
-
* @param {string} databaseId
|
|
214
|
-
* @param {string} collectionId
|
|
215
|
-
* @param {string} key
|
|
216
|
-
* @param {string[]} elements
|
|
217
|
-
* @param {boolean} required
|
|
218
|
-
* @param {string} xdefault
|
|
219
|
-
* @param {boolean} array
|
|
697
|
+
* @param {string} databaseId - Database ID.
|
|
698
|
+
* @param {string} collectionId - Collection ID.
|
|
699
|
+
* @param {string} key - Attribute Key.
|
|
700
|
+
* @param {string[]} elements - Array of enum values.
|
|
701
|
+
* @param {boolean} required - Is attribute required?
|
|
702
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
703
|
+
* @param {boolean} array - Is attribute an array?
|
|
220
704
|
* @throws {AppwriteException}
|
|
221
705
|
* @returns {Promise<Models.AttributeEnum>}
|
|
706
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
222
707
|
*/
|
|
223
708
|
createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
|
|
224
709
|
/**
|
|
225
710
|
* Update an enum attribute. Changing the `default` value will not update already existing documents.
|
|
226
|
-
|
|
227
711
|
*
|
|
228
|
-
*
|
|
229
|
-
* @param {string}
|
|
230
|
-
* @param {string}
|
|
231
|
-
* @param {string
|
|
232
|
-
* @param {
|
|
233
|
-
* @param {
|
|
234
|
-
* @param {string}
|
|
712
|
+
*
|
|
713
|
+
* @param {string} params.databaseId - Database ID.
|
|
714
|
+
* @param {string} params.collectionId - Collection ID.
|
|
715
|
+
* @param {string} params.key - Attribute Key.
|
|
716
|
+
* @param {string[]} params.elements - Updated list of enum values.
|
|
717
|
+
* @param {boolean} params.required - Is attribute required?
|
|
718
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
719
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
235
720
|
* @throws {AppwriteException}
|
|
236
721
|
* @returns {Promise<Models.AttributeEnum>}
|
|
722
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEnumColumn` instead.
|
|
723
|
+
*/
|
|
724
|
+
updateEnumAttribute(params: {
|
|
725
|
+
databaseId: string;
|
|
726
|
+
collectionId: string;
|
|
727
|
+
key: string;
|
|
728
|
+
elements: string[];
|
|
729
|
+
required: boolean;
|
|
730
|
+
xdefault?: string;
|
|
731
|
+
newKey?: string;
|
|
732
|
+
}): Promise<Models.AttributeEnum>;
|
|
733
|
+
/**
|
|
734
|
+
* Update an enum attribute. Changing the `default` value will not update already existing documents.
|
|
735
|
+
*
|
|
736
|
+
*
|
|
737
|
+
* @param {string} databaseId - Database ID.
|
|
738
|
+
* @param {string} collectionId - Collection ID.
|
|
739
|
+
* @param {string} key - Attribute Key.
|
|
740
|
+
* @param {string[]} elements - Updated list of enum values.
|
|
741
|
+
* @param {boolean} required - Is attribute required?
|
|
742
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
743
|
+
* @param {string} newKey - New Attribute Key.
|
|
744
|
+
* @throws {AppwriteException}
|
|
745
|
+
* @returns {Promise<Models.AttributeEnum>}
|
|
746
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
237
747
|
*/
|
|
238
748
|
updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum>;
|
|
239
749
|
/**
|
|
240
750
|
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
241
|
-
|
|
242
751
|
*
|
|
243
|
-
*
|
|
244
|
-
* @param {string}
|
|
245
|
-
* @param {string}
|
|
246
|
-
* @param {
|
|
247
|
-
* @param {
|
|
248
|
-
* @param {number}
|
|
249
|
-
* @param {number}
|
|
250
|
-
* @param {
|
|
752
|
+
*
|
|
753
|
+
* @param {string} params.databaseId - Database ID.
|
|
754
|
+
* @param {string} params.collectionId - Collection ID.
|
|
755
|
+
* @param {string} params.key - Attribute Key.
|
|
756
|
+
* @param {boolean} params.required - Is attribute required?
|
|
757
|
+
* @param {number} params.min - Minimum value.
|
|
758
|
+
* @param {number} params.max - Maximum value.
|
|
759
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
760
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
761
|
+
* @throws {AppwriteException}
|
|
762
|
+
* @returns {Promise<Models.AttributeFloat>}
|
|
763
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead.
|
|
764
|
+
*/
|
|
765
|
+
createFloatAttribute(params: {
|
|
766
|
+
databaseId: string;
|
|
767
|
+
collectionId: string;
|
|
768
|
+
key: string;
|
|
769
|
+
required: boolean;
|
|
770
|
+
min?: number;
|
|
771
|
+
max?: number;
|
|
772
|
+
xdefault?: number;
|
|
773
|
+
array?: boolean;
|
|
774
|
+
}): Promise<Models.AttributeFloat>;
|
|
775
|
+
/**
|
|
776
|
+
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
777
|
+
*
|
|
778
|
+
*
|
|
779
|
+
* @param {string} databaseId - Database ID.
|
|
780
|
+
* @param {string} collectionId - Collection ID.
|
|
781
|
+
* @param {string} key - Attribute Key.
|
|
782
|
+
* @param {boolean} required - Is attribute required?
|
|
783
|
+
* @param {number} min - Minimum value.
|
|
784
|
+
* @param {number} max - Maximum value.
|
|
785
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
786
|
+
* @param {boolean} array - Is attribute an array?
|
|
251
787
|
* @throws {AppwriteException}
|
|
252
788
|
* @returns {Promise<Models.AttributeFloat>}
|
|
789
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
253
790
|
*/
|
|
254
791
|
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
|
|
255
792
|
/**
|
|
256
793
|
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
257
|
-
|
|
258
794
|
*
|
|
259
|
-
*
|
|
260
|
-
* @param {string}
|
|
261
|
-
* @param {string}
|
|
262
|
-
* @param {
|
|
263
|
-
* @param {
|
|
264
|
-
* @param {number}
|
|
265
|
-
* @param {number}
|
|
266
|
-
* @param {
|
|
795
|
+
*
|
|
796
|
+
* @param {string} params.databaseId - Database ID.
|
|
797
|
+
* @param {string} params.collectionId - Collection ID.
|
|
798
|
+
* @param {string} params.key - Attribute Key.
|
|
799
|
+
* @param {boolean} params.required - Is attribute required?
|
|
800
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
801
|
+
* @param {number} params.min - Minimum value.
|
|
802
|
+
* @param {number} params.max - Maximum value.
|
|
803
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
804
|
+
* @throws {AppwriteException}
|
|
805
|
+
* @returns {Promise<Models.AttributeFloat>}
|
|
806
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead.
|
|
807
|
+
*/
|
|
808
|
+
updateFloatAttribute(params: {
|
|
809
|
+
databaseId: string;
|
|
810
|
+
collectionId: string;
|
|
811
|
+
key: string;
|
|
812
|
+
required: boolean;
|
|
813
|
+
xdefault?: number;
|
|
814
|
+
min?: number;
|
|
815
|
+
max?: number;
|
|
816
|
+
newKey?: string;
|
|
817
|
+
}): Promise<Models.AttributeFloat>;
|
|
818
|
+
/**
|
|
819
|
+
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
820
|
+
*
|
|
821
|
+
*
|
|
822
|
+
* @param {string} databaseId - Database ID.
|
|
823
|
+
* @param {string} collectionId - Collection ID.
|
|
824
|
+
* @param {string} key - Attribute Key.
|
|
825
|
+
* @param {boolean} required - Is attribute required?
|
|
826
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
827
|
+
* @param {number} min - Minimum value.
|
|
828
|
+
* @param {number} max - Maximum value.
|
|
829
|
+
* @param {string} newKey - New Attribute Key.
|
|
267
830
|
* @throws {AppwriteException}
|
|
268
831
|
* @returns {Promise<Models.AttributeFloat>}
|
|
832
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
269
833
|
*/
|
|
270
834
|
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat>;
|
|
271
835
|
/**
|
|
272
836
|
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
273
|
-
|
|
274
837
|
*
|
|
275
|
-
*
|
|
276
|
-
* @param {string}
|
|
277
|
-
* @param {string}
|
|
278
|
-
* @param {
|
|
279
|
-
* @param {
|
|
280
|
-
* @param {number}
|
|
281
|
-
* @param {number}
|
|
282
|
-
* @param {
|
|
838
|
+
*
|
|
839
|
+
* @param {string} params.databaseId - Database ID.
|
|
840
|
+
* @param {string} params.collectionId - Collection ID.
|
|
841
|
+
* @param {string} params.key - Attribute Key.
|
|
842
|
+
* @param {boolean} params.required - Is attribute required?
|
|
843
|
+
* @param {number} params.min - Minimum value
|
|
844
|
+
* @param {number} params.max - Maximum value
|
|
845
|
+
* @param {number} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
846
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
283
847
|
* @throws {AppwriteException}
|
|
284
848
|
* @returns {Promise<Models.AttributeInteger>}
|
|
849
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead.
|
|
850
|
+
*/
|
|
851
|
+
createIntegerAttribute(params: {
|
|
852
|
+
databaseId: string;
|
|
853
|
+
collectionId: string;
|
|
854
|
+
key: string;
|
|
855
|
+
required: boolean;
|
|
856
|
+
min?: number;
|
|
857
|
+
max?: number;
|
|
858
|
+
xdefault?: number;
|
|
859
|
+
array?: boolean;
|
|
860
|
+
}): Promise<Models.AttributeInteger>;
|
|
861
|
+
/**
|
|
862
|
+
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
863
|
+
*
|
|
864
|
+
*
|
|
865
|
+
* @param {string} databaseId - Database ID.
|
|
866
|
+
* @param {string} collectionId - Collection ID.
|
|
867
|
+
* @param {string} key - Attribute Key.
|
|
868
|
+
* @param {boolean} required - Is attribute required?
|
|
869
|
+
* @param {number} min - Minimum value
|
|
870
|
+
* @param {number} max - Maximum value
|
|
871
|
+
* @param {number} xdefault - Default value. Cannot be set when attribute is required.
|
|
872
|
+
* @param {boolean} array - Is attribute an array?
|
|
873
|
+
* @throws {AppwriteException}
|
|
874
|
+
* @returns {Promise<Models.AttributeInteger>}
|
|
875
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
285
876
|
*/
|
|
286
877
|
createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
|
|
287
878
|
/**
|
|
288
879
|
* Update an integer attribute. Changing the `default` value will not update already existing documents.
|
|
289
|
-
|
|
290
880
|
*
|
|
291
|
-
*
|
|
292
|
-
* @param {string}
|
|
293
|
-
* @param {string}
|
|
294
|
-
* @param {
|
|
295
|
-
* @param {
|
|
296
|
-
* @param {number}
|
|
297
|
-
* @param {number}
|
|
298
|
-
* @param {
|
|
881
|
+
*
|
|
882
|
+
* @param {string} params.databaseId - Database ID.
|
|
883
|
+
* @param {string} params.collectionId - Collection ID.
|
|
884
|
+
* @param {string} params.key - Attribute Key.
|
|
885
|
+
* @param {boolean} params.required - Is attribute required?
|
|
886
|
+
* @param {number} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
887
|
+
* @param {number} params.min - Minimum value
|
|
888
|
+
* @param {number} params.max - Maximum value
|
|
889
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
890
|
+
* @throws {AppwriteException}
|
|
891
|
+
* @returns {Promise<Models.AttributeInteger>}
|
|
892
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead.
|
|
893
|
+
*/
|
|
894
|
+
updateIntegerAttribute(params: {
|
|
895
|
+
databaseId: string;
|
|
896
|
+
collectionId: string;
|
|
897
|
+
key: string;
|
|
898
|
+
required: boolean;
|
|
899
|
+
xdefault?: number;
|
|
900
|
+
min?: number;
|
|
901
|
+
max?: number;
|
|
902
|
+
newKey?: string;
|
|
903
|
+
}): Promise<Models.AttributeInteger>;
|
|
904
|
+
/**
|
|
905
|
+
* Update an integer attribute. Changing the `default` value will not update already existing documents.
|
|
906
|
+
*
|
|
907
|
+
*
|
|
908
|
+
* @param {string} databaseId - Database ID.
|
|
909
|
+
* @param {string} collectionId - Collection ID.
|
|
910
|
+
* @param {string} key - Attribute Key.
|
|
911
|
+
* @param {boolean} required - Is attribute required?
|
|
912
|
+
* @param {number} xdefault - Default value. Cannot be set when attribute is required.
|
|
913
|
+
* @param {number} min - Minimum value
|
|
914
|
+
* @param {number} max - Maximum value
|
|
915
|
+
* @param {string} newKey - New Attribute Key.
|
|
299
916
|
* @throws {AppwriteException}
|
|
300
917
|
* @returns {Promise<Models.AttributeInteger>}
|
|
918
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
301
919
|
*/
|
|
302
920
|
updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger>;
|
|
303
921
|
/**
|
|
304
922
|
* Create IP address attribute.
|
|
305
|
-
|
|
306
923
|
*
|
|
307
|
-
*
|
|
308
|
-
* @param {string}
|
|
309
|
-
* @param {string}
|
|
310
|
-
* @param {
|
|
311
|
-
* @param {
|
|
312
|
-
* @param {
|
|
924
|
+
*
|
|
925
|
+
* @param {string} params.databaseId - Database ID.
|
|
926
|
+
* @param {string} params.collectionId - Collection ID.
|
|
927
|
+
* @param {string} params.key - Attribute Key.
|
|
928
|
+
* @param {boolean} params.required - Is attribute required?
|
|
929
|
+
* @param {string} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
930
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
931
|
+
* @throws {AppwriteException}
|
|
932
|
+
* @returns {Promise<Models.AttributeIp>}
|
|
933
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead.
|
|
934
|
+
*/
|
|
935
|
+
createIpAttribute(params: {
|
|
936
|
+
databaseId: string;
|
|
937
|
+
collectionId: string;
|
|
938
|
+
key: string;
|
|
939
|
+
required: boolean;
|
|
940
|
+
xdefault?: string;
|
|
941
|
+
array?: boolean;
|
|
942
|
+
}): Promise<Models.AttributeIp>;
|
|
943
|
+
/**
|
|
944
|
+
* Create IP address attribute.
|
|
945
|
+
*
|
|
946
|
+
*
|
|
947
|
+
* @param {string} databaseId - Database ID.
|
|
948
|
+
* @param {string} collectionId - Collection ID.
|
|
949
|
+
* @param {string} key - Attribute Key.
|
|
950
|
+
* @param {boolean} required - Is attribute required?
|
|
951
|
+
* @param {string} xdefault - Default value. Cannot be set when attribute is required.
|
|
952
|
+
* @param {boolean} array - Is attribute an array?
|
|
313
953
|
* @throws {AppwriteException}
|
|
314
954
|
* @returns {Promise<Models.AttributeIp>}
|
|
955
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
315
956
|
*/
|
|
316
957
|
createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
|
|
317
958
|
/**
|
|
318
959
|
* Update an ip attribute. Changing the `default` value will not update already existing documents.
|
|
319
|
-
|
|
320
960
|
*
|
|
321
|
-
*
|
|
322
|
-
* @param {string}
|
|
323
|
-
* @param {string}
|
|
324
|
-
* @param {
|
|
325
|
-
* @param {
|
|
326
|
-
* @param {string}
|
|
961
|
+
*
|
|
962
|
+
* @param {string} params.databaseId - Database ID.
|
|
963
|
+
* @param {string} params.collectionId - Collection ID.
|
|
964
|
+
* @param {string} params.key - Attribute Key.
|
|
965
|
+
* @param {boolean} params.required - Is attribute required?
|
|
966
|
+
* @param {string} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
967
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
968
|
+
* @throws {AppwriteException}
|
|
969
|
+
* @returns {Promise<Models.AttributeIp>}
|
|
970
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIpColumn` instead.
|
|
971
|
+
*/
|
|
972
|
+
updateIpAttribute(params: {
|
|
973
|
+
databaseId: string;
|
|
974
|
+
collectionId: string;
|
|
975
|
+
key: string;
|
|
976
|
+
required: boolean;
|
|
977
|
+
xdefault?: string;
|
|
978
|
+
newKey?: string;
|
|
979
|
+
}): Promise<Models.AttributeIp>;
|
|
980
|
+
/**
|
|
981
|
+
* Update an ip attribute. Changing the `default` value will not update already existing documents.
|
|
982
|
+
*
|
|
983
|
+
*
|
|
984
|
+
* @param {string} databaseId - Database ID.
|
|
985
|
+
* @param {string} collectionId - Collection ID.
|
|
986
|
+
* @param {string} key - Attribute Key.
|
|
987
|
+
* @param {boolean} required - Is attribute required?
|
|
988
|
+
* @param {string} xdefault - Default value. Cannot be set when attribute is required.
|
|
989
|
+
* @param {string} newKey - New Attribute Key.
|
|
327
990
|
* @throws {AppwriteException}
|
|
328
991
|
* @returns {Promise<Models.AttributeIp>}
|
|
992
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
329
993
|
*/
|
|
330
994
|
updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp>;
|
|
995
|
+
/**
|
|
996
|
+
* Create a geometric line attribute.
|
|
997
|
+
*
|
|
998
|
+
* @param {string} params.databaseId - Database ID.
|
|
999
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1000
|
+
* @param {string} params.key - Attribute Key.
|
|
1001
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1002
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
1003
|
+
* @throws {AppwriteException}
|
|
1004
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
1005
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead.
|
|
1006
|
+
*/
|
|
1007
|
+
createLineAttribute(params: {
|
|
1008
|
+
databaseId: string;
|
|
1009
|
+
collectionId: string;
|
|
1010
|
+
key: string;
|
|
1011
|
+
required: boolean;
|
|
1012
|
+
xdefault?: any[];
|
|
1013
|
+
}): Promise<Models.AttributeLine>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Create a geometric line attribute.
|
|
1016
|
+
*
|
|
1017
|
+
* @param {string} databaseId - Database ID.
|
|
1018
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1019
|
+
* @param {string} key - Attribute Key.
|
|
1020
|
+
* @param {boolean} required - Is attribute required?
|
|
1021
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
1022
|
+
* @throws {AppwriteException}
|
|
1023
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
1024
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1025
|
+
*/
|
|
1026
|
+
createLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributeLine>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Update a line attribute. Changing the `default` value will not update already existing documents.
|
|
1029
|
+
*
|
|
1030
|
+
* @param {string} params.databaseId - Database ID.
|
|
1031
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
1032
|
+
* @param {string} params.key - Attribute Key.
|
|
1033
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1034
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
1035
|
+
* @param {string} params.newKey - New attribute key.
|
|
1036
|
+
* @throws {AppwriteException}
|
|
1037
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
1038
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLineColumn` instead.
|
|
1039
|
+
*/
|
|
1040
|
+
updateLineAttribute(params: {
|
|
1041
|
+
databaseId: string;
|
|
1042
|
+
collectionId: string;
|
|
1043
|
+
key: string;
|
|
1044
|
+
required: boolean;
|
|
1045
|
+
xdefault?: any[];
|
|
1046
|
+
newKey?: string;
|
|
1047
|
+
}): Promise<Models.AttributeLine>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Update a line attribute. Changing the `default` value will not update already existing documents.
|
|
1050
|
+
*
|
|
1051
|
+
* @param {string} databaseId - Database ID.
|
|
1052
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
1053
|
+
* @param {string} key - Attribute Key.
|
|
1054
|
+
* @param {boolean} required - Is attribute required?
|
|
1055
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
1056
|
+
* @param {string} newKey - New attribute key.
|
|
1057
|
+
* @throws {AppwriteException}
|
|
1058
|
+
* @returns {Promise<Models.AttributeLine>}
|
|
1059
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1060
|
+
*/
|
|
1061
|
+
updateLineAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributeLine>;
|
|
1062
|
+
/**
|
|
1063
|
+
* Create a geometric point attribute.
|
|
1064
|
+
*
|
|
1065
|
+
* @param {string} params.databaseId - Database ID.
|
|
1066
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1067
|
+
* @param {string} params.key - Attribute Key.
|
|
1068
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1069
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
1070
|
+
* @throws {AppwriteException}
|
|
1071
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
1072
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead.
|
|
1073
|
+
*/
|
|
1074
|
+
createPointAttribute(params: {
|
|
1075
|
+
databaseId: string;
|
|
1076
|
+
collectionId: string;
|
|
1077
|
+
key: string;
|
|
1078
|
+
required: boolean;
|
|
1079
|
+
xdefault?: any[];
|
|
1080
|
+
}): Promise<Models.AttributePoint>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Create a geometric point attribute.
|
|
1083
|
+
*
|
|
1084
|
+
* @param {string} databaseId - Database ID.
|
|
1085
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1086
|
+
* @param {string} key - Attribute Key.
|
|
1087
|
+
* @param {boolean} required - Is attribute required?
|
|
1088
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
1089
|
+
* @throws {AppwriteException}
|
|
1090
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
1091
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1092
|
+
*/
|
|
1093
|
+
createPointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributePoint>;
|
|
1094
|
+
/**
|
|
1095
|
+
* Update a point attribute. Changing the `default` value will not update already existing documents.
|
|
1096
|
+
*
|
|
1097
|
+
* @param {string} params.databaseId - Database ID.
|
|
1098
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
1099
|
+
* @param {string} params.key - Attribute Key.
|
|
1100
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1101
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
1102
|
+
* @param {string} params.newKey - New attribute key.
|
|
1103
|
+
* @throws {AppwriteException}
|
|
1104
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
1105
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePointColumn` instead.
|
|
1106
|
+
*/
|
|
1107
|
+
updatePointAttribute(params: {
|
|
1108
|
+
databaseId: string;
|
|
1109
|
+
collectionId: string;
|
|
1110
|
+
key: string;
|
|
1111
|
+
required: boolean;
|
|
1112
|
+
xdefault?: any[];
|
|
1113
|
+
newKey?: string;
|
|
1114
|
+
}): Promise<Models.AttributePoint>;
|
|
1115
|
+
/**
|
|
1116
|
+
* Update a point attribute. Changing the `default` value will not update already existing documents.
|
|
1117
|
+
*
|
|
1118
|
+
* @param {string} databaseId - Database ID.
|
|
1119
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
1120
|
+
* @param {string} key - Attribute Key.
|
|
1121
|
+
* @param {boolean} required - Is attribute required?
|
|
1122
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
1123
|
+
* @param {string} newKey - New attribute key.
|
|
1124
|
+
* @throws {AppwriteException}
|
|
1125
|
+
* @returns {Promise<Models.AttributePoint>}
|
|
1126
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1127
|
+
*/
|
|
1128
|
+
updatePointAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributePoint>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Create a geometric polygon attribute.
|
|
1131
|
+
*
|
|
1132
|
+
* @param {string} params.databaseId - Database ID.
|
|
1133
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1134
|
+
* @param {string} params.key - Attribute Key.
|
|
1135
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1136
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
1137
|
+
* @throws {AppwriteException}
|
|
1138
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
1139
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead.
|
|
1140
|
+
*/
|
|
1141
|
+
createPolygonAttribute(params: {
|
|
1142
|
+
databaseId: string;
|
|
1143
|
+
collectionId: string;
|
|
1144
|
+
key: string;
|
|
1145
|
+
required: boolean;
|
|
1146
|
+
xdefault?: any[];
|
|
1147
|
+
}): Promise<Models.AttributePolygon>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Create a geometric polygon attribute.
|
|
1150
|
+
*
|
|
1151
|
+
* @param {string} databaseId - Database ID.
|
|
1152
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1153
|
+
* @param {string} key - Attribute Key.
|
|
1154
|
+
* @param {boolean} required - Is attribute required?
|
|
1155
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
1156
|
+
* @throws {AppwriteException}
|
|
1157
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
1158
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1159
|
+
*/
|
|
1160
|
+
createPolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.AttributePolygon>;
|
|
1161
|
+
/**
|
|
1162
|
+
* Update a polygon attribute. Changing the `default` value will not update already existing documents.
|
|
1163
|
+
*
|
|
1164
|
+
* @param {string} params.databaseId - Database ID.
|
|
1165
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
1166
|
+
* @param {string} params.key - Attribute Key.
|
|
1167
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1168
|
+
* @param {any[]} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
1169
|
+
* @param {string} params.newKey - New attribute key.
|
|
1170
|
+
* @throws {AppwriteException}
|
|
1171
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
1172
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePolygonColumn` instead.
|
|
1173
|
+
*/
|
|
1174
|
+
updatePolygonAttribute(params: {
|
|
1175
|
+
databaseId: string;
|
|
1176
|
+
collectionId: string;
|
|
1177
|
+
key: string;
|
|
1178
|
+
required: boolean;
|
|
1179
|
+
xdefault?: any[];
|
|
1180
|
+
newKey?: string;
|
|
1181
|
+
}): Promise<Models.AttributePolygon>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Update a polygon attribute. Changing the `default` value will not update already existing documents.
|
|
1184
|
+
*
|
|
1185
|
+
* @param {string} databaseId - Database ID.
|
|
1186
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
|
1187
|
+
* @param {string} key - Attribute Key.
|
|
1188
|
+
* @param {boolean} required - Is attribute required?
|
|
1189
|
+
* @param {any[]} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
1190
|
+
* @param {string} newKey - New attribute key.
|
|
1191
|
+
* @throws {AppwriteException}
|
|
1192
|
+
* @returns {Promise<Models.AttributePolygon>}
|
|
1193
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1194
|
+
*/
|
|
1195
|
+
updatePolygonAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.AttributePolygon>;
|
|
1196
|
+
/**
|
|
1197
|
+
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1198
|
+
*
|
|
1199
|
+
*
|
|
1200
|
+
* @param {string} params.databaseId - Database ID.
|
|
1201
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1202
|
+
* @param {string} params.relatedCollectionId - Related Collection ID.
|
|
1203
|
+
* @param {RelationshipType} params.type - Relation type
|
|
1204
|
+
* @param {boolean} params.twoWay - Is Two Way?
|
|
1205
|
+
* @param {string} params.key - Attribute Key.
|
|
1206
|
+
* @param {string} params.twoWayKey - Two Way Attribute Key.
|
|
1207
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
1208
|
+
* @throws {AppwriteException}
|
|
1209
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
1210
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead.
|
|
1211
|
+
*/
|
|
1212
|
+
createRelationshipAttribute(params: {
|
|
1213
|
+
databaseId: string;
|
|
1214
|
+
collectionId: string;
|
|
1215
|
+
relatedCollectionId: string;
|
|
1216
|
+
type: RelationshipType;
|
|
1217
|
+
twoWay?: boolean;
|
|
1218
|
+
key?: string;
|
|
1219
|
+
twoWayKey?: string;
|
|
1220
|
+
onDelete?: RelationMutate;
|
|
1221
|
+
}): Promise<Models.AttributeRelationship>;
|
|
331
1222
|
/**
|
|
332
1223
|
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
333
|
-
|
|
334
1224
|
*
|
|
335
|
-
*
|
|
336
|
-
* @param {string}
|
|
337
|
-
* @param {string}
|
|
338
|
-
* @param {
|
|
339
|
-
* @param {
|
|
340
|
-
* @param {
|
|
341
|
-
* @param {string}
|
|
342
|
-
* @param {
|
|
1225
|
+
*
|
|
1226
|
+
* @param {string} databaseId - Database ID.
|
|
1227
|
+
* @param {string} collectionId - Collection ID.
|
|
1228
|
+
* @param {string} relatedCollectionId - Related Collection ID.
|
|
1229
|
+
* @param {RelationshipType} type - Relation type
|
|
1230
|
+
* @param {boolean} twoWay - Is Two Way?
|
|
1231
|
+
* @param {string} key - Attribute Key.
|
|
1232
|
+
* @param {string} twoWayKey - Two Way Attribute Key.
|
|
1233
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
343
1234
|
* @throws {AppwriteException}
|
|
344
1235
|
* @returns {Promise<Models.AttributeRelationship>}
|
|
1236
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
345
1237
|
*/
|
|
346
1238
|
createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
|
|
347
1239
|
/**
|
|
348
1240
|
* Create a string attribute.
|
|
349
|
-
|
|
350
1241
|
*
|
|
351
|
-
*
|
|
352
|
-
* @param {string}
|
|
353
|
-
* @param {string}
|
|
354
|
-
* @param {
|
|
355
|
-
* @param {
|
|
356
|
-
* @param {
|
|
357
|
-
* @param {
|
|
358
|
-
* @param {boolean}
|
|
1242
|
+
*
|
|
1243
|
+
* @param {string} params.databaseId - Database ID.
|
|
1244
|
+
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1245
|
+
* @param {string} params.key - Attribute Key.
|
|
1246
|
+
* @param {number} params.size - Attribute size for text attributes, in number of characters.
|
|
1247
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1248
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1249
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
1250
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
359
1251
|
* @throws {AppwriteException}
|
|
360
1252
|
* @returns {Promise<Models.AttributeString>}
|
|
1253
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
|
|
1254
|
+
*/
|
|
1255
|
+
createStringAttribute(params: {
|
|
1256
|
+
databaseId: string;
|
|
1257
|
+
collectionId: string;
|
|
1258
|
+
key: string;
|
|
1259
|
+
size: number;
|
|
1260
|
+
required: boolean;
|
|
1261
|
+
xdefault?: string;
|
|
1262
|
+
array?: boolean;
|
|
1263
|
+
encrypt?: boolean;
|
|
1264
|
+
}): Promise<Models.AttributeString>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Create a string attribute.
|
|
1267
|
+
*
|
|
1268
|
+
*
|
|
1269
|
+
* @param {string} databaseId - Database ID.
|
|
1270
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1271
|
+
* @param {string} key - Attribute Key.
|
|
1272
|
+
* @param {number} size - Attribute size for text attributes, in number of characters.
|
|
1273
|
+
* @param {boolean} required - Is attribute required?
|
|
1274
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1275
|
+
* @param {boolean} array - Is attribute an array?
|
|
1276
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
1277
|
+
* @throws {AppwriteException}
|
|
1278
|
+
* @returns {Promise<Models.AttributeString>}
|
|
1279
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
361
1280
|
*/
|
|
362
1281
|
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
|
|
363
1282
|
/**
|
|
364
1283
|
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
365
|
-
|
|
366
1284
|
*
|
|
367
|
-
*
|
|
368
|
-
* @param {string}
|
|
369
|
-
* @param {string}
|
|
370
|
-
* @param {
|
|
371
|
-
* @param {
|
|
372
|
-
* @param {
|
|
373
|
-
* @param {
|
|
1285
|
+
*
|
|
1286
|
+
* @param {string} params.databaseId - Database ID.
|
|
1287
|
+
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1288
|
+
* @param {string} params.key - Attribute Key.
|
|
1289
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1290
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1291
|
+
* @param {number} params.size - Maximum size of the string attribute.
|
|
1292
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
374
1293
|
* @throws {AppwriteException}
|
|
375
1294
|
* @returns {Promise<Models.AttributeString>}
|
|
1295
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.
|
|
1296
|
+
*/
|
|
1297
|
+
updateStringAttribute(params: {
|
|
1298
|
+
databaseId: string;
|
|
1299
|
+
collectionId: string;
|
|
1300
|
+
key: string;
|
|
1301
|
+
required: boolean;
|
|
1302
|
+
xdefault?: string;
|
|
1303
|
+
size?: number;
|
|
1304
|
+
newKey?: string;
|
|
1305
|
+
}): Promise<Models.AttributeString>;
|
|
1306
|
+
/**
|
|
1307
|
+
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
1308
|
+
*
|
|
1309
|
+
*
|
|
1310
|
+
* @param {string} databaseId - Database ID.
|
|
1311
|
+
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1312
|
+
* @param {string} key - Attribute Key.
|
|
1313
|
+
* @param {boolean} required - Is attribute required?
|
|
1314
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1315
|
+
* @param {number} size - Maximum size of the string attribute.
|
|
1316
|
+
* @param {string} newKey - New Attribute Key.
|
|
1317
|
+
* @throws {AppwriteException}
|
|
1318
|
+
* @returns {Promise<Models.AttributeString>}
|
|
1319
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
376
1320
|
*/
|
|
377
1321
|
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
|
|
378
1322
|
/**
|
|
379
1323
|
* Create a URL attribute.
|
|
380
|
-
|
|
381
1324
|
*
|
|
382
|
-
*
|
|
383
|
-
* @param {string}
|
|
384
|
-
* @param {string}
|
|
385
|
-
* @param {
|
|
386
|
-
* @param {
|
|
387
|
-
* @param {
|
|
1325
|
+
*
|
|
1326
|
+
* @param {string} params.databaseId - Database ID.
|
|
1327
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1328
|
+
* @param {string} params.key - Attribute Key.
|
|
1329
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1330
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1331
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
388
1332
|
* @throws {AppwriteException}
|
|
389
1333
|
* @returns {Promise<Models.AttributeUrl>}
|
|
1334
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead.
|
|
1335
|
+
*/
|
|
1336
|
+
createUrlAttribute(params: {
|
|
1337
|
+
databaseId: string;
|
|
1338
|
+
collectionId: string;
|
|
1339
|
+
key: string;
|
|
1340
|
+
required: boolean;
|
|
1341
|
+
xdefault?: string;
|
|
1342
|
+
array?: boolean;
|
|
1343
|
+
}): Promise<Models.AttributeUrl>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Create a URL attribute.
|
|
1346
|
+
*
|
|
1347
|
+
*
|
|
1348
|
+
* @param {string} databaseId - Database ID.
|
|
1349
|
+
* @param {string} collectionId - Collection ID.
|
|
1350
|
+
* @param {string} key - Attribute Key.
|
|
1351
|
+
* @param {boolean} required - Is attribute required?
|
|
1352
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1353
|
+
* @param {boolean} array - Is attribute an array?
|
|
1354
|
+
* @throws {AppwriteException}
|
|
1355
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
1356
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
390
1357
|
*/
|
|
391
1358
|
createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
|
|
392
1359
|
/**
|
|
393
1360
|
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
394
|
-
|
|
395
1361
|
*
|
|
396
|
-
*
|
|
397
|
-
* @param {string}
|
|
398
|
-
* @param {string}
|
|
399
|
-
* @param {
|
|
400
|
-
* @param {
|
|
401
|
-
* @param {string}
|
|
1362
|
+
*
|
|
1363
|
+
* @param {string} params.databaseId - Database ID.
|
|
1364
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1365
|
+
* @param {string} params.key - Attribute Key.
|
|
1366
|
+
* @param {boolean} params.required - Is attribute required?
|
|
1367
|
+
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1368
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
1369
|
+
* @throws {AppwriteException}
|
|
1370
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
1371
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead.
|
|
1372
|
+
*/
|
|
1373
|
+
updateUrlAttribute(params: {
|
|
1374
|
+
databaseId: string;
|
|
1375
|
+
collectionId: string;
|
|
1376
|
+
key: string;
|
|
1377
|
+
required: boolean;
|
|
1378
|
+
xdefault?: string;
|
|
1379
|
+
newKey?: string;
|
|
1380
|
+
}): Promise<Models.AttributeUrl>;
|
|
1381
|
+
/**
|
|
1382
|
+
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
1383
|
+
*
|
|
1384
|
+
*
|
|
1385
|
+
* @param {string} databaseId - Database ID.
|
|
1386
|
+
* @param {string} collectionId - Collection ID.
|
|
1387
|
+
* @param {string} key - Attribute Key.
|
|
1388
|
+
* @param {boolean} required - Is attribute required?
|
|
1389
|
+
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1390
|
+
* @param {string} newKey - New Attribute Key.
|
|
402
1391
|
* @throws {AppwriteException}
|
|
403
1392
|
* @returns {Promise<Models.AttributeUrl>}
|
|
1393
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
404
1394
|
*/
|
|
405
1395
|
updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl>;
|
|
406
1396
|
/**
|
|
407
1397
|
* Get attribute by ID.
|
|
408
1398
|
*
|
|
409
|
-
* @param {string} databaseId
|
|
410
|
-
* @param {string} collectionId
|
|
411
|
-
* @param {string} key
|
|
1399
|
+
* @param {string} params.databaseId - Database ID.
|
|
1400
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1401
|
+
* @param {string} params.key - Attribute Key.
|
|
1402
|
+
* @throws {AppwriteException}
|
|
1403
|
+
* @returns {Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>}
|
|
1404
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead.
|
|
1405
|
+
*/
|
|
1406
|
+
getAttribute(params: {
|
|
1407
|
+
databaseId: string;
|
|
1408
|
+
collectionId: string;
|
|
1409
|
+
key: string;
|
|
1410
|
+
}): Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>;
|
|
1411
|
+
/**
|
|
1412
|
+
* Get attribute by ID.
|
|
1413
|
+
*
|
|
1414
|
+
* @param {string} databaseId - Database ID.
|
|
1415
|
+
* @param {string} collectionId - Collection ID.
|
|
1416
|
+
* @param {string} key - Attribute Key.
|
|
1417
|
+
* @throws {AppwriteException}
|
|
1418
|
+
* @returns {Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>}
|
|
1419
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1420
|
+
*/
|
|
1421
|
+
getAttribute(databaseId: string, collectionId: string, key: string): Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>;
|
|
1422
|
+
/**
|
|
1423
|
+
* Deletes an attribute.
|
|
1424
|
+
*
|
|
1425
|
+
* @param {string} params.databaseId - Database ID.
|
|
1426
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1427
|
+
* @param {string} params.key - Attribute Key.
|
|
412
1428
|
* @throws {AppwriteException}
|
|
413
1429
|
* @returns {Promise<{}>}
|
|
1430
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteColumn` instead.
|
|
414
1431
|
*/
|
|
415
|
-
|
|
1432
|
+
deleteAttribute(params: {
|
|
1433
|
+
databaseId: string;
|
|
1434
|
+
collectionId: string;
|
|
1435
|
+
key: string;
|
|
1436
|
+
}): Promise<{}>;
|
|
416
1437
|
/**
|
|
417
1438
|
* Deletes an attribute.
|
|
418
1439
|
*
|
|
419
|
-
* @param {string} databaseId
|
|
420
|
-
* @param {string} collectionId
|
|
421
|
-
* @param {string} key
|
|
1440
|
+
* @param {string} databaseId - Database ID.
|
|
1441
|
+
* @param {string} collectionId - Collection ID.
|
|
1442
|
+
* @param {string} key - Attribute Key.
|
|
422
1443
|
* @throws {AppwriteException}
|
|
423
1444
|
* @returns {Promise<{}>}
|
|
1445
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
424
1446
|
*/
|
|
425
1447
|
deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
426
1448
|
/**
|
|
427
1449
|
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
428
|
-
|
|
429
1450
|
*
|
|
430
|
-
*
|
|
431
|
-
* @param {string}
|
|
432
|
-
* @param {string}
|
|
433
|
-
* @param {
|
|
434
|
-
* @param {
|
|
1451
|
+
*
|
|
1452
|
+
* @param {string} params.databaseId - Database ID.
|
|
1453
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1454
|
+
* @param {string} params.key - Attribute Key.
|
|
1455
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
1456
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
1457
|
+
* @throws {AppwriteException}
|
|
1458
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
1459
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
|
|
1460
|
+
*/
|
|
1461
|
+
updateRelationshipAttribute(params: {
|
|
1462
|
+
databaseId: string;
|
|
1463
|
+
collectionId: string;
|
|
1464
|
+
key: string;
|
|
1465
|
+
onDelete?: RelationMutate;
|
|
1466
|
+
newKey?: string;
|
|
1467
|
+
}): Promise<Models.AttributeRelationship>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1470
|
+
*
|
|
1471
|
+
*
|
|
1472
|
+
* @param {string} databaseId - Database ID.
|
|
1473
|
+
* @param {string} collectionId - Collection ID.
|
|
1474
|
+
* @param {string} key - Attribute Key.
|
|
1475
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
1476
|
+
* @param {string} newKey - New Attribute Key.
|
|
435
1477
|
* @throws {AppwriteException}
|
|
436
1478
|
* @returns {Promise<Models.AttributeRelationship>}
|
|
1479
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
437
1480
|
*/
|
|
438
1481
|
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
|
|
439
1482
|
/**
|
|
440
|
-
* Get a list of all the user
|
|
1483
|
+
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
1484
|
+
*
|
|
1485
|
+
* @param {string} params.databaseId - Database ID.
|
|
1486
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1487
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1488
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1489
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1490
|
+
* @throws {AppwriteException}
|
|
1491
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1492
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
|
1493
|
+
*/
|
|
1494
|
+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1495
|
+
databaseId: string;
|
|
1496
|
+
collectionId: string;
|
|
1497
|
+
queries?: string[];
|
|
1498
|
+
transactionId?: string;
|
|
1499
|
+
total?: boolean;
|
|
1500
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
441
1503
|
*
|
|
442
|
-
* @param {string} databaseId
|
|
443
|
-
* @param {string} collectionId
|
|
444
|
-
* @param {string[]} queries
|
|
1504
|
+
* @param {string} databaseId - Database ID.
|
|
1505
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1506
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1507
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1508
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
445
1509
|
* @throws {AppwriteException}
|
|
446
1510
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1511
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1512
|
+
*/
|
|
1513
|
+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
|
|
1514
|
+
/**
|
|
1515
|
+
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
1516
|
+
*
|
|
1517
|
+
* @param {string} params.databaseId - Database ID.
|
|
1518
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
1519
|
+
* @param {string} params.documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1520
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} params.data - Document data as JSON object.
|
|
1521
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1522
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1523
|
+
* @throws {AppwriteException}
|
|
1524
|
+
* @returns {Promise<Document>}
|
|
1525
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.
|
|
447
1526
|
*/
|
|
448
|
-
|
|
1527
|
+
createDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1528
|
+
databaseId: string;
|
|
1529
|
+
collectionId: string;
|
|
1530
|
+
documentId: string;
|
|
1531
|
+
data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>;
|
|
1532
|
+
permissions?: string[];
|
|
1533
|
+
transactionId?: string;
|
|
1534
|
+
}): Promise<Document>;
|
|
449
1535
|
/**
|
|
450
1536
|
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
451
1537
|
*
|
|
452
|
-
* @param {string} databaseId
|
|
453
|
-
* @param {string} collectionId
|
|
454
|
-
* @param {string} documentId
|
|
455
|
-
* @param {Omit<Document, keyof Models.Document>} data
|
|
456
|
-
* @param {string[]} permissions
|
|
1538
|
+
* @param {string} databaseId - Database ID.
|
|
1539
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
1540
|
+
* @param {string} documentId - Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1541
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} data - Document data as JSON object.
|
|
1542
|
+
* @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1543
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
457
1544
|
* @throws {AppwriteException}
|
|
458
1545
|
* @returns {Promise<Document>}
|
|
1546
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
459
1547
|
*/
|
|
460
|
-
createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
|
|
1548
|
+
createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[], transactionId?: string): Promise<Document>;
|
|
461
1549
|
/**
|
|
462
1550
|
* Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
463
1551
|
*
|
|
464
|
-
* @param {string} databaseId
|
|
465
|
-
* @param {string} collectionId
|
|
466
|
-
* @param {object[]} documents
|
|
1552
|
+
* @param {string} params.databaseId - Database ID.
|
|
1553
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
1554
|
+
* @param {object[]} params.documents - Array of documents data as JSON objects.
|
|
1555
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
467
1556
|
* @throws {AppwriteException}
|
|
468
1557
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1558
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRows` instead.
|
|
469
1559
|
*/
|
|
470
|
-
createDocuments<Document extends Models.Document>(
|
|
1560
|
+
createDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1561
|
+
databaseId: string;
|
|
1562
|
+
collectionId: string;
|
|
1563
|
+
documents: object[];
|
|
1564
|
+
transactionId?: string;
|
|
1565
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1566
|
+
/**
|
|
1567
|
+
* Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
1568
|
+
*
|
|
1569
|
+
* @param {string} databaseId - Database ID.
|
|
1570
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
1571
|
+
* @param {object[]} documents - Array of documents data as JSON objects.
|
|
1572
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1573
|
+
* @throws {AppwriteException}
|
|
1574
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1575
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1576
|
+
*/
|
|
1577
|
+
createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
471
1578
|
/**
|
|
472
1579
|
* Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
473
|
-
|
|
474
1580
|
*
|
|
475
|
-
*
|
|
476
|
-
* @param {string}
|
|
477
|
-
* @param {
|
|
1581
|
+
*
|
|
1582
|
+
* @param {string} params.databaseId - Database ID.
|
|
1583
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1584
|
+
* @param {object[]} params.documents - Array of document data as JSON objects. May contain partial documents.
|
|
1585
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
478
1586
|
* @throws {AppwriteException}
|
|
479
1587
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1588
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRows` instead.
|
|
480
1589
|
*/
|
|
481
|
-
upsertDocuments<Document extends Models.Document>(
|
|
1590
|
+
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1591
|
+
databaseId: string;
|
|
1592
|
+
collectionId: string;
|
|
1593
|
+
documents: object[];
|
|
1594
|
+
transactionId?: string;
|
|
1595
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1596
|
+
/**
|
|
1597
|
+
* Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
1598
|
+
*
|
|
1599
|
+
*
|
|
1600
|
+
* @param {string} databaseId - Database ID.
|
|
1601
|
+
* @param {string} collectionId - Collection ID.
|
|
1602
|
+
* @param {object[]} documents - Array of document data as JSON objects. May contain partial documents.
|
|
1603
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1604
|
+
* @throws {AppwriteException}
|
|
1605
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1606
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1607
|
+
*/
|
|
1608
|
+
upsertDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
482
1609
|
/**
|
|
483
1610
|
* Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
|
|
484
1611
|
*
|
|
485
|
-
* @param {string} databaseId
|
|
486
|
-
* @param {string} collectionId
|
|
487
|
-
* @param {object} data
|
|
488
|
-
* @param {string[]} queries
|
|
1612
|
+
* @param {string} params.databaseId - Database ID.
|
|
1613
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1614
|
+
* @param {object} params.data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1615
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1616
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
489
1617
|
* @throws {AppwriteException}
|
|
490
1618
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1619
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRows` instead.
|
|
491
1620
|
*/
|
|
492
|
-
updateDocuments<Document extends Models.Document>(
|
|
1621
|
+
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1622
|
+
databaseId: string;
|
|
1623
|
+
collectionId: string;
|
|
1624
|
+
data?: object;
|
|
1625
|
+
queries?: string[];
|
|
1626
|
+
transactionId?: string;
|
|
1627
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
1628
|
+
/**
|
|
1629
|
+
* Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
|
|
1630
|
+
*
|
|
1631
|
+
* @param {string} databaseId - Database ID.
|
|
1632
|
+
* @param {string} collectionId - Collection ID.
|
|
1633
|
+
* @param {object} data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1634
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1635
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1636
|
+
* @throws {AppwriteException}
|
|
1637
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1638
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1639
|
+
*/
|
|
1640
|
+
updateDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, data?: object, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
1641
|
+
/**
|
|
1642
|
+
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
1643
|
+
*
|
|
1644
|
+
* @param {string} params.databaseId - Database ID.
|
|
1645
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1646
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1647
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1648
|
+
* @throws {AppwriteException}
|
|
1649
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1650
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRows` instead.
|
|
1651
|
+
*/
|
|
1652
|
+
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1653
|
+
databaseId: string;
|
|
1654
|
+
collectionId: string;
|
|
1655
|
+
queries?: string[];
|
|
1656
|
+
transactionId?: string;
|
|
1657
|
+
}): Promise<Models.DocumentList<Document>>;
|
|
493
1658
|
/**
|
|
494
1659
|
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
495
1660
|
*
|
|
496
|
-
* @param {string} databaseId
|
|
497
|
-
* @param {string} collectionId
|
|
498
|
-
* @param {string[]} queries
|
|
1661
|
+
* @param {string} databaseId - Database ID.
|
|
1662
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1663
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1664
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
499
1665
|
* @throws {AppwriteException}
|
|
500
1666
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1667
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1668
|
+
*/
|
|
1669
|
+
deleteDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
1670
|
+
/**
|
|
1671
|
+
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
1672
|
+
*
|
|
1673
|
+
* @param {string} params.databaseId - Database ID.
|
|
1674
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1675
|
+
* @param {string} params.documentId - Document ID.
|
|
1676
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1677
|
+
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1678
|
+
* @throws {AppwriteException}
|
|
1679
|
+
* @returns {Promise<Document>}
|
|
1680
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.
|
|
501
1681
|
*/
|
|
502
|
-
|
|
1682
|
+
getDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1683
|
+
databaseId: string;
|
|
1684
|
+
collectionId: string;
|
|
1685
|
+
documentId: string;
|
|
1686
|
+
queries?: string[];
|
|
1687
|
+
transactionId?: string;
|
|
1688
|
+
}): Promise<Document>;
|
|
503
1689
|
/**
|
|
504
1690
|
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
505
1691
|
*
|
|
506
|
-
* @param {string} databaseId
|
|
507
|
-
* @param {string} collectionId
|
|
508
|
-
* @param {string} documentId
|
|
509
|
-
* @param {string[]} queries
|
|
1692
|
+
* @param {string} databaseId - Database ID.
|
|
1693
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1694
|
+
* @param {string} documentId - Document ID.
|
|
1695
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
1696
|
+
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
510
1697
|
* @throws {AppwriteException}
|
|
511
1698
|
* @returns {Promise<Document>}
|
|
1699
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
512
1700
|
*/
|
|
513
|
-
getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
|
|
1701
|
+
getDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, queries?: string[], transactionId?: string): Promise<Document>;
|
|
514
1702
|
/**
|
|
515
1703
|
* Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
516
1704
|
*
|
|
517
|
-
* @param {string} databaseId
|
|
518
|
-
* @param {string} collectionId
|
|
519
|
-
* @param {string} documentId
|
|
520
|
-
* @param {
|
|
521
|
-
* @param {string[]} permissions
|
|
1705
|
+
* @param {string} params.databaseId - Database ID.
|
|
1706
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1707
|
+
* @param {string} params.documentId - Document ID.
|
|
1708
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} params.data - Document data as JSON object. Include all required attributes of the document to be created or updated.
|
|
1709
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1710
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1711
|
+
* @throws {AppwriteException}
|
|
1712
|
+
* @returns {Promise<Document>}
|
|
1713
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.
|
|
1714
|
+
*/
|
|
1715
|
+
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1716
|
+
databaseId: string;
|
|
1717
|
+
collectionId: string;
|
|
1718
|
+
documentId: string;
|
|
1719
|
+
data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
1720
|
+
permissions?: string[];
|
|
1721
|
+
transactionId?: string;
|
|
1722
|
+
}): Promise<Document>;
|
|
1723
|
+
/**
|
|
1724
|
+
* Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
1725
|
+
*
|
|
1726
|
+
* @param {string} databaseId - Database ID.
|
|
1727
|
+
* @param {string} collectionId - Collection ID.
|
|
1728
|
+
* @param {string} documentId - Document ID.
|
|
1729
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data - Document data as JSON object. Include all required attributes of the document to be created or updated.
|
|
1730
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1731
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1732
|
+
* @throws {AppwriteException}
|
|
1733
|
+
* @returns {Promise<Document>}
|
|
1734
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1735
|
+
*/
|
|
1736
|
+
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[], transactionId?: string): Promise<Document>;
|
|
1737
|
+
/**
|
|
1738
|
+
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
1739
|
+
*
|
|
1740
|
+
* @param {string} params.databaseId - Database ID.
|
|
1741
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1742
|
+
* @param {string} params.documentId - Document ID.
|
|
1743
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} params.data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1744
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1745
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
522
1746
|
* @throws {AppwriteException}
|
|
523
1747
|
* @returns {Promise<Document>}
|
|
1748
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.
|
|
524
1749
|
*/
|
|
525
|
-
|
|
1750
|
+
updateDocument<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1751
|
+
databaseId: string;
|
|
1752
|
+
collectionId: string;
|
|
1753
|
+
documentId: string;
|
|
1754
|
+
data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>;
|
|
1755
|
+
permissions?: string[];
|
|
1756
|
+
transactionId?: string;
|
|
1757
|
+
}): Promise<Document>;
|
|
526
1758
|
/**
|
|
527
1759
|
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
528
1760
|
*
|
|
529
|
-
* @param {string} databaseId
|
|
530
|
-
* @param {string} collectionId
|
|
531
|
-
* @param {string} documentId
|
|
532
|
-
* @param {Partial<Omit<Document, keyof Models.Document>>} data
|
|
533
|
-
* @param {string[]} permissions
|
|
1761
|
+
* @param {string} databaseId - Database ID.
|
|
1762
|
+
* @param {string} collectionId - Collection ID.
|
|
1763
|
+
* @param {string} documentId - Document ID.
|
|
1764
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data - Document data as JSON object. Include only attribute and value pairs to be updated.
|
|
1765
|
+
* @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
1766
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
534
1767
|
* @throws {AppwriteException}
|
|
535
1768
|
* @returns {Promise<Document>}
|
|
1769
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
536
1770
|
*/
|
|
537
|
-
updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
|
|
1771
|
+
updateDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[], transactionId?: string): Promise<Document>;
|
|
538
1772
|
/**
|
|
539
1773
|
* Delete a document by its unique ID.
|
|
540
1774
|
*
|
|
541
|
-
* @param {string} databaseId
|
|
542
|
-
* @param {string} collectionId
|
|
543
|
-
* @param {string} documentId
|
|
1775
|
+
* @param {string} params.databaseId - Database ID.
|
|
1776
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1777
|
+
* @param {string} params.documentId - Document ID.
|
|
1778
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
544
1779
|
* @throws {AppwriteException}
|
|
545
1780
|
* @returns {Promise<{}>}
|
|
1781
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead.
|
|
546
1782
|
*/
|
|
547
|
-
deleteDocument(
|
|
1783
|
+
deleteDocument(params: {
|
|
1784
|
+
databaseId: string;
|
|
1785
|
+
collectionId: string;
|
|
1786
|
+
documentId: string;
|
|
1787
|
+
transactionId?: string;
|
|
1788
|
+
}): Promise<{}>;
|
|
1789
|
+
/**
|
|
1790
|
+
* Delete a document by its unique ID.
|
|
1791
|
+
*
|
|
1792
|
+
* @param {string} databaseId - Database ID.
|
|
1793
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1794
|
+
* @param {string} documentId - Document ID.
|
|
1795
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1796
|
+
* @throws {AppwriteException}
|
|
1797
|
+
* @returns {Promise<{}>}
|
|
1798
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1799
|
+
*/
|
|
1800
|
+
deleteDocument(databaseId: string, collectionId: string, documentId: string, transactionId?: string): Promise<{}>;
|
|
1801
|
+
/**
|
|
1802
|
+
* Get the document activity logs list by its unique ID.
|
|
1803
|
+
*
|
|
1804
|
+
* @param {string} params.databaseId - Database ID.
|
|
1805
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1806
|
+
* @param {string} params.documentId - Document ID.
|
|
1807
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
1808
|
+
* @throws {AppwriteException}
|
|
1809
|
+
* @returns {Promise<Models.LogList>}
|
|
1810
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRowLogs` instead.
|
|
1811
|
+
*/
|
|
1812
|
+
listDocumentLogs(params: {
|
|
1813
|
+
databaseId: string;
|
|
1814
|
+
collectionId: string;
|
|
1815
|
+
documentId: string;
|
|
1816
|
+
queries?: string[];
|
|
1817
|
+
}): Promise<Models.LogList>;
|
|
548
1818
|
/**
|
|
549
1819
|
* Get the document activity logs list by its unique ID.
|
|
550
1820
|
*
|
|
551
|
-
* @param {string} databaseId
|
|
552
|
-
* @param {string} collectionId
|
|
553
|
-
* @param {string} documentId
|
|
554
|
-
* @param {string[]} queries
|
|
1821
|
+
* @param {string} databaseId - Database ID.
|
|
1822
|
+
* @param {string} collectionId - Collection ID.
|
|
1823
|
+
* @param {string} documentId - Document ID.
|
|
1824
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
555
1825
|
* @throws {AppwriteException}
|
|
556
1826
|
* @returns {Promise<Models.LogList>}
|
|
1827
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
557
1828
|
*/
|
|
558
1829
|
listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList>;
|
|
559
1830
|
/**
|
|
560
1831
|
* Decrement a specific attribute of a document by a given value.
|
|
561
1832
|
*
|
|
562
|
-
* @param {string} databaseId
|
|
563
|
-
* @param {string} collectionId
|
|
564
|
-
* @param {string} documentId
|
|
565
|
-
* @param {string} attribute
|
|
566
|
-
* @param {number} value
|
|
567
|
-
* @param {number} min
|
|
1833
|
+
* @param {string} params.databaseId - Database ID.
|
|
1834
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1835
|
+
* @param {string} params.documentId - Document ID.
|
|
1836
|
+
* @param {string} params.attribute - Attribute key.
|
|
1837
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1838
|
+
* @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
1839
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
568
1840
|
* @throws {AppwriteException}
|
|
569
1841
|
* @returns {Promise<Document>}
|
|
1842
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
|
|
570
1843
|
*/
|
|
571
|
-
decrementDocumentAttribute<Document extends Models.Document>(
|
|
1844
|
+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1845
|
+
databaseId: string;
|
|
1846
|
+
collectionId: string;
|
|
1847
|
+
documentId: string;
|
|
1848
|
+
attribute: string;
|
|
1849
|
+
value?: number;
|
|
1850
|
+
min?: number;
|
|
1851
|
+
transactionId?: string;
|
|
1852
|
+
}): Promise<Document>;
|
|
1853
|
+
/**
|
|
1854
|
+
* Decrement a specific attribute of a document by a given value.
|
|
1855
|
+
*
|
|
1856
|
+
* @param {string} databaseId - Database ID.
|
|
1857
|
+
* @param {string} collectionId - Collection ID.
|
|
1858
|
+
* @param {string} documentId - Document ID.
|
|
1859
|
+
* @param {string} attribute - Attribute key.
|
|
1860
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1861
|
+
* @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
1862
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1863
|
+
* @throws {AppwriteException}
|
|
1864
|
+
* @returns {Promise<Document>}
|
|
1865
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1866
|
+
*/
|
|
1867
|
+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string): Promise<Document>;
|
|
572
1868
|
/**
|
|
573
1869
|
* Increment a specific attribute of a document by a given value.
|
|
574
1870
|
*
|
|
575
|
-
* @param {string} databaseId
|
|
576
|
-
* @param {string} collectionId
|
|
577
|
-
* @param {string} documentId
|
|
578
|
-
* @param {string} attribute
|
|
579
|
-
* @param {number} value
|
|
580
|
-
* @param {number} max
|
|
1871
|
+
* @param {string} params.databaseId - Database ID.
|
|
1872
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1873
|
+
* @param {string} params.documentId - Document ID.
|
|
1874
|
+
* @param {string} params.attribute - Attribute key.
|
|
1875
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1876
|
+
* @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
1877
|
+
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
581
1878
|
* @throws {AppwriteException}
|
|
582
1879
|
* @returns {Promise<Document>}
|
|
1880
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
|
|
583
1881
|
*/
|
|
584
|
-
incrementDocumentAttribute<Document extends Models.Document>(
|
|
1882
|
+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: {
|
|
1883
|
+
databaseId: string;
|
|
1884
|
+
collectionId: string;
|
|
1885
|
+
documentId: string;
|
|
1886
|
+
attribute: string;
|
|
1887
|
+
value?: number;
|
|
1888
|
+
max?: number;
|
|
1889
|
+
transactionId?: string;
|
|
1890
|
+
}): Promise<Document>;
|
|
1891
|
+
/**
|
|
1892
|
+
* Increment a specific attribute of a document by a given value.
|
|
1893
|
+
*
|
|
1894
|
+
* @param {string} databaseId - Database ID.
|
|
1895
|
+
* @param {string} collectionId - Collection ID.
|
|
1896
|
+
* @param {string} documentId - Document ID.
|
|
1897
|
+
* @param {string} attribute - Attribute key.
|
|
1898
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1899
|
+
* @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
1900
|
+
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1901
|
+
* @throws {AppwriteException}
|
|
1902
|
+
* @returns {Promise<Document>}
|
|
1903
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1904
|
+
*/
|
|
1905
|
+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string): Promise<Document>;
|
|
585
1906
|
/**
|
|
586
1907
|
* List indexes in the collection.
|
|
587
1908
|
*
|
|
588
|
-
* @param {string} databaseId
|
|
589
|
-
* @param {string} collectionId
|
|
590
|
-
* @param {string[]} queries
|
|
1909
|
+
* @param {string} params.databaseId - Database ID.
|
|
1910
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1911
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error
|
|
1912
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
591
1913
|
* @throws {AppwriteException}
|
|
592
1914
|
* @returns {Promise<Models.IndexList>}
|
|
1915
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
|
|
593
1916
|
*/
|
|
594
|
-
listIndexes(
|
|
1917
|
+
listIndexes(params: {
|
|
1918
|
+
databaseId: string;
|
|
1919
|
+
collectionId: string;
|
|
1920
|
+
queries?: string[];
|
|
1921
|
+
total?: boolean;
|
|
1922
|
+
}): Promise<Models.IndexList>;
|
|
1923
|
+
/**
|
|
1924
|
+
* List indexes in the collection.
|
|
1925
|
+
*
|
|
1926
|
+
* @param {string} databaseId - Database ID.
|
|
1927
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1928
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error
|
|
1929
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1930
|
+
* @throws {AppwriteException}
|
|
1931
|
+
* @returns {Promise<Models.IndexList>}
|
|
1932
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1933
|
+
*/
|
|
1934
|
+
listIndexes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.IndexList>;
|
|
1935
|
+
/**
|
|
1936
|
+
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
1937
|
+
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
1938
|
+
*
|
|
1939
|
+
* @param {string} params.databaseId - Database ID.
|
|
1940
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1941
|
+
* @param {string} params.key - Index Key.
|
|
1942
|
+
* @param {IndexType} params.type - Index type.
|
|
1943
|
+
* @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1944
|
+
* @param {string[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1945
|
+
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
1946
|
+
* @throws {AppwriteException}
|
|
1947
|
+
* @returns {Promise<Models.Index>}
|
|
1948
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.
|
|
1949
|
+
*/
|
|
1950
|
+
createIndex(params: {
|
|
1951
|
+
databaseId: string;
|
|
1952
|
+
collectionId: string;
|
|
1953
|
+
key: string;
|
|
1954
|
+
type: IndexType;
|
|
1955
|
+
attributes: string[];
|
|
1956
|
+
orders?: string[];
|
|
1957
|
+
lengths?: number[];
|
|
1958
|
+
}): Promise<Models.Index>;
|
|
595
1959
|
/**
|
|
596
1960
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
597
|
-
Attributes can be `key`, `fulltext`, and `unique`.
|
|
1961
|
+
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
598
1962
|
*
|
|
599
|
-
* @param {string} databaseId
|
|
600
|
-
* @param {string} collectionId
|
|
601
|
-
* @param {string} key
|
|
602
|
-
* @param {IndexType} type
|
|
603
|
-
* @param {string[]} attributes
|
|
604
|
-
* @param {string[]} orders
|
|
605
|
-
* @param {number[]} lengths
|
|
1963
|
+
* @param {string} databaseId - Database ID.
|
|
1964
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1965
|
+
* @param {string} key - Index Key.
|
|
1966
|
+
* @param {IndexType} type - Index type.
|
|
1967
|
+
* @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1968
|
+
* @param {string[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1969
|
+
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
606
1970
|
* @throws {AppwriteException}
|
|
607
1971
|
* @returns {Promise<Models.Index>}
|
|
1972
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
608
1973
|
*/
|
|
609
1974
|
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index>;
|
|
610
1975
|
/**
|
|
611
|
-
* Get index by ID.
|
|
1976
|
+
* Get an index by its unique ID.
|
|
612
1977
|
*
|
|
613
|
-
* @param {string} databaseId
|
|
614
|
-
* @param {string} collectionId
|
|
615
|
-
* @param {string} key
|
|
1978
|
+
* @param {string} params.databaseId - Database ID.
|
|
1979
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1980
|
+
* @param {string} params.key - Index Key.
|
|
616
1981
|
* @throws {AppwriteException}
|
|
617
1982
|
* @returns {Promise<Models.Index>}
|
|
1983
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getIndex` instead.
|
|
1984
|
+
*/
|
|
1985
|
+
getIndex(params: {
|
|
1986
|
+
databaseId: string;
|
|
1987
|
+
collectionId: string;
|
|
1988
|
+
key: string;
|
|
1989
|
+
}): Promise<Models.Index>;
|
|
1990
|
+
/**
|
|
1991
|
+
* Get an index by its unique ID.
|
|
1992
|
+
*
|
|
1993
|
+
* @param {string} databaseId - Database ID.
|
|
1994
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1995
|
+
* @param {string} key - Index Key.
|
|
1996
|
+
* @throws {AppwriteException}
|
|
1997
|
+
* @returns {Promise<Models.Index>}
|
|
1998
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
618
1999
|
*/
|
|
619
2000
|
getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
|
|
620
2001
|
/**
|
|
621
2002
|
* Delete an index.
|
|
622
2003
|
*
|
|
623
|
-
* @param {string} databaseId
|
|
624
|
-
* @param {string} collectionId
|
|
625
|
-
* @param {string} key
|
|
2004
|
+
* @param {string} params.databaseId - Database ID.
|
|
2005
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
2006
|
+
* @param {string} params.key - Index Key.
|
|
626
2007
|
* @throws {AppwriteException}
|
|
627
2008
|
* @returns {Promise<{}>}
|
|
2009
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteIndex` instead.
|
|
2010
|
+
*/
|
|
2011
|
+
deleteIndex(params: {
|
|
2012
|
+
databaseId: string;
|
|
2013
|
+
collectionId: string;
|
|
2014
|
+
key: string;
|
|
2015
|
+
}): Promise<{}>;
|
|
2016
|
+
/**
|
|
2017
|
+
* Delete an index.
|
|
2018
|
+
*
|
|
2019
|
+
* @param {string} databaseId - Database ID.
|
|
2020
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
2021
|
+
* @param {string} key - Index Key.
|
|
2022
|
+
* @throws {AppwriteException}
|
|
2023
|
+
* @returns {Promise<{}>}
|
|
2024
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
628
2025
|
*/
|
|
629
2026
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
630
2027
|
/**
|
|
631
2028
|
* Get the collection activity logs list by its unique ID.
|
|
632
2029
|
*
|
|
633
|
-
* @param {string} databaseId
|
|
634
|
-
* @param {string} collectionId
|
|
635
|
-
* @param {string[]} queries
|
|
2030
|
+
* @param {string} params.databaseId - Database ID.
|
|
2031
|
+
* @param {string} params.collectionId - Collection ID.
|
|
2032
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2033
|
+
* @throws {AppwriteException}
|
|
2034
|
+
* @returns {Promise<Models.LogList>}
|
|
2035
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTableLogs` instead.
|
|
2036
|
+
*/
|
|
2037
|
+
listCollectionLogs(params: {
|
|
2038
|
+
databaseId: string;
|
|
2039
|
+
collectionId: string;
|
|
2040
|
+
queries?: string[];
|
|
2041
|
+
}): Promise<Models.LogList>;
|
|
2042
|
+
/**
|
|
2043
|
+
* Get the collection activity logs list by its unique ID.
|
|
2044
|
+
*
|
|
2045
|
+
* @param {string} databaseId - Database ID.
|
|
2046
|
+
* @param {string} collectionId - Collection ID.
|
|
2047
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
636
2048
|
* @throws {AppwriteException}
|
|
637
2049
|
* @returns {Promise<Models.LogList>}
|
|
2050
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
638
2051
|
*/
|
|
639
2052
|
listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList>;
|
|
640
2053
|
/**
|
|
641
2054
|
* Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
642
2055
|
*
|
|
643
|
-
* @param {string} databaseId
|
|
644
|
-
* @param {string} collectionId
|
|
645
|
-
* @param {
|
|
2056
|
+
* @param {string} params.databaseId - Database ID.
|
|
2057
|
+
* @param {string} params.collectionId - Collection ID.
|
|
2058
|
+
* @param {UsageRange} params.range - Date range.
|
|
2059
|
+
* @throws {AppwriteException}
|
|
2060
|
+
* @returns {Promise<Models.UsageCollection>}
|
|
2061
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTableUsage` instead.
|
|
2062
|
+
*/
|
|
2063
|
+
getCollectionUsage(params: {
|
|
2064
|
+
databaseId: string;
|
|
2065
|
+
collectionId: string;
|
|
2066
|
+
range?: UsageRange;
|
|
2067
|
+
}): Promise<Models.UsageCollection>;
|
|
2068
|
+
/**
|
|
2069
|
+
* Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
2070
|
+
*
|
|
2071
|
+
* @param {string} databaseId - Database ID.
|
|
2072
|
+
* @param {string} collectionId - Collection ID.
|
|
2073
|
+
* @param {UsageRange} range - Date range.
|
|
646
2074
|
* @throws {AppwriteException}
|
|
647
2075
|
* @returns {Promise<Models.UsageCollection>}
|
|
2076
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2077
|
+
*/
|
|
2078
|
+
getCollectionUsage(databaseId: string, collectionId: string, range?: UsageRange): Promise<Models.UsageCollection>;
|
|
2079
|
+
/**
|
|
2080
|
+
* Get the database activity logs list by its unique ID.
|
|
2081
|
+
*
|
|
2082
|
+
* @param {string} params.databaseId - Database ID.
|
|
2083
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2084
|
+
* @throws {AppwriteException}
|
|
2085
|
+
* @returns {Promise<Models.LogList>}
|
|
2086
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listDatabaseLogs` instead.
|
|
648
2087
|
*/
|
|
649
|
-
|
|
2088
|
+
listLogs(params: {
|
|
2089
|
+
databaseId: string;
|
|
2090
|
+
queries?: string[];
|
|
2091
|
+
}): Promise<Models.LogList>;
|
|
650
2092
|
/**
|
|
651
2093
|
* Get the database activity logs list by its unique ID.
|
|
652
2094
|
*
|
|
653
|
-
* @param {string} databaseId
|
|
654
|
-
* @param {string[]} queries
|
|
2095
|
+
* @param {string} databaseId - Database ID.
|
|
2096
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
655
2097
|
* @throws {AppwriteException}
|
|
656
2098
|
* @returns {Promise<Models.LogList>}
|
|
2099
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
657
2100
|
*/
|
|
658
2101
|
listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList>;
|
|
659
2102
|
/**
|
|
660
2103
|
* Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
661
2104
|
*
|
|
662
|
-
* @param {string} databaseId
|
|
663
|
-
* @param {
|
|
2105
|
+
* @param {string} params.databaseId - Database ID.
|
|
2106
|
+
* @param {UsageRange} params.range - Date range.
|
|
2107
|
+
* @throws {AppwriteException}
|
|
2108
|
+
* @returns {Promise<Models.UsageDatabase>}
|
|
2109
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getUsage` instead.
|
|
2110
|
+
*/
|
|
2111
|
+
getUsage(params: {
|
|
2112
|
+
databaseId: string;
|
|
2113
|
+
range?: UsageRange;
|
|
2114
|
+
}): Promise<Models.UsageDatabase>;
|
|
2115
|
+
/**
|
|
2116
|
+
* Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
2117
|
+
*
|
|
2118
|
+
* @param {string} databaseId - Database ID.
|
|
2119
|
+
* @param {UsageRange} range - Date range.
|
|
664
2120
|
* @throws {AppwriteException}
|
|
665
2121
|
* @returns {Promise<Models.UsageDatabase>}
|
|
2122
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
666
2123
|
*/
|
|
667
|
-
|
|
2124
|
+
getUsage(databaseId: string, range?: UsageRange): Promise<Models.UsageDatabase>;
|
|
668
2125
|
}
|