@appwrite.io/console 0.6.4 → 0.7.0-rc.2
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/README.md +3 -3
- package/dist/cjs/sdk.js +2513 -2350
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2513 -2350
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2513 -2350
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-password-session.md +1 -1
- package/docs/examples/account/create-email-token.md +1 -1
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
- package/docs/examples/account/create-mfa-authenticator.md +1 -1
- package/docs/examples/account/create-mfa-challenge.md +1 -1
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/create-phone-token.md +1 -1
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-push-target.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-session.md +1 -1
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-mfa-authenticator.md +2 -3
- package/docs/examples/account/delete-push-target.md +1 -1
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/delete.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-m-f-a.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-mfa-authenticator.md +1 -1
- package/docs/examples/account/update-mfa-challenge.md +1 -1
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-phone-session.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-push-target.md +1 -1
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/assistant/chat.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +1 -1
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +1 -1
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +1 -1
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create-build.md +2 -2
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-execution.md +3 -2
- package/docs/examples/functions/create-variable.md +1 -1
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-execution.md +14 -0
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/{download-deployment.md → get-deployment-download.md} +1 -1
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/{get-specifications.md → get-template.md} +4 -2
- package/docs/examples/functions/get-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +1 -1
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-templates.md +16 -0
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment-build.md +14 -0
- package/docs/examples/functions/update-deployment.md +1 -1
- package/docs/examples/functions/update-variable.md +1 -1
- package/docs/examples/functions/update.md +3 -3
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-certificate.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-failed-jobs.md +1 -1
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-builds.md +1 -1
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +1 -1
- package/docs/examples/health/get-queue-deletes.md +1 -1
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-mails.md +1 -1
- package/docs/examples/health/get-queue-messaging.md +1 -1
- package/docs/examples/health/get-queue-migrations.md +1 -1
- package/docs/examples/health/get-queue-usage-dump.md +1 -1
- package/docs/examples/health/get-queue-usage.md +1 -1
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-queue.md +1 -1
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-storage.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +1 -1
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/messaging/create-apns-provider.md +1 -1
- package/docs/examples/messaging/create-email.md +1 -1
- package/docs/examples/messaging/create-fcm-provider.md +1 -1
- package/docs/examples/messaging/create-mailgun-provider.md +1 -1
- package/docs/examples/messaging/create-msg91provider.md +1 -1
- package/docs/examples/messaging/create-push.md +1 -1
- package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/create-sms.md +1 -1
- package/docs/examples/messaging/create-smtp-provider.md +1 -1
- package/docs/examples/messaging/create-subscriber.md +1 -1
- package/docs/examples/messaging/create-telesign-provider.md +1 -1
- package/docs/examples/messaging/create-textmagic-provider.md +1 -1
- package/docs/examples/messaging/create-topic.md +1 -1
- package/docs/examples/messaging/create-twilio-provider.md +1 -1
- package/docs/examples/messaging/create-vonage-provider.md +1 -1
- package/docs/examples/messaging/delete-provider.md +1 -1
- package/docs/examples/messaging/delete-subscriber.md +1 -1
- package/docs/examples/messaging/delete-topic.md +1 -1
- package/docs/examples/messaging/delete.md +1 -1
- package/docs/examples/messaging/get-message.md +1 -1
- package/docs/examples/messaging/get-provider.md +1 -1
- package/docs/examples/messaging/get-subscriber.md +1 -1
- package/docs/examples/messaging/get-topic.md +1 -1
- package/docs/examples/messaging/list-message-logs.md +1 -1
- package/docs/examples/messaging/list-messages.md +1 -1
- package/docs/examples/messaging/list-provider-logs.md +1 -1
- package/docs/examples/messaging/list-providers.md +1 -1
- package/docs/examples/messaging/list-subscriber-logs.md +1 -1
- package/docs/examples/messaging/list-subscribers.md +1 -1
- package/docs/examples/messaging/list-targets.md +1 -1
- package/docs/examples/messaging/list-topic-logs.md +1 -1
- package/docs/examples/messaging/list-topics.md +1 -1
- package/docs/examples/messaging/update-apns-provider.md +1 -1
- package/docs/examples/messaging/update-email.md +1 -1
- package/docs/examples/messaging/update-fcm-provider.md +1 -1
- package/docs/examples/messaging/update-mailgun-provider.md +1 -1
- package/docs/examples/messaging/update-msg91provider.md +1 -1
- package/docs/examples/messaging/update-push.md +1 -1
- package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/update-sms.md +1 -1
- package/docs/examples/messaging/update-smtp-provider.md +1 -1
- package/docs/examples/messaging/update-telesign-provider.md +1 -1
- package/docs/examples/messaging/update-textmagic-provider.md +1 -1
- package/docs/examples/messaging/update-topic.md +1 -1
- package/docs/examples/messaging/update-twilio-provider.md +1 -1
- package/docs/examples/messaging/update-vonage-provider.md +1 -1
- package/docs/examples/migrations/create-appwrite-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
- package/docs/examples/migrations/create-n-host-migration.md +1 -1
- package/docs/examples/migrations/create-supabase-migration.md +1 -1
- package/docs/examples/migrations/delete-firebase-auth.md +1 -1
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +1 -1
- package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
- package/docs/examples/migrations/get-firebase-report.md +1 -1
- package/docs/examples/migrations/get-n-host-report.md +1 -1
- package/docs/examples/migrations/get-supabase-report.md +1 -1
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/list-firebase-projects.md +1 -1
- package/docs/examples/migrations/list.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/project/create-variable.md +1 -1
- package/docs/examples/project/delete-variable.md +1 -1
- package/docs/examples/project/get-usage.md +1 -1
- package/docs/examples/project/get-variable.md +1 -1
- package/docs/examples/project/list-variables.md +1 -1
- package/docs/examples/project/update-variable.md +1 -1
- package/docs/examples/projects/create-j-w-t.md +15 -0
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +1 -1
- package/docs/examples/projects/create-smtp-test.md +1 -1
- package/docs/examples/projects/create-webhook.md +1 -1
- package/docs/examples/projects/create.md +1 -1
- package/docs/examples/projects/delete-email-template.md +1 -1
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +1 -1
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-email-template.md +1 -1
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +1 -1
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-api-status-all.md +1 -1
- package/docs/examples/projects/update-api-status.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-email-template.md +1 -1
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-mock-numbers.md +14 -0
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/update-personal-data-check.md +1 -1
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/update-service-status-all.md +1 -1
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-session-alerts.md +14 -0
- package/docs/examples/projects/update-sms-template.md +1 -1
- package/docs/examples/projects/update-smtp.md +1 -1
- package/docs/examples/projects/update-team.md +1 -1
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +1 -1
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-rule.md +1 -1
- package/docs/examples/proxy/delete-rule.md +1 -1
- package/docs/examples/proxy/get-rule.md +1 -1
- package/docs/examples/proxy/list-rules.md +1 -1
- package/docs/examples/proxy/update-rule-verification.md +1 -1
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/update-membership.md +1 -1
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-j-w-t.md +15 -0
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create-session.md +1 -1
- package/docs/examples/users/create-target.md +1 -1
- package/docs/examples/users/create-token.md +1 -1
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +1 -1
- package/docs/examples/users/delete-mfa-authenticator.md +1 -1
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete-target.md +1 -1
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-target.md +1 -1
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +1 -1
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-mfa-factors.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list-targets.md +1 -1
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +1 -1
- package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/update-mfa.md +1 -1
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/users/update-target.md +1 -1
- package/docs/examples/vcs/create-repository-detection.md +1 -1
- package/docs/examples/vcs/create-repository.md +1 -1
- package/docs/examples/vcs/delete-installation.md +1 -1
- package/docs/examples/vcs/get-installation.md +1 -1
- package/docs/examples/vcs/get-repository-contents.md +15 -0
- package/docs/examples/vcs/get-repository.md +1 -1
- package/docs/examples/vcs/list-installations.md +1 -1
- package/docs/examples/vcs/list-repositories.md +1 -1
- package/docs/examples/vcs/list-repository-branches.md +1 -1
- package/docs/examples/vcs/update-external-deployments.md +1 -1
- package/package.json +1 -1
- package/src/client.ts +124 -66
- package/src/enums/email-template-type.ts +2 -0
- package/src/enums/platform-type.ts +2 -0
- package/src/enums/runtime.ts +1 -0
- package/src/index.ts +1 -1
- package/src/models.ts +230 -28
- package/src/services/account.ts +651 -644
- package/src/services/assistant.ts +19 -16
- package/src/services/avatars.ts +111 -152
- package/src/services/console.ts +19 -14
- package/src/services/databases.ts +628 -638
- package/src/services/functions.ts +435 -339
- package/src/services/graphql.ts +31 -24
- package/src/services/health.ts +299 -199
- package/src/services/locale.ts +113 -77
- package/src/services/messaging.ts +568 -583
- package/src/services/migrations.ts +199 -197
- package/src/services/project.ts +82 -65
- package/src/services/projects.ts +615 -459
- package/src/services/proxy.ts +68 -50
- package/src/services/storage.ts +198 -253
- package/src/services/teams.ts +198 -188
- package/src/services/users.ts +568 -478
- package/src/services/vcs.ts +149 -83
- package/types/client.d.ts +13 -17
- package/types/enums/email-template-type.d.ts +3 -1
- package/types/enums/platform-type.d.ts +3 -1
- package/types/enums/runtime.d.ts +2 -1
- package/types/index.d.ts +1 -1
- package/types/models.d.ts +230 -28
- package/types/services/account.d.ts +162 -317
- package/types/services/assistant.d.ts +4 -4
- package/types/services/avatars.d.ts +50 -84
- package/types/services/console.d.ts +4 -4
- package/types/services/databases.d.ts +143 -173
- package/types/services/functions.d.ts +112 -97
- package/types/services/graphql.d.ts +6 -6
- package/types/services/health.d.ts +64 -85
- package/types/services/locale.d.ts +28 -39
- package/types/services/messaging.d.ts +103 -104
- package/types/services/migrations.d.ts +34 -34
- package/types/services/project.d.ts +17 -20
- package/types/services/projects.d.ts +118 -87
- package/types/services/proxy.d.ts +13 -14
- package/types/services/storage.d.ts +53 -78
- package/types/services/teams.d.ts +53 -83
- package/types/services/users.d.ts +120 -157
- package/types/services/vcs.d.ts +31 -20
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { Service } from '../service';
|
|
2
1
|
import { Client } from '../client';
|
|
3
2
|
import type { Models } from '../models';
|
|
4
3
|
import { DatabaseUsageRange } from '../enums/database-usage-range';
|
|
5
4
|
import { RelationshipType } from '../enums/relationship-type';
|
|
6
5
|
import { RelationMutate } from '../enums/relation-mutate';
|
|
7
6
|
import { IndexType } from '../enums/index-type';
|
|
8
|
-
export declare class Databases
|
|
7
|
+
export declare class Databases {
|
|
8
|
+
client: Client;
|
|
9
9
|
constructor(client: Client);
|
|
10
10
|
/**
|
|
11
11
|
* List databases
|
|
12
12
|
*
|
|
13
|
-
* Get a list of all databases from the current Appwrite project. You can use
|
|
14
|
-
* the search parameter to filter your results.
|
|
13
|
+
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
15
14
|
*
|
|
16
15
|
* @param {string[]} queries
|
|
17
16
|
* @param {string} search
|
|
18
17
|
* @throws {AppwriteException}
|
|
19
|
-
* @returns {Promise}
|
|
20
|
-
|
|
18
|
+
* @returns {Promise<Models.DatabaseList>}
|
|
19
|
+
*/
|
|
21
20
|
list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
|
|
22
21
|
/**
|
|
23
22
|
* Create database
|
|
24
23
|
*
|
|
25
24
|
* Create a new Database.
|
|
26
|
-
|
|
25
|
+
|
|
27
26
|
*
|
|
28
27
|
* @param {string} databaseId
|
|
29
28
|
* @param {string} name
|
|
30
29
|
* @param {boolean} enabled
|
|
31
30
|
* @throws {AppwriteException}
|
|
32
|
-
* @returns {Promise}
|
|
33
|
-
|
|
31
|
+
* @returns {Promise<Models.Database>}
|
|
32
|
+
*/
|
|
34
33
|
create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
35
34
|
/**
|
|
36
35
|
* Get databases usage stats
|
|
@@ -38,19 +37,18 @@ export declare class Databases extends Service {
|
|
|
38
37
|
*
|
|
39
38
|
* @param {DatabaseUsageRange} range
|
|
40
39
|
* @throws {AppwriteException}
|
|
41
|
-
* @returns {Promise}
|
|
42
|
-
|
|
40
|
+
* @returns {Promise<Models.UsageDatabases>}
|
|
41
|
+
*/
|
|
43
42
|
getUsage(range?: DatabaseUsageRange): Promise<Models.UsageDatabases>;
|
|
44
43
|
/**
|
|
45
44
|
* Get database
|
|
46
45
|
*
|
|
47
|
-
* Get a database by its unique ID. This endpoint response returns a JSON
|
|
48
|
-
* object with the database metadata.
|
|
46
|
+
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
49
47
|
*
|
|
50
48
|
* @param {string} databaseId
|
|
51
49
|
* @throws {AppwriteException}
|
|
52
|
-
* @returns {Promise}
|
|
53
|
-
|
|
50
|
+
* @returns {Promise<Models.Database>}
|
|
51
|
+
*/
|
|
54
52
|
get(databaseId: string): Promise<Models.Database>;
|
|
55
53
|
/**
|
|
56
54
|
* Update database
|
|
@@ -61,40 +59,35 @@ export declare class Databases extends Service {
|
|
|
61
59
|
* @param {string} name
|
|
62
60
|
* @param {boolean} enabled
|
|
63
61
|
* @throws {AppwriteException}
|
|
64
|
-
* @returns {Promise}
|
|
65
|
-
|
|
62
|
+
* @returns {Promise<Models.Database>}
|
|
63
|
+
*/
|
|
66
64
|
update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
67
65
|
/**
|
|
68
66
|
* Delete database
|
|
69
67
|
*
|
|
70
|
-
* Delete a database by its unique ID. Only API keys with with databases.write
|
|
71
|
-
* scope can delete a database.
|
|
68
|
+
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
72
69
|
*
|
|
73
70
|
* @param {string} databaseId
|
|
74
71
|
* @throws {AppwriteException}
|
|
75
|
-
* @returns {Promise}
|
|
76
|
-
|
|
72
|
+
* @returns {Promise<{}>}
|
|
73
|
+
*/
|
|
77
74
|
delete(databaseId: string): Promise<{}>;
|
|
78
75
|
/**
|
|
79
76
|
* List collections
|
|
80
77
|
*
|
|
81
|
-
* Get a list of all collections that belong to the provided databaseId. You
|
|
82
|
-
* can use the search parameter to filter your results.
|
|
78
|
+
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
83
79
|
*
|
|
84
80
|
* @param {string} databaseId
|
|
85
81
|
* @param {string[]} queries
|
|
86
82
|
* @param {string} search
|
|
87
83
|
* @throws {AppwriteException}
|
|
88
|
-
* @returns {Promise}
|
|
89
|
-
|
|
84
|
+
* @returns {Promise<Models.CollectionList>}
|
|
85
|
+
*/
|
|
90
86
|
listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
|
|
91
87
|
/**
|
|
92
88
|
* Create collection
|
|
93
89
|
*
|
|
94
|
-
* Create a new Collection. Before using this route, you should create a new
|
|
95
|
-
* database resource using either a [server
|
|
96
|
-
* integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
|
97
|
-
* API or directly from your database console.
|
|
90
|
+
* 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.
|
|
98
91
|
*
|
|
99
92
|
* @param {string} databaseId
|
|
100
93
|
* @param {string} collectionId
|
|
@@ -103,20 +96,19 @@ export declare class Databases extends Service {
|
|
|
103
96
|
* @param {boolean} documentSecurity
|
|
104
97
|
* @param {boolean} enabled
|
|
105
98
|
* @throws {AppwriteException}
|
|
106
|
-
* @returns {Promise}
|
|
107
|
-
|
|
99
|
+
* @returns {Promise<Models.Collection>}
|
|
100
|
+
*/
|
|
108
101
|
createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
109
102
|
/**
|
|
110
103
|
* Get collection
|
|
111
104
|
*
|
|
112
|
-
* Get a collection by its unique ID. This endpoint response returns a JSON
|
|
113
|
-
* object with the collection metadata.
|
|
105
|
+
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
114
106
|
*
|
|
115
107
|
* @param {string} databaseId
|
|
116
108
|
* @param {string} collectionId
|
|
117
109
|
* @throws {AppwriteException}
|
|
118
|
-
* @returns {Promise}
|
|
119
|
-
|
|
110
|
+
* @returns {Promise<Models.Collection>}
|
|
111
|
+
*/
|
|
120
112
|
getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
|
|
121
113
|
/**
|
|
122
114
|
* Update collection
|
|
@@ -130,20 +122,19 @@ export declare class Databases extends Service {
|
|
|
130
122
|
* @param {boolean} documentSecurity
|
|
131
123
|
* @param {boolean} enabled
|
|
132
124
|
* @throws {AppwriteException}
|
|
133
|
-
* @returns {Promise}
|
|
134
|
-
|
|
125
|
+
* @returns {Promise<Models.Collection>}
|
|
126
|
+
*/
|
|
135
127
|
updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
136
128
|
/**
|
|
137
129
|
* Delete collection
|
|
138
130
|
*
|
|
139
|
-
* Delete a collection by its unique ID. Only users with write permissions
|
|
140
|
-
* have access to delete this resource.
|
|
131
|
+
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
141
132
|
*
|
|
142
133
|
* @param {string} databaseId
|
|
143
134
|
* @param {string} collectionId
|
|
144
135
|
* @throws {AppwriteException}
|
|
145
|
-
* @returns {Promise}
|
|
146
|
-
|
|
136
|
+
* @returns {Promise<{}>}
|
|
137
|
+
*/
|
|
147
138
|
deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
|
|
148
139
|
/**
|
|
149
140
|
* List attributes
|
|
@@ -154,14 +145,14 @@ export declare class Databases extends Service {
|
|
|
154
145
|
* @param {string} collectionId
|
|
155
146
|
* @param {string[]} queries
|
|
156
147
|
* @throws {AppwriteException}
|
|
157
|
-
* @returns {Promise}
|
|
158
|
-
|
|
148
|
+
* @returns {Promise<Models.AttributeList>}
|
|
149
|
+
*/
|
|
159
150
|
listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
|
|
160
151
|
/**
|
|
161
152
|
* Create boolean attribute
|
|
162
153
|
*
|
|
163
154
|
* Create a boolean attribute.
|
|
164
|
-
|
|
155
|
+
|
|
165
156
|
*
|
|
166
157
|
* @param {string} databaseId
|
|
167
158
|
* @param {string} collectionId
|
|
@@ -170,14 +161,13 @@ export declare class Databases extends Service {
|
|
|
170
161
|
* @param {boolean} xdefault
|
|
171
162
|
* @param {boolean} array
|
|
172
163
|
* @throws {AppwriteException}
|
|
173
|
-
* @returns {Promise}
|
|
174
|
-
|
|
164
|
+
* @returns {Promise<Models.AttributeBoolean>}
|
|
165
|
+
*/
|
|
175
166
|
createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
|
|
176
167
|
/**
|
|
177
168
|
* Update boolean attribute
|
|
178
169
|
*
|
|
179
|
-
* Update a boolean attribute. Changing the `default` value will not update
|
|
180
|
-
* already existing documents.
|
|
170
|
+
* Update a boolean attribute. Changing the `default` value will not update already existing documents.
|
|
181
171
|
*
|
|
182
172
|
* @param {string} databaseId
|
|
183
173
|
* @param {string} collectionId
|
|
@@ -185,8 +175,8 @@ export declare class Databases extends Service {
|
|
|
185
175
|
* @param {boolean} required
|
|
186
176
|
* @param {boolean} xdefault
|
|
187
177
|
* @throws {AppwriteException}
|
|
188
|
-
* @returns {Promise}
|
|
189
|
-
|
|
178
|
+
* @returns {Promise<Models.AttributeBoolean>}
|
|
179
|
+
*/
|
|
190
180
|
updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean): Promise<Models.AttributeBoolean>;
|
|
191
181
|
/**
|
|
192
182
|
* Create datetime attribute
|
|
@@ -200,14 +190,13 @@ export declare class Databases extends Service {
|
|
|
200
190
|
* @param {string} xdefault
|
|
201
191
|
* @param {boolean} array
|
|
202
192
|
* @throws {AppwriteException}
|
|
203
|
-
* @returns {Promise}
|
|
204
|
-
|
|
193
|
+
* @returns {Promise<Models.AttributeDatetime>}
|
|
194
|
+
*/
|
|
205
195
|
createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
|
|
206
196
|
/**
|
|
207
197
|
* Update dateTime attribute
|
|
208
198
|
*
|
|
209
|
-
* Update a date time attribute. Changing the `default` value will not update
|
|
210
|
-
* already existing documents.
|
|
199
|
+
* Update a date time attribute. Changing the `default` value will not update already existing documents.
|
|
211
200
|
*
|
|
212
201
|
* @param {string} databaseId
|
|
213
202
|
* @param {string} collectionId
|
|
@@ -215,14 +204,14 @@ export declare class Databases extends Service {
|
|
|
215
204
|
* @param {boolean} required
|
|
216
205
|
* @param {string} xdefault
|
|
217
206
|
* @throws {AppwriteException}
|
|
218
|
-
* @returns {Promise}
|
|
219
|
-
|
|
207
|
+
* @returns {Promise<Models.AttributeDatetime>}
|
|
208
|
+
*/
|
|
220
209
|
updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeDatetime>;
|
|
221
210
|
/**
|
|
222
211
|
* Create email attribute
|
|
223
212
|
*
|
|
224
213
|
* Create an email attribute.
|
|
225
|
-
|
|
214
|
+
|
|
226
215
|
*
|
|
227
216
|
* @param {string} databaseId
|
|
228
217
|
* @param {string} collectionId
|
|
@@ -231,15 +220,14 @@ export declare class Databases extends Service {
|
|
|
231
220
|
* @param {string} xdefault
|
|
232
221
|
* @param {boolean} array
|
|
233
222
|
* @throws {AppwriteException}
|
|
234
|
-
* @returns {Promise}
|
|
235
|
-
|
|
223
|
+
* @returns {Promise<Models.AttributeEmail>}
|
|
224
|
+
*/
|
|
236
225
|
createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
|
|
237
226
|
/**
|
|
238
227
|
* Update email attribute
|
|
239
228
|
*
|
|
240
|
-
* Update an email attribute. Changing the `default` value will not update
|
|
241
|
-
|
|
242
|
-
*
|
|
229
|
+
* Update an email attribute. Changing the `default` value will not update already existing documents.
|
|
230
|
+
|
|
243
231
|
*
|
|
244
232
|
* @param {string} databaseId
|
|
245
233
|
* @param {string} collectionId
|
|
@@ -247,15 +235,14 @@ export declare class Databases extends Service {
|
|
|
247
235
|
* @param {boolean} required
|
|
248
236
|
* @param {string} xdefault
|
|
249
237
|
* @throws {AppwriteException}
|
|
250
|
-
* @returns {Promise}
|
|
251
|
-
|
|
238
|
+
* @returns {Promise<Models.AttributeEmail>}
|
|
239
|
+
*/
|
|
252
240
|
updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeEmail>;
|
|
253
241
|
/**
|
|
254
242
|
* Create enum attribute
|
|
255
243
|
*
|
|
256
|
-
* Create an enumeration attribute. The `elements` param acts as a white-list
|
|
257
|
-
|
|
258
|
-
*
|
|
244
|
+
* Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
|
|
245
|
+
|
|
259
246
|
*
|
|
260
247
|
* @param {string} databaseId
|
|
261
248
|
* @param {string} collectionId
|
|
@@ -265,15 +252,14 @@ export declare class Databases extends Service {
|
|
|
265
252
|
* @param {string} xdefault
|
|
266
253
|
* @param {boolean} array
|
|
267
254
|
* @throws {AppwriteException}
|
|
268
|
-
* @returns {Promise}
|
|
269
|
-
|
|
255
|
+
* @returns {Promise<Models.AttributeEnum>}
|
|
256
|
+
*/
|
|
270
257
|
createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
|
|
271
258
|
/**
|
|
272
259
|
* Update enum attribute
|
|
273
260
|
*
|
|
274
|
-
* Update an enum attribute. Changing the `default` value will not update
|
|
275
|
-
|
|
276
|
-
*
|
|
261
|
+
* Update an enum attribute. Changing the `default` value will not update already existing documents.
|
|
262
|
+
|
|
277
263
|
*
|
|
278
264
|
* @param {string} databaseId
|
|
279
265
|
* @param {string} collectionId
|
|
@@ -282,15 +268,14 @@ export declare class Databases extends Service {
|
|
|
282
268
|
* @param {boolean} required
|
|
283
269
|
* @param {string} xdefault
|
|
284
270
|
* @throws {AppwriteException}
|
|
285
|
-
* @returns {Promise}
|
|
286
|
-
|
|
271
|
+
* @returns {Promise<Models.AttributeEnum>}
|
|
272
|
+
*/
|
|
287
273
|
updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string): Promise<Models.AttributeEnum>;
|
|
288
274
|
/**
|
|
289
275
|
* Create float attribute
|
|
290
276
|
*
|
|
291
|
-
* Create a float attribute. Optionally, minimum and maximum values can be
|
|
292
|
-
|
|
293
|
-
*
|
|
277
|
+
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
278
|
+
|
|
294
279
|
*
|
|
295
280
|
* @param {string} databaseId
|
|
296
281
|
* @param {string} collectionId
|
|
@@ -301,15 +286,14 @@ export declare class Databases extends Service {
|
|
|
301
286
|
* @param {number} xdefault
|
|
302
287
|
* @param {boolean} array
|
|
303
288
|
* @throws {AppwriteException}
|
|
304
|
-
* @returns {Promise}
|
|
305
|
-
|
|
289
|
+
* @returns {Promise<Models.AttributeFloat>}
|
|
290
|
+
*/
|
|
306
291
|
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
|
|
307
292
|
/**
|
|
308
293
|
* Update float attribute
|
|
309
294
|
*
|
|
310
|
-
* Update a float attribute. Changing the `default` value will not update
|
|
311
|
-
|
|
312
|
-
*
|
|
295
|
+
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
296
|
+
|
|
313
297
|
*
|
|
314
298
|
* @param {string} databaseId
|
|
315
299
|
* @param {string} collectionId
|
|
@@ -319,15 +303,14 @@ export declare class Databases extends Service {
|
|
|
319
303
|
* @param {number} max
|
|
320
304
|
* @param {number} xdefault
|
|
321
305
|
* @throws {AppwriteException}
|
|
322
|
-
* @returns {Promise}
|
|
323
|
-
|
|
306
|
+
* @returns {Promise<Models.AttributeFloat>}
|
|
307
|
+
*/
|
|
324
308
|
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeFloat>;
|
|
325
309
|
/**
|
|
326
310
|
* Create integer attribute
|
|
327
311
|
*
|
|
328
|
-
* Create an integer attribute. Optionally, minimum and maximum values can be
|
|
329
|
-
|
|
330
|
-
*
|
|
312
|
+
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
313
|
+
|
|
331
314
|
*
|
|
332
315
|
* @param {string} databaseId
|
|
333
316
|
* @param {string} collectionId
|
|
@@ -338,15 +321,14 @@ export declare class Databases extends Service {
|
|
|
338
321
|
* @param {number} xdefault
|
|
339
322
|
* @param {boolean} array
|
|
340
323
|
* @throws {AppwriteException}
|
|
341
|
-
* @returns {Promise}
|
|
342
|
-
|
|
324
|
+
* @returns {Promise<Models.AttributeInteger>}
|
|
325
|
+
*/
|
|
343
326
|
createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
|
|
344
327
|
/**
|
|
345
328
|
* Update integer attribute
|
|
346
329
|
*
|
|
347
|
-
* Update an integer attribute. Changing the `default` value will not update
|
|
348
|
-
|
|
349
|
-
*
|
|
330
|
+
* Update an integer attribute. Changing the `default` value will not update already existing documents.
|
|
331
|
+
|
|
350
332
|
*
|
|
351
333
|
* @param {string} databaseId
|
|
352
334
|
* @param {string} collectionId
|
|
@@ -356,14 +338,14 @@ export declare class Databases extends Service {
|
|
|
356
338
|
* @param {number} max
|
|
357
339
|
* @param {number} xdefault
|
|
358
340
|
* @throws {AppwriteException}
|
|
359
|
-
* @returns {Promise}
|
|
360
|
-
|
|
341
|
+
* @returns {Promise<Models.AttributeInteger>}
|
|
342
|
+
*/
|
|
361
343
|
updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeInteger>;
|
|
362
344
|
/**
|
|
363
345
|
* Create IP address attribute
|
|
364
346
|
*
|
|
365
347
|
* Create IP address attribute.
|
|
366
|
-
|
|
348
|
+
|
|
367
349
|
*
|
|
368
350
|
* @param {string} databaseId
|
|
369
351
|
* @param {string} collectionId
|
|
@@ -372,15 +354,14 @@ export declare class Databases extends Service {
|
|
|
372
354
|
* @param {string} xdefault
|
|
373
355
|
* @param {boolean} array
|
|
374
356
|
* @throws {AppwriteException}
|
|
375
|
-
* @returns {Promise}
|
|
376
|
-
|
|
357
|
+
* @returns {Promise<Models.AttributeIp>}
|
|
358
|
+
*/
|
|
377
359
|
createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
|
|
378
360
|
/**
|
|
379
361
|
* Update IP address attribute
|
|
380
362
|
*
|
|
381
|
-
* Update an ip attribute. Changing the `default` value will not update
|
|
382
|
-
|
|
383
|
-
*
|
|
363
|
+
* Update an ip attribute. Changing the `default` value will not update already existing documents.
|
|
364
|
+
|
|
384
365
|
*
|
|
385
366
|
* @param {string} databaseId
|
|
386
367
|
* @param {string} collectionId
|
|
@@ -388,15 +369,14 @@ export declare class Databases extends Service {
|
|
|
388
369
|
* @param {boolean} required
|
|
389
370
|
* @param {string} xdefault
|
|
390
371
|
* @throws {AppwriteException}
|
|
391
|
-
* @returns {Promise}
|
|
392
|
-
|
|
372
|
+
* @returns {Promise<Models.AttributeIp>}
|
|
373
|
+
*/
|
|
393
374
|
updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeIp>;
|
|
394
375
|
/**
|
|
395
376
|
* Create relationship attribute
|
|
396
377
|
*
|
|
397
|
-
* Create relationship attribute. [Learn more about relationship
|
|
398
|
-
|
|
399
|
-
*
|
|
378
|
+
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
379
|
+
|
|
400
380
|
*
|
|
401
381
|
* @param {string} databaseId
|
|
402
382
|
* @param {string} collectionId
|
|
@@ -407,14 +387,14 @@ export declare class Databases extends Service {
|
|
|
407
387
|
* @param {string} twoWayKey
|
|
408
388
|
* @param {RelationMutate} onDelete
|
|
409
389
|
* @throws {AppwriteException}
|
|
410
|
-
* @returns {Promise}
|
|
411
|
-
|
|
390
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
391
|
+
*/
|
|
412
392
|
createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
|
|
413
393
|
/**
|
|
414
394
|
* Create string attribute
|
|
415
395
|
*
|
|
416
396
|
* Create a string attribute.
|
|
417
|
-
|
|
397
|
+
|
|
418
398
|
*
|
|
419
399
|
* @param {string} databaseId
|
|
420
400
|
* @param {string} collectionId
|
|
@@ -425,15 +405,14 @@ export declare class Databases extends Service {
|
|
|
425
405
|
* @param {boolean} array
|
|
426
406
|
* @param {boolean} encrypt
|
|
427
407
|
* @throws {AppwriteException}
|
|
428
|
-
* @returns {Promise}
|
|
429
|
-
|
|
408
|
+
* @returns {Promise<Models.AttributeString>}
|
|
409
|
+
*/
|
|
430
410
|
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
|
|
431
411
|
/**
|
|
432
412
|
* Update string attribute
|
|
433
413
|
*
|
|
434
|
-
* Update a string attribute. Changing the `default` value will not update
|
|
435
|
-
|
|
436
|
-
*
|
|
414
|
+
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
415
|
+
|
|
437
416
|
*
|
|
438
417
|
* @param {string} databaseId
|
|
439
418
|
* @param {string} collectionId
|
|
@@ -441,14 +420,14 @@ export declare class Databases extends Service {
|
|
|
441
420
|
* @param {boolean} required
|
|
442
421
|
* @param {string} xdefault
|
|
443
422
|
* @throws {AppwriteException}
|
|
444
|
-
* @returns {Promise}
|
|
445
|
-
|
|
423
|
+
* @returns {Promise<Models.AttributeString>}
|
|
424
|
+
*/
|
|
446
425
|
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeString>;
|
|
447
426
|
/**
|
|
448
427
|
* Create URL attribute
|
|
449
428
|
*
|
|
450
429
|
* Create a URL attribute.
|
|
451
|
-
|
|
430
|
+
|
|
452
431
|
*
|
|
453
432
|
* @param {string} databaseId
|
|
454
433
|
* @param {string} collectionId
|
|
@@ -457,15 +436,14 @@ export declare class Databases extends Service {
|
|
|
457
436
|
* @param {string} xdefault
|
|
458
437
|
* @param {boolean} array
|
|
459
438
|
* @throws {AppwriteException}
|
|
460
|
-
* @returns {Promise}
|
|
461
|
-
|
|
439
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
440
|
+
*/
|
|
462
441
|
createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
|
|
463
442
|
/**
|
|
464
443
|
* Update URL attribute
|
|
465
444
|
*
|
|
466
|
-
* Update an url attribute. Changing the `default` value will not update
|
|
467
|
-
|
|
468
|
-
*
|
|
445
|
+
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
446
|
+
|
|
469
447
|
*
|
|
470
448
|
* @param {string} databaseId
|
|
471
449
|
* @param {string} collectionId
|
|
@@ -473,8 +451,8 @@ export declare class Databases extends Service {
|
|
|
473
451
|
* @param {boolean} required
|
|
474
452
|
* @param {string} xdefault
|
|
475
453
|
* @throws {AppwriteException}
|
|
476
|
-
* @returns {Promise}
|
|
477
|
-
|
|
454
|
+
* @returns {Promise<Models.AttributeUrl>}
|
|
455
|
+
*/
|
|
478
456
|
updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeUrl>;
|
|
479
457
|
/**
|
|
480
458
|
* Get attribute
|
|
@@ -485,8 +463,8 @@ export declare class Databases extends Service {
|
|
|
485
463
|
* @param {string} collectionId
|
|
486
464
|
* @param {string} key
|
|
487
465
|
* @throws {AppwriteException}
|
|
488
|
-
* @returns {Promise}
|
|
489
|
-
|
|
466
|
+
* @returns {Promise<{}>}
|
|
467
|
+
*/
|
|
490
468
|
getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
491
469
|
/**
|
|
492
470
|
* Delete attribute
|
|
@@ -497,44 +475,39 @@ export declare class Databases extends Service {
|
|
|
497
475
|
* @param {string} collectionId
|
|
498
476
|
* @param {string} key
|
|
499
477
|
* @throws {AppwriteException}
|
|
500
|
-
* @returns {Promise}
|
|
501
|
-
|
|
478
|
+
* @returns {Promise<{}>}
|
|
479
|
+
*/
|
|
502
480
|
deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
503
481
|
/**
|
|
504
482
|
* Update relationship attribute
|
|
505
483
|
*
|
|
506
|
-
* Update relationship attribute. [Learn more about relationship
|
|
507
|
-
|
|
508
|
-
*
|
|
484
|
+
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
485
|
+
|
|
509
486
|
*
|
|
510
487
|
* @param {string} databaseId
|
|
511
488
|
* @param {string} collectionId
|
|
512
489
|
* @param {string} key
|
|
513
490
|
* @param {RelationMutate} onDelete
|
|
514
491
|
* @throws {AppwriteException}
|
|
515
|
-
* @returns {Promise}
|
|
516
|
-
|
|
492
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
493
|
+
*/
|
|
517
494
|
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
|
|
518
495
|
/**
|
|
519
496
|
* List documents
|
|
520
497
|
*
|
|
521
|
-
* Get a list of all the user
|
|
522
|
-
* the query params to filter your results.
|
|
498
|
+
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
523
499
|
*
|
|
524
500
|
* @param {string} databaseId
|
|
525
501
|
* @param {string} collectionId
|
|
526
502
|
* @param {string[]} queries
|
|
527
503
|
* @throws {AppwriteException}
|
|
528
|
-
* @returns {Promise}
|
|
529
|
-
|
|
504
|
+
* @returns {Promise<Models.DocumentList<Document>>}
|
|
505
|
+
*/
|
|
530
506
|
listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
531
507
|
/**
|
|
532
508
|
* Create document
|
|
533
509
|
*
|
|
534
|
-
* Create a new Document. Before using this route, you should create a new
|
|
535
|
-
* collection resource using either a [server
|
|
536
|
-
* integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
|
537
|
-
* API or directly from your database console.
|
|
510
|
+
* 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.
|
|
538
511
|
*
|
|
539
512
|
* @param {string} databaseId
|
|
540
513
|
* @param {string} collectionId
|
|
@@ -542,28 +515,26 @@ export declare class Databases extends Service {
|
|
|
542
515
|
* @param {Omit<Document, keyof Models.Document>} data
|
|
543
516
|
* @param {string[]} permissions
|
|
544
517
|
* @throws {AppwriteException}
|
|
545
|
-
* @returns {Promise}
|
|
546
|
-
|
|
518
|
+
* @returns {Promise<Document>}
|
|
519
|
+
*/
|
|
547
520
|
createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
|
|
548
521
|
/**
|
|
549
522
|
* Get document
|
|
550
523
|
*
|
|
551
|
-
* Get a document by its unique ID. This endpoint response returns a JSON
|
|
552
|
-
* object with the document data.
|
|
524
|
+
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
553
525
|
*
|
|
554
526
|
* @param {string} databaseId
|
|
555
527
|
* @param {string} collectionId
|
|
556
528
|
* @param {string} documentId
|
|
557
529
|
* @param {string[]} queries
|
|
558
530
|
* @throws {AppwriteException}
|
|
559
|
-
* @returns {Promise}
|
|
560
|
-
|
|
531
|
+
* @returns {Promise<Document>}
|
|
532
|
+
*/
|
|
561
533
|
getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
|
|
562
534
|
/**
|
|
563
535
|
* Update document
|
|
564
536
|
*
|
|
565
|
-
* Update a document by its unique ID. Using the patch method you can pass
|
|
566
|
-
* only specific fields that will get updated.
|
|
537
|
+
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
567
538
|
*
|
|
568
539
|
* @param {string} databaseId
|
|
569
540
|
* @param {string} collectionId
|
|
@@ -571,8 +542,8 @@ export declare class Databases extends Service {
|
|
|
571
542
|
* @param {Partial<Omit<Document, keyof Models.Document>>} data
|
|
572
543
|
* @param {string[]} permissions
|
|
573
544
|
* @throws {AppwriteException}
|
|
574
|
-
* @returns {Promise}
|
|
575
|
-
|
|
545
|
+
* @returns {Promise<Document>}
|
|
546
|
+
*/
|
|
576
547
|
updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
|
|
577
548
|
/**
|
|
578
549
|
* Delete document
|
|
@@ -583,8 +554,8 @@ export declare class Databases extends Service {
|
|
|
583
554
|
* @param {string} collectionId
|
|
584
555
|
* @param {string} documentId
|
|
585
556
|
* @throws {AppwriteException}
|
|
586
|
-
* @returns {Promise}
|
|
587
|
-
|
|
557
|
+
* @returns {Promise<{}>}
|
|
558
|
+
*/
|
|
588
559
|
deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
|
|
589
560
|
/**
|
|
590
561
|
* List document logs
|
|
@@ -596,8 +567,8 @@ export declare class Databases extends Service {
|
|
|
596
567
|
* @param {string} documentId
|
|
597
568
|
* @param {string[]} queries
|
|
598
569
|
* @throws {AppwriteException}
|
|
599
|
-
* @returns {Promise}
|
|
600
|
-
|
|
570
|
+
* @returns {Promise<Models.LogList>}
|
|
571
|
+
*/
|
|
601
572
|
listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList>;
|
|
602
573
|
/**
|
|
603
574
|
* List indexes
|
|
@@ -608,15 +579,14 @@ export declare class Databases extends Service {
|
|
|
608
579
|
* @param {string} collectionId
|
|
609
580
|
* @param {string[]} queries
|
|
610
581
|
* @throws {AppwriteException}
|
|
611
|
-
* @returns {Promise}
|
|
612
|
-
|
|
582
|
+
* @returns {Promise<Models.IndexList>}
|
|
583
|
+
*/
|
|
613
584
|
listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
|
|
614
585
|
/**
|
|
615
586
|
* Create index
|
|
616
587
|
*
|
|
617
|
-
* Creates an index on the attributes listed. Your index should include all
|
|
618
|
-
|
|
619
|
-
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
588
|
+
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
589
|
+
Attributes can be `key`, `fulltext`, and `unique`.
|
|
620
590
|
*
|
|
621
591
|
* @param {string} databaseId
|
|
622
592
|
* @param {string} collectionId
|
|
@@ -625,8 +595,8 @@ export declare class Databases extends Service {
|
|
|
625
595
|
* @param {string[]} attributes
|
|
626
596
|
* @param {string[]} orders
|
|
627
597
|
* @throws {AppwriteException}
|
|
628
|
-
* @returns {Promise}
|
|
629
|
-
|
|
598
|
+
* @returns {Promise<Models.Index>}
|
|
599
|
+
*/
|
|
630
600
|
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[]): Promise<Models.Index>;
|
|
631
601
|
/**
|
|
632
602
|
* Get index
|
|
@@ -637,8 +607,8 @@ export declare class Databases extends Service {
|
|
|
637
607
|
* @param {string} collectionId
|
|
638
608
|
* @param {string} key
|
|
639
609
|
* @throws {AppwriteException}
|
|
640
|
-
* @returns {Promise}
|
|
641
|
-
|
|
610
|
+
* @returns {Promise<Models.Index>}
|
|
611
|
+
*/
|
|
642
612
|
getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
|
|
643
613
|
/**
|
|
644
614
|
* Delete index
|
|
@@ -649,8 +619,8 @@ export declare class Databases extends Service {
|
|
|
649
619
|
* @param {string} collectionId
|
|
650
620
|
* @param {string} key
|
|
651
621
|
* @throws {AppwriteException}
|
|
652
|
-
* @returns {Promise}
|
|
653
|
-
|
|
622
|
+
* @returns {Promise<{}>}
|
|
623
|
+
*/
|
|
654
624
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
655
625
|
/**
|
|
656
626
|
* List collection logs
|
|
@@ -661,8 +631,8 @@ export declare class Databases extends Service {
|
|
|
661
631
|
* @param {string} collectionId
|
|
662
632
|
* @param {string[]} queries
|
|
663
633
|
* @throws {AppwriteException}
|
|
664
|
-
* @returns {Promise}
|
|
665
|
-
|
|
634
|
+
* @returns {Promise<Models.LogList>}
|
|
635
|
+
*/
|
|
666
636
|
listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList>;
|
|
667
637
|
/**
|
|
668
638
|
* Get collection usage stats
|
|
@@ -672,8 +642,8 @@ export declare class Databases extends Service {
|
|
|
672
642
|
* @param {string} collectionId
|
|
673
643
|
* @param {DatabaseUsageRange} range
|
|
674
644
|
* @throws {AppwriteException}
|
|
675
|
-
* @returns {Promise}
|
|
676
|
-
|
|
645
|
+
* @returns {Promise<Models.UsageCollection>}
|
|
646
|
+
*/
|
|
677
647
|
getCollectionUsage(databaseId: string, collectionId: string, range?: DatabaseUsageRange): Promise<Models.UsageCollection>;
|
|
678
648
|
/**
|
|
679
649
|
* List database logs
|
|
@@ -683,8 +653,8 @@ export declare class Databases extends Service {
|
|
|
683
653
|
* @param {string} databaseId
|
|
684
654
|
* @param {string[]} queries
|
|
685
655
|
* @throws {AppwriteException}
|
|
686
|
-
* @returns {Promise}
|
|
687
|
-
|
|
656
|
+
* @returns {Promise<Models.LogList>}
|
|
657
|
+
*/
|
|
688
658
|
listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList>;
|
|
689
659
|
/**
|
|
690
660
|
* Get database usage stats
|
|
@@ -693,7 +663,7 @@ export declare class Databases extends Service {
|
|
|
693
663
|
* @param {string} databaseId
|
|
694
664
|
* @param {DatabaseUsageRange} range
|
|
695
665
|
* @throws {AppwriteException}
|
|
696
|
-
* @returns {Promise}
|
|
697
|
-
|
|
666
|
+
* @returns {Promise<Models.UsageDatabase>}
|
|
667
|
+
*/
|
|
698
668
|
getDatabaseUsage(databaseId: string, range?: DatabaseUsageRange): Promise<Models.UsageDatabase>;
|
|
699
669
|
}
|