@appwrite.io/console 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/README.md +3 -3
- package/dist/cjs/sdk.js +6731 -3907
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +6729 -3908
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +6731 -3907
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-billing-address.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-o-auth2session.md +1 -1
- package/docs/examples/account/create-o-auth2token.md +1 -1
- package/docs/examples/account/create-payment-method.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-billing-address.md +1 -1
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-mfa-authenticator.md +1 -1
- package/docs/examples/account/delete-payment-method.md +1 -1
- 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-billing-address.md +1 -1
- package/docs/examples/account/get-coupon.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-payment-method.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-billing-addresses.md +1 -1
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-invoices.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-payment-methods.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-billing-address.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-payment-method-mandate-options.md +1 -1
- package/docs/examples/account/update-payment-method-provider.md +1 -1
- package/docs/examples/account/update-payment-method.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/avatars/get-browser.md +2 -2
- package/docs/examples/avatars/get-credit-card.md +2 -2
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +2 -2
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/backups/create-archive.md +1 -1
- package/docs/examples/backups/create-policy.md +1 -1
- package/docs/examples/backups/create-restoration.md +1 -1
- package/docs/examples/backups/delete-archive.md +1 -1
- package/docs/examples/backups/delete-policy.md +1 -1
- package/docs/examples/backups/get-archive.md +1 -1
- package/docs/examples/backups/get-policy.md +1 -1
- package/docs/examples/backups/get-restoration.md +1 -1
- package/docs/examples/backups/list-archives.md +1 -1
- package/docs/examples/backups/list-policies.md +1 -1
- package/docs/examples/backups/list-restorations.md +1 -1
- package/docs/examples/backups/update-policy.md +1 -1
- package/docs/examples/console/create-program-membership.md +1 -1
- package/docs/examples/console/create-source.md +1 -1
- package/docs/examples/console/get-campaign.md +1 -1
- package/docs/examples/console/get-coupon.md +1 -1
- package/docs/examples/console/get-resource.md +14 -0
- package/docs/examples/console/plans.md +1 -1
- package/docs/examples/console/regions.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 +4 -2
- package/docs/examples/databases/create-documents.md +15 -0
- 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 +3 -2
- 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-documents.md +15 -0
- 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-documents.md +16 -0
- 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/databases/upsert-documents.md +15 -0
- package/docs/examples/domains/create-preset-google-workspace.md +13 -0
- package/docs/examples/domains/create-preset-i-cloud.md +13 -0
- package/docs/examples/domains/create-preset-mailgun.md +13 -0
- package/docs/examples/domains/create-preset-outlook.md +13 -0
- package/docs/examples/domains/create-preset-proton-mail.md +13 -0
- package/docs/examples/domains/create-preset-zoho.md +13 -0
- package/docs/examples/domains/create-record-a-a-a-a.md +17 -0
- package/docs/examples/domains/create-record-a.md +17 -0
- package/docs/examples/domains/create-record-alias.md +17 -0
- package/docs/examples/domains/create-record-c-a-a.md +17 -0
- package/docs/examples/domains/create-record-c-n-a-m-e.md +17 -0
- package/docs/examples/domains/create-record-h-t-t-p-s.md +17 -0
- package/docs/examples/domains/create-record-m-x.md +18 -0
- package/docs/examples/domains/create-record-n-s.md +17 -0
- package/docs/examples/domains/create-record-s-r-v.md +20 -0
- package/docs/examples/domains/create-record-t-x-t.md +17 -0
- package/docs/examples/domains/create.md +14 -0
- package/docs/examples/domains/delete-record.md +14 -0
- package/docs/examples/domains/delete.md +13 -0
- package/docs/examples/domains/get-preset-google-workspace.md +13 -0
- package/docs/examples/domains/get-preset-i-cloud.md +13 -0
- package/docs/examples/domains/get-preset-mailgun.md +13 -0
- package/docs/examples/domains/get-preset-outlook.md +13 -0
- package/docs/examples/domains/get-preset-proton-mail.md +13 -0
- package/docs/examples/domains/get-preset-zoho.md +13 -0
- package/docs/examples/domains/get-record.md +14 -0
- package/docs/examples/domains/get-zone.md +13 -0
- package/docs/examples/domains/get.md +13 -0
- package/docs/examples/domains/list-records.md +14 -0
- package/docs/examples/domains/list.md +14 -0
- package/docs/examples/domains/update-nameservers.md +13 -0
- package/docs/examples/domains/update-record-a-a-a-a.md +18 -0
- package/docs/examples/domains/update-record-a.md +18 -0
- package/docs/examples/domains/update-record-alias.md +18 -0
- package/docs/examples/domains/update-record-c-a-a.md +18 -0
- package/docs/examples/domains/update-record-c-n-a-m-e.md +18 -0
- package/docs/examples/domains/update-record-h-t-t-p-s.md +18 -0
- package/docs/examples/domains/update-record-m-x.md +19 -0
- package/docs/examples/domains/update-record-n-s.md +18 -0
- package/docs/examples/domains/update-record-s-r-v.md +21 -0
- package/docs/examples/domains/update-record-t-x-t.md +18 -0
- package/docs/examples/domains/update-team.md +14 -0
- package/docs/examples/domains/update-zone.md +14 -0
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-duplicate-deployment.md +15 -0
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-template-deployment.md +18 -0
- package/docs/examples/functions/create-variable.md +3 -2
- package/docs/examples/functions/create-vcs-deployment.md +16 -0
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-execution.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/get-deployment-download.md +4 -3
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-template.md +1 -1
- package/docs/examples/functions/get-usage.md +2 -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 +2 -3
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-specifications.md +1 -1
- package/docs/examples/functions/list-templates.md +1 -1
- package/docs/examples/functions/list-usage.md +13 -0
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment-status.md +14 -0
- package/docs/examples/functions/update-function-deployment.md +14 -0
- package/docs/examples/functions/update-variable.md +3 -2
- package/docs/examples/functions/update.md +1 -1
- 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-billing-aggregation.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-priority-builds.md +1 -1
- package/docs/examples/health/get-queue-region-manager.md +13 -0
- package/docs/examples/health/get-queue-stats-resources.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-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-csv-migration.md +15 -0
- package/docs/examples/migrations/create-firebase-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.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.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.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/organizations/add-credit.md +1 -1
- package/docs/examples/organizations/create-invoice-payment.md +1 -1
- package/docs/examples/organizations/create.md +1 -1
- package/docs/examples/organizations/delete-backup-payment-method.md +1 -1
- package/docs/examples/organizations/delete-billing-address.md +1 -1
- package/docs/examples/organizations/delete-default-payment-method.md +1 -1
- package/docs/examples/organizations/delete.md +1 -1
- package/docs/examples/organizations/get-aggregation.md +1 -1
- package/docs/examples/organizations/get-billing-address.md +1 -1
- package/docs/examples/organizations/get-credit.md +1 -1
- package/docs/examples/organizations/get-invoice-download.md +1 -1
- package/docs/examples/organizations/get-invoice-view.md +1 -1
- package/docs/examples/organizations/get-invoice.md +1 -1
- package/docs/examples/organizations/get-payment-method.md +1 -1
- package/docs/examples/organizations/get-plan.md +1 -1
- package/docs/examples/organizations/get-scopes.md +1 -1
- package/docs/examples/organizations/list-aggregations.md +1 -1
- package/docs/examples/organizations/list-credits.md +1 -1
- package/docs/examples/organizations/list-invoices.md +1 -1
- package/docs/examples/organizations/list.md +1 -1
- package/docs/examples/organizations/set-backup-payment-method.md +1 -1
- package/docs/examples/organizations/set-billing-address.md +1 -1
- package/docs/examples/organizations/set-billing-email.md +1 -1
- package/docs/examples/organizations/set-billing-tax-id.md +1 -1
- package/docs/examples/organizations/set-default-payment-method.md +1 -1
- package/docs/examples/organizations/update-budget.md +1 -1
- package/docs/examples/organizations/update-plan.md +1 -1
- package/docs/examples/organizations/validate-invoice.md +1 -1
- package/docs/examples/project/create-variable.md +3 -2
- 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 +3 -2
- package/docs/examples/projects/create-dev-key.md +15 -0
- package/docs/examples/projects/create-j-w-t.md +1 -1
- 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 +2 -2
- package/docs/examples/projects/delete-dev-key.md +14 -0
- 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-dev-key.md +14 -0
- 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-dev-keys.md +14 -0
- 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-dev-key.md +16 -0
- package/docs/examples/projects/update-email-template.md +1 -1
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-memberships-privacy.md +1 -1
- package/docs/examples/projects/update-mock-numbers.md +1 -1
- 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 +1 -1
- 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-a-p-i-rule.md +13 -0
- package/docs/examples/proxy/create-function-rule.md +15 -0
- package/docs/examples/proxy/create-redirect-rule.md +15 -0
- package/docs/examples/proxy/create-site-rule.md +15 -0
- 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/sites/create-deployment.md +18 -0
- package/docs/examples/sites/create-duplicate-deployment.md +14 -0
- package/docs/examples/sites/create-template-deployment.md +18 -0
- package/docs/examples/sites/create-variable.md +16 -0
- package/docs/examples/sites/create-vcs-deployment.md +16 -0
- package/docs/examples/sites/create.md +30 -0
- package/docs/examples/sites/delete-deployment.md +14 -0
- package/docs/examples/sites/delete-log.md +14 -0
- package/docs/examples/sites/delete-variable.md +14 -0
- package/docs/examples/sites/delete.md +13 -0
- package/docs/examples/sites/get-deployment-download.md +15 -0
- package/docs/examples/sites/get-deployment.md +14 -0
- package/docs/examples/sites/get-log.md +14 -0
- package/docs/examples/sites/get-template.md +13 -0
- package/docs/examples/sites/get-usage.md +14 -0
- package/docs/examples/sites/get-variable.md +14 -0
- package/docs/examples/sites/get.md +13 -0
- package/docs/examples/sites/list-deployments.md +15 -0
- package/docs/examples/sites/list-frameworks.md +11 -0
- package/docs/examples/sites/list-logs.md +14 -0
- package/docs/examples/sites/list-specifications.md +11 -0
- package/docs/examples/sites/list-templates.md +16 -0
- package/docs/examples/sites/list-usage.md +13 -0
- package/docs/examples/sites/list-variables.md +13 -0
- package/docs/examples/sites/list.md +14 -0
- package/docs/examples/sites/update-deployment-status.md +14 -0
- package/docs/examples/sites/update-site-deployment.md +14 -0
- package/docs/examples/sites/update-variable.md +17 -0
- package/docs/examples/sites/update.md +30 -0
- 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-download.md +3 -2
- package/docs/examples/storage/get-file-preview.md +4 -3
- package/docs/examples/storage/get-file-view.md +3 -2
- 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/tokens/create-file-token.md +15 -0
- package/docs/examples/tokens/delete.md +13 -0
- package/docs/examples/tokens/get.md +13 -0
- package/docs/examples/tokens/list.md +15 -0
- package/docs/examples/tokens/update.md +14 -0
- 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 +1 -1
- 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 +4 -2
- 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 +3 -2
- 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 +1 -1
- 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 +3 -2
- 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 +12 -2
- package/src/enums/adapter.ts +4 -0
- package/src/enums/api-service.ts +1 -0
- package/src/enums/build-runtime.ts +62 -0
- package/src/enums/console-resource-type.ts +3 -0
- package/src/enums/deployment-download-type.ts +4 -0
- package/src/enums/framework.ts +16 -0
- package/src/enums/image-format.ts +0 -1
- package/src/enums/name.ts +0 -1
- package/src/enums/region.ts +2 -1
- package/src/enums/runtime.ts +4 -3
- package/src/enums/site-usage-range.ts +5 -0
- package/src/enums/status-code.ts +6 -0
- package/src/enums/v-c-s-deployment-type.ts +5 -0
- package/src/enums/v-c-s-detection-type.ts +4 -0
- package/src/index.ts +13 -2
- package/src/models.ts +1092 -221
- package/src/services/account.ts +0 -16
- package/src/services/avatars.ts +0 -7
- package/src/services/backups.ts +0 -6
- package/src/services/console.ts +36 -5
- package/src/services/databases.ts +149 -18
- package/src/services/domains.ts +1821 -0
- package/src/services/functions.ts +174 -69
- package/src/services/health.ts +9 -34
- package/src/services/locale.ts +0 -8
- package/src/services/messaging.ts +0 -13
- package/src/services/migrations.ts +43 -6
- package/src/services/organizations.ts +0 -47
- package/src/services/project.ts +10 -5
- package/src/services/projects.ts +172 -10
- package/src/services/proxy.ts +124 -14
- package/src/services/sites.ts +1104 -0
- package/src/services/storage.ts +15 -12
- package/src/services/teams.ts +0 -6
- package/src/services/tokens.ts +160 -0
- package/src/services/users.ts +9 -13
- package/src/services/vcs.ts +54 -42
- package/types/enums/adapter.d.ts +4 -0
- package/types/enums/api-service.d.ts +1 -0
- package/types/enums/build-runtime.d.ts +62 -0
- package/types/enums/console-resource-type.d.ts +3 -0
- package/types/enums/deployment-download-type.d.ts +4 -0
- package/types/enums/framework.d.ts +16 -0
- package/types/enums/image-format.d.ts +0 -1
- package/types/enums/name.d.ts +0 -1
- package/types/enums/region.d.ts +3 -2
- package/types/enums/runtime.d.ts +5 -4
- package/types/enums/site-usage-range.d.ts +5 -0
- package/types/enums/status-code.d.ts +6 -0
- package/types/enums/v-c-s-deployment-type.d.ts +5 -0
- package/types/enums/v-c-s-detection-type.d.ts +4 -0
- package/types/index.d.ts +13 -2
- package/types/models.d.ts +1092 -221
- package/types/services/console.d.ts +10 -0
- package/types/services/databases.d.ts +44 -2
- package/types/services/domains.d.ts +524 -0
- package/types/services/functions.d.ts +60 -30
- package/types/services/health.d.ts +6 -6
- package/types/services/migrations.d.ts +10 -0
- package/types/services/organizations.d.ts +0 -10
- package/types/services/project.d.ts +4 -2
- package/types/services/projects.d.ts +48 -0
- package/types/services/proxy.d.ts +33 -5
- package/types/services/sites.d.ts +319 -0
- package/types/services/storage.d.ts +6 -3
- package/types/services/tokens.d.ts +51 -0
- package/types/services/users.d.ts +3 -1
- package/types/services/vcs.d.ts +15 -12
package/src/services/storage.ts
CHANGED
|
@@ -33,7 +33,6 @@ export class Storage {
|
|
|
33
33
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
34
34
|
|
|
35
35
|
const apiHeaders: { [header: string]: string } = {
|
|
36
|
-
'content-type': 'application/json',
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
return this.client.call(
|
|
@@ -127,7 +126,6 @@ export class Storage {
|
|
|
127
126
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
128
127
|
|
|
129
128
|
const apiHeaders: { [header: string]: string } = {
|
|
130
|
-
'content-type': 'application/json',
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
return this.client.call(
|
|
@@ -252,7 +250,6 @@ export class Storage {
|
|
|
252
250
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
253
251
|
|
|
254
252
|
const apiHeaders: { [header: string]: string } = {
|
|
255
|
-
'content-type': 'application/json',
|
|
256
253
|
}
|
|
257
254
|
|
|
258
255
|
return this.client.call(
|
|
@@ -334,7 +331,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
334
331
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
335
332
|
|
|
336
333
|
const apiHeaders: { [header: string]: string } = {
|
|
337
|
-
'content-type': 'application/json',
|
|
338
334
|
}
|
|
339
335
|
|
|
340
336
|
return this.client.call(
|
|
@@ -417,10 +413,11 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
417
413
|
*
|
|
418
414
|
* @param {string} bucketId
|
|
419
415
|
* @param {string} fileId
|
|
416
|
+
* @param {string} token
|
|
420
417
|
* @throws {AppwriteException}
|
|
421
418
|
* @returns {string}
|
|
422
419
|
*/
|
|
423
|
-
getFileDownload(bucketId: string, fileId: string): string {
|
|
420
|
+
getFileDownload(bucketId: string, fileId: string, token?: string): string {
|
|
424
421
|
if (typeof bucketId === 'undefined') {
|
|
425
422
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
426
423
|
}
|
|
@@ -429,10 +426,12 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
429
426
|
}
|
|
430
427
|
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
431
428
|
const payload: Payload = {};
|
|
429
|
+
if (typeof token !== 'undefined') {
|
|
430
|
+
payload['token'] = token;
|
|
431
|
+
}
|
|
432
432
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
433
433
|
|
|
434
434
|
const apiHeaders: { [header: string]: string } = {
|
|
435
|
-
'content-type': 'application/json',
|
|
436
435
|
}
|
|
437
436
|
|
|
438
437
|
payload['project'] = this.client.config.project;
|
|
@@ -459,10 +458,11 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
459
458
|
* @param {number} rotation
|
|
460
459
|
* @param {string} background
|
|
461
460
|
* @param {ImageFormat} output
|
|
461
|
+
* @param {string} token
|
|
462
462
|
* @throws {AppwriteException}
|
|
463
463
|
* @returns {string}
|
|
464
464
|
*/
|
|
465
|
-
getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat): string {
|
|
465
|
+
getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string): string {
|
|
466
466
|
if (typeof bucketId === 'undefined') {
|
|
467
467
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
468
468
|
}
|
|
@@ -504,10 +504,12 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
504
504
|
if (typeof output !== 'undefined') {
|
|
505
505
|
payload['output'] = output;
|
|
506
506
|
}
|
|
507
|
+
if (typeof token !== 'undefined') {
|
|
508
|
+
payload['token'] = token;
|
|
509
|
+
}
|
|
507
510
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
508
511
|
|
|
509
512
|
const apiHeaders: { [header: string]: string } = {
|
|
510
|
-
'content-type': 'application/json',
|
|
511
513
|
}
|
|
512
514
|
|
|
513
515
|
payload['project'] = this.client.config.project;
|
|
@@ -523,10 +525,11 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
523
525
|
*
|
|
524
526
|
* @param {string} bucketId
|
|
525
527
|
* @param {string} fileId
|
|
528
|
+
* @param {string} token
|
|
526
529
|
* @throws {AppwriteException}
|
|
527
530
|
* @returns {string}
|
|
528
531
|
*/
|
|
529
|
-
getFileView(bucketId: string, fileId: string): string {
|
|
532
|
+
getFileView(bucketId: string, fileId: string, token?: string): string {
|
|
530
533
|
if (typeof bucketId === 'undefined') {
|
|
531
534
|
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
532
535
|
}
|
|
@@ -535,10 +538,12 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
535
538
|
}
|
|
536
539
|
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
537
540
|
const payload: Payload = {};
|
|
541
|
+
if (typeof token !== 'undefined') {
|
|
542
|
+
payload['token'] = token;
|
|
543
|
+
}
|
|
538
544
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
539
545
|
|
|
540
546
|
const apiHeaders: { [header: string]: string } = {
|
|
541
|
-
'content-type': 'application/json',
|
|
542
547
|
}
|
|
543
548
|
|
|
544
549
|
payload['project'] = this.client.config.project;
|
|
@@ -566,7 +571,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
566
571
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
567
572
|
|
|
568
573
|
const apiHeaders: { [header: string]: string } = {
|
|
569
|
-
'content-type': 'application/json',
|
|
570
574
|
}
|
|
571
575
|
|
|
572
576
|
return this.client.call(
|
|
@@ -597,7 +601,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk
|
|
|
597
601
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
598
602
|
|
|
599
603
|
const apiHeaders: { [header: string]: string } = {
|
|
600
|
-
'content-type': 'application/json',
|
|
601
604
|
}
|
|
602
605
|
|
|
603
606
|
return this.client.call(
|
package/src/services/teams.ts
CHANGED
|
@@ -29,7 +29,6 @@ export class Teams {
|
|
|
29
29
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
30
30
|
|
|
31
31
|
const apiHeaders: { [header: string]: string } = {
|
|
32
|
-
'content-type': 'application/json',
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
return this.client.call(
|
|
@@ -95,7 +94,6 @@ export class Teams {
|
|
|
95
94
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
96
95
|
|
|
97
96
|
const apiHeaders: { [header: string]: string } = {
|
|
98
|
-
'content-type': 'application/json',
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
return this.client.call(
|
|
@@ -184,7 +182,6 @@ export class Teams {
|
|
|
184
182
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
185
183
|
|
|
186
184
|
const apiHeaders: { [header: string]: string } = {
|
|
187
|
-
'content-type': 'application/json',
|
|
188
185
|
}
|
|
189
186
|
|
|
190
187
|
return this.client.call(
|
|
@@ -218,7 +215,6 @@ export class Teams {
|
|
|
218
215
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
219
216
|
|
|
220
217
|
const apiHeaders: { [header: string]: string } = {
|
|
221
|
-
'content-type': 'application/json',
|
|
222
218
|
}
|
|
223
219
|
|
|
224
220
|
return this.client.call(
|
|
@@ -308,7 +304,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
|
|
|
308
304
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
309
305
|
|
|
310
306
|
const apiHeaders: { [header: string]: string } = {
|
|
311
|
-
'content-type': 'application/json',
|
|
312
307
|
}
|
|
313
308
|
|
|
314
309
|
return this.client.call(
|
|
@@ -449,7 +444,6 @@ If the request is successful, a session for the user is automatically created.
|
|
|
449
444
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
450
445
|
|
|
451
446
|
const apiHeaders: { [header: string]: string } = {
|
|
452
|
-
'content-type': 'application/json',
|
|
453
447
|
}
|
|
454
448
|
|
|
455
449
|
return this.client.call(
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
|
+
import type { Models } from '../models';
|
|
4
|
+
|
|
5
|
+
export class Tokens {
|
|
6
|
+
client: Client;
|
|
7
|
+
|
|
8
|
+
constructor(client: Client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* List all the tokens created for a specific file or bucket. You can use the query params to filter your results.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} bucketId
|
|
16
|
+
* @param {string} fileId
|
|
17
|
+
* @param {string[]} queries
|
|
18
|
+
* @throws {AppwriteException}
|
|
19
|
+
* @returns {Promise<Models.ResourceTokenList>}
|
|
20
|
+
*/
|
|
21
|
+
list(bucketId: string, fileId: string, queries?: string[]): Promise<Models.ResourceTokenList> {
|
|
22
|
+
if (typeof bucketId === 'undefined') {
|
|
23
|
+
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
24
|
+
}
|
|
25
|
+
if (typeof fileId === 'undefined') {
|
|
26
|
+
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
27
|
+
}
|
|
28
|
+
const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
29
|
+
const payload: Payload = {};
|
|
30
|
+
if (typeof queries !== 'undefined') {
|
|
31
|
+
payload['queries'] = queries;
|
|
32
|
+
}
|
|
33
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
34
|
+
|
|
35
|
+
const apiHeaders: { [header: string]: string } = {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return this.client.call(
|
|
39
|
+
'get',
|
|
40
|
+
uri,
|
|
41
|
+
apiHeaders,
|
|
42
|
+
payload
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} bucketId
|
|
49
|
+
* @param {string} fileId
|
|
50
|
+
* @param {string} expire
|
|
51
|
+
* @throws {AppwriteException}
|
|
52
|
+
* @returns {Promise<Models.ResourceToken>}
|
|
53
|
+
*/
|
|
54
|
+
createFileToken(bucketId: string, fileId: string, expire?: string): Promise<Models.ResourceToken> {
|
|
55
|
+
if (typeof bucketId === 'undefined') {
|
|
56
|
+
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
57
|
+
}
|
|
58
|
+
if (typeof fileId === 'undefined') {
|
|
59
|
+
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
60
|
+
}
|
|
61
|
+
const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
|
|
62
|
+
const payload: Payload = {};
|
|
63
|
+
if (typeof expire !== 'undefined') {
|
|
64
|
+
payload['expire'] = expire;
|
|
65
|
+
}
|
|
66
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
67
|
+
|
|
68
|
+
const apiHeaders: { [header: string]: string } = {
|
|
69
|
+
'content-type': 'application/json',
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return this.client.call(
|
|
73
|
+
'post',
|
|
74
|
+
uri,
|
|
75
|
+
apiHeaders,
|
|
76
|
+
payload
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get a token by its unique ID.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} tokenId
|
|
83
|
+
* @throws {AppwriteException}
|
|
84
|
+
* @returns {Promise<Models.ResourceToken>}
|
|
85
|
+
*/
|
|
86
|
+
get(tokenId: string): Promise<Models.ResourceToken> {
|
|
87
|
+
if (typeof tokenId === 'undefined') {
|
|
88
|
+
throw new AppwriteException('Missing required parameter: "tokenId"');
|
|
89
|
+
}
|
|
90
|
+
const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId);
|
|
91
|
+
const payload: Payload = {};
|
|
92
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
93
|
+
|
|
94
|
+
const apiHeaders: { [header: string]: string } = {
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return this.client.call(
|
|
98
|
+
'get',
|
|
99
|
+
uri,
|
|
100
|
+
apiHeaders,
|
|
101
|
+
payload
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Update a token by its unique ID. Use this endpoint to update a token's expiry date.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} tokenId
|
|
108
|
+
* @param {string} expire
|
|
109
|
+
* @throws {AppwriteException}
|
|
110
|
+
* @returns {Promise<Models.ResourceToken>}
|
|
111
|
+
*/
|
|
112
|
+
update(tokenId: string, expire?: string): Promise<Models.ResourceToken> {
|
|
113
|
+
if (typeof tokenId === 'undefined') {
|
|
114
|
+
throw new AppwriteException('Missing required parameter: "tokenId"');
|
|
115
|
+
}
|
|
116
|
+
const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId);
|
|
117
|
+
const payload: Payload = {};
|
|
118
|
+
if (typeof expire !== 'undefined') {
|
|
119
|
+
payload['expire'] = expire;
|
|
120
|
+
}
|
|
121
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
122
|
+
|
|
123
|
+
const apiHeaders: { [header: string]: string } = {
|
|
124
|
+
'content-type': 'application/json',
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return this.client.call(
|
|
128
|
+
'patch',
|
|
129
|
+
uri,
|
|
130
|
+
apiHeaders,
|
|
131
|
+
payload
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Delete a token by its unique ID.
|
|
136
|
+
*
|
|
137
|
+
* @param {string} tokenId
|
|
138
|
+
* @throws {AppwriteException}
|
|
139
|
+
* @returns {Promise<{}>}
|
|
140
|
+
*/
|
|
141
|
+
delete(tokenId: string): Promise<{}> {
|
|
142
|
+
if (typeof tokenId === 'undefined') {
|
|
143
|
+
throw new AppwriteException('Missing required parameter: "tokenId"');
|
|
144
|
+
}
|
|
145
|
+
const apiPath = '/tokens/{tokenId}'.replace('{tokenId}', tokenId);
|
|
146
|
+
const payload: Payload = {};
|
|
147
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
148
|
+
|
|
149
|
+
const apiHeaders: { [header: string]: string } = {
|
|
150
|
+
'content-type': 'application/json',
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return this.client.call(
|
|
154
|
+
'delete',
|
|
155
|
+
uri,
|
|
156
|
+
apiHeaders,
|
|
157
|
+
payload
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
}
|
package/src/services/users.ts
CHANGED
|
@@ -33,7 +33,6 @@ export class Users {
|
|
|
33
33
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
34
34
|
|
|
35
35
|
const apiHeaders: { [header: string]: string } = {
|
|
36
|
-
'content-type': 'application/json',
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
return this.client.call(
|
|
@@ -202,7 +201,6 @@ export class Users {
|
|
|
202
201
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
203
202
|
|
|
204
203
|
const apiHeaders: { [header: string]: string } = {
|
|
205
|
-
'content-type': 'application/json',
|
|
206
204
|
}
|
|
207
205
|
|
|
208
206
|
return this.client.call(
|
|
@@ -550,7 +548,6 @@ export class Users {
|
|
|
550
548
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
551
549
|
|
|
552
550
|
const apiHeaders: { [header: string]: string } = {
|
|
553
|
-
'content-type': 'application/json',
|
|
554
551
|
}
|
|
555
552
|
|
|
556
553
|
return this.client.call(
|
|
@@ -576,7 +573,6 @@ export class Users {
|
|
|
576
573
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
577
574
|
|
|
578
575
|
const apiHeaders: { [header: string]: string } = {
|
|
579
|
-
'content-type': 'application/json',
|
|
580
576
|
}
|
|
581
577
|
|
|
582
578
|
return this.client.call(
|
|
@@ -734,7 +730,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
734
730
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
735
731
|
|
|
736
732
|
const apiHeaders: { [header: string]: string } = {
|
|
737
|
-
'content-type': 'application/json',
|
|
738
733
|
}
|
|
739
734
|
|
|
740
735
|
return this.client.call(
|
|
@@ -748,19 +743,26 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
748
743
|
* Get the user membership list by its unique ID.
|
|
749
744
|
*
|
|
750
745
|
* @param {string} userId
|
|
746
|
+
* @param {string[]} queries
|
|
747
|
+
* @param {string} search
|
|
751
748
|
* @throws {AppwriteException}
|
|
752
749
|
* @returns {Promise<Models.MembershipList>}
|
|
753
750
|
*/
|
|
754
|
-
listMemberships(userId: string): Promise<Models.MembershipList> {
|
|
751
|
+
listMemberships(userId: string, queries?: string[], search?: string): Promise<Models.MembershipList> {
|
|
755
752
|
if (typeof userId === 'undefined') {
|
|
756
753
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
757
754
|
}
|
|
758
755
|
const apiPath = '/users/{userId}/memberships'.replace('{userId}', userId);
|
|
759
756
|
const payload: Payload = {};
|
|
757
|
+
if (typeof queries !== 'undefined') {
|
|
758
|
+
payload['queries'] = queries;
|
|
759
|
+
}
|
|
760
|
+
if (typeof search !== 'undefined') {
|
|
761
|
+
payload['search'] = search;
|
|
762
|
+
}
|
|
760
763
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
761
764
|
|
|
762
765
|
const apiHeaders: { [header: string]: string } = {
|
|
763
|
-
'content-type': 'application/json',
|
|
764
766
|
}
|
|
765
767
|
|
|
766
768
|
return this.client.call(
|
|
@@ -849,7 +851,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
849
851
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
850
852
|
|
|
851
853
|
const apiHeaders: { [header: string]: string } = {
|
|
852
|
-
'content-type': 'application/json',
|
|
853
854
|
}
|
|
854
855
|
|
|
855
856
|
return this.client.call(
|
|
@@ -875,7 +876,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
875
876
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
876
877
|
|
|
877
878
|
const apiHeaders: { [header: string]: string } = {
|
|
878
|
-
'content-type': 'application/json',
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
return this.client.call(
|
|
@@ -1052,7 +1052,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1052
1052
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1053
1053
|
|
|
1054
1054
|
const apiHeaders: { [header: string]: string } = {
|
|
1055
|
-
'content-type': 'application/json',
|
|
1056
1055
|
}
|
|
1057
1056
|
|
|
1058
1057
|
return this.client.call(
|
|
@@ -1111,7 +1110,6 @@ Labels can be used to grant access to resources. While teams are a way for user&
|
|
|
1111
1110
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1112
1111
|
|
|
1113
1112
|
const apiHeaders: { [header: string]: string } = {
|
|
1114
|
-
'content-type': 'application/json',
|
|
1115
1113
|
}
|
|
1116
1114
|
|
|
1117
1115
|
return this.client.call(
|
|
@@ -1258,7 +1256,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1258
1256
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1259
1257
|
|
|
1260
1258
|
const apiHeaders: { [header: string]: string } = {
|
|
1261
|
-
'content-type': 'application/json',
|
|
1262
1259
|
}
|
|
1263
1260
|
|
|
1264
1261
|
return this.client.call(
|
|
@@ -1343,7 +1340,6 @@ If you want to generate a token for a custom authentication flow, use the [POST
|
|
|
1343
1340
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1344
1341
|
|
|
1345
1342
|
const apiHeaders: { [header: string]: string } = {
|
|
1346
|
-
'content-type': 'application/json',
|
|
1347
1343
|
}
|
|
1348
1344
|
|
|
1349
1345
|
return this.client.call(
|
package/src/services/vcs.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
+
import { VCSDetectionType } from '../enums/v-c-s-detection-type';
|
|
4
5
|
|
|
5
6
|
export class Vcs {
|
|
6
7
|
client: Client;
|
|
@@ -9,27 +10,77 @@ export class Vcs {
|
|
|
9
10
|
this.client = client;
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} installationId
|
|
17
|
+
* @param {string} providerRepositoryId
|
|
18
|
+
* @param {VCSDetectionType} type
|
|
19
|
+
* @param {string} providerRootDirectory
|
|
20
|
+
* @throws {AppwriteException}
|
|
21
|
+
* @returns {Promise<Models.DetectionFramework>}
|
|
22
|
+
*/
|
|
23
|
+
createRepositoryDetection(installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string): Promise<Models.DetectionFramework> {
|
|
24
|
+
if (typeof installationId === 'undefined') {
|
|
25
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
26
|
+
}
|
|
27
|
+
if (typeof providerRepositoryId === 'undefined') {
|
|
28
|
+
throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
|
|
29
|
+
}
|
|
30
|
+
if (typeof type === 'undefined') {
|
|
31
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
32
|
+
}
|
|
33
|
+
const apiPath = '/vcs/github/installations/{installationId}/detections'.replace('{installationId}', installationId);
|
|
34
|
+
const payload: Payload = {};
|
|
35
|
+
if (typeof providerRepositoryId !== 'undefined') {
|
|
36
|
+
payload['providerRepositoryId'] = providerRepositoryId;
|
|
37
|
+
}
|
|
38
|
+
if (typeof type !== 'undefined') {
|
|
39
|
+
payload['type'] = type;
|
|
40
|
+
}
|
|
41
|
+
if (typeof providerRootDirectory !== 'undefined') {
|
|
42
|
+
payload['providerRootDirectory'] = providerRootDirectory;
|
|
43
|
+
}
|
|
44
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45
|
+
|
|
46
|
+
const apiHeaders: { [header: string]: string } = {
|
|
47
|
+
'content-type': 'application/json',
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return this.client.call(
|
|
51
|
+
'post',
|
|
52
|
+
uri,
|
|
53
|
+
apiHeaders,
|
|
54
|
+
payload
|
|
55
|
+
);
|
|
56
|
+
}
|
|
12
57
|
/**
|
|
13
58
|
* Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.
|
|
14
59
|
*
|
|
15
60
|
* @param {string} installationId
|
|
61
|
+
* @param {VCSDetectionType} type
|
|
16
62
|
* @param {string} search
|
|
17
63
|
* @throws {AppwriteException}
|
|
18
|
-
* @returns {Promise<Models.
|
|
64
|
+
* @returns {Promise<Models.ProviderRepositoryFrameworkList>}
|
|
19
65
|
*/
|
|
20
|
-
listRepositories(installationId: string, search?: string): Promise<Models.
|
|
66
|
+
listRepositories(installationId: string, type: VCSDetectionType, search?: string): Promise<Models.ProviderRepositoryFrameworkList> {
|
|
21
67
|
if (typeof installationId === 'undefined') {
|
|
22
68
|
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
23
69
|
}
|
|
70
|
+
if (typeof type === 'undefined') {
|
|
71
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
72
|
+
}
|
|
24
73
|
const apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
|
|
25
74
|
const payload: Payload = {};
|
|
75
|
+
if (typeof type !== 'undefined') {
|
|
76
|
+
payload['type'] = type;
|
|
77
|
+
}
|
|
26
78
|
if (typeof search !== 'undefined') {
|
|
27
79
|
payload['search'] = search;
|
|
28
80
|
}
|
|
29
81
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
30
82
|
|
|
31
83
|
const apiHeaders: { [header: string]: string } = {
|
|
32
|
-
'content-type': 'application/json',
|
|
33
84
|
}
|
|
34
85
|
|
|
35
86
|
return this.client.call(
|
|
@@ -99,7 +150,6 @@ export class Vcs {
|
|
|
99
150
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
100
151
|
|
|
101
152
|
const apiHeaders: { [header: string]: string } = {
|
|
102
|
-
'content-type': 'application/json',
|
|
103
153
|
}
|
|
104
154
|
|
|
105
155
|
return this.client.call(
|
|
@@ -130,7 +180,6 @@ export class Vcs {
|
|
|
130
180
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
131
181
|
|
|
132
182
|
const apiHeaders: { [header: string]: string } = {
|
|
133
|
-
'content-type': 'application/json',
|
|
134
183
|
}
|
|
135
184
|
|
|
136
185
|
return this.client.call(
|
|
@@ -165,7 +214,6 @@ export class Vcs {
|
|
|
165
214
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
166
215
|
|
|
167
216
|
const apiHeaders: { [header: string]: string } = {
|
|
168
|
-
'content-type': 'application/json',
|
|
169
217
|
}
|
|
170
218
|
|
|
171
219
|
return this.client.call(
|
|
@@ -175,40 +223,6 @@ export class Vcs {
|
|
|
175
223
|
payload
|
|
176
224
|
);
|
|
177
225
|
}
|
|
178
|
-
/**
|
|
179
|
-
* Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
|
|
180
|
-
*
|
|
181
|
-
* @param {string} installationId
|
|
182
|
-
* @param {string} providerRepositoryId
|
|
183
|
-
* @param {string} providerRootDirectory
|
|
184
|
-
* @throws {AppwriteException}
|
|
185
|
-
* @returns {Promise<Models.Detection>}
|
|
186
|
-
*/
|
|
187
|
-
createRepositoryDetection(installationId: string, providerRepositoryId: string, providerRootDirectory?: string): Promise<Models.Detection> {
|
|
188
|
-
if (typeof installationId === 'undefined') {
|
|
189
|
-
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
190
|
-
}
|
|
191
|
-
if (typeof providerRepositoryId === 'undefined') {
|
|
192
|
-
throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
|
|
193
|
-
}
|
|
194
|
-
const apiPath = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
|
|
195
|
-
const payload: Payload = {};
|
|
196
|
-
if (typeof providerRootDirectory !== 'undefined') {
|
|
197
|
-
payload['providerRootDirectory'] = providerRootDirectory;
|
|
198
|
-
}
|
|
199
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
200
|
-
|
|
201
|
-
const apiHeaders: { [header: string]: string } = {
|
|
202
|
-
'content-type': 'application/json',
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return this.client.call(
|
|
206
|
-
'post',
|
|
207
|
-
uri,
|
|
208
|
-
apiHeaders,
|
|
209
|
-
payload
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
226
|
/**
|
|
213
227
|
* Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.
|
|
214
228
|
*
|
|
@@ -267,7 +281,6 @@ export class Vcs {
|
|
|
267
281
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
268
282
|
|
|
269
283
|
const apiHeaders: { [header: string]: string } = {
|
|
270
|
-
'content-type': 'application/json',
|
|
271
284
|
}
|
|
272
285
|
|
|
273
286
|
return this.client.call(
|
|
@@ -293,7 +306,6 @@ export class Vcs {
|
|
|
293
306
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
294
307
|
|
|
295
308
|
const apiHeaders: { [header: string]: string } = {
|
|
296
|
-
'content-type': 'application/json',
|
|
297
309
|
}
|
|
298
310
|
|
|
299
311
|
return this.client.call(
|