@appwrite.io/console 1.5.2 → 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 +11874 -11100
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +11872 -11101
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +11874 -11100
- 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 +14 -0
- 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 +32 -5
- 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/o-auth-provider.ts +1 -0
- 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 +1171 -188
- package/src/services/account.ts +126 -446
- package/src/services/assistant.ts +2 -7
- package/src/services/avatars.ts +7 -28
- package/src/services/backups.ts +24 -90
- package/src/services/console.ts +48 -52
- package/src/services/databases.ts +241 -350
- package/src/services/domains.ts +1821 -0
- package/src/services/functions.ts +216 -248
- package/src/services/graphql.ts +4 -14
- package/src/services/health.ts +56 -206
- package/src/services/locale.ts +16 -64
- package/src/services/messaging.ts +92 -335
- package/src/services/migrations.ts +66 -89
- package/src/services/organizations.ts +84 -241
- package/src/services/project.ts +20 -45
- package/src/services/projects.ts +262 -330
- package/src/services/proxy.ts +129 -44
- package/src/services/sites.ts +1104 -0
- package/src/services/storage.ts +42 -105
- package/src/services/teams.ts +28 -104
- package/src/services/tokens.ts +160 -0
- package/src/services/users.ts +94 -313
- package/src/services/vcs.ts +70 -108
- 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/o-auth-provider.d.ts +1 -0
- 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 +1171 -188
- package/types/services/account.d.ts +4 -128
- package/types/services/assistant.d.ts +0 -2
- package/types/services/avatars.d.ts +0 -14
- package/types/services/backups.d.ts +0 -24
- package/types/services/console.d.ts +9 -13
- package/types/services/databases.d.ts +43 -97
- package/types/services/domains.d.ts +524 -0
- package/types/services/functions.d.ts +58 -84
- package/types/services/graphql.d.ts +0 -4
- package/types/services/health.d.ts +6 -56
- package/types/services/locale.d.ts +0 -16
- package/types/services/messaging.d.ts +0 -92
- package/types/services/migrations.d.ts +9 -23
- package/types/services/organizations.d.ts +11 -68
- package/types/services/project.d.ts +4 -14
- package/types/services/projects.d.ts +47 -91
- package/types/services/proxy.d.ts +31 -13
- package/types/services/sites.d.ts +319 -0
- package/types/services/storage.d.ts +6 -33
- package/types/services/teams.d.ts +0 -28
- package/types/services/tokens.d.ts +51 -0
- package/types/services/users.d.ts +3 -87
- package/types/services/vcs.d.ts +14 -31
|
@@ -3,6 +3,8 @@ import { AppwriteException, Client, type Payload, UploadProgress } from '../clie
|
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
import { Runtime } from '../enums/runtime';
|
|
5
5
|
import { FunctionUsageRange } from '../enums/function-usage-range';
|
|
6
|
+
import { VCSDeploymentType } from '../enums/v-c-s-deployment-type';
|
|
7
|
+
import { DeploymentDownloadType } from '../enums/deployment-download-type';
|
|
6
8
|
import { ExecutionMethod } from '../enums/execution-method';
|
|
7
9
|
|
|
8
10
|
export class Functions {
|
|
@@ -13,8 +15,6 @@ export class Functions {
|
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
* List functions
|
|
17
|
-
*
|
|
18
18
|
* Get a list of all the project's functions. You can use the query params to filter your results.
|
|
19
19
|
*
|
|
20
20
|
* @param {string[]} queries
|
|
@@ -22,7 +22,7 @@ export class Functions {
|
|
|
22
22
|
* @throws {AppwriteException}
|
|
23
23
|
* @returns {Promise<Models.FunctionList>}
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
list(queries?: string[], search?: string): Promise<Models.FunctionList> {
|
|
26
26
|
const apiPath = '/functions';
|
|
27
27
|
const payload: Payload = {};
|
|
28
28
|
if (typeof queries !== 'undefined') {
|
|
@@ -34,13 +34,9 @@ export class Functions {
|
|
|
34
34
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35
35
|
|
|
36
36
|
const apiHeaders: { [header: string]: string } = {
|
|
37
|
-
'content-type': 'application/json',
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return await this.client.call(
|
|
39
|
+
return this.client.call(
|
|
44
40
|
'get',
|
|
45
41
|
uri,
|
|
46
42
|
apiHeaders,
|
|
@@ -48,8 +44,6 @@ export class Functions {
|
|
|
48
44
|
);
|
|
49
45
|
}
|
|
50
46
|
/**
|
|
51
|
-
* Create function
|
|
52
|
-
*
|
|
53
47
|
* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
|
|
54
48
|
*
|
|
55
49
|
* @param {string} functionId
|
|
@@ -69,15 +63,15 @@ export class Functions {
|
|
|
69
63
|
* @param {string} providerBranch
|
|
70
64
|
* @param {boolean} providerSilentMode
|
|
71
65
|
* @param {string} providerRootDirectory
|
|
66
|
+
* @param {string} specification
|
|
72
67
|
* @param {string} templateRepository
|
|
73
68
|
* @param {string} templateOwner
|
|
74
69
|
* @param {string} templateRootDirectory
|
|
75
70
|
* @param {string} templateVersion
|
|
76
|
-
* @param {string} specification
|
|
77
71
|
* @throws {AppwriteException}
|
|
78
72
|
* @returns {Promise<Models.Function>}
|
|
79
73
|
*/
|
|
80
|
-
|
|
74
|
+
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateVersion?: string): Promise<Models.Function> {
|
|
81
75
|
if (typeof functionId === 'undefined') {
|
|
82
76
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
83
77
|
}
|
|
@@ -140,6 +134,9 @@ export class Functions {
|
|
|
140
134
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
141
135
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
142
136
|
}
|
|
137
|
+
if (typeof specification !== 'undefined') {
|
|
138
|
+
payload['specification'] = specification;
|
|
139
|
+
}
|
|
143
140
|
if (typeof templateRepository !== 'undefined') {
|
|
144
141
|
payload['templateRepository'] = templateRepository;
|
|
145
142
|
}
|
|
@@ -152,19 +149,13 @@ export class Functions {
|
|
|
152
149
|
if (typeof templateVersion !== 'undefined') {
|
|
153
150
|
payload['templateVersion'] = templateVersion;
|
|
154
151
|
}
|
|
155
|
-
if (typeof specification !== 'undefined') {
|
|
156
|
-
payload['specification'] = specification;
|
|
157
|
-
}
|
|
158
152
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
159
153
|
|
|
160
154
|
const apiHeaders: { [header: string]: string } = {
|
|
161
155
|
'content-type': 'application/json',
|
|
162
156
|
}
|
|
163
157
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return await this.client.call(
|
|
158
|
+
return this.client.call(
|
|
168
159
|
'post',
|
|
169
160
|
uri,
|
|
170
161
|
apiHeaders,
|
|
@@ -172,26 +163,20 @@ export class Functions {
|
|
|
172
163
|
);
|
|
173
164
|
}
|
|
174
165
|
/**
|
|
175
|
-
* List runtimes
|
|
176
|
-
*
|
|
177
166
|
* Get a list of all runtimes that are currently active on your instance.
|
|
178
167
|
*
|
|
179
168
|
* @throws {AppwriteException}
|
|
180
169
|
* @returns {Promise<Models.RuntimeList>}
|
|
181
170
|
*/
|
|
182
|
-
|
|
171
|
+
listRuntimes(): Promise<Models.RuntimeList> {
|
|
183
172
|
const apiPath = '/functions/runtimes';
|
|
184
173
|
const payload: Payload = {};
|
|
185
174
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
186
175
|
|
|
187
176
|
const apiHeaders: { [header: string]: string } = {
|
|
188
|
-
'content-type': 'application/json',
|
|
189
177
|
}
|
|
190
178
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return await this.client.call(
|
|
179
|
+
return this.client.call(
|
|
195
180
|
'get',
|
|
196
181
|
uri,
|
|
197
182
|
apiHeaders,
|
|
@@ -199,27 +184,20 @@ export class Functions {
|
|
|
199
184
|
);
|
|
200
185
|
}
|
|
201
186
|
/**
|
|
202
|
-
* List available function runtime specifications
|
|
203
|
-
*
|
|
204
187
|
* List allowed function specifications for this instance.
|
|
205
|
-
|
|
206
188
|
*
|
|
207
189
|
* @throws {AppwriteException}
|
|
208
190
|
* @returns {Promise<Models.SpecificationList>}
|
|
209
191
|
*/
|
|
210
|
-
|
|
192
|
+
listSpecifications(): Promise<Models.SpecificationList> {
|
|
211
193
|
const apiPath = '/functions/specifications';
|
|
212
194
|
const payload: Payload = {};
|
|
213
195
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
214
196
|
|
|
215
197
|
const apiHeaders: { [header: string]: string } = {
|
|
216
|
-
'content-type': 'application/json',
|
|
217
198
|
}
|
|
218
199
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
return await this.client.call(
|
|
200
|
+
return this.client.call(
|
|
223
201
|
'get',
|
|
224
202
|
uri,
|
|
225
203
|
apiHeaders,
|
|
@@ -227,8 +205,6 @@ export class Functions {
|
|
|
227
205
|
);
|
|
228
206
|
}
|
|
229
207
|
/**
|
|
230
|
-
* List function templates
|
|
231
|
-
*
|
|
232
208
|
* List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
|
|
233
209
|
*
|
|
234
210
|
* @param {string[]} runtimes
|
|
@@ -238,7 +214,7 @@ export class Functions {
|
|
|
238
214
|
* @throws {AppwriteException}
|
|
239
215
|
* @returns {Promise<Models.TemplateFunctionList>}
|
|
240
216
|
*/
|
|
241
|
-
|
|
217
|
+
listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateFunctionList> {
|
|
242
218
|
const apiPath = '/functions/templates';
|
|
243
219
|
const payload: Payload = {};
|
|
244
220
|
if (typeof runtimes !== 'undefined') {
|
|
@@ -256,13 +232,9 @@ export class Functions {
|
|
|
256
232
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
257
233
|
|
|
258
234
|
const apiHeaders: { [header: string]: string } = {
|
|
259
|
-
'content-type': 'application/json',
|
|
260
235
|
}
|
|
261
236
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return await this.client.call(
|
|
237
|
+
return this.client.call(
|
|
266
238
|
'get',
|
|
267
239
|
uri,
|
|
268
240
|
apiHeaders,
|
|
@@ -270,15 +242,13 @@ export class Functions {
|
|
|
270
242
|
);
|
|
271
243
|
}
|
|
272
244
|
/**
|
|
273
|
-
* Get function template
|
|
274
|
-
*
|
|
275
245
|
* Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
|
|
276
246
|
*
|
|
277
247
|
* @param {string} templateId
|
|
278
248
|
* @throws {AppwriteException}
|
|
279
249
|
* @returns {Promise<Models.TemplateFunction>}
|
|
280
250
|
*/
|
|
281
|
-
|
|
251
|
+
getTemplate(templateId: string): Promise<Models.TemplateFunction> {
|
|
282
252
|
if (typeof templateId === 'undefined') {
|
|
283
253
|
throw new AppwriteException('Missing required parameter: "templateId"');
|
|
284
254
|
}
|
|
@@ -287,13 +257,9 @@ export class Functions {
|
|
|
287
257
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
288
258
|
|
|
289
259
|
const apiHeaders: { [header: string]: string } = {
|
|
290
|
-
'content-type': 'application/json',
|
|
291
260
|
}
|
|
292
261
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
return await this.client.call(
|
|
262
|
+
return this.client.call(
|
|
297
263
|
'get',
|
|
298
264
|
uri,
|
|
299
265
|
apiHeaders,
|
|
@@ -301,15 +267,13 @@ export class Functions {
|
|
|
301
267
|
);
|
|
302
268
|
}
|
|
303
269
|
/**
|
|
304
|
-
* Get functions usage
|
|
305
|
-
*
|
|
306
|
-
* Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
|
|
270
|
+
* Get usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
|
|
307
271
|
*
|
|
308
272
|
* @param {FunctionUsageRange} range
|
|
309
273
|
* @throws {AppwriteException}
|
|
310
274
|
* @returns {Promise<Models.UsageFunctions>}
|
|
311
275
|
*/
|
|
312
|
-
|
|
276
|
+
listUsage(range?: FunctionUsageRange): Promise<Models.UsageFunctions> {
|
|
313
277
|
const apiPath = '/functions/usage';
|
|
314
278
|
const payload: Payload = {};
|
|
315
279
|
if (typeof range !== 'undefined') {
|
|
@@ -318,13 +282,9 @@ export class Functions {
|
|
|
318
282
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
319
283
|
|
|
320
284
|
const apiHeaders: { [header: string]: string } = {
|
|
321
|
-
'content-type': 'application/json',
|
|
322
285
|
}
|
|
323
286
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
return await this.client.call(
|
|
287
|
+
return this.client.call(
|
|
328
288
|
'get',
|
|
329
289
|
uri,
|
|
330
290
|
apiHeaders,
|
|
@@ -332,15 +292,13 @@ export class Functions {
|
|
|
332
292
|
);
|
|
333
293
|
}
|
|
334
294
|
/**
|
|
335
|
-
* Get function
|
|
336
|
-
*
|
|
337
295
|
* Get a function by its unique ID.
|
|
338
296
|
*
|
|
339
297
|
* @param {string} functionId
|
|
340
298
|
* @throws {AppwriteException}
|
|
341
299
|
* @returns {Promise<Models.Function>}
|
|
342
300
|
*/
|
|
343
|
-
|
|
301
|
+
get(functionId: string): Promise<Models.Function> {
|
|
344
302
|
if (typeof functionId === 'undefined') {
|
|
345
303
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
346
304
|
}
|
|
@@ -349,13 +307,9 @@ export class Functions {
|
|
|
349
307
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
350
308
|
|
|
351
309
|
const apiHeaders: { [header: string]: string } = {
|
|
352
|
-
'content-type': 'application/json',
|
|
353
310
|
}
|
|
354
311
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
return await this.client.call(
|
|
312
|
+
return this.client.call(
|
|
359
313
|
'get',
|
|
360
314
|
uri,
|
|
361
315
|
apiHeaders,
|
|
@@ -363,8 +317,6 @@ export class Functions {
|
|
|
363
317
|
);
|
|
364
318
|
}
|
|
365
319
|
/**
|
|
366
|
-
* Update function
|
|
367
|
-
*
|
|
368
320
|
* Update function by its unique ID.
|
|
369
321
|
*
|
|
370
322
|
* @param {string} functionId
|
|
@@ -388,7 +340,7 @@ export class Functions {
|
|
|
388
340
|
* @throws {AppwriteException}
|
|
389
341
|
* @returns {Promise<Models.Function>}
|
|
390
342
|
*/
|
|
391
|
-
|
|
343
|
+
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function> {
|
|
392
344
|
if (typeof functionId === 'undefined') {
|
|
393
345
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
394
346
|
}
|
|
@@ -454,10 +406,7 @@ export class Functions {
|
|
|
454
406
|
'content-type': 'application/json',
|
|
455
407
|
}
|
|
456
408
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
return await this.client.call(
|
|
409
|
+
return this.client.call(
|
|
461
410
|
'put',
|
|
462
411
|
uri,
|
|
463
412
|
apiHeaders,
|
|
@@ -465,15 +414,13 @@ export class Functions {
|
|
|
465
414
|
);
|
|
466
415
|
}
|
|
467
416
|
/**
|
|
468
|
-
* Delete function
|
|
469
|
-
*
|
|
470
417
|
* Delete a function by its unique ID.
|
|
471
418
|
*
|
|
472
419
|
* @param {string} functionId
|
|
473
420
|
* @throws {AppwriteException}
|
|
474
421
|
* @returns {Promise<{}>}
|
|
475
422
|
*/
|
|
476
|
-
|
|
423
|
+
delete(functionId: string): Promise<{}> {
|
|
477
424
|
if (typeof functionId === 'undefined') {
|
|
478
425
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
479
426
|
}
|
|
@@ -485,10 +432,7 @@ export class Functions {
|
|
|
485
432
|
'content-type': 'application/json',
|
|
486
433
|
}
|
|
487
434
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
return await this.client.call(
|
|
435
|
+
return this.client.call(
|
|
492
436
|
'delete',
|
|
493
437
|
uri,
|
|
494
438
|
apiHeaders,
|
|
@@ -496,9 +440,40 @@ export class Functions {
|
|
|
496
440
|
);
|
|
497
441
|
}
|
|
498
442
|
/**
|
|
499
|
-
*
|
|
443
|
+
* Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.
|
|
500
444
|
*
|
|
501
|
-
*
|
|
445
|
+
* @param {string} functionId
|
|
446
|
+
* @param {string} deploymentId
|
|
447
|
+
* @throws {AppwriteException}
|
|
448
|
+
* @returns {Promise<Models.Function>}
|
|
449
|
+
*/
|
|
450
|
+
updateFunctionDeployment(functionId: string, deploymentId: string): Promise<Models.Function> {
|
|
451
|
+
if (typeof functionId === 'undefined') {
|
|
452
|
+
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
453
|
+
}
|
|
454
|
+
if (typeof deploymentId === 'undefined') {
|
|
455
|
+
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
456
|
+
}
|
|
457
|
+
const apiPath = '/functions/{functionId}/deployment'.replace('{functionId}', functionId);
|
|
458
|
+
const payload: Payload = {};
|
|
459
|
+
if (typeof deploymentId !== 'undefined') {
|
|
460
|
+
payload['deploymentId'] = deploymentId;
|
|
461
|
+
}
|
|
462
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
463
|
+
|
|
464
|
+
const apiHeaders: { [header: string]: string } = {
|
|
465
|
+
'content-type': 'application/json',
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
return this.client.call(
|
|
469
|
+
'patch',
|
|
470
|
+
uri,
|
|
471
|
+
apiHeaders,
|
|
472
|
+
payload
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Get a list of all the function's code deployments. You can use the query params to filter your results.
|
|
502
477
|
*
|
|
503
478
|
* @param {string} functionId
|
|
504
479
|
* @param {string[]} queries
|
|
@@ -506,7 +481,7 @@ export class Functions {
|
|
|
506
481
|
* @throws {AppwriteException}
|
|
507
482
|
* @returns {Promise<Models.DeploymentList>}
|
|
508
483
|
*/
|
|
509
|
-
|
|
484
|
+
listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList> {
|
|
510
485
|
if (typeof functionId === 'undefined') {
|
|
511
486
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
512
487
|
}
|
|
@@ -521,13 +496,9 @@ export class Functions {
|
|
|
521
496
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
522
497
|
|
|
523
498
|
const apiHeaders: { [header: string]: string } = {
|
|
524
|
-
'content-type': 'application/json',
|
|
525
499
|
}
|
|
526
500
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
return await this.client.call(
|
|
501
|
+
return this.client.call(
|
|
531
502
|
'get',
|
|
532
503
|
uri,
|
|
533
504
|
apiHeaders,
|
|
@@ -535,8 +506,6 @@ export class Functions {
|
|
|
535
506
|
);
|
|
536
507
|
}
|
|
537
508
|
/**
|
|
538
|
-
* Create deployment
|
|
539
|
-
*
|
|
540
509
|
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
|
|
541
510
|
|
|
542
511
|
This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
|
|
@@ -551,7 +520,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
551
520
|
* @throws {AppwriteException}
|
|
552
521
|
* @returns {Promise<Models.Deployment>}
|
|
553
522
|
*/
|
|
554
|
-
|
|
523
|
+
createDeployment(functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress = (progress: UploadProgress) => {}): Promise<Models.Deployment> {
|
|
555
524
|
if (typeof functionId === 'undefined') {
|
|
556
525
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
557
526
|
}
|
|
@@ -581,10 +550,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
581
550
|
'content-type': 'multipart/form-data',
|
|
582
551
|
}
|
|
583
552
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
return await this.client.chunkedUpload(
|
|
553
|
+
return this.client.chunkedUpload(
|
|
588
554
|
'post',
|
|
589
555
|
uri,
|
|
590
556
|
apiHeaders,
|
|
@@ -593,167 +559,193 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
593
559
|
);
|
|
594
560
|
}
|
|
595
561
|
/**
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
* Get a code deployment by its unique ID.
|
|
562
|
+
* Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
599
563
|
*
|
|
600
564
|
* @param {string} functionId
|
|
601
565
|
* @param {string} deploymentId
|
|
566
|
+
* @param {string} buildId
|
|
602
567
|
* @throws {AppwriteException}
|
|
603
568
|
* @returns {Promise<Models.Deployment>}
|
|
604
569
|
*/
|
|
605
|
-
|
|
570
|
+
createDuplicateDeployment(functionId: string, deploymentId: string, buildId?: string): Promise<Models.Deployment> {
|
|
606
571
|
if (typeof functionId === 'undefined') {
|
|
607
572
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
608
573
|
}
|
|
609
574
|
if (typeof deploymentId === 'undefined') {
|
|
610
575
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
611
576
|
}
|
|
612
|
-
const apiPath = '/functions/{functionId}/deployments/
|
|
577
|
+
const apiPath = '/functions/{functionId}/deployments/duplicate'.replace('{functionId}', functionId);
|
|
613
578
|
const payload: Payload = {};
|
|
579
|
+
if (typeof deploymentId !== 'undefined') {
|
|
580
|
+
payload['deploymentId'] = deploymentId;
|
|
581
|
+
}
|
|
582
|
+
if (typeof buildId !== 'undefined') {
|
|
583
|
+
payload['buildId'] = buildId;
|
|
584
|
+
}
|
|
614
585
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
615
586
|
|
|
616
587
|
const apiHeaders: { [header: string]: string } = {
|
|
617
588
|
'content-type': 'application/json',
|
|
618
589
|
}
|
|
619
590
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
return await this.client.call(
|
|
624
|
-
'get',
|
|
591
|
+
return this.client.call(
|
|
592
|
+
'post',
|
|
625
593
|
uri,
|
|
626
594
|
apiHeaders,
|
|
627
595
|
payload
|
|
628
596
|
);
|
|
629
597
|
}
|
|
630
598
|
/**
|
|
631
|
-
*
|
|
632
|
-
|
|
633
|
-
|
|
599
|
+
* Create a deployment based on a template.
|
|
600
|
+
|
|
601
|
+
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
|
|
634
602
|
*
|
|
635
603
|
* @param {string} functionId
|
|
636
|
-
* @param {string}
|
|
604
|
+
* @param {string} repository
|
|
605
|
+
* @param {string} owner
|
|
606
|
+
* @param {string} rootDirectory
|
|
607
|
+
* @param {string} version
|
|
608
|
+
* @param {boolean} activate
|
|
637
609
|
* @throws {AppwriteException}
|
|
638
|
-
* @returns {Promise<Models.
|
|
610
|
+
* @returns {Promise<Models.Deployment>}
|
|
639
611
|
*/
|
|
640
|
-
|
|
612
|
+
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, version: string, activate?: boolean): Promise<Models.Deployment> {
|
|
641
613
|
if (typeof functionId === 'undefined') {
|
|
642
614
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
643
615
|
}
|
|
644
|
-
if (typeof
|
|
645
|
-
throw new AppwriteException('Missing required parameter: "
|
|
616
|
+
if (typeof repository === 'undefined') {
|
|
617
|
+
throw new AppwriteException('Missing required parameter: "repository"');
|
|
646
618
|
}
|
|
647
|
-
|
|
619
|
+
if (typeof owner === 'undefined') {
|
|
620
|
+
throw new AppwriteException('Missing required parameter: "owner"');
|
|
621
|
+
}
|
|
622
|
+
if (typeof rootDirectory === 'undefined') {
|
|
623
|
+
throw new AppwriteException('Missing required parameter: "rootDirectory"');
|
|
624
|
+
}
|
|
625
|
+
if (typeof version === 'undefined') {
|
|
626
|
+
throw new AppwriteException('Missing required parameter: "version"');
|
|
627
|
+
}
|
|
628
|
+
const apiPath = '/functions/{functionId}/deployments/template'.replace('{functionId}', functionId);
|
|
648
629
|
const payload: Payload = {};
|
|
630
|
+
if (typeof repository !== 'undefined') {
|
|
631
|
+
payload['repository'] = repository;
|
|
632
|
+
}
|
|
633
|
+
if (typeof owner !== 'undefined') {
|
|
634
|
+
payload['owner'] = owner;
|
|
635
|
+
}
|
|
636
|
+
if (typeof rootDirectory !== 'undefined') {
|
|
637
|
+
payload['rootDirectory'] = rootDirectory;
|
|
638
|
+
}
|
|
639
|
+
if (typeof version !== 'undefined') {
|
|
640
|
+
payload['version'] = version;
|
|
641
|
+
}
|
|
642
|
+
if (typeof activate !== 'undefined') {
|
|
643
|
+
payload['activate'] = activate;
|
|
644
|
+
}
|
|
649
645
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
650
646
|
|
|
651
647
|
const apiHeaders: { [header: string]: string } = {
|
|
652
648
|
'content-type': 'application/json',
|
|
653
649
|
}
|
|
654
650
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
return await this.client.call(
|
|
659
|
-
'patch',
|
|
651
|
+
return this.client.call(
|
|
652
|
+
'post',
|
|
660
653
|
uri,
|
|
661
654
|
apiHeaders,
|
|
662
655
|
payload
|
|
663
656
|
);
|
|
664
657
|
}
|
|
665
658
|
/**
|
|
666
|
-
*
|
|
667
|
-
|
|
668
|
-
|
|
659
|
+
* Create a deployment when a function is connected to VCS.
|
|
660
|
+
|
|
661
|
+
This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
669
662
|
*
|
|
670
663
|
* @param {string} functionId
|
|
671
|
-
* @param {
|
|
664
|
+
* @param {VCSDeploymentType} type
|
|
665
|
+
* @param {string} reference
|
|
666
|
+
* @param {boolean} activate
|
|
672
667
|
* @throws {AppwriteException}
|
|
673
|
-
* @returns {Promise<
|
|
668
|
+
* @returns {Promise<Models.Deployment>}
|
|
674
669
|
*/
|
|
675
|
-
|
|
670
|
+
createVcsDeployment(functionId: string, type: VCSDeploymentType, reference: string, activate?: boolean): Promise<Models.Deployment> {
|
|
676
671
|
if (typeof functionId === 'undefined') {
|
|
677
672
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
678
673
|
}
|
|
679
|
-
if (typeof
|
|
680
|
-
throw new AppwriteException('Missing required parameter: "
|
|
674
|
+
if (typeof type === 'undefined') {
|
|
675
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
681
676
|
}
|
|
682
|
-
|
|
677
|
+
if (typeof reference === 'undefined') {
|
|
678
|
+
throw new AppwriteException('Missing required parameter: "reference"');
|
|
679
|
+
}
|
|
680
|
+
const apiPath = '/functions/{functionId}/deployments/vcs'.replace('{functionId}', functionId);
|
|
683
681
|
const payload: Payload = {};
|
|
682
|
+
if (typeof type !== 'undefined') {
|
|
683
|
+
payload['type'] = type;
|
|
684
|
+
}
|
|
685
|
+
if (typeof reference !== 'undefined') {
|
|
686
|
+
payload['reference'] = reference;
|
|
687
|
+
}
|
|
688
|
+
if (typeof activate !== 'undefined') {
|
|
689
|
+
payload['activate'] = activate;
|
|
690
|
+
}
|
|
684
691
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
685
692
|
|
|
686
693
|
const apiHeaders: { [header: string]: string } = {
|
|
687
694
|
'content-type': 'application/json',
|
|
688
695
|
}
|
|
689
696
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
return await this.client.call(
|
|
694
|
-
'delete',
|
|
697
|
+
return this.client.call(
|
|
698
|
+
'post',
|
|
695
699
|
uri,
|
|
696
700
|
apiHeaders,
|
|
697
701
|
payload
|
|
698
702
|
);
|
|
699
703
|
}
|
|
700
704
|
/**
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
* Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
705
|
+
* Get a function deployment by its unique ID.
|
|
704
706
|
*
|
|
705
707
|
* @param {string} functionId
|
|
706
708
|
* @param {string} deploymentId
|
|
707
|
-
* @param {string} buildId
|
|
708
709
|
* @throws {AppwriteException}
|
|
709
|
-
* @returns {Promise<
|
|
710
|
+
* @returns {Promise<Models.Deployment>}
|
|
710
711
|
*/
|
|
711
|
-
|
|
712
|
+
getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment> {
|
|
712
713
|
if (typeof functionId === 'undefined') {
|
|
713
714
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
714
715
|
}
|
|
715
716
|
if (typeof deploymentId === 'undefined') {
|
|
716
717
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
717
718
|
}
|
|
718
|
-
const apiPath = '/functions/{functionId}/deployments/{deploymentId}
|
|
719
|
+
const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
|
|
719
720
|
const payload: Payload = {};
|
|
720
|
-
if (typeof buildId !== 'undefined') {
|
|
721
|
-
payload['buildId'] = buildId;
|
|
722
|
-
}
|
|
723
721
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
724
722
|
|
|
725
723
|
const apiHeaders: { [header: string]: string } = {
|
|
726
|
-
'content-type': 'application/json',
|
|
727
724
|
}
|
|
728
725
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
return await this.client.call(
|
|
733
|
-
'post',
|
|
726
|
+
return this.client.call(
|
|
727
|
+
'get',
|
|
734
728
|
uri,
|
|
735
729
|
apiHeaders,
|
|
736
730
|
payload
|
|
737
731
|
);
|
|
738
732
|
}
|
|
739
733
|
/**
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
* Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
|
|
734
|
+
* Delete a code deployment by its unique ID.
|
|
743
735
|
*
|
|
744
736
|
* @param {string} functionId
|
|
745
737
|
* @param {string} deploymentId
|
|
746
738
|
* @throws {AppwriteException}
|
|
747
|
-
* @returns {Promise<
|
|
739
|
+
* @returns {Promise<{}>}
|
|
748
740
|
*/
|
|
749
|
-
|
|
741
|
+
deleteDeployment(functionId: string, deploymentId: string): Promise<{}> {
|
|
750
742
|
if (typeof functionId === 'undefined') {
|
|
751
743
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
752
744
|
}
|
|
753
745
|
if (typeof deploymentId === 'undefined') {
|
|
754
746
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
755
747
|
}
|
|
756
|
-
const apiPath = '/functions/{functionId}/deployments/{deploymentId}
|
|
748
|
+
const apiPath = '/functions/{functionId}/deployments/{deploymentId}'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
|
|
757
749
|
const payload: Payload = {};
|
|
758
750
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
759
751
|
|
|
@@ -761,27 +753,23 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
761
753
|
'content-type': 'application/json',
|
|
762
754
|
}
|
|
763
755
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
return await this.client.call(
|
|
768
|
-
'patch',
|
|
756
|
+
return this.client.call(
|
|
757
|
+
'delete',
|
|
769
758
|
uri,
|
|
770
759
|
apiHeaders,
|
|
771
760
|
payload
|
|
772
761
|
);
|
|
773
762
|
}
|
|
774
763
|
/**
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
* Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.
|
|
764
|
+
* Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
|
|
778
765
|
*
|
|
779
766
|
* @param {string} functionId
|
|
780
767
|
* @param {string} deploymentId
|
|
768
|
+
* @param {DeploymentDownloadType} type
|
|
781
769
|
* @throws {AppwriteException}
|
|
782
770
|
* @returns {string}
|
|
783
771
|
*/
|
|
784
|
-
getDeploymentDownload(functionId: string, deploymentId: string): string {
|
|
772
|
+
getDeploymentDownload(functionId: string, deploymentId: string, type?: DeploymentDownloadType): string {
|
|
785
773
|
if (typeof functionId === 'undefined') {
|
|
786
774
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
787
775
|
}
|
|
@@ -790,10 +778,12 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
790
778
|
}
|
|
791
779
|
const apiPath = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
|
|
792
780
|
const payload: Payload = {};
|
|
781
|
+
if (typeof type !== 'undefined') {
|
|
782
|
+
payload['type'] = type;
|
|
783
|
+
}
|
|
793
784
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
794
785
|
|
|
795
786
|
const apiHeaders: { [header: string]: string } = {
|
|
796
|
-
'content-type': 'application/json',
|
|
797
787
|
}
|
|
798
788
|
|
|
799
789
|
payload['project'] = this.client.config.project;
|
|
@@ -801,21 +791,48 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
801
791
|
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
802
792
|
uri.searchParams.append(key, value);
|
|
803
793
|
}
|
|
804
|
-
|
|
794
|
+
|
|
805
795
|
return uri.toString();
|
|
806
796
|
}
|
|
807
797
|
/**
|
|
808
|
-
*
|
|
798
|
+
* Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
|
|
809
799
|
*
|
|
800
|
+
* @param {string} functionId
|
|
801
|
+
* @param {string} deploymentId
|
|
802
|
+
* @throws {AppwriteException}
|
|
803
|
+
* @returns {Promise<Models.Deployment>}
|
|
804
|
+
*/
|
|
805
|
+
updateDeploymentStatus(functionId: string, deploymentId: string): Promise<Models.Deployment> {
|
|
806
|
+
if (typeof functionId === 'undefined') {
|
|
807
|
+
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
808
|
+
}
|
|
809
|
+
if (typeof deploymentId === 'undefined') {
|
|
810
|
+
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
811
|
+
}
|
|
812
|
+
const apiPath = '/functions/{functionId}/deployments/{deploymentId}/status'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
|
|
813
|
+
const payload: Payload = {};
|
|
814
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
815
|
+
|
|
816
|
+
const apiHeaders: { [header: string]: string } = {
|
|
817
|
+
'content-type': 'application/json',
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
return this.client.call(
|
|
821
|
+
'patch',
|
|
822
|
+
uri,
|
|
823
|
+
apiHeaders,
|
|
824
|
+
payload
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
810
828
|
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
|
|
811
829
|
*
|
|
812
830
|
* @param {string} functionId
|
|
813
831
|
* @param {string[]} queries
|
|
814
|
-
* @param {string} search
|
|
815
832
|
* @throws {AppwriteException}
|
|
816
833
|
* @returns {Promise<Models.ExecutionList>}
|
|
817
834
|
*/
|
|
818
|
-
|
|
835
|
+
listExecutions(functionId: string, queries?: string[]): Promise<Models.ExecutionList> {
|
|
819
836
|
if (typeof functionId === 'undefined') {
|
|
820
837
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
821
838
|
}
|
|
@@ -824,19 +841,12 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
824
841
|
if (typeof queries !== 'undefined') {
|
|
825
842
|
payload['queries'] = queries;
|
|
826
843
|
}
|
|
827
|
-
if (typeof search !== 'undefined') {
|
|
828
|
-
payload['search'] = search;
|
|
829
|
-
}
|
|
830
844
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
831
845
|
|
|
832
846
|
const apiHeaders: { [header: string]: string } = {
|
|
833
|
-
'content-type': 'application/json',
|
|
834
847
|
}
|
|
835
848
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
return await this.client.call(
|
|
849
|
+
return this.client.call(
|
|
840
850
|
'get',
|
|
841
851
|
uri,
|
|
842
852
|
apiHeaders,
|
|
@@ -844,8 +854,6 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
844
854
|
);
|
|
845
855
|
}
|
|
846
856
|
/**
|
|
847
|
-
* Create execution
|
|
848
|
-
*
|
|
849
857
|
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
|
|
850
858
|
*
|
|
851
859
|
* @param {string} functionId
|
|
@@ -858,7 +866,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
858
866
|
* @throws {AppwriteException}
|
|
859
867
|
* @returns {Promise<Models.Execution>}
|
|
860
868
|
*/
|
|
861
|
-
|
|
869
|
+
createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution> {
|
|
862
870
|
if (typeof functionId === 'undefined') {
|
|
863
871
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
864
872
|
}
|
|
@@ -888,10 +896,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
888
896
|
'content-type': 'application/json',
|
|
889
897
|
}
|
|
890
898
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
return await this.client.call(
|
|
899
|
+
return this.client.call(
|
|
895
900
|
'post',
|
|
896
901
|
uri,
|
|
897
902
|
apiHeaders,
|
|
@@ -899,8 +904,6 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
899
904
|
);
|
|
900
905
|
}
|
|
901
906
|
/**
|
|
902
|
-
* Get execution
|
|
903
|
-
*
|
|
904
907
|
* Get a function execution log by its unique ID.
|
|
905
908
|
*
|
|
906
909
|
* @param {string} functionId
|
|
@@ -908,7 +911,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
908
911
|
* @throws {AppwriteException}
|
|
909
912
|
* @returns {Promise<Models.Execution>}
|
|
910
913
|
*/
|
|
911
|
-
|
|
914
|
+
getExecution(functionId: string, executionId: string): Promise<Models.Execution> {
|
|
912
915
|
if (typeof functionId === 'undefined') {
|
|
913
916
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
914
917
|
}
|
|
@@ -920,13 +923,9 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
920
923
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
921
924
|
|
|
922
925
|
const apiHeaders: { [header: string]: string } = {
|
|
923
|
-
'content-type': 'application/json',
|
|
924
926
|
}
|
|
925
927
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
return await this.client.call(
|
|
928
|
+
return this.client.call(
|
|
930
929
|
'get',
|
|
931
930
|
uri,
|
|
932
931
|
apiHeaders,
|
|
@@ -934,17 +933,14 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
934
933
|
);
|
|
935
934
|
}
|
|
936
935
|
/**
|
|
937
|
-
* Delete execution
|
|
938
|
-
*
|
|
939
936
|
* Delete a function execution by its unique ID.
|
|
940
|
-
|
|
941
937
|
*
|
|
942
938
|
* @param {string} functionId
|
|
943
939
|
* @param {string} executionId
|
|
944
940
|
* @throws {AppwriteException}
|
|
945
941
|
* @returns {Promise<{}>}
|
|
946
942
|
*/
|
|
947
|
-
|
|
943
|
+
deleteExecution(functionId: string, executionId: string): Promise<{}> {
|
|
948
944
|
if (typeof functionId === 'undefined') {
|
|
949
945
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
950
946
|
}
|
|
@@ -959,10 +955,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
959
955
|
'content-type': 'application/json',
|
|
960
956
|
}
|
|
961
957
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
return await this.client.call(
|
|
958
|
+
return this.client.call(
|
|
966
959
|
'delete',
|
|
967
960
|
uri,
|
|
968
961
|
apiHeaders,
|
|
@@ -970,8 +963,6 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
970
963
|
);
|
|
971
964
|
}
|
|
972
965
|
/**
|
|
973
|
-
* Get function usage
|
|
974
|
-
*
|
|
975
966
|
* Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
|
|
976
967
|
*
|
|
977
968
|
* @param {string} functionId
|
|
@@ -979,7 +970,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
979
970
|
* @throws {AppwriteException}
|
|
980
971
|
* @returns {Promise<Models.UsageFunction>}
|
|
981
972
|
*/
|
|
982
|
-
|
|
973
|
+
getUsage(functionId: string, range?: FunctionUsageRange): Promise<Models.UsageFunction> {
|
|
983
974
|
if (typeof functionId === 'undefined') {
|
|
984
975
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
985
976
|
}
|
|
@@ -991,13 +982,9 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
991
982
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
992
983
|
|
|
993
984
|
const apiHeaders: { [header: string]: string } = {
|
|
994
|
-
'content-type': 'application/json',
|
|
995
985
|
}
|
|
996
986
|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
return await this.client.call(
|
|
987
|
+
return this.client.call(
|
|
1001
988
|
'get',
|
|
1002
989
|
uri,
|
|
1003
990
|
apiHeaders,
|
|
@@ -1005,15 +992,13 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1005
992
|
);
|
|
1006
993
|
}
|
|
1007
994
|
/**
|
|
1008
|
-
* List variables
|
|
1009
|
-
*
|
|
1010
995
|
* Get a list of all variables of a specific function.
|
|
1011
996
|
*
|
|
1012
997
|
* @param {string} functionId
|
|
1013
998
|
* @throws {AppwriteException}
|
|
1014
999
|
* @returns {Promise<Models.VariableList>}
|
|
1015
1000
|
*/
|
|
1016
|
-
|
|
1001
|
+
listVariables(functionId: string): Promise<Models.VariableList> {
|
|
1017
1002
|
if (typeof functionId === 'undefined') {
|
|
1018
1003
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
1019
1004
|
}
|
|
@@ -1022,13 +1007,9 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1022
1007
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1023
1008
|
|
|
1024
1009
|
const apiHeaders: { [header: string]: string } = {
|
|
1025
|
-
'content-type': 'application/json',
|
|
1026
1010
|
}
|
|
1027
1011
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
return await this.client.call(
|
|
1012
|
+
return this.client.call(
|
|
1032
1013
|
'get',
|
|
1033
1014
|
uri,
|
|
1034
1015
|
apiHeaders,
|
|
@@ -1036,17 +1017,16 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1036
1017
|
);
|
|
1037
1018
|
}
|
|
1038
1019
|
/**
|
|
1039
|
-
* Create variable
|
|
1040
|
-
*
|
|
1041
1020
|
* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
|
|
1042
1021
|
*
|
|
1043
1022
|
* @param {string} functionId
|
|
1044
1023
|
* @param {string} key
|
|
1045
1024
|
* @param {string} value
|
|
1025
|
+
* @param {boolean} secret
|
|
1046
1026
|
* @throws {AppwriteException}
|
|
1047
1027
|
* @returns {Promise<Models.Variable>}
|
|
1048
1028
|
*/
|
|
1049
|
-
|
|
1029
|
+
createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable> {
|
|
1050
1030
|
if (typeof functionId === 'undefined') {
|
|
1051
1031
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
1052
1032
|
}
|
|
@@ -1064,16 +1044,16 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1064
1044
|
if (typeof value !== 'undefined') {
|
|
1065
1045
|
payload['value'] = value;
|
|
1066
1046
|
}
|
|
1047
|
+
if (typeof secret !== 'undefined') {
|
|
1048
|
+
payload['secret'] = secret;
|
|
1049
|
+
}
|
|
1067
1050
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1068
1051
|
|
|
1069
1052
|
const apiHeaders: { [header: string]: string } = {
|
|
1070
1053
|
'content-type': 'application/json',
|
|
1071
1054
|
}
|
|
1072
1055
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
return await this.client.call(
|
|
1056
|
+
return this.client.call(
|
|
1077
1057
|
'post',
|
|
1078
1058
|
uri,
|
|
1079
1059
|
apiHeaders,
|
|
@@ -1081,8 +1061,6 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1081
1061
|
);
|
|
1082
1062
|
}
|
|
1083
1063
|
/**
|
|
1084
|
-
* Get variable
|
|
1085
|
-
*
|
|
1086
1064
|
* Get a variable by its unique ID.
|
|
1087
1065
|
*
|
|
1088
1066
|
* @param {string} functionId
|
|
@@ -1090,7 +1068,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1090
1068
|
* @throws {AppwriteException}
|
|
1091
1069
|
* @returns {Promise<Models.Variable>}
|
|
1092
1070
|
*/
|
|
1093
|
-
|
|
1071
|
+
getVariable(functionId: string, variableId: string): Promise<Models.Variable> {
|
|
1094
1072
|
if (typeof functionId === 'undefined') {
|
|
1095
1073
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
1096
1074
|
}
|
|
@@ -1102,13 +1080,9 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1102
1080
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1103
1081
|
|
|
1104
1082
|
const apiHeaders: { [header: string]: string } = {
|
|
1105
|
-
'content-type': 'application/json',
|
|
1106
1083
|
}
|
|
1107
1084
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
return await this.client.call(
|
|
1085
|
+
return this.client.call(
|
|
1112
1086
|
'get',
|
|
1113
1087
|
uri,
|
|
1114
1088
|
apiHeaders,
|
|
@@ -1116,18 +1090,17 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1116
1090
|
);
|
|
1117
1091
|
}
|
|
1118
1092
|
/**
|
|
1119
|
-
* Update variable
|
|
1120
|
-
*
|
|
1121
1093
|
* Update variable by its unique ID.
|
|
1122
1094
|
*
|
|
1123
1095
|
* @param {string} functionId
|
|
1124
1096
|
* @param {string} variableId
|
|
1125
1097
|
* @param {string} key
|
|
1126
1098
|
* @param {string} value
|
|
1099
|
+
* @param {boolean} secret
|
|
1127
1100
|
* @throws {AppwriteException}
|
|
1128
1101
|
* @returns {Promise<Models.Variable>}
|
|
1129
1102
|
*/
|
|
1130
|
-
|
|
1103
|
+
updateVariable(functionId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable> {
|
|
1131
1104
|
if (typeof functionId === 'undefined') {
|
|
1132
1105
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
1133
1106
|
}
|
|
@@ -1145,16 +1118,16 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1145
1118
|
if (typeof value !== 'undefined') {
|
|
1146
1119
|
payload['value'] = value;
|
|
1147
1120
|
}
|
|
1121
|
+
if (typeof secret !== 'undefined') {
|
|
1122
|
+
payload['secret'] = secret;
|
|
1123
|
+
}
|
|
1148
1124
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1149
1125
|
|
|
1150
1126
|
const apiHeaders: { [header: string]: string } = {
|
|
1151
1127
|
'content-type': 'application/json',
|
|
1152
1128
|
}
|
|
1153
1129
|
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
return await this.client.call(
|
|
1130
|
+
return this.client.call(
|
|
1158
1131
|
'put',
|
|
1159
1132
|
uri,
|
|
1160
1133
|
apiHeaders,
|
|
@@ -1162,8 +1135,6 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1162
1135
|
);
|
|
1163
1136
|
}
|
|
1164
1137
|
/**
|
|
1165
|
-
* Delete variable
|
|
1166
|
-
*
|
|
1167
1138
|
* Delete a variable by its unique ID.
|
|
1168
1139
|
*
|
|
1169
1140
|
* @param {string} functionId
|
|
@@ -1171,7 +1142,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1171
1142
|
* @throws {AppwriteException}
|
|
1172
1143
|
* @returns {Promise<{}>}
|
|
1173
1144
|
*/
|
|
1174
|
-
|
|
1145
|
+
deleteVariable(functionId: string, variableId: string): Promise<{}> {
|
|
1175
1146
|
if (typeof functionId === 'undefined') {
|
|
1176
1147
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
1177
1148
|
}
|
|
@@ -1186,10 +1157,7 @@ Use the "command" param to set the entrypoint used to execute your cod
|
|
|
1186
1157
|
'content-type': 'application/json',
|
|
1187
1158
|
}
|
|
1188
1159
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
return await this.client.call(
|
|
1160
|
+
return this.client.call(
|
|
1193
1161
|
'delete',
|
|
1194
1162
|
uri,
|
|
1195
1163
|
apiHeaders,
|