@appwrite.io/console 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +9 -8
- package/CHANGELOG.md +51 -6
- package/LICENSE +1 -1
- package/README.md +84 -4
- package/dist/cjs/sdk.js +15258 -6036
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +15256 -6037
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +15258 -6036
- package/docs/examples/account/create-billing-address.md +8 -8
- package/docs/examples/account/create-email-password-session.md +4 -4
- package/docs/examples/account/create-email-token.md +5 -5
- package/docs/examples/account/{update-magic-u-r-l-session.md → create-email-verification.md} +3 -4
- package/docs/examples/account/{update-m-f-a.md → create-jwt.md} +3 -3
- package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
- package/docs/examples/account/create-mfa-authenticator.md +3 -3
- package/docs/examples/account/create-mfa-challenge.md +3 -3
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
- package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
- package/docs/examples/account/create-phone-token.md +4 -4
- package/docs/examples/account/create-push-target.md +5 -5
- package/docs/examples/account/create-recovery.md +4 -4
- package/docs/examples/account/create-session.md +4 -4
- package/docs/examples/account/create-verification.md +3 -3
- package/docs/examples/account/create.md +6 -6
- package/docs/examples/account/delete-billing-address.md +3 -3
- package/docs/examples/account/delete-identity.md +3 -3
- package/docs/examples/account/delete-mfa-authenticator.md +3 -3
- package/docs/examples/account/delete-payment-method.md +3 -3
- package/docs/examples/account/delete-push-target.md +3 -3
- package/docs/examples/account/delete-session.md +3 -3
- package/docs/examples/account/get-billing-address.md +3 -3
- package/docs/examples/account/get-coupon.md +3 -3
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-payment-method.md +3 -3
- package/docs/examples/account/get-session.md +3 -3
- package/docs/examples/account/list-billing-addresses.md +3 -3
- package/docs/examples/account/list-identities.md +4 -3
- package/docs/examples/account/list-invoices.md +3 -3
- package/docs/examples/account/list-logs.md +4 -3
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/list-payment-methods.md +3 -3
- package/docs/examples/account/update-billing-address.md +9 -9
- package/docs/examples/account/update-email-verification.md +14 -0
- package/docs/examples/account/update-email.md +4 -4
- package/docs/examples/account/update-magic-url-session.md +14 -0
- package/docs/examples/account/update-mfa-authenticator.md +4 -4
- package/docs/examples/account/update-mfa-challenge.md +4 -4
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{create-j-w-t.md → update-mfa.md} +3 -1
- package/docs/examples/account/update-name.md +3 -3
- package/docs/examples/account/update-password.md +4 -4
- package/docs/examples/account/update-payment-method-mandate-options.md +3 -3
- package/docs/examples/account/update-payment-method-provider.md +6 -5
- package/docs/examples/account/update-payment-method.md +6 -5
- package/docs/examples/account/update-phone-session.md +4 -4
- package/docs/examples/account/update-phone-verification.md +4 -4
- package/docs/examples/account/update-phone.md +4 -4
- package/docs/examples/account/update-prefs.md +7 -3
- package/docs/examples/account/update-push-target.md +4 -4
- package/docs/examples/account/update-recovery.md +5 -5
- package/docs/examples/account/update-session.md +3 -3
- package/docs/examples/account/update-verification.md +4 -4
- package/docs/examples/assistant/chat.md +3 -3
- package/docs/examples/avatars/get-browser.md +6 -6
- package/docs/examples/avatars/get-credit-card.md +6 -6
- package/docs/examples/avatars/get-favicon.md +3 -3
- package/docs/examples/avatars/get-flag.md +6 -6
- package/docs/examples/avatars/get-image.md +5 -5
- package/docs/examples/avatars/get-initials.md +6 -6
- package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
- package/docs/examples/avatars/get-screenshot.md +35 -0
- package/docs/examples/backups/create-archive.md +4 -4
- package/docs/examples/backups/create-policy.md +9 -9
- package/docs/examples/backups/create-restoration.md +6 -6
- package/docs/examples/backups/delete-archive.md +3 -3
- package/docs/examples/backups/delete-policy.md +3 -3
- package/docs/examples/backups/get-archive.md +3 -3
- package/docs/examples/backups/get-policy.md +3 -3
- package/docs/examples/backups/get-restoration.md +3 -3
- package/docs/examples/backups/list-archives.md +3 -3
- package/docs/examples/backups/list-policies.md +3 -3
- package/docs/examples/backups/list-restorations.md +3 -3
- package/docs/examples/backups/update-policy.md +7 -7
- package/docs/examples/console/create-program-membership.md +3 -3
- package/docs/examples/console/create-source.md +7 -7
- package/docs/examples/console/get-campaign.md +3 -3
- package/docs/examples/console/get-coupon.md +3 -3
- package/docs/examples/console/{plans.md → get-plan.md} +3 -1
- package/docs/examples/console/get-plans.md +13 -0
- package/docs/examples/console/{regions.md → get-program.md} +3 -1
- package/docs/examples/console/get-regions.md +13 -0
- package/docs/examples/console/get-resource.md +4 -4
- package/docs/examples/console/suggest-columns.md +17 -0
- package/docs/examples/console/suggest-indexes.md +16 -0
- package/docs/examples/databases/create-boolean-attribute.md +8 -8
- package/docs/examples/databases/create-collection.md +11 -9
- package/docs/examples/databases/create-datetime-attribute.md +8 -8
- package/docs/examples/databases/create-document.md +16 -11
- package/docs/examples/databases/create-documents.md +7 -6
- package/docs/examples/databases/create-email-attribute.md +8 -8
- package/docs/examples/databases/create-enum-attribute.md +9 -9
- package/docs/examples/databases/create-float-attribute.md +10 -10
- package/docs/examples/databases/create-index.md +9 -9
- package/docs/examples/databases/create-integer-attribute.md +10 -10
- package/docs/examples/databases/create-ip-attribute.md +8 -8
- package/docs/examples/databases/create-line-attribute.md +17 -0
- package/docs/examples/databases/create-operations.md +24 -0
- package/docs/examples/databases/create-point-attribute.md +17 -0
- package/docs/examples/databases/create-polygon-attribute.md +17 -0
- package/docs/examples/databases/create-relationship-attribute.md +10 -10
- package/docs/examples/databases/create-string-attribute.md +10 -10
- package/docs/examples/databases/create-transaction.md +13 -0
- package/docs/examples/databases/create-url-attribute.md +8 -8
- package/docs/examples/databases/create.md +5 -5
- package/docs/examples/databases/decrement-document-attribute.md +9 -8
- package/docs/examples/databases/delete-attribute.md +5 -5
- package/docs/examples/databases/delete-collection.md +4 -4
- package/docs/examples/databases/delete-document.md +6 -5
- package/docs/examples/databases/delete-documents.md +6 -5
- package/docs/examples/databases/delete-index.md +5 -5
- package/docs/examples/databases/{get-database-usage.md → delete-transaction.md} +4 -5
- package/docs/examples/databases/delete.md +3 -3
- package/docs/examples/databases/get-attribute.md +5 -5
- package/docs/examples/databases/get-collection-usage.md +6 -6
- package/docs/examples/databases/get-collection.md +4 -4
- package/docs/examples/databases/get-document.md +7 -6
- package/docs/examples/databases/get-index.md +5 -5
- package/docs/examples/databases/get-transaction.md +13 -0
- package/docs/examples/databases/get-usage.md +5 -4
- package/docs/examples/databases/get.md +3 -3
- package/docs/examples/databases/increment-document-attribute.md +9 -8
- package/docs/examples/databases/list-attributes.md +6 -5
- package/docs/examples/databases/list-collection-logs.md +5 -5
- package/docs/examples/databases/list-collections.md +6 -5
- package/docs/examples/databases/list-document-logs.md +6 -6
- package/docs/examples/databases/list-documents.md +7 -5
- package/docs/examples/databases/list-indexes.md +6 -5
- package/docs/examples/databases/list-logs.md +4 -4
- package/docs/examples/databases/list-transactions.md +13 -0
- package/docs/examples/databases/list-usage.md +13 -0
- package/docs/examples/databases/list.md +5 -4
- package/docs/examples/databases/update-boolean-attribute.md +8 -8
- package/docs/examples/databases/update-collection.md +9 -9
- package/docs/examples/databases/update-datetime-attribute.md +8 -8
- package/docs/examples/databases/update-document.md +15 -8
- package/docs/examples/databases/update-documents.md +13 -6
- package/docs/examples/databases/update-email-attribute.md +8 -8
- package/docs/examples/databases/update-enum-attribute.md +9 -9
- package/docs/examples/databases/update-float-attribute.md +10 -10
- package/docs/examples/databases/update-integer-attribute.md +10 -10
- package/docs/examples/databases/update-ip-attribute.md +8 -8
- package/docs/examples/databases/update-line-attribute.md +18 -0
- package/docs/examples/databases/update-point-attribute.md +18 -0
- package/docs/examples/databases/update-polygon-attribute.md +18 -0
- package/docs/examples/databases/update-relationship-attribute.md +7 -7
- package/docs/examples/databases/update-string-attribute.md +9 -9
- package/docs/examples/databases/update-transaction.md +15 -0
- package/docs/examples/databases/update-url-attribute.md +8 -8
- package/docs/examples/databases/update.md +5 -5
- package/docs/examples/databases/upsert-document.md +15 -8
- package/docs/examples/databases/upsert-documents.md +6 -5
- package/docs/examples/domains/create-preset-google-workspace.md +3 -3
- package/docs/examples/domains/create-preset-i-cloud.md +3 -3
- package/docs/examples/domains/create-preset-mailgun.md +3 -3
- package/docs/examples/domains/create-preset-outlook.md +3 -3
- package/docs/examples/domains/create-preset-proton-mail.md +3 -3
- package/docs/examples/domains/create-preset-zoho.md +3 -3
- package/docs/examples/domains/create-record-a.md +7 -7
- package/docs/examples/domains/{create-record-a-a-a-a.md → create-record-aaaa.md} +7 -7
- package/docs/examples/domains/create-record-alias.md +7 -7
- package/docs/examples/domains/{create-record-n-s.md → create-record-caa.md} +7 -7
- package/docs/examples/domains/{create-record-c-a-a.md → create-record-cname.md} +7 -7
- package/docs/examples/domains/{create-record-h-t-t-p-s.md → create-record-https.md} +7 -7
- package/docs/examples/domains/create-record-mx.md +18 -0
- package/docs/examples/domains/create-record-ns.md +17 -0
- package/docs/examples/domains/create-record-srv.md +20 -0
- package/docs/examples/domains/{create-record-c-n-a-m-e.md → create-record-txt.md} +7 -7
- package/docs/examples/domains/create.md +4 -4
- package/docs/examples/domains/delete-record.md +4 -4
- package/docs/examples/domains/delete.md +3 -3
- package/docs/examples/domains/get-preset-google-workspace.md +3 -3
- package/docs/examples/domains/get-preset-i-cloud.md +3 -3
- package/docs/examples/domains/get-preset-mailgun.md +3 -3
- package/docs/examples/domains/get-preset-outlook.md +3 -3
- package/docs/examples/domains/get-preset-proton-mail.md +3 -3
- package/docs/examples/domains/get-preset-zoho.md +3 -3
- package/docs/examples/domains/get-record.md +4 -4
- package/docs/examples/domains/get-zone.md +3 -3
- package/docs/examples/domains/get.md +3 -3
- package/docs/examples/domains/list-records.md +4 -4
- package/docs/examples/domains/list.md +4 -4
- package/docs/examples/domains/update-nameservers.md +3 -3
- package/docs/examples/domains/update-record-a.md +8 -8
- package/docs/examples/domains/update-record-aaaa.md +18 -0
- package/docs/examples/domains/update-record-alias.md +8 -8
- package/docs/examples/domains/update-record-caa.md +18 -0
- package/docs/examples/domains/update-record-cname.md +18 -0
- package/docs/examples/domains/update-record-https.md +18 -0
- package/docs/examples/domains/update-record-mx.md +19 -0
- package/docs/examples/domains/update-record-ns.md +18 -0
- package/docs/examples/domains/update-record-srv.md +21 -0
- package/docs/examples/domains/update-record-txt.md +18 -0
- package/docs/examples/domains/update-team.md +4 -4
- package/docs/examples/domains/update-zone.md +4 -4
- package/docs/examples/functions/create-deployment.md +7 -7
- package/docs/examples/functions/create-duplicate-deployment.md +5 -5
- package/docs/examples/functions/create-execution.md +9 -9
- package/docs/examples/functions/create-template-deployment.md +10 -9
- package/docs/examples/functions/create-variable.md +6 -6
- package/docs/examples/functions/create-vcs-deployment.md +7 -7
- package/docs/examples/functions/create.md +21 -21
- package/docs/examples/functions/delete-deployment.md +4 -4
- package/docs/examples/functions/delete-execution.md +4 -4
- package/docs/examples/functions/delete-variable.md +4 -4
- package/docs/examples/functions/delete.md +3 -3
- package/docs/examples/functions/get-deployment-download.md +5 -5
- package/docs/examples/functions/get-deployment.md +4 -4
- package/docs/examples/functions/get-execution.md +4 -4
- package/docs/examples/functions/get-template.md +3 -3
- package/docs/examples/functions/get-usage.md +5 -5
- package/docs/examples/functions/get-variable.md +4 -4
- package/docs/examples/functions/get.md +3 -3
- package/docs/examples/functions/list-deployments.md +6 -5
- package/docs/examples/functions/list-executions.md +5 -4
- package/docs/examples/functions/list-templates.md +7 -6
- package/docs/examples/functions/list-usage.md +4 -4
- package/docs/examples/functions/list-variables.md +3 -3
- package/docs/examples/functions/list.md +5 -4
- package/docs/examples/functions/update-deployment-status.md +4 -4
- package/docs/examples/functions/update-function-deployment.md +4 -4
- package/docs/examples/functions/update-variable.md +7 -7
- package/docs/examples/functions/update.md +21 -21
- package/docs/examples/graphql/mutation.md +3 -3
- package/docs/examples/graphql/query.md +3 -3
- package/docs/examples/health/get-certificate.md +3 -3
- package/docs/examples/health/get-failed-jobs.md +5 -5
- package/docs/examples/health/get-queue-billing-project-aggregation.md +3 -3
- package/docs/examples/health/get-queue-billing-team-aggregation.md +3 -3
- package/docs/examples/health/get-queue-builds.md +3 -3
- package/docs/examples/health/get-queue-certificates.md +3 -3
- package/docs/examples/health/get-queue-databases.md +4 -4
- package/docs/examples/health/get-queue-deletes.md +3 -3
- package/docs/examples/health/get-queue-functions.md +3 -3
- package/docs/examples/health/get-queue-logs.md +3 -3
- package/docs/examples/health/get-queue-mails.md +3 -3
- package/docs/examples/health/get-queue-messaging.md +3 -3
- package/docs/examples/health/get-queue-migrations.md +3 -3
- package/docs/examples/health/get-queue-priority-builds.md +3 -3
- package/docs/examples/health/get-queue-region-manager.md +3 -3
- package/docs/examples/health/get-queue-stats-resources.md +3 -3
- package/docs/examples/health/get-queue-threats.md +13 -0
- package/docs/examples/health/get-queue-usage.md +3 -3
- package/docs/examples/health/get-queue-webhooks.md +3 -3
- package/docs/examples/messaging/create-apns-provider.md +10 -10
- package/docs/examples/messaging/create-email.md +14 -14
- package/docs/examples/messaging/create-fcm-provider.md +6 -6
- package/docs/examples/messaging/create-mailgun-provider.md +12 -12
- package/docs/examples/messaging/{create-msg91provider.md → create-msg-91-provider.md} +8 -8
- package/docs/examples/messaging/create-push.md +21 -21
- package/docs/examples/messaging/create-resend-provider.md +20 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +10 -10
- package/docs/examples/messaging/create-sms.md +9 -9
- package/docs/examples/messaging/create-smtp-provider.md +16 -16
- package/docs/examples/messaging/create-subscriber.md +5 -5
- package/docs/examples/messaging/create-telesign-provider.md +8 -8
- package/docs/examples/messaging/create-textmagic-provider.md +8 -8
- package/docs/examples/messaging/create-topic.md +5 -5
- package/docs/examples/messaging/create-twilio-provider.md +8 -8
- package/docs/examples/messaging/create-vonage-provider.md +8 -8
- package/docs/examples/messaging/delete-provider.md +3 -3
- package/docs/examples/messaging/delete-subscriber.md +4 -4
- package/docs/examples/messaging/delete-topic.md +3 -3
- package/docs/examples/messaging/delete.md +3 -3
- package/docs/examples/messaging/get-message.md +3 -3
- package/docs/examples/messaging/get-provider.md +3 -3
- package/docs/examples/messaging/get-subscriber.md +4 -4
- package/docs/examples/messaging/get-topic.md +3 -3
- package/docs/examples/messaging/list-message-logs.md +5 -4
- package/docs/examples/messaging/list-messages.md +5 -4
- package/docs/examples/messaging/list-provider-logs.md +5 -4
- package/docs/examples/messaging/list-providers.md +5 -4
- package/docs/examples/messaging/list-subscriber-logs.md +5 -4
- package/docs/examples/messaging/list-subscribers.md +6 -5
- package/docs/examples/messaging/list-targets.md +5 -4
- package/docs/examples/messaging/list-topic-logs.md +5 -4
- package/docs/examples/messaging/list-topics.md +5 -4
- package/docs/examples/messaging/update-apns-provider.md +10 -10
- package/docs/examples/messaging/update-email.md +14 -14
- package/docs/examples/messaging/update-fcm-provider.md +6 -6
- package/docs/examples/messaging/update-mailgun-provider.md +12 -12
- package/docs/examples/messaging/{update-msg91provider.md → update-msg-91-provider.md} +8 -8
- package/docs/examples/messaging/update-push.md +21 -21
- package/docs/examples/messaging/update-resend-provider.md +20 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +10 -10
- package/docs/examples/messaging/update-sms.md +9 -9
- package/docs/examples/messaging/update-smtp-provider.md +16 -16
- package/docs/examples/messaging/update-telesign-provider.md +8 -8
- package/docs/examples/messaging/update-textmagic-provider.md +8 -8
- package/docs/examples/messaging/update-topic.md +5 -5
- package/docs/examples/messaging/update-twilio-provider.md +8 -8
- package/docs/examples/messaging/update-vonage-provider.md +8 -8
- package/docs/examples/migrations/create-appwrite-migration.md +6 -6
- package/docs/examples/migrations/create-csv-export.md +21 -0
- package/docs/examples/migrations/{create-csv-migration.md → create-csv-import.md} +6 -5
- package/docs/examples/migrations/create-firebase-migration.md +4 -4
- package/docs/examples/migrations/create-n-host-migration.md +10 -10
- package/docs/examples/migrations/create-supabase-migration.md +9 -9
- package/docs/examples/migrations/delete.md +3 -3
- package/docs/examples/migrations/get-appwrite-report.md +6 -6
- package/docs/examples/migrations/get-firebase-report.md +4 -4
- package/docs/examples/migrations/get-n-host-report.md +10 -10
- package/docs/examples/migrations/get-supabase-report.md +9 -9
- package/docs/examples/migrations/get.md +3 -3
- package/docs/examples/migrations/list.md +5 -4
- package/docs/examples/migrations/retry.md +3 -3
- package/docs/examples/organizations/add-credit.md +4 -4
- package/docs/examples/organizations/cancel-downgrade.md +3 -3
- package/docs/examples/organizations/create-downgrade-feedback.md +17 -0
- package/docs/examples/organizations/create-invoice-payment.md +5 -5
- package/docs/examples/organizations/create.md +13 -12
- package/docs/examples/organizations/delete-backup-payment-method.md +3 -3
- package/docs/examples/organizations/delete-billing-address.md +3 -3
- package/docs/examples/organizations/delete-default-payment-method.md +3 -3
- package/docs/examples/organizations/delete.md +3 -3
- package/docs/examples/organizations/estimation-create-organization.md +8 -7
- package/docs/examples/organizations/estimation-delete-organization.md +3 -3
- package/docs/examples/organizations/estimation-update-plan.md +7 -7
- package/docs/examples/organizations/get-aggregation.md +6 -4
- package/docs/examples/organizations/get-available-credits.md +13 -0
- package/docs/examples/organizations/get-billing-address.md +4 -4
- package/docs/examples/organizations/get-credit.md +4 -4
- package/docs/examples/organizations/get-invoice-download.md +4 -4
- package/docs/examples/organizations/get-invoice-view.md +4 -4
- package/docs/examples/organizations/get-invoice.md +4 -4
- package/docs/examples/organizations/get-payment-method.md +4 -4
- package/docs/examples/organizations/get-plan.md +3 -3
- package/docs/examples/organizations/get-scopes.md +3 -3
- package/docs/examples/organizations/get-usage.md +5 -5
- package/docs/examples/organizations/list-aggregations.md +4 -4
- package/docs/examples/organizations/list-credits.md +4 -4
- package/docs/examples/organizations/list-invoices.md +4 -4
- package/docs/examples/organizations/list.md +4 -4
- package/docs/examples/organizations/set-backup-payment-method.md +4 -4
- package/docs/examples/organizations/set-billing-address.md +4 -4
- package/docs/examples/organizations/set-billing-email.md +4 -4
- package/docs/examples/organizations/set-billing-tax-id.md +4 -4
- package/docs/examples/organizations/set-default-payment-method.md +4 -4
- package/docs/examples/organizations/update-budget.md +5 -5
- package/docs/examples/organizations/update-plan.md +11 -11
- package/docs/examples/organizations/update-projects.md +14 -0
- package/docs/examples/organizations/validate-invoice.md +4 -4
- package/docs/examples/organizations/validate-payment.md +4 -4
- package/docs/examples/project/create-variable.md +5 -5
- package/docs/examples/project/delete-variable.md +3 -3
- package/docs/examples/project/get-usage.md +5 -5
- package/docs/examples/project/get-variable.md +3 -3
- package/docs/examples/project/update-variable.md +6 -6
- package/docs/examples/projects/create-dev-key.md +5 -5
- package/docs/examples/projects/{create-j-w-t.md → create-jwt.md} +5 -5
- package/docs/examples/projects/create-key.md +6 -6
- package/docs/examples/projects/create-platform.md +8 -8
- package/docs/examples/projects/create-smtp-test.md +12 -12
- package/docs/examples/projects/create-webhook.md +10 -10
- package/docs/examples/projects/create.md +16 -16
- package/docs/examples/projects/delete-dev-key.md +4 -4
- package/docs/examples/projects/delete-email-template.md +5 -5
- package/docs/examples/projects/delete-key.md +4 -4
- package/docs/examples/projects/delete-platform.md +4 -4
- package/docs/examples/projects/delete-sms-template.md +5 -5
- package/docs/examples/projects/delete-webhook.md +4 -4
- package/docs/examples/projects/delete.md +3 -3
- package/docs/examples/projects/get-dev-key.md +4 -4
- package/docs/examples/projects/get-email-template.md +5 -5
- package/docs/examples/projects/get-key.md +4 -4
- package/docs/examples/projects/get-platform.md +4 -4
- package/docs/examples/projects/get-sms-template.md +5 -5
- package/docs/examples/projects/get-webhook.md +4 -4
- package/docs/examples/projects/get.md +3 -3
- package/docs/examples/projects/list-dev-keys.md +4 -4
- package/docs/examples/projects/list-keys.md +4 -3
- package/docs/examples/projects/list-platforms.md +4 -3
- package/docs/examples/projects/list-webhooks.md +4 -3
- package/docs/examples/projects/list.md +5 -4
- package/docs/examples/projects/update-api-status-all.md +4 -4
- package/docs/examples/projects/update-api-status.md +6 -6
- package/docs/examples/projects/update-auth-duration.md +4 -4
- package/docs/examples/projects/update-auth-limit.md +4 -4
- package/docs/examples/projects/update-auth-password-dictionary.md +4 -4
- package/docs/examples/projects/update-auth-password-history.md +4 -4
- package/docs/examples/projects/update-auth-sessions-limit.md +4 -4
- package/docs/examples/projects/update-auth-status.md +5 -5
- package/docs/examples/projects/update-dev-key.md +6 -6
- package/docs/examples/projects/update-email-template.md +10 -10
- package/docs/examples/projects/update-key.md +7 -7
- package/docs/examples/projects/update-memberships-privacy.md +6 -6
- package/docs/examples/projects/update-mock-numbers.md +4 -4
- package/docs/examples/projects/{update-o-auth2.md → update-o-auth-2.md} +7 -7
- package/docs/examples/projects/update-personal-data-check.md +4 -4
- package/docs/examples/projects/update-platform.md +8 -8
- package/docs/examples/projects/update-service-status-all.md +4 -4
- package/docs/examples/projects/update-service-status.md +5 -5
- package/docs/examples/projects/update-session-alerts.md +4 -4
- package/docs/examples/projects/update-session-invalidation.md +14 -0
- package/docs/examples/projects/update-sms-template.md +6 -6
- package/docs/examples/projects/update-smtp.md +12 -12
- package/docs/examples/projects/update-status.md +14 -0
- package/docs/examples/projects/update-team.md +4 -4
- package/docs/examples/projects/update-webhook-signature.md +4 -4
- package/docs/examples/projects/update-webhook.md +11 -11
- package/docs/examples/projects/update.md +13 -13
- package/docs/examples/proxy/{create-a-p-i-rule.md → create-api-rule.md} +3 -3
- package/docs/examples/proxy/create-function-rule.md +5 -5
- package/docs/examples/proxy/create-redirect-rule.md +8 -8
- package/docs/examples/proxy/create-site-rule.md +5 -5
- package/docs/examples/proxy/delete-rule.md +3 -3
- package/docs/examples/proxy/get-rule.md +3 -3
- package/docs/examples/proxy/list-rules.md +5 -4
- package/docs/examples/proxy/update-rule-verification.md +3 -3
- package/docs/examples/sites/create-deployment.md +8 -8
- package/docs/examples/sites/create-duplicate-deployment.md +4 -4
- package/docs/examples/sites/create-template-deployment.md +10 -9
- package/docs/examples/sites/create-variable.md +6 -6
- package/docs/examples/sites/create-vcs-deployment.md +7 -7
- package/docs/examples/sites/create.md +21 -21
- package/docs/examples/sites/delete-deployment.md +4 -4
- package/docs/examples/sites/delete-log.md +4 -4
- package/docs/examples/sites/delete-variable.md +4 -4
- package/docs/examples/sites/delete.md +3 -3
- package/docs/examples/sites/get-deployment-download.md +5 -5
- package/docs/examples/sites/get-deployment.md +4 -4
- package/docs/examples/sites/get-log.md +4 -4
- package/docs/examples/sites/get-template.md +3 -3
- package/docs/examples/sites/get-usage.md +5 -5
- package/docs/examples/sites/get-variable.md +4 -4
- package/docs/examples/sites/get.md +3 -3
- package/docs/examples/sites/list-deployments.md +6 -5
- package/docs/examples/sites/list-logs.md +5 -4
- package/docs/examples/sites/list-templates.md +6 -6
- package/docs/examples/sites/list-usage.md +4 -4
- package/docs/examples/sites/list-variables.md +3 -3
- package/docs/examples/sites/list.md +5 -4
- package/docs/examples/sites/update-deployment-status.md +4 -4
- package/docs/examples/sites/update-site-deployment.md +4 -4
- package/docs/examples/sites/update-variable.md +7 -7
- package/docs/examples/sites/update.md +21 -21
- package/docs/examples/storage/create-bucket.md +14 -13
- package/docs/examples/storage/create-file.md +7 -7
- package/docs/examples/storage/delete-bucket.md +3 -3
- package/docs/examples/storage/delete-file.md +4 -4
- package/docs/examples/storage/get-bucket-usage.md +5 -5
- package/docs/examples/storage/get-bucket.md +3 -3
- package/docs/examples/storage/get-file-download.md +5 -5
- package/docs/examples/storage/get-file-preview.md +16 -16
- package/docs/examples/storage/get-file-view.md +5 -5
- package/docs/examples/storage/get-file.md +4 -4
- package/docs/examples/storage/get-usage.md +4 -4
- package/docs/examples/storage/list-buckets.md +5 -4
- package/docs/examples/storage/list-files.md +6 -5
- package/docs/examples/storage/update-bucket.md +14 -13
- package/docs/examples/storage/update-file.md +7 -7
- package/docs/examples/tablesdb/create-boolean-column.md +18 -0
- package/docs/examples/tablesdb/create-datetime-column.md +18 -0
- package/docs/examples/tablesdb/create-email-column.md +18 -0
- package/docs/examples/tablesdb/create-enum-column.md +19 -0
- package/docs/examples/tablesdb/create-float-column.md +20 -0
- package/docs/examples/tablesdb/create-index.md +19 -0
- package/docs/examples/tablesdb/create-integer-column.md +20 -0
- package/docs/examples/tablesdb/create-ip-column.md +18 -0
- package/docs/examples/tablesdb/create-line-column.md +17 -0
- package/docs/examples/tablesdb/create-operations.md +24 -0
- package/docs/examples/tablesdb/create-point-column.md +17 -0
- package/docs/examples/tablesdb/create-polygon-column.md +17 -0
- package/docs/examples/tablesdb/create-relationship-column.md +20 -0
- package/docs/examples/tablesdb/create-row.md +24 -0
- package/docs/examples/tablesdb/create-rows.md +16 -0
- package/docs/examples/tablesdb/create-string-column.md +20 -0
- package/docs/examples/tablesdb/create-table.md +20 -0
- package/docs/examples/tablesdb/create-transaction.md +13 -0
- package/docs/examples/tablesdb/create-url-column.md +18 -0
- package/docs/examples/tablesdb/create.md +15 -0
- package/docs/examples/tablesdb/decrement-row-column.md +19 -0
- package/docs/examples/tablesdb/delete-column.md +15 -0
- package/docs/examples/tablesdb/delete-index.md +15 -0
- package/docs/examples/tablesdb/delete-row.md +16 -0
- package/docs/examples/tablesdb/delete-rows.md +16 -0
- package/docs/examples/tablesdb/delete-table.md +14 -0
- package/docs/examples/tablesdb/delete-transaction.md +13 -0
- package/docs/examples/tablesdb/delete.md +13 -0
- package/docs/examples/tablesdb/get-column.md +15 -0
- package/docs/examples/tablesdb/get-index.md +15 -0
- package/docs/examples/tablesdb/get-row.md +17 -0
- package/docs/examples/tablesdb/get-table-usage.md +15 -0
- package/docs/examples/tablesdb/get-table.md +14 -0
- package/docs/examples/tablesdb/get-transaction.md +13 -0
- package/docs/examples/tablesdb/get-usage.md +14 -0
- package/docs/examples/tablesdb/get.md +13 -0
- package/docs/examples/tablesdb/increment-row-column.md +19 -0
- package/docs/examples/tablesdb/list-columns.md +16 -0
- package/docs/examples/tablesdb/list-indexes.md +16 -0
- package/docs/examples/tablesdb/list-row-logs.md +16 -0
- package/docs/examples/tablesdb/list-rows.md +17 -0
- package/docs/examples/tablesdb/list-table-logs.md +15 -0
- package/docs/examples/tablesdb/list-tables.md +16 -0
- package/docs/examples/tablesdb/list-transactions.md +13 -0
- package/docs/examples/tablesdb/list-usage.md +13 -0
- package/docs/examples/tablesdb/list.md +15 -0
- package/docs/examples/tablesdb/update-boolean-column.md +18 -0
- package/docs/examples/tablesdb/update-datetime-column.md +18 -0
- package/docs/examples/tablesdb/update-email-column.md +18 -0
- package/docs/examples/tablesdb/update-enum-column.md +19 -0
- package/docs/examples/tablesdb/update-float-column.md +20 -0
- package/docs/examples/tablesdb/update-integer-column.md +20 -0
- package/docs/examples/tablesdb/update-ip-column.md +18 -0
- package/docs/examples/tablesdb/update-line-column.md +18 -0
- package/docs/examples/tablesdb/update-point-column.md +18 -0
- package/docs/examples/tablesdb/update-polygon-column.md +18 -0
- package/docs/examples/tablesdb/update-relationship-column.md +17 -0
- package/docs/examples/tablesdb/update-row.md +24 -0
- package/docs/examples/tablesdb/update-rows.md +23 -0
- package/docs/examples/tablesdb/update-string-column.md +19 -0
- package/docs/examples/tablesdb/update-table.md +18 -0
- package/docs/examples/tablesdb/update-transaction.md +15 -0
- package/docs/examples/tablesdb/update-url-column.md +18 -0
- package/docs/examples/tablesdb/update.md +15 -0
- package/docs/examples/tablesdb/upsert-row.md +24 -0
- package/docs/examples/tablesdb/upsert-rows.md +16 -0
- package/docs/examples/teams/create-membership.md +9 -9
- package/docs/examples/teams/create.md +5 -5
- package/docs/examples/teams/delete-membership.md +4 -4
- package/docs/examples/teams/delete.md +3 -3
- package/docs/examples/teams/get-membership.md +4 -4
- package/docs/examples/teams/get-prefs.md +3 -3
- package/docs/examples/teams/get.md +3 -3
- package/docs/examples/teams/list-logs.md +5 -4
- package/docs/examples/teams/list-memberships.md +6 -5
- package/docs/examples/teams/list.md +5 -4
- package/docs/examples/teams/update-membership-status.md +6 -6
- package/docs/examples/teams/update-membership.md +5 -5
- package/docs/examples/teams/update-name.md +4 -4
- package/docs/examples/teams/update-prefs.md +4 -4
- package/docs/examples/tokens/create-file-token.md +5 -5
- package/docs/examples/tokens/delete.md +3 -3
- package/docs/examples/tokens/get.md +3 -3
- package/docs/examples/tokens/list.md +6 -5
- package/docs/examples/tokens/update.md +4 -4
- package/docs/examples/users/{create-m-d5user.md → create-argon-2-user.md} +6 -6
- package/docs/examples/users/create-bcrypt-user.md +6 -6
- package/docs/examples/users/{create-j-w-t.md → create-jwt.md} +5 -5
- package/docs/examples/users/{create-argon2user.md → create-md-5-user.md} +6 -6
- package/docs/examples/users/create-mfa-recovery-codes.md +3 -3
- package/docs/examples/users/{create-p-h-pass-user.md → create-ph-pass-user.md} +6 -6
- package/docs/examples/users/create-scrypt-modified-user.md +9 -9
- package/docs/examples/users/create-scrypt-user.md +11 -11
- package/docs/examples/users/create-session.md +3 -3
- package/docs/examples/users/{create-s-h-a-user.md → create-sha-user.md} +7 -7
- package/docs/examples/users/create-target.md +8 -8
- package/docs/examples/users/create-token.md +5 -5
- package/docs/examples/users/create.md +7 -7
- package/docs/examples/users/delete-identity.md +3 -3
- package/docs/examples/users/delete-mfa-authenticator.md +4 -4
- package/docs/examples/users/delete-session.md +4 -4
- package/docs/examples/users/delete-sessions.md +3 -3
- package/docs/examples/users/delete-target.md +4 -4
- package/docs/examples/users/delete.md +3 -3
- package/docs/examples/users/get-mfa-recovery-codes.md +3 -3
- package/docs/examples/users/get-prefs.md +3 -3
- package/docs/examples/users/get-target.md +4 -4
- package/docs/examples/users/get-usage.md +4 -4
- package/docs/examples/users/get.md +3 -3
- package/docs/examples/users/list-identities.md +5 -4
- package/docs/examples/users/list-logs.md +5 -4
- package/docs/examples/users/list-memberships.md +6 -5
- package/docs/examples/users/list-mfa-factors.md +3 -3
- package/docs/examples/users/list-sessions.md +4 -3
- package/docs/examples/users/list-targets.md +5 -4
- package/docs/examples/users/list.md +5 -4
- package/docs/examples/users/update-email-verification.md +4 -4
- package/docs/examples/users/update-email.md +4 -4
- package/docs/examples/users/update-labels.md +4 -4
- package/docs/examples/users/update-mfa-recovery-codes.md +3 -3
- package/docs/examples/users/update-mfa.md +4 -4
- package/docs/examples/users/update-name.md +4 -4
- package/docs/examples/users/update-password.md +4 -4
- package/docs/examples/users/update-phone-verification.md +4 -4
- package/docs/examples/users/update-phone.md +4 -4
- package/docs/examples/users/update-prefs.md +4 -4
- package/docs/examples/users/update-status.md +4 -4
- package/docs/examples/users/update-target.md +7 -7
- package/docs/examples/vcs/create-repository-detection.md +6 -6
- package/docs/examples/vcs/create-repository.md +5 -5
- package/docs/examples/vcs/delete-installation.md +3 -3
- package/docs/examples/vcs/get-installation.md +3 -3
- package/docs/examples/vcs/get-repository-contents.md +6 -5
- package/docs/examples/vcs/get-repository.md +4 -4
- package/docs/examples/vcs/list-installations.md +5 -4
- package/docs/examples/vcs/list-repositories.md +6 -5
- package/docs/examples/vcs/list-repository-branches.md +4 -4
- package/docs/examples/vcs/update-external-deployments.md +5 -5
- package/package.json +4 -4
- package/src/client.ts +42 -7
- package/src/enums/api-service.ts +1 -0
- package/src/enums/attribute-status.ts +7 -0
- package/src/enums/billing-plan-group.ts +5 -0
- package/src/enums/build-runtime.ts +2 -0
- package/src/enums/column-status.ts +7 -0
- package/src/enums/credit-card.ts +1 -1
- package/src/enums/database-type.ts +4 -0
- package/src/enums/deployment-status.ts +7 -0
- package/src/enums/execution-method.ts +1 -0
- package/src/enums/execution-status.ts +7 -0
- package/src/enums/execution-trigger.ts +5 -0
- package/src/enums/framework.ts +1 -0
- package/src/enums/health-antivirus-status.ts +5 -0
- package/src/enums/health-check-status.ts +4 -0
- package/src/enums/index-status.ts +7 -0
- package/src/enums/index-type.ts +1 -0
- package/src/enums/message-status.ts +7 -0
- package/src/enums/o-auth-provider.ts +3 -0
- package/src/enums/platform.ts +4 -0
- package/src/enums/proxy-rule-deployment-resource-type.ts +4 -0
- package/src/enums/proxy-rule-status.ts +6 -0
- package/src/enums/region.ts +3 -0
- package/src/enums/runtime.ts +2 -0
- package/src/enums/status.ts +4 -0
- package/src/enums/template-reference-type.ts +5 -0
- package/src/enums/theme.ts +4 -0
- package/src/enums/timezone.ts +421 -0
- package/src/enums/{user-usage-range.ts → usage-range.ts} +1 -1
- package/src/enums/{v-c-s-deployment-type.ts → vcs-reference-type.ts} +1 -1
- package/src/index.ts +27 -11
- package/src/models.ts +1925 -239
- package/src/operator.ts +308 -0
- package/src/query.ts +246 -2
- package/src/services/account.ts +2278 -235
- package/src/services/assistant.ts +29 -3
- package/src/services/avatars.ts +511 -52
- package/src/services/backups.ts +400 -42
- package/src/services/console.ts +499 -19
- package/src/services/databases.ts +3584 -430
- package/src/services/domains.ts +1795 -266
- package/src/services/functions.ts +1197 -155
- package/src/services/graphql.ts +56 -4
- package/src/services/health.ts +586 -42
- package/src/services/locale.ts +18 -2
- package/src/services/messaging.ts +3418 -386
- package/src/services/migrations.ts +653 -65
- package/src/services/organizations.ts +1411 -126
- package/src/services/project.ts +173 -17
- package/src/services/projects.ts +2808 -282
- package/src/services/proxy.ts +272 -26
- package/src/services/realtime.ts +437 -0
- package/src/services/sites.ts +1129 -143
- package/src/services/storage.ts +672 -89
- package/src/services/tables-db.ts +5439 -0
- package/src/services/teams.ts +535 -65
- package/src/services/tokens.ts +171 -16
- package/src/services/users.ts +1916 -182
- package/src/services/vcs.ts +373 -41
- package/types/client.d.ts +14 -5
- package/types/enums/api-service.d.ts +1 -0
- package/types/enums/attribute-status.d.ts +7 -0
- package/types/enums/billing-plan-group.d.ts +5 -0
- package/types/enums/build-runtime.d.ts +3 -1
- package/types/enums/column-status.d.ts +7 -0
- package/types/enums/credit-card.d.ts +1 -1
- package/types/enums/database-type.d.ts +4 -0
- package/types/enums/deployment-status.d.ts +7 -0
- package/types/enums/execution-method.d.ts +2 -1
- package/types/enums/execution-status.d.ts +7 -0
- package/types/enums/execution-trigger.d.ts +5 -0
- package/types/enums/framework.d.ts +1 -0
- package/types/enums/health-antivirus-status.d.ts +5 -0
- package/types/enums/health-check-status.d.ts +4 -0
- package/types/enums/index-status.d.ts +7 -0
- package/types/enums/index-type.d.ts +2 -1
- package/types/enums/message-status.d.ts +7 -0
- package/types/enums/o-auth-provider.d.ts +4 -1
- package/types/enums/platform.d.ts +4 -0
- package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
- package/types/enums/proxy-rule-status.d.ts +6 -0
- package/types/enums/region.d.ts +4 -1
- package/types/enums/runtime.d.ts +3 -1
- package/types/enums/status.d.ts +4 -0
- package/types/enums/template-reference-type.d.ts +5 -0
- package/types/enums/theme.d.ts +4 -0
- package/types/enums/timezone.d.ts +421 -0
- package/types/enums/{site-usage-range.d.ts → usage-range.d.ts} +1 -1
- package/types/enums/{v-c-s-deployment-type.d.ts → vcs-reference-type.d.ts} +1 -1
- package/types/index.d.ts +27 -11
- package/types/models.d.ts +1877 -422
- package/types/operator.d.ts +180 -0
- package/types/query.d.ts +198 -2
- package/types/services/account.d.ts +1020 -158
- package/types/services/assistant.d.ts +13 -2
- package/types/services/avatars.d.ts +263 -45
- package/types/services/backups.d.ts +190 -30
- package/types/services/console.d.ts +202 -15
- package/types/services/databases.d.ts +1756 -299
- package/types/services/domains.d.ts +971 -219
- package/types/services/functions.d.ts +622 -131
- package/types/services/graphql.d.ts +24 -2
- package/types/services/health.d.ts +246 -24
- package/types/services/locale.d.ts +2 -2
- package/types/services/messaging.d.ts +1670 -281
- package/types/services/migrations.d.ts +319 -53
- package/types/services/organizations.d.ts +664 -109
- package/types/services/project.d.ts +81 -12
- package/types/services/projects.d.ts +1308 -202
- package/types/services/proxy.d.ts +128 -19
- package/types/services/realtime.d.ts +118 -0
- package/types/services/sites.d.ts +580 -119
- package/types/services/storage.d.ts +362 -81
- package/types/services/tables-db.d.ts +2040 -0
- package/types/services/teams.d.ts +277 -61
- package/types/services/tokens.d.ts +80 -12
- package/types/services/users.d.ts +906 -149
- package/types/services/vcs.d.ts +182 -34
- package/docs/examples/domains/create-record-m-x.md +0 -18
- package/docs/examples/domains/create-record-s-r-v.md +0 -20
- package/docs/examples/domains/create-record-t-x-t.md +0 -17
- package/docs/examples/domains/update-record-a-a-a-a.md +0 -18
- package/docs/examples/domains/update-record-c-a-a.md +0 -18
- package/docs/examples/domains/update-record-c-n-a-m-e.md +0 -18
- package/docs/examples/domains/update-record-h-t-t-p-s.md +0 -18
- package/docs/examples/domains/update-record-m-x.md +0 -19
- package/docs/examples/domains/update-record-n-s.md +0 -18
- package/docs/examples/domains/update-record-s-r-v.md +0 -21
- package/docs/examples/domains/update-record-t-x-t.md +0 -18
- package/src/enums/billing-plan.ts +0 -5
- package/src/enums/database-usage-range.ts +0 -5
- package/src/enums/function-usage-range.ts +0 -5
- package/src/enums/site-usage-range.ts +0 -5
- package/src/enums/storage-usage-range.ts +0 -5
- package/types/enums/billing-plan.d.ts +0 -5
- package/types/enums/database-usage-range.d.ts +0 -5
- package/types/enums/function-usage-range.d.ts +0 -5
- package/types/enums/storage-usage-range.d.ts +0 -5
- package/types/enums/user-usage-range.d.ts +0 -5
- /package/docs/examples/health/{get-d-b.md → get-db.md} +0 -0
- /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
- /package/src/enums/{s-m-t-p-secure.ts → smtp-secure.ts} +0 -0
- /package/src/enums/{v-c-s-detection-type.ts → vcs-detection-type.ts} +0 -0
- /package/types/enums/{s-m-t-p-secure.d.ts → smtp-secure.d.ts} +0 -0
- /package/types/enums/{v-c-s-detection-type.d.ts → vcs-detection-type.d.ts} +0 -0
package/src/services/sites.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
+
|
|
4
5
|
import { Framework } from '../enums/framework';
|
|
5
6
|
import { BuildRuntime } from '../enums/build-runtime';
|
|
6
7
|
import { Adapter } from '../enums/adapter';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { UsageRange } from '../enums/usage-range';
|
|
9
|
+
import { TemplateReferenceType } from '../enums/template-reference-type';
|
|
10
|
+
import { VCSReferenceType } from '../enums/vcs-reference-type';
|
|
9
11
|
import { DeploymentDownloadType } from '../enums/deployment-download-type';
|
|
10
12
|
|
|
11
13
|
export class Sites {
|
|
@@ -16,14 +18,47 @@ export class Sites {
|
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
|
-
* Get a list of all the project
|
|
21
|
+
* Get a list of all the project's sites. You can use the query params to filter your results.
|
|
22
|
+
*
|
|
23
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
|
|
24
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
25
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
26
|
+
* @throws {AppwriteException}
|
|
27
|
+
* @returns {Promise<Models.SiteList>}
|
|
28
|
+
*/
|
|
29
|
+
list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.SiteList>;
|
|
30
|
+
/**
|
|
31
|
+
* Get a list of all the project's sites. You can use the query params to filter your results.
|
|
20
32
|
*
|
|
21
|
-
* @param {string[]} queries
|
|
22
|
-
* @param {string} search
|
|
33
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
|
|
34
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
35
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
23
36
|
* @throws {AppwriteException}
|
|
24
37
|
* @returns {Promise<Models.SiteList>}
|
|
38
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
25
39
|
*/
|
|
26
|
-
list(queries?: string[], search?: string): Promise<Models.SiteList
|
|
40
|
+
list(queries?: string[], search?: string, total?: boolean): Promise<Models.SiteList>;
|
|
41
|
+
list(
|
|
42
|
+
paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],
|
|
43
|
+
...rest: [(string)?, (boolean)?]
|
|
44
|
+
): Promise<Models.SiteList> {
|
|
45
|
+
let params: { queries?: string[], search?: string, total?: boolean };
|
|
46
|
+
|
|
47
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
48
|
+
params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };
|
|
49
|
+
} else {
|
|
50
|
+
params = {
|
|
51
|
+
queries: paramsOrFirst as string[],
|
|
52
|
+
search: rest[0] as string,
|
|
53
|
+
total: rest[1] as boolean
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const queries = params.queries;
|
|
58
|
+
const search = params.search;
|
|
59
|
+
const total = params.total;
|
|
60
|
+
|
|
61
|
+
|
|
27
62
|
const apiPath = '/sites';
|
|
28
63
|
const payload: Payload = {};
|
|
29
64
|
if (typeof queries !== 'undefined') {
|
|
@@ -32,6 +67,9 @@ export class Sites {
|
|
|
32
67
|
if (typeof search !== 'undefined') {
|
|
33
68
|
payload['search'] = search;
|
|
34
69
|
}
|
|
70
|
+
if (typeof total !== 'undefined') {
|
|
71
|
+
payload['total'] = total;
|
|
72
|
+
}
|
|
35
73
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
36
74
|
|
|
37
75
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -44,31 +82,108 @@ export class Sites {
|
|
|
44
82
|
payload
|
|
45
83
|
);
|
|
46
84
|
}
|
|
85
|
+
|
|
47
86
|
/**
|
|
48
87
|
* Create a new site.
|
|
49
88
|
*
|
|
50
|
-
* @param {string} siteId
|
|
51
|
-
* @param {string} name
|
|
52
|
-
* @param {Framework} framework
|
|
53
|
-
* @param {BuildRuntime} buildRuntime
|
|
54
|
-
* @param {boolean} enabled
|
|
55
|
-
* @param {boolean} logging
|
|
56
|
-
* @param {number} timeout
|
|
57
|
-
* @param {string} installCommand
|
|
58
|
-
* @param {string} buildCommand
|
|
59
|
-
* @param {string} outputDirectory
|
|
60
|
-
* @param {Adapter} adapter
|
|
61
|
-
* @param {string} installationId
|
|
62
|
-
* @param {string} fallbackFile
|
|
63
|
-
* @param {string} providerRepositoryId
|
|
64
|
-
* @param {string} providerBranch
|
|
65
|
-
* @param {boolean} providerSilentMode
|
|
66
|
-
* @param {string} providerRootDirectory
|
|
67
|
-
* @param {string} specification
|
|
89
|
+
* @param {string} params.siteId - Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
90
|
+
* @param {string} params.name - Site name. Max length: 128 chars.
|
|
91
|
+
* @param {Framework} params.framework - Sites framework.
|
|
92
|
+
* @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
|
|
93
|
+
* @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
|
|
94
|
+
* @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
|
|
95
|
+
* @param {number} params.timeout - Maximum request time in seconds.
|
|
96
|
+
* @param {string} params.installCommand - Install Command.
|
|
97
|
+
* @param {string} params.buildCommand - Build Command.
|
|
98
|
+
* @param {string} params.outputDirectory - Output Directory for site.
|
|
99
|
+
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
100
|
+
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
101
|
+
* @param {string} params.fallbackFile - Fallback file for single page application sites.
|
|
102
|
+
* @param {string} params.providerRepositoryId - Repository ID of the repo linked to the site.
|
|
103
|
+
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
104
|
+
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
105
|
+
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
106
|
+
* @param {string} params.specification - Framework specification for the site and builds.
|
|
68
107
|
* @throws {AppwriteException}
|
|
69
108
|
* @returns {Promise<Models.Site>}
|
|
70
109
|
*/
|
|
71
|
-
create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site
|
|
110
|
+
create(params: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Site>;
|
|
111
|
+
/**
|
|
112
|
+
* Create a new site.
|
|
113
|
+
*
|
|
114
|
+
* @param {string} siteId - Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
115
|
+
* @param {string} name - Site name. Max length: 128 chars.
|
|
116
|
+
* @param {Framework} framework - Sites framework.
|
|
117
|
+
* @param {BuildRuntime} buildRuntime - Runtime to use during build step.
|
|
118
|
+
* @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
|
|
119
|
+
* @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
|
|
120
|
+
* @param {number} timeout - Maximum request time in seconds.
|
|
121
|
+
* @param {string} installCommand - Install Command.
|
|
122
|
+
* @param {string} buildCommand - Build Command.
|
|
123
|
+
* @param {string} outputDirectory - Output Directory for site.
|
|
124
|
+
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
125
|
+
* @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
126
|
+
* @param {string} fallbackFile - Fallback file for single page application sites.
|
|
127
|
+
* @param {string} providerRepositoryId - Repository ID of the repo linked to the site.
|
|
128
|
+
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
129
|
+
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
130
|
+
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
131
|
+
* @param {string} specification - Framework specification for the site and builds.
|
|
132
|
+
* @throws {AppwriteException}
|
|
133
|
+
* @returns {Promise<Models.Site>}
|
|
134
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
135
|
+
*/
|
|
136
|
+
create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
|
|
137
|
+
create(
|
|
138
|
+
paramsOrFirst: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
|
|
139
|
+
...rest: [(string)?, (Framework)?, (BuildRuntime)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
140
|
+
): Promise<Models.Site> {
|
|
141
|
+
let params: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
142
|
+
|
|
143
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
144
|
+
params = (paramsOrFirst || {}) as { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
145
|
+
} else {
|
|
146
|
+
params = {
|
|
147
|
+
siteId: paramsOrFirst as string,
|
|
148
|
+
name: rest[0] as string,
|
|
149
|
+
framework: rest[1] as Framework,
|
|
150
|
+
buildRuntime: rest[2] as BuildRuntime,
|
|
151
|
+
enabled: rest[3] as boolean,
|
|
152
|
+
logging: rest[4] as boolean,
|
|
153
|
+
timeout: rest[5] as number,
|
|
154
|
+
installCommand: rest[6] as string,
|
|
155
|
+
buildCommand: rest[7] as string,
|
|
156
|
+
outputDirectory: rest[8] as string,
|
|
157
|
+
adapter: rest[9] as Adapter,
|
|
158
|
+
installationId: rest[10] as string,
|
|
159
|
+
fallbackFile: rest[11] as string,
|
|
160
|
+
providerRepositoryId: rest[12] as string,
|
|
161
|
+
providerBranch: rest[13] as string,
|
|
162
|
+
providerSilentMode: rest[14] as boolean,
|
|
163
|
+
providerRootDirectory: rest[15] as string,
|
|
164
|
+
specification: rest[16] as string
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const siteId = params.siteId;
|
|
169
|
+
const name = params.name;
|
|
170
|
+
const framework = params.framework;
|
|
171
|
+
const buildRuntime = params.buildRuntime;
|
|
172
|
+
const enabled = params.enabled;
|
|
173
|
+
const logging = params.logging;
|
|
174
|
+
const timeout = params.timeout;
|
|
175
|
+
const installCommand = params.installCommand;
|
|
176
|
+
const buildCommand = params.buildCommand;
|
|
177
|
+
const outputDirectory = params.outputDirectory;
|
|
178
|
+
const adapter = params.adapter;
|
|
179
|
+
const installationId = params.installationId;
|
|
180
|
+
const fallbackFile = params.fallbackFile;
|
|
181
|
+
const providerRepositoryId = params.providerRepositoryId;
|
|
182
|
+
const providerBranch = params.providerBranch;
|
|
183
|
+
const providerSilentMode = params.providerSilentMode;
|
|
184
|
+
const providerRootDirectory = params.providerRootDirectory;
|
|
185
|
+
const specification = params.specification;
|
|
186
|
+
|
|
72
187
|
if (typeof siteId === 'undefined') {
|
|
73
188
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
74
189
|
}
|
|
@@ -81,6 +196,7 @@ export class Sites {
|
|
|
81
196
|
if (typeof buildRuntime === 'undefined') {
|
|
82
197
|
throw new AppwriteException('Missing required parameter: "buildRuntime"');
|
|
83
198
|
}
|
|
199
|
+
|
|
84
200
|
const apiPath = '/sites';
|
|
85
201
|
const payload: Payload = {};
|
|
86
202
|
if (typeof siteId !== 'undefined') {
|
|
@@ -150,6 +266,7 @@ export class Sites {
|
|
|
150
266
|
payload
|
|
151
267
|
);
|
|
152
268
|
}
|
|
269
|
+
|
|
153
270
|
/**
|
|
154
271
|
* Get a list of all frameworks that are currently available on the server instance.
|
|
155
272
|
*
|
|
@@ -157,6 +274,7 @@ export class Sites {
|
|
|
157
274
|
* @returns {Promise<Models.FrameworkList>}
|
|
158
275
|
*/
|
|
159
276
|
listFrameworks(): Promise<Models.FrameworkList> {
|
|
277
|
+
|
|
160
278
|
const apiPath = '/sites/frameworks';
|
|
161
279
|
const payload: Payload = {};
|
|
162
280
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -171,6 +289,7 @@ export class Sites {
|
|
|
171
289
|
payload
|
|
172
290
|
);
|
|
173
291
|
}
|
|
292
|
+
|
|
174
293
|
/**
|
|
175
294
|
* List allowed site specifications for this instance.
|
|
176
295
|
*
|
|
@@ -178,6 +297,7 @@ export class Sites {
|
|
|
178
297
|
* @returns {Promise<Models.SpecificationList>}
|
|
179
298
|
*/
|
|
180
299
|
listSpecifications(): Promise<Models.SpecificationList> {
|
|
300
|
+
|
|
181
301
|
const apiPath = '/sites/specifications';
|
|
182
302
|
const payload: Payload = {};
|
|
183
303
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -192,17 +312,53 @@ export class Sites {
|
|
|
192
312
|
payload
|
|
193
313
|
);
|
|
194
314
|
}
|
|
315
|
+
|
|
195
316
|
/**
|
|
196
317
|
* List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
197
318
|
*
|
|
198
|
-
* @param {string[]} frameworks
|
|
199
|
-
* @param {string[]} useCases
|
|
200
|
-
* @param {number} limit
|
|
201
|
-
* @param {number} offset
|
|
319
|
+
* @param {string[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
|
|
320
|
+
* @param {string[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
|
|
321
|
+
* @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
322
|
+
* @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
202
323
|
* @throws {AppwriteException}
|
|
203
324
|
* @returns {Promise<Models.TemplateSiteList>}
|
|
204
325
|
*/
|
|
205
|
-
listTemplates(frameworks?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateSiteList
|
|
326
|
+
listTemplates(params?: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number }): Promise<Models.TemplateSiteList>;
|
|
327
|
+
/**
|
|
328
|
+
* List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
329
|
+
*
|
|
330
|
+
* @param {string[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
|
|
331
|
+
* @param {string[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
|
|
332
|
+
* @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
333
|
+
* @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
334
|
+
* @throws {AppwriteException}
|
|
335
|
+
* @returns {Promise<Models.TemplateSiteList>}
|
|
336
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
337
|
+
*/
|
|
338
|
+
listTemplates(frameworks?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
|
|
339
|
+
listTemplates(
|
|
340
|
+
paramsOrFirst?: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number } | string[],
|
|
341
|
+
...rest: [(string[])?, (number)?, (number)?]
|
|
342
|
+
): Promise<Models.TemplateSiteList> {
|
|
343
|
+
let params: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number };
|
|
344
|
+
|
|
345
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
346
|
+
params = (paramsOrFirst || {}) as { frameworks?: string[], useCases?: string[], limit?: number, offset?: number };
|
|
347
|
+
} else {
|
|
348
|
+
params = {
|
|
349
|
+
frameworks: paramsOrFirst as string[],
|
|
350
|
+
useCases: rest[0] as string[],
|
|
351
|
+
limit: rest[1] as number,
|
|
352
|
+
offset: rest[2] as number
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
const frameworks = params.frameworks;
|
|
357
|
+
const useCases = params.useCases;
|
|
358
|
+
const limit = params.limit;
|
|
359
|
+
const offset = params.offset;
|
|
360
|
+
|
|
361
|
+
|
|
206
362
|
const apiPath = '/sites/templates';
|
|
207
363
|
const payload: Payload = {};
|
|
208
364
|
if (typeof frameworks !== 'undefined') {
|
|
@@ -229,17 +385,43 @@ export class Sites {
|
|
|
229
385
|
payload
|
|
230
386
|
);
|
|
231
387
|
}
|
|
388
|
+
|
|
232
389
|
/**
|
|
233
390
|
* Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
234
391
|
*
|
|
235
|
-
* @param {string} templateId
|
|
392
|
+
* @param {string} params.templateId - Template ID.
|
|
236
393
|
* @throws {AppwriteException}
|
|
237
394
|
* @returns {Promise<Models.TemplateSite>}
|
|
238
395
|
*/
|
|
239
|
-
getTemplate(templateId: string): Promise<Models.TemplateSite
|
|
396
|
+
getTemplate(params: { templateId: string }): Promise<Models.TemplateSite>;
|
|
397
|
+
/**
|
|
398
|
+
* Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
399
|
+
*
|
|
400
|
+
* @param {string} templateId - Template ID.
|
|
401
|
+
* @throws {AppwriteException}
|
|
402
|
+
* @returns {Promise<Models.TemplateSite>}
|
|
403
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
404
|
+
*/
|
|
405
|
+
getTemplate(templateId: string): Promise<Models.TemplateSite>;
|
|
406
|
+
getTemplate(
|
|
407
|
+
paramsOrFirst: { templateId: string } | string
|
|
408
|
+
): Promise<Models.TemplateSite> {
|
|
409
|
+
let params: { templateId: string };
|
|
410
|
+
|
|
411
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
412
|
+
params = (paramsOrFirst || {}) as { templateId: string };
|
|
413
|
+
} else {
|
|
414
|
+
params = {
|
|
415
|
+
templateId: paramsOrFirst as string
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
const templateId = params.templateId;
|
|
420
|
+
|
|
240
421
|
if (typeof templateId === 'undefined') {
|
|
241
422
|
throw new AppwriteException('Missing required parameter: "templateId"');
|
|
242
423
|
}
|
|
424
|
+
|
|
243
425
|
const apiPath = '/sites/templates/{templateId}'.replace('{templateId}', templateId);
|
|
244
426
|
const payload: Payload = {};
|
|
245
427
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -254,14 +436,40 @@ export class Sites {
|
|
|
254
436
|
payload
|
|
255
437
|
);
|
|
256
438
|
}
|
|
439
|
+
|
|
257
440
|
/**
|
|
258
441
|
* Get usage metrics and statistics for all sites 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.
|
|
259
442
|
*
|
|
260
|
-
* @param {
|
|
443
|
+
* @param {UsageRange} params.range - Date range.
|
|
261
444
|
* @throws {AppwriteException}
|
|
262
445
|
* @returns {Promise<Models.UsageSites>}
|
|
263
446
|
*/
|
|
264
|
-
listUsage(range?:
|
|
447
|
+
listUsage(params?: { range?: UsageRange }): Promise<Models.UsageSites>;
|
|
448
|
+
/**
|
|
449
|
+
* Get usage metrics and statistics for all sites 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.
|
|
450
|
+
*
|
|
451
|
+
* @param {UsageRange} range - Date range.
|
|
452
|
+
* @throws {AppwriteException}
|
|
453
|
+
* @returns {Promise<Models.UsageSites>}
|
|
454
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
455
|
+
*/
|
|
456
|
+
listUsage(range?: UsageRange): Promise<Models.UsageSites>;
|
|
457
|
+
listUsage(
|
|
458
|
+
paramsOrFirst?: { range?: UsageRange } | UsageRange
|
|
459
|
+
): Promise<Models.UsageSites> {
|
|
460
|
+
let params: { range?: UsageRange };
|
|
461
|
+
|
|
462
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'range' in paramsOrFirst)) {
|
|
463
|
+
params = (paramsOrFirst || {}) as { range?: UsageRange };
|
|
464
|
+
} else {
|
|
465
|
+
params = {
|
|
466
|
+
range: paramsOrFirst as UsageRange
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
const range = params.range;
|
|
471
|
+
|
|
472
|
+
|
|
265
473
|
const apiPath = '/sites/usage';
|
|
266
474
|
const payload: Payload = {};
|
|
267
475
|
if (typeof range !== 'undefined') {
|
|
@@ -279,17 +487,43 @@ export class Sites {
|
|
|
279
487
|
payload
|
|
280
488
|
);
|
|
281
489
|
}
|
|
490
|
+
|
|
282
491
|
/**
|
|
283
492
|
* Get a site by its unique ID.
|
|
284
493
|
*
|
|
285
|
-
* @param {string} siteId
|
|
494
|
+
* @param {string} params.siteId - Site ID.
|
|
286
495
|
* @throws {AppwriteException}
|
|
287
496
|
* @returns {Promise<Models.Site>}
|
|
288
497
|
*/
|
|
289
|
-
get(siteId: string): Promise<Models.Site
|
|
498
|
+
get(params: { siteId: string }): Promise<Models.Site>;
|
|
499
|
+
/**
|
|
500
|
+
* Get a site by its unique ID.
|
|
501
|
+
*
|
|
502
|
+
* @param {string} siteId - Site ID.
|
|
503
|
+
* @throws {AppwriteException}
|
|
504
|
+
* @returns {Promise<Models.Site>}
|
|
505
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
506
|
+
*/
|
|
507
|
+
get(siteId: string): Promise<Models.Site>;
|
|
508
|
+
get(
|
|
509
|
+
paramsOrFirst: { siteId: string } | string
|
|
510
|
+
): Promise<Models.Site> {
|
|
511
|
+
let params: { siteId: string };
|
|
512
|
+
|
|
513
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
514
|
+
params = (paramsOrFirst || {}) as { siteId: string };
|
|
515
|
+
} else {
|
|
516
|
+
params = {
|
|
517
|
+
siteId: paramsOrFirst as string
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
const siteId = params.siteId;
|
|
522
|
+
|
|
290
523
|
if (typeof siteId === 'undefined') {
|
|
291
524
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
292
525
|
}
|
|
526
|
+
|
|
293
527
|
const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
294
528
|
const payload: Payload = {};
|
|
295
529
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -304,31 +538,108 @@ export class Sites {
|
|
|
304
538
|
payload
|
|
305
539
|
);
|
|
306
540
|
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Update site by its unique ID.
|
|
544
|
+
*
|
|
545
|
+
* @param {string} params.siteId - Site ID.
|
|
546
|
+
* @param {string} params.name - Site name. Max length: 128 chars.
|
|
547
|
+
* @param {Framework} params.framework - Sites framework.
|
|
548
|
+
* @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
|
|
549
|
+
* @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
|
|
550
|
+
* @param {number} params.timeout - Maximum request time in seconds.
|
|
551
|
+
* @param {string} params.installCommand - Install Command.
|
|
552
|
+
* @param {string} params.buildCommand - Build Command.
|
|
553
|
+
* @param {string} params.outputDirectory - Output Directory for site.
|
|
554
|
+
* @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
|
|
555
|
+
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
556
|
+
* @param {string} params.fallbackFile - Fallback file for single page application sites.
|
|
557
|
+
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
558
|
+
* @param {string} params.providerRepositoryId - Repository ID of the repo linked to the site.
|
|
559
|
+
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
560
|
+
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
561
|
+
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
562
|
+
* @param {string} params.specification - Framework specification for the site and builds.
|
|
563
|
+
* @throws {AppwriteException}
|
|
564
|
+
* @returns {Promise<Models.Site>}
|
|
565
|
+
*/
|
|
566
|
+
update(params: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Site>;
|
|
307
567
|
/**
|
|
308
568
|
* Update site by its unique ID.
|
|
309
569
|
*
|
|
310
|
-
* @param {string} siteId
|
|
311
|
-
* @param {string} name
|
|
312
|
-
* @param {Framework} framework
|
|
313
|
-
* @param {boolean} enabled
|
|
314
|
-
* @param {boolean} logging
|
|
315
|
-
* @param {number} timeout
|
|
316
|
-
* @param {string} installCommand
|
|
317
|
-
* @param {string} buildCommand
|
|
318
|
-
* @param {string} outputDirectory
|
|
319
|
-
* @param {BuildRuntime} buildRuntime
|
|
320
|
-
* @param {Adapter} adapter
|
|
321
|
-
* @param {string} fallbackFile
|
|
322
|
-
* @param {string} installationId
|
|
323
|
-
* @param {string} providerRepositoryId
|
|
324
|
-
* @param {string} providerBranch
|
|
325
|
-
* @param {boolean} providerSilentMode
|
|
326
|
-
* @param {string} providerRootDirectory
|
|
327
|
-
* @param {string} specification
|
|
570
|
+
* @param {string} siteId - Site ID.
|
|
571
|
+
* @param {string} name - Site name. Max length: 128 chars.
|
|
572
|
+
* @param {Framework} framework - Sites framework.
|
|
573
|
+
* @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
|
|
574
|
+
* @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
|
|
575
|
+
* @param {number} timeout - Maximum request time in seconds.
|
|
576
|
+
* @param {string} installCommand - Install Command.
|
|
577
|
+
* @param {string} buildCommand - Build Command.
|
|
578
|
+
* @param {string} outputDirectory - Output Directory for site.
|
|
579
|
+
* @param {BuildRuntime} buildRuntime - Runtime to use during build step.
|
|
580
|
+
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
581
|
+
* @param {string} fallbackFile - Fallback file for single page application sites.
|
|
582
|
+
* @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
583
|
+
* @param {string} providerRepositoryId - Repository ID of the repo linked to the site.
|
|
584
|
+
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
585
|
+
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
586
|
+
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
587
|
+
* @param {string} specification - Framework specification for the site and builds.
|
|
328
588
|
* @throws {AppwriteException}
|
|
329
589
|
* @returns {Promise<Models.Site>}
|
|
590
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
330
591
|
*/
|
|
331
|
-
update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site
|
|
592
|
+
update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
|
|
593
|
+
update(
|
|
594
|
+
paramsOrFirst: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
|
|
595
|
+
...rest: [(string)?, (Framework)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (BuildRuntime)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
596
|
+
): Promise<Models.Site> {
|
|
597
|
+
let params: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
598
|
+
|
|
599
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
600
|
+
params = (paramsOrFirst || {}) as { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
601
|
+
} else {
|
|
602
|
+
params = {
|
|
603
|
+
siteId: paramsOrFirst as string,
|
|
604
|
+
name: rest[0] as string,
|
|
605
|
+
framework: rest[1] as Framework,
|
|
606
|
+
enabled: rest[2] as boolean,
|
|
607
|
+
logging: rest[3] as boolean,
|
|
608
|
+
timeout: rest[4] as number,
|
|
609
|
+
installCommand: rest[5] as string,
|
|
610
|
+
buildCommand: rest[6] as string,
|
|
611
|
+
outputDirectory: rest[7] as string,
|
|
612
|
+
buildRuntime: rest[8] as BuildRuntime,
|
|
613
|
+
adapter: rest[9] as Adapter,
|
|
614
|
+
fallbackFile: rest[10] as string,
|
|
615
|
+
installationId: rest[11] as string,
|
|
616
|
+
providerRepositoryId: rest[12] as string,
|
|
617
|
+
providerBranch: rest[13] as string,
|
|
618
|
+
providerSilentMode: rest[14] as boolean,
|
|
619
|
+
providerRootDirectory: rest[15] as string,
|
|
620
|
+
specification: rest[16] as string
|
|
621
|
+
};
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
const siteId = params.siteId;
|
|
625
|
+
const name = params.name;
|
|
626
|
+
const framework = params.framework;
|
|
627
|
+
const enabled = params.enabled;
|
|
628
|
+
const logging = params.logging;
|
|
629
|
+
const timeout = params.timeout;
|
|
630
|
+
const installCommand = params.installCommand;
|
|
631
|
+
const buildCommand = params.buildCommand;
|
|
632
|
+
const outputDirectory = params.outputDirectory;
|
|
633
|
+
const buildRuntime = params.buildRuntime;
|
|
634
|
+
const adapter = params.adapter;
|
|
635
|
+
const fallbackFile = params.fallbackFile;
|
|
636
|
+
const installationId = params.installationId;
|
|
637
|
+
const providerRepositoryId = params.providerRepositoryId;
|
|
638
|
+
const providerBranch = params.providerBranch;
|
|
639
|
+
const providerSilentMode = params.providerSilentMode;
|
|
640
|
+
const providerRootDirectory = params.providerRootDirectory;
|
|
641
|
+
const specification = params.specification;
|
|
642
|
+
|
|
332
643
|
if (typeof siteId === 'undefined') {
|
|
333
644
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
334
645
|
}
|
|
@@ -338,6 +649,7 @@ export class Sites {
|
|
|
338
649
|
if (typeof framework === 'undefined') {
|
|
339
650
|
throw new AppwriteException('Missing required parameter: "framework"');
|
|
340
651
|
}
|
|
652
|
+
|
|
341
653
|
const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
342
654
|
const payload: Payload = {};
|
|
343
655
|
if (typeof name !== 'undefined') {
|
|
@@ -404,17 +716,43 @@ export class Sites {
|
|
|
404
716
|
payload
|
|
405
717
|
);
|
|
406
718
|
}
|
|
719
|
+
|
|
407
720
|
/**
|
|
408
721
|
* Delete a site by its unique ID.
|
|
409
722
|
*
|
|
410
|
-
* @param {string} siteId
|
|
723
|
+
* @param {string} params.siteId - Site ID.
|
|
411
724
|
* @throws {AppwriteException}
|
|
412
725
|
* @returns {Promise<{}>}
|
|
413
726
|
*/
|
|
414
|
-
delete(siteId: string): Promise<{}
|
|
727
|
+
delete(params: { siteId: string }): Promise<{}>;
|
|
728
|
+
/**
|
|
729
|
+
* Delete a site by its unique ID.
|
|
730
|
+
*
|
|
731
|
+
* @param {string} siteId - Site ID.
|
|
732
|
+
* @throws {AppwriteException}
|
|
733
|
+
* @returns {Promise<{}>}
|
|
734
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
735
|
+
*/
|
|
736
|
+
delete(siteId: string): Promise<{}>;
|
|
737
|
+
delete(
|
|
738
|
+
paramsOrFirst: { siteId: string } | string
|
|
739
|
+
): Promise<{}> {
|
|
740
|
+
let params: { siteId: string };
|
|
741
|
+
|
|
742
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
743
|
+
params = (paramsOrFirst || {}) as { siteId: string };
|
|
744
|
+
} else {
|
|
745
|
+
params = {
|
|
746
|
+
siteId: paramsOrFirst as string
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
const siteId = params.siteId;
|
|
751
|
+
|
|
415
752
|
if (typeof siteId === 'undefined') {
|
|
416
753
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
417
754
|
}
|
|
755
|
+
|
|
418
756
|
const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
419
757
|
const payload: Payload = {};
|
|
420
758
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -430,21 +768,51 @@ export class Sites {
|
|
|
430
768
|
payload
|
|
431
769
|
);
|
|
432
770
|
}
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
|
|
774
|
+
*
|
|
775
|
+
* @param {string} params.siteId - Site ID.
|
|
776
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
777
|
+
* @throws {AppwriteException}
|
|
778
|
+
* @returns {Promise<Models.Site>}
|
|
779
|
+
*/
|
|
780
|
+
updateSiteDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Site>;
|
|
433
781
|
/**
|
|
434
782
|
* Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
|
|
435
783
|
*
|
|
436
|
-
* @param {string} siteId
|
|
437
|
-
* @param {string} deploymentId
|
|
784
|
+
* @param {string} siteId - Site ID.
|
|
785
|
+
* @param {string} deploymentId - Deployment ID.
|
|
438
786
|
* @throws {AppwriteException}
|
|
439
787
|
* @returns {Promise<Models.Site>}
|
|
788
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
440
789
|
*/
|
|
441
|
-
updateSiteDeployment(siteId: string, deploymentId: string): Promise<Models.Site
|
|
790
|
+
updateSiteDeployment(siteId: string, deploymentId: string): Promise<Models.Site>;
|
|
791
|
+
updateSiteDeployment(
|
|
792
|
+
paramsOrFirst: { siteId: string, deploymentId: string } | string,
|
|
793
|
+
...rest: [(string)?]
|
|
794
|
+
): Promise<Models.Site> {
|
|
795
|
+
let params: { siteId: string, deploymentId: string };
|
|
796
|
+
|
|
797
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
798
|
+
params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
|
|
799
|
+
} else {
|
|
800
|
+
params = {
|
|
801
|
+
siteId: paramsOrFirst as string,
|
|
802
|
+
deploymentId: rest[0] as string
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
const siteId = params.siteId;
|
|
807
|
+
const deploymentId = params.deploymentId;
|
|
808
|
+
|
|
442
809
|
if (typeof siteId === 'undefined') {
|
|
443
810
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
444
811
|
}
|
|
445
812
|
if (typeof deploymentId === 'undefined') {
|
|
446
813
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
447
814
|
}
|
|
815
|
+
|
|
448
816
|
const apiPath = '/sites/{siteId}/deployment'.replace('{siteId}', siteId);
|
|
449
817
|
const payload: Payload = {};
|
|
450
818
|
if (typeof deploymentId !== 'undefined') {
|
|
@@ -463,19 +831,56 @@ export class Sites {
|
|
|
463
831
|
payload
|
|
464
832
|
);
|
|
465
833
|
}
|
|
834
|
+
|
|
466
835
|
/**
|
|
467
|
-
* Get a list of all the site
|
|
836
|
+
* Get a list of all the site's code deployments. You can use the query params to filter your results.
|
|
468
837
|
*
|
|
469
|
-
* @param {string} siteId
|
|
470
|
-
* @param {string[]} queries
|
|
471
|
-
* @param {string} search
|
|
838
|
+
* @param {string} params.siteId - Site ID.
|
|
839
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
840
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
841
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
472
842
|
* @throws {AppwriteException}
|
|
473
843
|
* @returns {Promise<Models.DeploymentList>}
|
|
474
844
|
*/
|
|
475
|
-
listDeployments(siteId: string, queries?: string[], search?: string): Promise<Models.DeploymentList
|
|
845
|
+
listDeployments(params: { siteId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.DeploymentList>;
|
|
846
|
+
/**
|
|
847
|
+
* Get a list of all the site's code deployments. You can use the query params to filter your results.
|
|
848
|
+
*
|
|
849
|
+
* @param {string} siteId - Site ID.
|
|
850
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
851
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
852
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
853
|
+
* @throws {AppwriteException}
|
|
854
|
+
* @returns {Promise<Models.DeploymentList>}
|
|
855
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
856
|
+
*/
|
|
857
|
+
listDeployments(siteId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
|
|
858
|
+
listDeployments(
|
|
859
|
+
paramsOrFirst: { siteId: string, queries?: string[], search?: string, total?: boolean } | string,
|
|
860
|
+
...rest: [(string[])?, (string)?, (boolean)?]
|
|
861
|
+
): Promise<Models.DeploymentList> {
|
|
862
|
+
let params: { siteId: string, queries?: string[], search?: string, total?: boolean };
|
|
863
|
+
|
|
864
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
865
|
+
params = (paramsOrFirst || {}) as { siteId: string, queries?: string[], search?: string, total?: boolean };
|
|
866
|
+
} else {
|
|
867
|
+
params = {
|
|
868
|
+
siteId: paramsOrFirst as string,
|
|
869
|
+
queries: rest[0] as string[],
|
|
870
|
+
search: rest[1] as string,
|
|
871
|
+
total: rest[2] as boolean
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
const siteId = params.siteId;
|
|
876
|
+
const queries = params.queries;
|
|
877
|
+
const search = params.search;
|
|
878
|
+
const total = params.total;
|
|
879
|
+
|
|
476
880
|
if (typeof siteId === 'undefined') {
|
|
477
881
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
478
882
|
}
|
|
883
|
+
|
|
479
884
|
const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
480
885
|
const payload: Payload = {};
|
|
481
886
|
if (typeof queries !== 'undefined') {
|
|
@@ -484,6 +889,9 @@ export class Sites {
|
|
|
484
889
|
if (typeof search !== 'undefined') {
|
|
485
890
|
payload['search'] = search;
|
|
486
891
|
}
|
|
892
|
+
if (typeof total !== 'undefined') {
|
|
893
|
+
payload['total'] = total;
|
|
894
|
+
}
|
|
487
895
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
488
896
|
|
|
489
897
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -496,19 +904,63 @@ export class Sites {
|
|
|
496
904
|
payload
|
|
497
905
|
);
|
|
498
906
|
}
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
|
|
910
|
+
*
|
|
911
|
+
* @param {string} params.siteId - Site ID.
|
|
912
|
+
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
913
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
914
|
+
* @param {string} params.installCommand - Install Commands.
|
|
915
|
+
* @param {string} params.buildCommand - Build Commands.
|
|
916
|
+
* @param {string} params.outputDirectory - Output Directory.
|
|
917
|
+
* @throws {AppwriteException}
|
|
918
|
+
* @returns {Promise<Models.Deployment>}
|
|
919
|
+
*/
|
|
920
|
+
createDeployment(params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string , onProgress?: (progress: UploadProgress) => void }): Promise<Models.Deployment>;
|
|
499
921
|
/**
|
|
500
|
-
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you
|
|
922
|
+
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
|
|
501
923
|
*
|
|
502
|
-
* @param {string} siteId
|
|
503
|
-
* @param {File} code
|
|
504
|
-
* @param {boolean} activate
|
|
505
|
-
* @param {string} installCommand
|
|
506
|
-
* @param {string} buildCommand
|
|
507
|
-
* @param {string} outputDirectory
|
|
924
|
+
* @param {string} siteId - Site ID.
|
|
925
|
+
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
926
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
927
|
+
* @param {string} installCommand - Install Commands.
|
|
928
|
+
* @param {string} buildCommand - Build Commands.
|
|
929
|
+
* @param {string} outputDirectory - Output Directory.
|
|
508
930
|
* @throws {AppwriteException}
|
|
509
931
|
* @returns {Promise<Models.Deployment>}
|
|
932
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
510
933
|
*/
|
|
511
|
-
createDeployment(siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress
|
|
934
|
+
createDeployment(siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
|
|
935
|
+
createDeployment(
|
|
936
|
+
paramsOrFirst: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void } | string,
|
|
937
|
+
...rest: [(File)?, (boolean)?, (string)?, (string)?, (string)?,((progress: UploadProgress) => void)?]
|
|
938
|
+
): Promise<Models.Deployment> {
|
|
939
|
+
let params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string };
|
|
940
|
+
let onProgress: ((progress: UploadProgress) => void);
|
|
941
|
+
|
|
942
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
943
|
+
params = (paramsOrFirst || {}) as { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string };
|
|
944
|
+
onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);
|
|
945
|
+
} else {
|
|
946
|
+
params = {
|
|
947
|
+
siteId: paramsOrFirst as string,
|
|
948
|
+
code: rest[0] as File,
|
|
949
|
+
activate: rest[1] as boolean,
|
|
950
|
+
installCommand: rest[2] as string,
|
|
951
|
+
buildCommand: rest[3] as string,
|
|
952
|
+
outputDirectory: rest[4] as string
|
|
953
|
+
};
|
|
954
|
+
onProgress = rest[5] as ((progress: UploadProgress) => void);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
const siteId = params.siteId;
|
|
958
|
+
const code = params.code;
|
|
959
|
+
const activate = params.activate;
|
|
960
|
+
const installCommand = params.installCommand;
|
|
961
|
+
const buildCommand = params.buildCommand;
|
|
962
|
+
const outputDirectory = params.outputDirectory;
|
|
963
|
+
|
|
512
964
|
if (typeof siteId === 'undefined') {
|
|
513
965
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
514
966
|
}
|
|
@@ -518,6 +970,7 @@ export class Sites {
|
|
|
518
970
|
if (typeof activate === 'undefined') {
|
|
519
971
|
throw new AppwriteException('Missing required parameter: "activate"');
|
|
520
972
|
}
|
|
973
|
+
|
|
521
974
|
const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
522
975
|
const payload: Payload = {};
|
|
523
976
|
if (typeof installCommand !== 'undefined') {
|
|
@@ -549,21 +1002,51 @@ export class Sites {
|
|
|
549
1002
|
onProgress
|
|
550
1003
|
);
|
|
551
1004
|
}
|
|
1005
|
+
|
|
552
1006
|
/**
|
|
553
|
-
* Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment
|
|
1007
|
+
* Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory 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.
|
|
554
1008
|
*
|
|
555
|
-
* @param {string} siteId
|
|
556
|
-
* @param {string} deploymentId
|
|
1009
|
+
* @param {string} params.siteId - Site ID.
|
|
1010
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
557
1011
|
* @throws {AppwriteException}
|
|
558
1012
|
* @returns {Promise<Models.Deployment>}
|
|
559
1013
|
*/
|
|
560
|
-
createDuplicateDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment
|
|
1014
|
+
createDuplicateDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory 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.
|
|
1017
|
+
*
|
|
1018
|
+
* @param {string} siteId - Site ID.
|
|
1019
|
+
* @param {string} deploymentId - Deployment ID.
|
|
1020
|
+
* @throws {AppwriteException}
|
|
1021
|
+
* @returns {Promise<Models.Deployment>}
|
|
1022
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1023
|
+
*/
|
|
1024
|
+
createDuplicateDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment>;
|
|
1025
|
+
createDuplicateDeployment(
|
|
1026
|
+
paramsOrFirst: { siteId: string, deploymentId: string } | string,
|
|
1027
|
+
...rest: [(string)?]
|
|
1028
|
+
): Promise<Models.Deployment> {
|
|
1029
|
+
let params: { siteId: string, deploymentId: string };
|
|
1030
|
+
|
|
1031
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1032
|
+
params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
|
|
1033
|
+
} else {
|
|
1034
|
+
params = {
|
|
1035
|
+
siteId: paramsOrFirst as string,
|
|
1036
|
+
deploymentId: rest[0] as string
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
const siteId = params.siteId;
|
|
1041
|
+
const deploymentId = params.deploymentId;
|
|
1042
|
+
|
|
561
1043
|
if (typeof siteId === 'undefined') {
|
|
562
1044
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
563
1045
|
}
|
|
564
1046
|
if (typeof deploymentId === 'undefined') {
|
|
565
1047
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
566
1048
|
}
|
|
1049
|
+
|
|
567
1050
|
const apiPath = '/sites/{siteId}/deployments/duplicate'.replace('{siteId}', siteId);
|
|
568
1051
|
const payload: Payload = {};
|
|
569
1052
|
if (typeof deploymentId !== 'undefined') {
|
|
@@ -582,21 +1065,68 @@ export class Sites {
|
|
|
582
1065
|
payload
|
|
583
1066
|
);
|
|
584
1067
|
}
|
|
1068
|
+
|
|
585
1069
|
/**
|
|
586
1070
|
* Create a deployment based on a template.
|
|
587
|
-
|
|
588
|
-
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/
|
|
1071
|
+
*
|
|
1072
|
+
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.
|
|
589
1073
|
*
|
|
590
|
-
* @param {string} siteId
|
|
591
|
-
* @param {string} repository
|
|
592
|
-
* @param {string} owner
|
|
593
|
-
* @param {string} rootDirectory
|
|
594
|
-
* @param {
|
|
595
|
-
* @param {
|
|
1074
|
+
* @param {string} params.siteId - Site ID.
|
|
1075
|
+
* @param {string} params.repository - Repository name of the template.
|
|
1076
|
+
* @param {string} params.owner - The name of the owner of the template.
|
|
1077
|
+
* @param {string} params.rootDirectory - Path to site code in the template repo.
|
|
1078
|
+
* @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
|
|
1079
|
+
* @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
|
|
1080
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
596
1081
|
* @throws {AppwriteException}
|
|
597
1082
|
* @returns {Promise<Models.Deployment>}
|
|
598
1083
|
*/
|
|
599
|
-
createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string,
|
|
1084
|
+
createTemplateDeployment(params: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
|
|
1085
|
+
/**
|
|
1086
|
+
* Create a deployment based on a template.
|
|
1087
|
+
*
|
|
1088
|
+
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.
|
|
1089
|
+
*
|
|
1090
|
+
* @param {string} siteId - Site ID.
|
|
1091
|
+
* @param {string} repository - Repository name of the template.
|
|
1092
|
+
* @param {string} owner - The name of the owner of the template.
|
|
1093
|
+
* @param {string} rootDirectory - Path to site code in the template repo.
|
|
1094
|
+
* @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
|
|
1095
|
+
* @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
|
|
1096
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
1097
|
+
* @throws {AppwriteException}
|
|
1098
|
+
* @returns {Promise<Models.Deployment>}
|
|
1099
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1100
|
+
*/
|
|
1101
|
+
createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
1102
|
+
createTemplateDeployment(
|
|
1103
|
+
paramsOrFirst: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean } | string,
|
|
1104
|
+
...rest: [(string)?, (string)?, (string)?, (TemplateReferenceType)?, (string)?, (boolean)?]
|
|
1105
|
+
): Promise<Models.Deployment> {
|
|
1106
|
+
let params: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
|
|
1107
|
+
|
|
1108
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1109
|
+
params = (paramsOrFirst || {}) as { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean };
|
|
1110
|
+
} else {
|
|
1111
|
+
params = {
|
|
1112
|
+
siteId: paramsOrFirst as string,
|
|
1113
|
+
repository: rest[0] as string,
|
|
1114
|
+
owner: rest[1] as string,
|
|
1115
|
+
rootDirectory: rest[2] as string,
|
|
1116
|
+
type: rest[3] as TemplateReferenceType,
|
|
1117
|
+
reference: rest[4] as string,
|
|
1118
|
+
activate: rest[5] as boolean
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
const siteId = params.siteId;
|
|
1123
|
+
const repository = params.repository;
|
|
1124
|
+
const owner = params.owner;
|
|
1125
|
+
const rootDirectory = params.rootDirectory;
|
|
1126
|
+
const type = params.type;
|
|
1127
|
+
const reference = params.reference;
|
|
1128
|
+
const activate = params.activate;
|
|
1129
|
+
|
|
600
1130
|
if (typeof siteId === 'undefined') {
|
|
601
1131
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
602
1132
|
}
|
|
@@ -609,9 +1139,13 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
|
|
|
609
1139
|
if (typeof rootDirectory === 'undefined') {
|
|
610
1140
|
throw new AppwriteException('Missing required parameter: "rootDirectory"');
|
|
611
1141
|
}
|
|
612
|
-
if (typeof
|
|
613
|
-
throw new AppwriteException('Missing required parameter: "
|
|
1142
|
+
if (typeof type === 'undefined') {
|
|
1143
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
614
1144
|
}
|
|
1145
|
+
if (typeof reference === 'undefined') {
|
|
1146
|
+
throw new AppwriteException('Missing required parameter: "reference"');
|
|
1147
|
+
}
|
|
1148
|
+
|
|
615
1149
|
const apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', siteId);
|
|
616
1150
|
const payload: Payload = {};
|
|
617
1151
|
if (typeof repository !== 'undefined') {
|
|
@@ -623,8 +1157,11 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
|
|
|
623
1157
|
if (typeof rootDirectory !== 'undefined') {
|
|
624
1158
|
payload['rootDirectory'] = rootDirectory;
|
|
625
1159
|
}
|
|
626
|
-
if (typeof
|
|
627
|
-
payload['
|
|
1160
|
+
if (typeof type !== 'undefined') {
|
|
1161
|
+
payload['type'] = type;
|
|
1162
|
+
}
|
|
1163
|
+
if (typeof reference !== 'undefined') {
|
|
1164
|
+
payload['reference'] = reference;
|
|
628
1165
|
}
|
|
629
1166
|
if (typeof activate !== 'undefined') {
|
|
630
1167
|
payload['activate'] = activate;
|
|
@@ -642,19 +1179,56 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
|
|
|
642
1179
|
payload
|
|
643
1180
|
);
|
|
644
1181
|
}
|
|
1182
|
+
|
|
645
1183
|
/**
|
|
646
1184
|
* Create a deployment when a site is connected to VCS.
|
|
647
|
-
|
|
648
|
-
This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
1185
|
+
*
|
|
1186
|
+
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
649
1187
|
*
|
|
650
|
-
* @param {string} siteId
|
|
651
|
-
* @param {
|
|
652
|
-
* @param {string} reference
|
|
653
|
-
* @param {boolean} activate
|
|
1188
|
+
* @param {string} params.siteId - Site ID.
|
|
1189
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
1190
|
+
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
1191
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
654
1192
|
* @throws {AppwriteException}
|
|
655
1193
|
* @returns {Promise<Models.Deployment>}
|
|
656
1194
|
*/
|
|
657
|
-
createVcsDeployment(siteId: string, type:
|
|
1195
|
+
createVcsDeployment(params: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
|
|
1196
|
+
/**
|
|
1197
|
+
* Create a deployment when a site is connected to VCS.
|
|
1198
|
+
*
|
|
1199
|
+
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
1200
|
+
*
|
|
1201
|
+
* @param {string} siteId - Site ID.
|
|
1202
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
1203
|
+
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
1204
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
1205
|
+
* @throws {AppwriteException}
|
|
1206
|
+
* @returns {Promise<Models.Deployment>}
|
|
1207
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1208
|
+
*/
|
|
1209
|
+
createVcsDeployment(siteId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
1210
|
+
createVcsDeployment(
|
|
1211
|
+
paramsOrFirst: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean } | string,
|
|
1212
|
+
...rest: [(VCSReferenceType)?, (string)?, (boolean)?]
|
|
1213
|
+
): Promise<Models.Deployment> {
|
|
1214
|
+
let params: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean };
|
|
1215
|
+
|
|
1216
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1217
|
+
params = (paramsOrFirst || {}) as { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean };
|
|
1218
|
+
} else {
|
|
1219
|
+
params = {
|
|
1220
|
+
siteId: paramsOrFirst as string,
|
|
1221
|
+
type: rest[0] as VCSReferenceType,
|
|
1222
|
+
reference: rest[1] as string,
|
|
1223
|
+
activate: rest[2] as boolean
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
const siteId = params.siteId;
|
|
1228
|
+
const type = params.type;
|
|
1229
|
+
const reference = params.reference;
|
|
1230
|
+
const activate = params.activate;
|
|
1231
|
+
|
|
658
1232
|
if (typeof siteId === 'undefined') {
|
|
659
1233
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
660
1234
|
}
|
|
@@ -664,6 +1238,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
664
1238
|
if (typeof reference === 'undefined') {
|
|
665
1239
|
throw new AppwriteException('Missing required parameter: "reference"');
|
|
666
1240
|
}
|
|
1241
|
+
|
|
667
1242
|
const apiPath = '/sites/{siteId}/deployments/vcs'.replace('{siteId}', siteId);
|
|
668
1243
|
const payload: Payload = {};
|
|
669
1244
|
if (typeof type !== 'undefined') {
|
|
@@ -688,21 +1263,51 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
688
1263
|
payload
|
|
689
1264
|
);
|
|
690
1265
|
}
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Get a site deployment by its unique ID.
|
|
1269
|
+
*
|
|
1270
|
+
* @param {string} params.siteId - Site ID.
|
|
1271
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
1272
|
+
* @throws {AppwriteException}
|
|
1273
|
+
* @returns {Promise<Models.Deployment>}
|
|
1274
|
+
*/
|
|
1275
|
+
getDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
|
|
691
1276
|
/**
|
|
692
1277
|
* Get a site deployment by its unique ID.
|
|
693
1278
|
*
|
|
694
|
-
* @param {string} siteId
|
|
695
|
-
* @param {string} deploymentId
|
|
1279
|
+
* @param {string} siteId - Site ID.
|
|
1280
|
+
* @param {string} deploymentId - Deployment ID.
|
|
696
1281
|
* @throws {AppwriteException}
|
|
697
1282
|
* @returns {Promise<Models.Deployment>}
|
|
1283
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
698
1284
|
*/
|
|
699
|
-
getDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment
|
|
1285
|
+
getDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment>;
|
|
1286
|
+
getDeployment(
|
|
1287
|
+
paramsOrFirst: { siteId: string, deploymentId: string } | string,
|
|
1288
|
+
...rest: [(string)?]
|
|
1289
|
+
): Promise<Models.Deployment> {
|
|
1290
|
+
let params: { siteId: string, deploymentId: string };
|
|
1291
|
+
|
|
1292
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1293
|
+
params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
|
|
1294
|
+
} else {
|
|
1295
|
+
params = {
|
|
1296
|
+
siteId: paramsOrFirst as string,
|
|
1297
|
+
deploymentId: rest[0] as string
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
const siteId = params.siteId;
|
|
1302
|
+
const deploymentId = params.deploymentId;
|
|
1303
|
+
|
|
700
1304
|
if (typeof siteId === 'undefined') {
|
|
701
1305
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
702
1306
|
}
|
|
703
1307
|
if (typeof deploymentId === 'undefined') {
|
|
704
1308
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
705
1309
|
}
|
|
1310
|
+
|
|
706
1311
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
707
1312
|
const payload: Payload = {};
|
|
708
1313
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -717,21 +1322,51 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
717
1322
|
payload
|
|
718
1323
|
);
|
|
719
1324
|
}
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Delete a site deployment by its unique ID.
|
|
1328
|
+
*
|
|
1329
|
+
* @param {string} params.siteId - Site ID.
|
|
1330
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
1331
|
+
* @throws {AppwriteException}
|
|
1332
|
+
* @returns {Promise<{}>}
|
|
1333
|
+
*/
|
|
1334
|
+
deleteDeployment(params: { siteId: string, deploymentId: string }): Promise<{}>;
|
|
720
1335
|
/**
|
|
721
1336
|
* Delete a site deployment by its unique ID.
|
|
722
1337
|
*
|
|
723
|
-
* @param {string} siteId
|
|
724
|
-
* @param {string} deploymentId
|
|
1338
|
+
* @param {string} siteId - Site ID.
|
|
1339
|
+
* @param {string} deploymentId - Deployment ID.
|
|
725
1340
|
* @throws {AppwriteException}
|
|
726
1341
|
* @returns {Promise<{}>}
|
|
1342
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
727
1343
|
*/
|
|
728
|
-
deleteDeployment(siteId: string, deploymentId: string): Promise<{}
|
|
1344
|
+
deleteDeployment(siteId: string, deploymentId: string): Promise<{}>;
|
|
1345
|
+
deleteDeployment(
|
|
1346
|
+
paramsOrFirst: { siteId: string, deploymentId: string } | string,
|
|
1347
|
+
...rest: [(string)?]
|
|
1348
|
+
): Promise<{}> {
|
|
1349
|
+
let params: { siteId: string, deploymentId: string };
|
|
1350
|
+
|
|
1351
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1352
|
+
params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
|
|
1353
|
+
} else {
|
|
1354
|
+
params = {
|
|
1355
|
+
siteId: paramsOrFirst as string,
|
|
1356
|
+
deploymentId: rest[0] as string
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
const siteId = params.siteId;
|
|
1361
|
+
const deploymentId = params.deploymentId;
|
|
1362
|
+
|
|
729
1363
|
if (typeof siteId === 'undefined') {
|
|
730
1364
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
731
1365
|
}
|
|
732
1366
|
if (typeof deploymentId === 'undefined') {
|
|
733
1367
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
734
1368
|
}
|
|
1369
|
+
|
|
735
1370
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
736
1371
|
const payload: Payload = {};
|
|
737
1372
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -747,22 +1382,55 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
747
1382
|
payload
|
|
748
1383
|
);
|
|
749
1384
|
}
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* Get a site 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.
|
|
1388
|
+
*
|
|
1389
|
+
* @param {string} params.siteId - Site ID.
|
|
1390
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
1391
|
+
* @param {DeploymentDownloadType} params.type - Deployment file to download. Can be: "source", "output".
|
|
1392
|
+
* @throws {AppwriteException}
|
|
1393
|
+
* @returns {string}
|
|
1394
|
+
*/
|
|
1395
|
+
getDeploymentDownload(params: { siteId: string, deploymentId: string, type?: DeploymentDownloadType }): string;
|
|
750
1396
|
/**
|
|
751
|
-
* Get a site deployment content by its unique ID. The endpoint response return with a
|
|
1397
|
+
* Get a site 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.
|
|
752
1398
|
*
|
|
753
|
-
* @param {string} siteId
|
|
754
|
-
* @param {string} deploymentId
|
|
755
|
-
* @param {DeploymentDownloadType} type
|
|
1399
|
+
* @param {string} siteId - Site ID.
|
|
1400
|
+
* @param {string} deploymentId - Deployment ID.
|
|
1401
|
+
* @param {DeploymentDownloadType} type - Deployment file to download. Can be: "source", "output".
|
|
756
1402
|
* @throws {AppwriteException}
|
|
757
1403
|
* @returns {string}
|
|
1404
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
758
1405
|
*/
|
|
759
|
-
getDeploymentDownload(siteId: string, deploymentId: string, type?: DeploymentDownloadType): string
|
|
1406
|
+
getDeploymentDownload(siteId: string, deploymentId: string, type?: DeploymentDownloadType): string;
|
|
1407
|
+
getDeploymentDownload(
|
|
1408
|
+
paramsOrFirst: { siteId: string, deploymentId: string, type?: DeploymentDownloadType } | string,
|
|
1409
|
+
...rest: [(string)?, (DeploymentDownloadType)?]
|
|
1410
|
+
): string {
|
|
1411
|
+
let params: { siteId: string, deploymentId: string, type?: DeploymentDownloadType };
|
|
1412
|
+
|
|
1413
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1414
|
+
params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string, type?: DeploymentDownloadType };
|
|
1415
|
+
} else {
|
|
1416
|
+
params = {
|
|
1417
|
+
siteId: paramsOrFirst as string,
|
|
1418
|
+
deploymentId: rest[0] as string,
|
|
1419
|
+
type: rest[1] as DeploymentDownloadType
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
const siteId = params.siteId;
|
|
1424
|
+
const deploymentId = params.deploymentId;
|
|
1425
|
+
const type = params.type;
|
|
1426
|
+
|
|
760
1427
|
if (typeof siteId === 'undefined') {
|
|
761
1428
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
762
1429
|
}
|
|
763
1430
|
if (typeof deploymentId === 'undefined') {
|
|
764
1431
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
765
1432
|
}
|
|
1433
|
+
|
|
766
1434
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
767
1435
|
const payload: Payload = {};
|
|
768
1436
|
if (typeof type !== 'undefined') {
|
|
@@ -781,21 +1449,51 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
781
1449
|
|
|
782
1450
|
return uri.toString();
|
|
783
1451
|
}
|
|
1452
|
+
|
|
784
1453
|
/**
|
|
785
|
-
* Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn
|
|
1454
|
+
* Cancel an ongoing site 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.
|
|
786
1455
|
*
|
|
787
|
-
* @param {string} siteId
|
|
788
|
-
* @param {string} deploymentId
|
|
1456
|
+
* @param {string} params.siteId - Site ID.
|
|
1457
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
789
1458
|
* @throws {AppwriteException}
|
|
790
1459
|
* @returns {Promise<Models.Deployment>}
|
|
791
1460
|
*/
|
|
792
|
-
updateDeploymentStatus(siteId: string, deploymentId: string): Promise<Models.Deployment
|
|
1461
|
+
updateDeploymentStatus(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Cancel an ongoing site 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.
|
|
1464
|
+
*
|
|
1465
|
+
* @param {string} siteId - Site ID.
|
|
1466
|
+
* @param {string} deploymentId - Deployment ID.
|
|
1467
|
+
* @throws {AppwriteException}
|
|
1468
|
+
* @returns {Promise<Models.Deployment>}
|
|
1469
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1470
|
+
*/
|
|
1471
|
+
updateDeploymentStatus(siteId: string, deploymentId: string): Promise<Models.Deployment>;
|
|
1472
|
+
updateDeploymentStatus(
|
|
1473
|
+
paramsOrFirst: { siteId: string, deploymentId: string } | string,
|
|
1474
|
+
...rest: [(string)?]
|
|
1475
|
+
): Promise<Models.Deployment> {
|
|
1476
|
+
let params: { siteId: string, deploymentId: string };
|
|
1477
|
+
|
|
1478
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1479
|
+
params = (paramsOrFirst || {}) as { siteId: string, deploymentId: string };
|
|
1480
|
+
} else {
|
|
1481
|
+
params = {
|
|
1482
|
+
siteId: paramsOrFirst as string,
|
|
1483
|
+
deploymentId: rest[0] as string
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
const siteId = params.siteId;
|
|
1488
|
+
const deploymentId = params.deploymentId;
|
|
1489
|
+
|
|
793
1490
|
if (typeof siteId === 'undefined') {
|
|
794
1491
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
795
1492
|
}
|
|
796
1493
|
if (typeof deploymentId === 'undefined') {
|
|
797
1494
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
798
1495
|
}
|
|
1496
|
+
|
|
799
1497
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
800
1498
|
const payload: Payload = {};
|
|
801
1499
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -811,23 +1509,60 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
811
1509
|
payload
|
|
812
1510
|
);
|
|
813
1511
|
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Get a list of all site logs. You can use the query params to filter your results.
|
|
1515
|
+
*
|
|
1516
|
+
* @param {string} params.siteId - Site ID.
|
|
1517
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
1518
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1519
|
+
* @throws {AppwriteException}
|
|
1520
|
+
* @returns {Promise<Models.ExecutionList>}
|
|
1521
|
+
*/
|
|
1522
|
+
listLogs(params: { siteId: string, queries?: string[], total?: boolean }): Promise<Models.ExecutionList>;
|
|
814
1523
|
/**
|
|
815
1524
|
* Get a list of all site logs. You can use the query params to filter your results.
|
|
816
1525
|
*
|
|
817
|
-
* @param {string} siteId
|
|
818
|
-
* @param {string[]} queries
|
|
1526
|
+
* @param {string} siteId - Site ID.
|
|
1527
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
1528
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
819
1529
|
* @throws {AppwriteException}
|
|
820
1530
|
* @returns {Promise<Models.ExecutionList>}
|
|
1531
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
821
1532
|
*/
|
|
822
|
-
listLogs(siteId: string, queries?: string[]): Promise<Models.ExecutionList
|
|
1533
|
+
listLogs(siteId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
|
|
1534
|
+
listLogs(
|
|
1535
|
+
paramsOrFirst: { siteId: string, queries?: string[], total?: boolean } | string,
|
|
1536
|
+
...rest: [(string[])?, (boolean)?]
|
|
1537
|
+
): Promise<Models.ExecutionList> {
|
|
1538
|
+
let params: { siteId: string, queries?: string[], total?: boolean };
|
|
1539
|
+
|
|
1540
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1541
|
+
params = (paramsOrFirst || {}) as { siteId: string, queries?: string[], total?: boolean };
|
|
1542
|
+
} else {
|
|
1543
|
+
params = {
|
|
1544
|
+
siteId: paramsOrFirst as string,
|
|
1545
|
+
queries: rest[0] as string[],
|
|
1546
|
+
total: rest[1] as boolean
|
|
1547
|
+
};
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
const siteId = params.siteId;
|
|
1551
|
+
const queries = params.queries;
|
|
1552
|
+
const total = params.total;
|
|
1553
|
+
|
|
823
1554
|
if (typeof siteId === 'undefined') {
|
|
824
1555
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
825
1556
|
}
|
|
1557
|
+
|
|
826
1558
|
const apiPath = '/sites/{siteId}/logs'.replace('{siteId}', siteId);
|
|
827
1559
|
const payload: Payload = {};
|
|
828
1560
|
if (typeof queries !== 'undefined') {
|
|
829
1561
|
payload['queries'] = queries;
|
|
830
1562
|
}
|
|
1563
|
+
if (typeof total !== 'undefined') {
|
|
1564
|
+
payload['total'] = total;
|
|
1565
|
+
}
|
|
831
1566
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
832
1567
|
|
|
833
1568
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -840,21 +1575,51 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
840
1575
|
payload
|
|
841
1576
|
);
|
|
842
1577
|
}
|
|
1578
|
+
|
|
843
1579
|
/**
|
|
844
1580
|
* Get a site request log by its unique ID.
|
|
845
1581
|
*
|
|
846
|
-
* @param {string} siteId
|
|
847
|
-
* @param {string} logId
|
|
1582
|
+
* @param {string} params.siteId - Site ID.
|
|
1583
|
+
* @param {string} params.logId - Log ID.
|
|
848
1584
|
* @throws {AppwriteException}
|
|
849
1585
|
* @returns {Promise<Models.Execution>}
|
|
850
1586
|
*/
|
|
851
|
-
getLog(siteId: string, logId: string): Promise<Models.Execution
|
|
1587
|
+
getLog(params: { siteId: string, logId: string }): Promise<Models.Execution>;
|
|
1588
|
+
/**
|
|
1589
|
+
* Get a site request log by its unique ID.
|
|
1590
|
+
*
|
|
1591
|
+
* @param {string} siteId - Site ID.
|
|
1592
|
+
* @param {string} logId - Log ID.
|
|
1593
|
+
* @throws {AppwriteException}
|
|
1594
|
+
* @returns {Promise<Models.Execution>}
|
|
1595
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1596
|
+
*/
|
|
1597
|
+
getLog(siteId: string, logId: string): Promise<Models.Execution>;
|
|
1598
|
+
getLog(
|
|
1599
|
+
paramsOrFirst: { siteId: string, logId: string } | string,
|
|
1600
|
+
...rest: [(string)?]
|
|
1601
|
+
): Promise<Models.Execution> {
|
|
1602
|
+
let params: { siteId: string, logId: string };
|
|
1603
|
+
|
|
1604
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1605
|
+
params = (paramsOrFirst || {}) as { siteId: string, logId: string };
|
|
1606
|
+
} else {
|
|
1607
|
+
params = {
|
|
1608
|
+
siteId: paramsOrFirst as string,
|
|
1609
|
+
logId: rest[0] as string
|
|
1610
|
+
};
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
const siteId = params.siteId;
|
|
1614
|
+
const logId = params.logId;
|
|
1615
|
+
|
|
852
1616
|
if (typeof siteId === 'undefined') {
|
|
853
1617
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
854
1618
|
}
|
|
855
1619
|
if (typeof logId === 'undefined') {
|
|
856
1620
|
throw new AppwriteException('Missing required parameter: "logId"');
|
|
857
1621
|
}
|
|
1622
|
+
|
|
858
1623
|
const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
|
|
859
1624
|
const payload: Payload = {};
|
|
860
1625
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -869,21 +1634,51 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
869
1634
|
payload
|
|
870
1635
|
);
|
|
871
1636
|
}
|
|
1637
|
+
|
|
872
1638
|
/**
|
|
873
1639
|
* Delete a site log by its unique ID.
|
|
874
1640
|
*
|
|
875
|
-
* @param {string} siteId
|
|
876
|
-
* @param {string} logId
|
|
1641
|
+
* @param {string} params.siteId - Site ID.
|
|
1642
|
+
* @param {string} params.logId - Log ID.
|
|
877
1643
|
* @throws {AppwriteException}
|
|
878
1644
|
* @returns {Promise<{}>}
|
|
879
1645
|
*/
|
|
880
|
-
deleteLog(siteId: string, logId: string): Promise<{}
|
|
1646
|
+
deleteLog(params: { siteId: string, logId: string }): Promise<{}>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Delete a site log by its unique ID.
|
|
1649
|
+
*
|
|
1650
|
+
* @param {string} siteId - Site ID.
|
|
1651
|
+
* @param {string} logId - Log ID.
|
|
1652
|
+
* @throws {AppwriteException}
|
|
1653
|
+
* @returns {Promise<{}>}
|
|
1654
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1655
|
+
*/
|
|
1656
|
+
deleteLog(siteId: string, logId: string): Promise<{}>;
|
|
1657
|
+
deleteLog(
|
|
1658
|
+
paramsOrFirst: { siteId: string, logId: string } | string,
|
|
1659
|
+
...rest: [(string)?]
|
|
1660
|
+
): Promise<{}> {
|
|
1661
|
+
let params: { siteId: string, logId: string };
|
|
1662
|
+
|
|
1663
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1664
|
+
params = (paramsOrFirst || {}) as { siteId: string, logId: string };
|
|
1665
|
+
} else {
|
|
1666
|
+
params = {
|
|
1667
|
+
siteId: paramsOrFirst as string,
|
|
1668
|
+
logId: rest[0] as string
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
const siteId = params.siteId;
|
|
1673
|
+
const logId = params.logId;
|
|
1674
|
+
|
|
881
1675
|
if (typeof siteId === 'undefined') {
|
|
882
1676
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
883
1677
|
}
|
|
884
1678
|
if (typeof logId === 'undefined') {
|
|
885
1679
|
throw new AppwriteException('Missing required parameter: "logId"');
|
|
886
1680
|
}
|
|
1681
|
+
|
|
887
1682
|
const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
|
|
888
1683
|
const payload: Payload = {};
|
|
889
1684
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -899,18 +1694,48 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
899
1694
|
payload
|
|
900
1695
|
);
|
|
901
1696
|
}
|
|
1697
|
+
|
|
1698
|
+
/**
|
|
1699
|
+
* Get usage metrics and statistics for a for a specific site. 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.
|
|
1700
|
+
*
|
|
1701
|
+
* @param {string} params.siteId - Site ID.
|
|
1702
|
+
* @param {UsageRange} params.range - Date range.
|
|
1703
|
+
* @throws {AppwriteException}
|
|
1704
|
+
* @returns {Promise<Models.UsageSite>}
|
|
1705
|
+
*/
|
|
1706
|
+
getUsage(params: { siteId: string, range?: UsageRange }): Promise<Models.UsageSite>;
|
|
902
1707
|
/**
|
|
903
1708
|
* Get usage metrics and statistics for a for a specific site. 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.
|
|
904
1709
|
*
|
|
905
|
-
* @param {string} siteId
|
|
906
|
-
* @param {
|
|
1710
|
+
* @param {string} siteId - Site ID.
|
|
1711
|
+
* @param {UsageRange} range - Date range.
|
|
907
1712
|
* @throws {AppwriteException}
|
|
908
1713
|
* @returns {Promise<Models.UsageSite>}
|
|
1714
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
909
1715
|
*/
|
|
910
|
-
getUsage(siteId: string, range?:
|
|
1716
|
+
getUsage(siteId: string, range?: UsageRange): Promise<Models.UsageSite>;
|
|
1717
|
+
getUsage(
|
|
1718
|
+
paramsOrFirst: { siteId: string, range?: UsageRange } | string,
|
|
1719
|
+
...rest: [(UsageRange)?]
|
|
1720
|
+
): Promise<Models.UsageSite> {
|
|
1721
|
+
let params: { siteId: string, range?: UsageRange };
|
|
1722
|
+
|
|
1723
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1724
|
+
params = (paramsOrFirst || {}) as { siteId: string, range?: UsageRange };
|
|
1725
|
+
} else {
|
|
1726
|
+
params = {
|
|
1727
|
+
siteId: paramsOrFirst as string,
|
|
1728
|
+
range: rest[0] as UsageRange
|
|
1729
|
+
};
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
const siteId = params.siteId;
|
|
1733
|
+
const range = params.range;
|
|
1734
|
+
|
|
911
1735
|
if (typeof siteId === 'undefined') {
|
|
912
1736
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
913
1737
|
}
|
|
1738
|
+
|
|
914
1739
|
const apiPath = '/sites/{siteId}/usage'.replace('{siteId}', siteId);
|
|
915
1740
|
const payload: Payload = {};
|
|
916
1741
|
if (typeof range !== 'undefined') {
|
|
@@ -928,17 +1753,43 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
928
1753
|
payload
|
|
929
1754
|
);
|
|
930
1755
|
}
|
|
1756
|
+
|
|
931
1757
|
/**
|
|
932
1758
|
* Get a list of all variables of a specific site.
|
|
933
1759
|
*
|
|
934
|
-
* @param {string} siteId
|
|
1760
|
+
* @param {string} params.siteId - Site unique ID.
|
|
935
1761
|
* @throws {AppwriteException}
|
|
936
1762
|
* @returns {Promise<Models.VariableList>}
|
|
937
1763
|
*/
|
|
938
|
-
listVariables(siteId: string): Promise<Models.VariableList
|
|
1764
|
+
listVariables(params: { siteId: string }): Promise<Models.VariableList>;
|
|
1765
|
+
/**
|
|
1766
|
+
* Get a list of all variables of a specific site.
|
|
1767
|
+
*
|
|
1768
|
+
* @param {string} siteId - Site unique ID.
|
|
1769
|
+
* @throws {AppwriteException}
|
|
1770
|
+
* @returns {Promise<Models.VariableList>}
|
|
1771
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1772
|
+
*/
|
|
1773
|
+
listVariables(siteId: string): Promise<Models.VariableList>;
|
|
1774
|
+
listVariables(
|
|
1775
|
+
paramsOrFirst: { siteId: string } | string
|
|
1776
|
+
): Promise<Models.VariableList> {
|
|
1777
|
+
let params: { siteId: string };
|
|
1778
|
+
|
|
1779
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1780
|
+
params = (paramsOrFirst || {}) as { siteId: string };
|
|
1781
|
+
} else {
|
|
1782
|
+
params = {
|
|
1783
|
+
siteId: paramsOrFirst as string
|
|
1784
|
+
};
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
const siteId = params.siteId;
|
|
1788
|
+
|
|
939
1789
|
if (typeof siteId === 'undefined') {
|
|
940
1790
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
941
1791
|
}
|
|
1792
|
+
|
|
942
1793
|
const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
|
|
943
1794
|
const payload: Payload = {};
|
|
944
1795
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -953,17 +1804,52 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
953
1804
|
payload
|
|
954
1805
|
);
|
|
955
1806
|
}
|
|
1807
|
+
|
|
1808
|
+
/**
|
|
1809
|
+
* Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
|
|
1810
|
+
*
|
|
1811
|
+
* @param {string} params.siteId - Site unique ID.
|
|
1812
|
+
* @param {string} params.key - Variable key. Max length: 255 chars.
|
|
1813
|
+
* @param {string} params.value - Variable value. Max length: 8192 chars.
|
|
1814
|
+
* @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
|
|
1815
|
+
* @throws {AppwriteException}
|
|
1816
|
+
* @returns {Promise<Models.Variable>}
|
|
1817
|
+
*/
|
|
1818
|
+
createVariable(params: { siteId: string, key: string, value: string, secret?: boolean }): Promise<Models.Variable>;
|
|
956
1819
|
/**
|
|
957
1820
|
* Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
|
|
958
1821
|
*
|
|
959
|
-
* @param {string} siteId
|
|
960
|
-
* @param {string} key
|
|
961
|
-
* @param {string} value
|
|
962
|
-
* @param {boolean} secret
|
|
1822
|
+
* @param {string} siteId - Site unique ID.
|
|
1823
|
+
* @param {string} key - Variable key. Max length: 255 chars.
|
|
1824
|
+
* @param {string} value - Variable value. Max length: 8192 chars.
|
|
1825
|
+
* @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
|
|
963
1826
|
* @throws {AppwriteException}
|
|
964
1827
|
* @returns {Promise<Models.Variable>}
|
|
1828
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
965
1829
|
*/
|
|
966
|
-
createVariable(siteId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable
|
|
1830
|
+
createVariable(siteId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
|
|
1831
|
+
createVariable(
|
|
1832
|
+
paramsOrFirst: { siteId: string, key: string, value: string, secret?: boolean } | string,
|
|
1833
|
+
...rest: [(string)?, (string)?, (boolean)?]
|
|
1834
|
+
): Promise<Models.Variable> {
|
|
1835
|
+
let params: { siteId: string, key: string, value: string, secret?: boolean };
|
|
1836
|
+
|
|
1837
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1838
|
+
params = (paramsOrFirst || {}) as { siteId: string, key: string, value: string, secret?: boolean };
|
|
1839
|
+
} else {
|
|
1840
|
+
params = {
|
|
1841
|
+
siteId: paramsOrFirst as string,
|
|
1842
|
+
key: rest[0] as string,
|
|
1843
|
+
value: rest[1] as string,
|
|
1844
|
+
secret: rest[2] as boolean
|
|
1845
|
+
};
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
const siteId = params.siteId;
|
|
1849
|
+
const key = params.key;
|
|
1850
|
+
const value = params.value;
|
|
1851
|
+
const secret = params.secret;
|
|
1852
|
+
|
|
967
1853
|
if (typeof siteId === 'undefined') {
|
|
968
1854
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
969
1855
|
}
|
|
@@ -973,6 +1859,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
973
1859
|
if (typeof value === 'undefined') {
|
|
974
1860
|
throw new AppwriteException('Missing required parameter: "value"');
|
|
975
1861
|
}
|
|
1862
|
+
|
|
976
1863
|
const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
|
|
977
1864
|
const payload: Payload = {};
|
|
978
1865
|
if (typeof key !== 'undefined') {
|
|
@@ -997,21 +1884,51 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
997
1884
|
payload
|
|
998
1885
|
);
|
|
999
1886
|
}
|
|
1887
|
+
|
|
1000
1888
|
/**
|
|
1001
1889
|
* Get a variable by its unique ID.
|
|
1002
1890
|
*
|
|
1003
|
-
* @param {string} siteId
|
|
1004
|
-
* @param {string} variableId
|
|
1891
|
+
* @param {string} params.siteId - Site unique ID.
|
|
1892
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
1005
1893
|
* @throws {AppwriteException}
|
|
1006
1894
|
* @returns {Promise<Models.Variable>}
|
|
1007
1895
|
*/
|
|
1008
|
-
getVariable(siteId: string, variableId: string): Promise<Models.Variable
|
|
1896
|
+
getVariable(params: { siteId: string, variableId: string }): Promise<Models.Variable>;
|
|
1897
|
+
/**
|
|
1898
|
+
* Get a variable by its unique ID.
|
|
1899
|
+
*
|
|
1900
|
+
* @param {string} siteId - Site unique ID.
|
|
1901
|
+
* @param {string} variableId - Variable unique ID.
|
|
1902
|
+
* @throws {AppwriteException}
|
|
1903
|
+
* @returns {Promise<Models.Variable>}
|
|
1904
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1905
|
+
*/
|
|
1906
|
+
getVariable(siteId: string, variableId: string): Promise<Models.Variable>;
|
|
1907
|
+
getVariable(
|
|
1908
|
+
paramsOrFirst: { siteId: string, variableId: string } | string,
|
|
1909
|
+
...rest: [(string)?]
|
|
1910
|
+
): Promise<Models.Variable> {
|
|
1911
|
+
let params: { siteId: string, variableId: string };
|
|
1912
|
+
|
|
1913
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1914
|
+
params = (paramsOrFirst || {}) as { siteId: string, variableId: string };
|
|
1915
|
+
} else {
|
|
1916
|
+
params = {
|
|
1917
|
+
siteId: paramsOrFirst as string,
|
|
1918
|
+
variableId: rest[0] as string
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
const siteId = params.siteId;
|
|
1923
|
+
const variableId = params.variableId;
|
|
1924
|
+
|
|
1009
1925
|
if (typeof siteId === 'undefined') {
|
|
1010
1926
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
1011
1927
|
}
|
|
1012
1928
|
if (typeof variableId === 'undefined') {
|
|
1013
1929
|
throw new AppwriteException('Missing required parameter: "variableId"');
|
|
1014
1930
|
}
|
|
1931
|
+
|
|
1015
1932
|
const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
1016
1933
|
const payload: Payload = {};
|
|
1017
1934
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -1026,18 +1943,56 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
1026
1943
|
payload
|
|
1027
1944
|
);
|
|
1028
1945
|
}
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* Update variable by its unique ID.
|
|
1949
|
+
*
|
|
1950
|
+
* @param {string} params.siteId - Site unique ID.
|
|
1951
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
1952
|
+
* @param {string} params.key - Variable key. Max length: 255 chars.
|
|
1953
|
+
* @param {string} params.value - Variable value. Max length: 8192 chars.
|
|
1954
|
+
* @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
|
|
1955
|
+
* @throws {AppwriteException}
|
|
1956
|
+
* @returns {Promise<Models.Variable>}
|
|
1957
|
+
*/
|
|
1958
|
+
updateVariable(params: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean }): Promise<Models.Variable>;
|
|
1029
1959
|
/**
|
|
1030
1960
|
* Update variable by its unique ID.
|
|
1031
1961
|
*
|
|
1032
|
-
* @param {string} siteId
|
|
1033
|
-
* @param {string} variableId
|
|
1034
|
-
* @param {string} key
|
|
1035
|
-
* @param {string} value
|
|
1036
|
-
* @param {boolean} secret
|
|
1962
|
+
* @param {string} siteId - Site unique ID.
|
|
1963
|
+
* @param {string} variableId - Variable unique ID.
|
|
1964
|
+
* @param {string} key - Variable key. Max length: 255 chars.
|
|
1965
|
+
* @param {string} value - Variable value. Max length: 8192 chars.
|
|
1966
|
+
* @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
|
|
1037
1967
|
* @throws {AppwriteException}
|
|
1038
1968
|
* @returns {Promise<Models.Variable>}
|
|
1969
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1039
1970
|
*/
|
|
1040
|
-
updateVariable(siteId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable
|
|
1971
|
+
updateVariable(siteId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable>;
|
|
1972
|
+
updateVariable(
|
|
1973
|
+
paramsOrFirst: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean } | string,
|
|
1974
|
+
...rest: [(string)?, (string)?, (string)?, (boolean)?]
|
|
1975
|
+
): Promise<Models.Variable> {
|
|
1976
|
+
let params: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean };
|
|
1977
|
+
|
|
1978
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1979
|
+
params = (paramsOrFirst || {}) as { siteId: string, variableId: string, key: string, value?: string, secret?: boolean };
|
|
1980
|
+
} else {
|
|
1981
|
+
params = {
|
|
1982
|
+
siteId: paramsOrFirst as string,
|
|
1983
|
+
variableId: rest[0] as string,
|
|
1984
|
+
key: rest[1] as string,
|
|
1985
|
+
value: rest[2] as string,
|
|
1986
|
+
secret: rest[3] as boolean
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
const siteId = params.siteId;
|
|
1991
|
+
const variableId = params.variableId;
|
|
1992
|
+
const key = params.key;
|
|
1993
|
+
const value = params.value;
|
|
1994
|
+
const secret = params.secret;
|
|
1995
|
+
|
|
1041
1996
|
if (typeof siteId === 'undefined') {
|
|
1042
1997
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
1043
1998
|
}
|
|
@@ -1047,6 +2002,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
1047
2002
|
if (typeof key === 'undefined') {
|
|
1048
2003
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
1049
2004
|
}
|
|
2005
|
+
|
|
1050
2006
|
const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
1051
2007
|
const payload: Payload = {};
|
|
1052
2008
|
if (typeof key !== 'undefined') {
|
|
@@ -1071,21 +2027,51 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
|
1071
2027
|
payload
|
|
1072
2028
|
);
|
|
1073
2029
|
}
|
|
2030
|
+
|
|
1074
2031
|
/**
|
|
1075
2032
|
* Delete a variable by its unique ID.
|
|
1076
2033
|
*
|
|
1077
|
-
* @param {string} siteId
|
|
1078
|
-
* @param {string} variableId
|
|
2034
|
+
* @param {string} params.siteId - Site unique ID.
|
|
2035
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
1079
2036
|
* @throws {AppwriteException}
|
|
1080
2037
|
* @returns {Promise<{}>}
|
|
1081
2038
|
*/
|
|
1082
|
-
deleteVariable(siteId: string, variableId: string): Promise<{}
|
|
2039
|
+
deleteVariable(params: { siteId: string, variableId: string }): Promise<{}>;
|
|
2040
|
+
/**
|
|
2041
|
+
* Delete a variable by its unique ID.
|
|
2042
|
+
*
|
|
2043
|
+
* @param {string} siteId - Site unique ID.
|
|
2044
|
+
* @param {string} variableId - Variable unique ID.
|
|
2045
|
+
* @throws {AppwriteException}
|
|
2046
|
+
* @returns {Promise<{}>}
|
|
2047
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2048
|
+
*/
|
|
2049
|
+
deleteVariable(siteId: string, variableId: string): Promise<{}>;
|
|
2050
|
+
deleteVariable(
|
|
2051
|
+
paramsOrFirst: { siteId: string, variableId: string } | string,
|
|
2052
|
+
...rest: [(string)?]
|
|
2053
|
+
): Promise<{}> {
|
|
2054
|
+
let params: { siteId: string, variableId: string };
|
|
2055
|
+
|
|
2056
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2057
|
+
params = (paramsOrFirst || {}) as { siteId: string, variableId: string };
|
|
2058
|
+
} else {
|
|
2059
|
+
params = {
|
|
2060
|
+
siteId: paramsOrFirst as string,
|
|
2061
|
+
variableId: rest[0] as string
|
|
2062
|
+
};
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
const siteId = params.siteId;
|
|
2066
|
+
const variableId = params.variableId;
|
|
2067
|
+
|
|
1083
2068
|
if (typeof siteId === 'undefined') {
|
|
1084
2069
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
1085
2070
|
}
|
|
1086
2071
|
if (typeof variableId === 'undefined') {
|
|
1087
2072
|
throw new AppwriteException('Missing required parameter: "variableId"');
|
|
1088
2073
|
}
|
|
2074
|
+
|
|
1089
2075
|
const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
1090
2076
|
const payload: Payload = {};
|
|
1091
2077
|
const uri = new URL(this.client.config.endpoint + apiPath);
|