@appwrite.io/console 1.10.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 +6 -0
- package/LICENSE +1 -1
- package/README.md +4 -4
- package/dist/cjs/sdk.js +15239 -6070
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +15237 -6071
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +15239 -6070
- 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 +15 -8
- package/docs/examples/databases/create-documents.md +6 -5
- 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 +3 -3
- 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 +4 -4
- 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 -6
- 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 +1692 -238
- package/src/operator.ts +308 -0
- package/src/query.ts +246 -2
- package/src/services/account.ts +2205 -223
- package/src/services/assistant.ts +29 -3
- package/src/services/avatars.ts +486 -33
- package/src/services/backups.ts +389 -42
- package/src/services/console.ts +492 -19
- package/src/services/databases.ts +3521 -431
- package/src/services/domains.ts +1684 -197
- package/src/services/functions.ts +1162 -149
- package/src/services/graphql.ts +55 -4
- package/src/services/health.ts +560 -41
- package/src/services/locale.ts +9 -0
- package/src/services/messaging.ts +3367 -380
- package/src/services/migrations.ts +641 -65
- package/src/services/organizations.ts +1323 -128
- package/src/services/project.ts +168 -17
- package/src/services/projects.ts +2742 -266
- package/src/services/proxy.ts +265 -26
- package/src/services/realtime.ts +437 -0
- package/src/services/sites.ts +1098 -140
- package/src/services/storage.ts +651 -82
- package/src/services/tables-db.ts +5439 -0
- package/src/services/teams.ts +512 -55
- package/src/services/tokens.ts +167 -16
- package/src/services/users.ts +1873 -181
- package/src/services/vcs.ts +359 -39
- 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 +1664 -245
- package/types/operator.d.ts +180 -0
- package/types/query.d.ts +198 -2
- package/types/services/account.d.ts +985 -123
- package/types/services/assistant.d.ts +13 -2
- package/types/services/avatars.d.ts +244 -26
- package/types/services/backups.d.ts +190 -30
- package/types/services/console.d.ts +201 -14
- package/types/services/databases.d.ts +1731 -284
- package/types/services/domains.d.ts +904 -152
- package/types/services/functions.d.ts +616 -125
- package/types/services/graphql.d.ts +24 -2
- package/types/services/health.d.ts +245 -23
- package/types/services/messaging.d.ts +1660 -271
- package/types/services/migrations.d.ts +319 -53
- package/types/services/organizations.d.ts +635 -97
- 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 +577 -116
- package/types/services/storage.d.ts +354 -73
- package/types/services/tables-db.d.ts +2040 -0
- package/types/services/teams.d.ts +260 -44
- package/types/services/tokens.d.ts +80 -12
- package/types/services/users.d.ts +881 -124
- package/types/services/vcs.d.ts +179 -31
- 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 } = {
|
|
@@ -48,28 +86,104 @@ export class Sites {
|
|
|
48
86
|
/**
|
|
49
87
|
* Create a new site.
|
|
50
88
|
*
|
|
51
|
-
* @param {string} siteId
|
|
52
|
-
* @param {string} name
|
|
53
|
-
* @param {Framework} framework
|
|
54
|
-
* @param {BuildRuntime} buildRuntime
|
|
55
|
-
* @param {boolean} enabled
|
|
56
|
-
* @param {boolean} logging
|
|
57
|
-
* @param {number} timeout
|
|
58
|
-
* @param {string} installCommand
|
|
59
|
-
* @param {string} buildCommand
|
|
60
|
-
* @param {string} outputDirectory
|
|
61
|
-
* @param {Adapter} adapter
|
|
62
|
-
* @param {string} installationId
|
|
63
|
-
* @param {string} fallbackFile
|
|
64
|
-
* @param {string} providerRepositoryId
|
|
65
|
-
* @param {string} providerBranch
|
|
66
|
-
* @param {boolean} providerSilentMode
|
|
67
|
-
* @param {string} providerRootDirectory
|
|
68
|
-
* @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.
|
|
107
|
+
* @throws {AppwriteException}
|
|
108
|
+
* @returns {Promise<Models.Site>}
|
|
109
|
+
*/
|
|
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.
|
|
69
132
|
* @throws {AppwriteException}
|
|
70
133
|
* @returns {Promise<Models.Site>}
|
|
134
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
71
135
|
*/
|
|
72
|
-
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
|
|
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
|
+
|
|
73
187
|
if (typeof siteId === 'undefined') {
|
|
74
188
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
75
189
|
}
|
|
@@ -82,6 +196,7 @@ export class Sites {
|
|
|
82
196
|
if (typeof buildRuntime === 'undefined') {
|
|
83
197
|
throw new AppwriteException('Missing required parameter: "buildRuntime"');
|
|
84
198
|
}
|
|
199
|
+
|
|
85
200
|
const apiPath = '/sites';
|
|
86
201
|
const payload: Payload = {};
|
|
87
202
|
if (typeof siteId !== 'undefined') {
|
|
@@ -159,6 +274,7 @@ export class Sites {
|
|
|
159
274
|
* @returns {Promise<Models.FrameworkList>}
|
|
160
275
|
*/
|
|
161
276
|
listFrameworks(): Promise<Models.FrameworkList> {
|
|
277
|
+
|
|
162
278
|
const apiPath = '/sites/frameworks';
|
|
163
279
|
const payload: Payload = {};
|
|
164
280
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -181,6 +297,7 @@ export class Sites {
|
|
|
181
297
|
* @returns {Promise<Models.SpecificationList>}
|
|
182
298
|
*/
|
|
183
299
|
listSpecifications(): Promise<Models.SpecificationList> {
|
|
300
|
+
|
|
184
301
|
const apiPath = '/sites/specifications';
|
|
185
302
|
const payload: Payload = {};
|
|
186
303
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -199,14 +316,49 @@ export class Sites {
|
|
|
199
316
|
/**
|
|
200
317
|
* List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
201
318
|
*
|
|
202
|
-
* @param {string[]} frameworks
|
|
203
|
-
* @param {string[]} useCases
|
|
204
|
-
* @param {number} limit
|
|
205
|
-
* @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.
|
|
206
323
|
* @throws {AppwriteException}
|
|
207
324
|
* @returns {Promise<Models.TemplateSiteList>}
|
|
208
325
|
*/
|
|
209
|
-
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
|
+
|
|
210
362
|
const apiPath = '/sites/templates';
|
|
211
363
|
const payload: Payload = {};
|
|
212
364
|
if (typeof frameworks !== 'undefined') {
|
|
@@ -237,14 +389,39 @@ export class Sites {
|
|
|
237
389
|
/**
|
|
238
390
|
* Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
239
391
|
*
|
|
240
|
-
* @param {string} templateId
|
|
392
|
+
* @param {string} params.templateId - Template ID.
|
|
393
|
+
* @throws {AppwriteException}
|
|
394
|
+
* @returns {Promise<Models.TemplateSite>}
|
|
395
|
+
*/
|
|
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.
|
|
241
401
|
* @throws {AppwriteException}
|
|
242
402
|
* @returns {Promise<Models.TemplateSite>}
|
|
403
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
243
404
|
*/
|
|
244
|
-
getTemplate(templateId: string): Promise<Models.TemplateSite
|
|
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
|
+
|
|
245
421
|
if (typeof templateId === 'undefined') {
|
|
246
422
|
throw new AppwriteException('Missing required parameter: "templateId"');
|
|
247
423
|
}
|
|
424
|
+
|
|
248
425
|
const apiPath = '/sites/templates/{templateId}'.replace('{templateId}', templateId);
|
|
249
426
|
const payload: Payload = {};
|
|
250
427
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -263,11 +440,36 @@ export class Sites {
|
|
|
263
440
|
/**
|
|
264
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.
|
|
265
442
|
*
|
|
266
|
-
* @param {
|
|
443
|
+
* @param {UsageRange} params.range - Date range.
|
|
444
|
+
* @throws {AppwriteException}
|
|
445
|
+
* @returns {Promise<Models.UsageSites>}
|
|
446
|
+
*/
|
|
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.
|
|
267
452
|
* @throws {AppwriteException}
|
|
268
453
|
* @returns {Promise<Models.UsageSites>}
|
|
454
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
269
455
|
*/
|
|
270
|
-
listUsage(range?:
|
|
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
|
+
|
|
271
473
|
const apiPath = '/sites/usage';
|
|
272
474
|
const payload: Payload = {};
|
|
273
475
|
if (typeof range !== 'undefined') {
|
|
@@ -289,14 +491,39 @@ export class Sites {
|
|
|
289
491
|
/**
|
|
290
492
|
* Get a site by its unique ID.
|
|
291
493
|
*
|
|
292
|
-
* @param {string} siteId
|
|
494
|
+
* @param {string} params.siteId - Site ID.
|
|
293
495
|
* @throws {AppwriteException}
|
|
294
496
|
* @returns {Promise<Models.Site>}
|
|
295
497
|
*/
|
|
296
|
-
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
|
+
|
|
297
523
|
if (typeof siteId === 'undefined') {
|
|
298
524
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
299
525
|
}
|
|
526
|
+
|
|
300
527
|
const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
301
528
|
const payload: Payload = {};
|
|
302
529
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -315,28 +542,104 @@ export class Sites {
|
|
|
315
542
|
/**
|
|
316
543
|
* Update site by its unique ID.
|
|
317
544
|
*
|
|
318
|
-
* @param {string} siteId
|
|
319
|
-
* @param {string} name
|
|
320
|
-
* @param {Framework} framework
|
|
321
|
-
* @param {boolean} enabled
|
|
322
|
-
* @param {boolean} logging
|
|
323
|
-
* @param {number} timeout
|
|
324
|
-
* @param {string} installCommand
|
|
325
|
-
* @param {string} buildCommand
|
|
326
|
-
* @param {string} outputDirectory
|
|
327
|
-
* @param {BuildRuntime} buildRuntime
|
|
328
|
-
* @param {Adapter} adapter
|
|
329
|
-
* @param {string} fallbackFile
|
|
330
|
-
* @param {string} installationId
|
|
331
|
-
* @param {string} providerRepositoryId
|
|
332
|
-
* @param {string} providerBranch
|
|
333
|
-
* @param {boolean} providerSilentMode
|
|
334
|
-
* @param {string} providerRootDirectory
|
|
335
|
-
* @param {string} specification
|
|
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.
|
|
336
563
|
* @throws {AppwriteException}
|
|
337
564
|
* @returns {Promise<Models.Site>}
|
|
338
565
|
*/
|
|
339
|
-
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
|
|
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>;
|
|
567
|
+
/**
|
|
568
|
+
* Update site by its unique ID.
|
|
569
|
+
*
|
|
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.
|
|
588
|
+
* @throws {AppwriteException}
|
|
589
|
+
* @returns {Promise<Models.Site>}
|
|
590
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
591
|
+
*/
|
|
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
|
+
|
|
340
643
|
if (typeof siteId === 'undefined') {
|
|
341
644
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
342
645
|
}
|
|
@@ -346,6 +649,7 @@ export class Sites {
|
|
|
346
649
|
if (typeof framework === 'undefined') {
|
|
347
650
|
throw new AppwriteException('Missing required parameter: "framework"');
|
|
348
651
|
}
|
|
652
|
+
|
|
349
653
|
const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
350
654
|
const payload: Payload = {};
|
|
351
655
|
if (typeof name !== 'undefined') {
|
|
@@ -416,14 +720,39 @@ export class Sites {
|
|
|
416
720
|
/**
|
|
417
721
|
* Delete a site by its unique ID.
|
|
418
722
|
*
|
|
419
|
-
* @param {string} siteId
|
|
723
|
+
* @param {string} params.siteId - Site ID.
|
|
724
|
+
* @throws {AppwriteException}
|
|
725
|
+
* @returns {Promise<{}>}
|
|
726
|
+
*/
|
|
727
|
+
delete(params: { siteId: string }): Promise<{}>;
|
|
728
|
+
/**
|
|
729
|
+
* Delete a site by its unique ID.
|
|
730
|
+
*
|
|
731
|
+
* @param {string} siteId - Site ID.
|
|
420
732
|
* @throws {AppwriteException}
|
|
421
733
|
* @returns {Promise<{}>}
|
|
734
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
422
735
|
*/
|
|
423
|
-
delete(siteId: string): Promise<{}
|
|
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
|
+
|
|
424
752
|
if (typeof siteId === 'undefined') {
|
|
425
753
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
426
754
|
}
|
|
755
|
+
|
|
427
756
|
const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
428
757
|
const payload: Payload = {};
|
|
429
758
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -443,18 +772,47 @@ export class Sites {
|
|
|
443
772
|
/**
|
|
444
773
|
* Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
|
|
445
774
|
*
|
|
446
|
-
* @param {string} siteId
|
|
447
|
-
* @param {string} deploymentId
|
|
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>;
|
|
781
|
+
/**
|
|
782
|
+
* Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
|
|
783
|
+
*
|
|
784
|
+
* @param {string} siteId - Site ID.
|
|
785
|
+
* @param {string} deploymentId - Deployment ID.
|
|
448
786
|
* @throws {AppwriteException}
|
|
449
787
|
* @returns {Promise<Models.Site>}
|
|
788
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
450
789
|
*/
|
|
451
|
-
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
|
+
|
|
452
809
|
if (typeof siteId === 'undefined') {
|
|
453
810
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
454
811
|
}
|
|
455
812
|
if (typeof deploymentId === 'undefined') {
|
|
456
813
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
457
814
|
}
|
|
815
|
+
|
|
458
816
|
const apiPath = '/sites/{siteId}/deployment'.replace('{siteId}', siteId);
|
|
459
817
|
const payload: Payload = {};
|
|
460
818
|
if (typeof deploymentId !== 'undefined') {
|
|
@@ -475,18 +833,54 @@ export class Sites {
|
|
|
475
833
|
}
|
|
476
834
|
|
|
477
835
|
/**
|
|
478
|
-
* 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.
|
|
837
|
+
*
|
|
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.
|
|
842
|
+
* @throws {AppwriteException}
|
|
843
|
+
* @returns {Promise<Models.DeploymentList>}
|
|
844
|
+
*/
|
|
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.
|
|
479
848
|
*
|
|
480
|
-
* @param {string} siteId
|
|
481
|
-
* @param {string[]} queries
|
|
482
|
-
* @param {string} search
|
|
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.
|
|
483
853
|
* @throws {AppwriteException}
|
|
484
854
|
* @returns {Promise<Models.DeploymentList>}
|
|
855
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
485
856
|
*/
|
|
486
|
-
listDeployments(siteId: string, queries?: string[], search?: string): Promise<Models.DeploymentList
|
|
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
|
+
|
|
487
880
|
if (typeof siteId === 'undefined') {
|
|
488
881
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
489
882
|
}
|
|
883
|
+
|
|
490
884
|
const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
491
885
|
const payload: Payload = {};
|
|
492
886
|
if (typeof queries !== 'undefined') {
|
|
@@ -495,6 +889,9 @@ export class Sites {
|
|
|
495
889
|
if (typeof search !== 'undefined') {
|
|
496
890
|
payload['search'] = search;
|
|
497
891
|
}
|
|
892
|
+
if (typeof total !== 'undefined') {
|
|
893
|
+
payload['total'] = total;
|
|
894
|
+
}
|
|
498
895
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
499
896
|
|
|
500
897
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -509,18 +906,61 @@ export class Sites {
|
|
|
509
906
|
}
|
|
510
907
|
|
|
511
908
|
/**
|
|
512
|
-
* 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
|
|
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.
|
|
513
910
|
*
|
|
514
|
-
* @param {string} siteId
|
|
515
|
-
* @param {File} code
|
|
516
|
-
* @param {boolean} activate
|
|
517
|
-
* @param {string} installCommand
|
|
518
|
-
* @param {string} buildCommand
|
|
519
|
-
* @param {string} outputDirectory
|
|
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.
|
|
520
917
|
* @throws {AppwriteException}
|
|
521
918
|
* @returns {Promise<Models.Deployment>}
|
|
522
919
|
*/
|
|
523
|
-
createDeployment(siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress
|
|
920
|
+
createDeployment(params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string , onProgress?: (progress: UploadProgress) => void }): Promise<Models.Deployment>;
|
|
921
|
+
/**
|
|
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.
|
|
923
|
+
*
|
|
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.
|
|
930
|
+
* @throws {AppwriteException}
|
|
931
|
+
* @returns {Promise<Models.Deployment>}
|
|
932
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
933
|
+
*/
|
|
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
|
+
|
|
524
964
|
if (typeof siteId === 'undefined') {
|
|
525
965
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
526
966
|
}
|
|
@@ -530,6 +970,7 @@ export class Sites {
|
|
|
530
970
|
if (typeof activate === 'undefined') {
|
|
531
971
|
throw new AppwriteException('Missing required parameter: "activate"');
|
|
532
972
|
}
|
|
973
|
+
|
|
533
974
|
const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
534
975
|
const payload: Payload = {};
|
|
535
976
|
if (typeof installCommand !== 'undefined') {
|
|
@@ -563,20 +1004,49 @@ export class Sites {
|
|
|
563
1004
|
}
|
|
564
1005
|
|
|
565
1006
|
/**
|
|
566
|
-
* 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.
|
|
567
1008
|
*
|
|
568
|
-
* @param {string} siteId
|
|
569
|
-
* @param {string} deploymentId
|
|
1009
|
+
* @param {string} params.siteId - Site ID.
|
|
1010
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
570
1011
|
* @throws {AppwriteException}
|
|
571
1012
|
* @returns {Promise<Models.Deployment>}
|
|
572
1013
|
*/
|
|
573
|
-
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
|
+
|
|
574
1043
|
if (typeof siteId === 'undefined') {
|
|
575
1044
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
576
1045
|
}
|
|
577
1046
|
if (typeof deploymentId === 'undefined') {
|
|
578
1047
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
579
1048
|
}
|
|
1049
|
+
|
|
580
1050
|
const apiPath = '/sites/{siteId}/deployments/duplicate'.replace('{siteId}', siteId);
|
|
581
1051
|
const payload: Payload = {};
|
|
582
1052
|
if (typeof deploymentId !== 'undefined') {
|
|
@@ -599,18 +1069,64 @@ export class Sites {
|
|
|
599
1069
|
/**
|
|
600
1070
|
* Create a deployment based on a template.
|
|
601
1071
|
*
|
|
602
|
-
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/
|
|
1072
|
+
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.
|
|
1073
|
+
*
|
|
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.
|
|
1081
|
+
* @throws {AppwriteException}
|
|
1082
|
+
* @returns {Promise<Models.Deployment>}
|
|
1083
|
+
*/
|
|
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.
|
|
603
1089
|
*
|
|
604
|
-
* @param {string} siteId
|
|
605
|
-
* @param {string} repository
|
|
606
|
-
* @param {string} owner
|
|
607
|
-
* @param {string} rootDirectory
|
|
608
|
-
* @param {
|
|
609
|
-
* @param {
|
|
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.
|
|
610
1097
|
* @throws {AppwriteException}
|
|
611
1098
|
* @returns {Promise<Models.Deployment>}
|
|
1099
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
612
1100
|
*/
|
|
613
|
-
createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string,
|
|
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
|
+
|
|
614
1130
|
if (typeof siteId === 'undefined') {
|
|
615
1131
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
616
1132
|
}
|
|
@@ -623,9 +1139,13 @@ export class Sites {
|
|
|
623
1139
|
if (typeof rootDirectory === 'undefined') {
|
|
624
1140
|
throw new AppwriteException('Missing required parameter: "rootDirectory"');
|
|
625
1141
|
}
|
|
626
|
-
if (typeof
|
|
627
|
-
throw new AppwriteException('Missing required parameter: "
|
|
1142
|
+
if (typeof type === 'undefined') {
|
|
1143
|
+
throw new AppwriteException('Missing required parameter: "type"');
|
|
628
1144
|
}
|
|
1145
|
+
if (typeof reference === 'undefined') {
|
|
1146
|
+
throw new AppwriteException('Missing required parameter: "reference"');
|
|
1147
|
+
}
|
|
1148
|
+
|
|
629
1149
|
const apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', siteId);
|
|
630
1150
|
const payload: Payload = {};
|
|
631
1151
|
if (typeof repository !== 'undefined') {
|
|
@@ -637,8 +1157,11 @@ export class Sites {
|
|
|
637
1157
|
if (typeof rootDirectory !== 'undefined') {
|
|
638
1158
|
payload['rootDirectory'] = rootDirectory;
|
|
639
1159
|
}
|
|
640
|
-
if (typeof
|
|
641
|
-
payload['
|
|
1160
|
+
if (typeof type !== 'undefined') {
|
|
1161
|
+
payload['type'] = type;
|
|
1162
|
+
}
|
|
1163
|
+
if (typeof reference !== 'undefined') {
|
|
1164
|
+
payload['reference'] = reference;
|
|
642
1165
|
}
|
|
643
1166
|
if (typeof activate !== 'undefined') {
|
|
644
1167
|
payload['activate'] = activate;
|
|
@@ -662,14 +1185,50 @@ export class Sites {
|
|
|
662
1185
|
*
|
|
663
1186
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
664
1187
|
*
|
|
665
|
-
* @param {string} siteId
|
|
666
|
-
* @param {
|
|
667
|
-
* @param {string} reference
|
|
668
|
-
* @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.
|
|
669
1192
|
* @throws {AppwriteException}
|
|
670
1193
|
* @returns {Promise<Models.Deployment>}
|
|
671
1194
|
*/
|
|
672
|
-
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
|
+
|
|
673
1232
|
if (typeof siteId === 'undefined') {
|
|
674
1233
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
675
1234
|
}
|
|
@@ -679,6 +1238,7 @@ export class Sites {
|
|
|
679
1238
|
if (typeof reference === 'undefined') {
|
|
680
1239
|
throw new AppwriteException('Missing required parameter: "reference"');
|
|
681
1240
|
}
|
|
1241
|
+
|
|
682
1242
|
const apiPath = '/sites/{siteId}/deployments/vcs'.replace('{siteId}', siteId);
|
|
683
1243
|
const payload: Payload = {};
|
|
684
1244
|
if (typeof type !== 'undefined') {
|
|
@@ -707,18 +1267,47 @@ export class Sites {
|
|
|
707
1267
|
/**
|
|
708
1268
|
* Get a site deployment by its unique ID.
|
|
709
1269
|
*
|
|
710
|
-
* @param {string} siteId
|
|
711
|
-
* @param {string} deploymentId
|
|
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>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Get a site deployment by its unique ID.
|
|
1278
|
+
*
|
|
1279
|
+
* @param {string} siteId - Site ID.
|
|
1280
|
+
* @param {string} deploymentId - Deployment ID.
|
|
712
1281
|
* @throws {AppwriteException}
|
|
713
1282
|
* @returns {Promise<Models.Deployment>}
|
|
1283
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
714
1284
|
*/
|
|
715
|
-
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
|
+
|
|
716
1304
|
if (typeof siteId === 'undefined') {
|
|
717
1305
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
718
1306
|
}
|
|
719
1307
|
if (typeof deploymentId === 'undefined') {
|
|
720
1308
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
721
1309
|
}
|
|
1310
|
+
|
|
722
1311
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
723
1312
|
const payload: Payload = {};
|
|
724
1313
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -737,18 +1326,47 @@ export class Sites {
|
|
|
737
1326
|
/**
|
|
738
1327
|
* Delete a site deployment by its unique ID.
|
|
739
1328
|
*
|
|
740
|
-
* @param {string} siteId
|
|
741
|
-
* @param {string} deploymentId
|
|
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<{}>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Delete a site deployment by its unique ID.
|
|
1337
|
+
*
|
|
1338
|
+
* @param {string} siteId - Site ID.
|
|
1339
|
+
* @param {string} deploymentId - Deployment ID.
|
|
742
1340
|
* @throws {AppwriteException}
|
|
743
1341
|
* @returns {Promise<{}>}
|
|
1342
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
744
1343
|
*/
|
|
745
|
-
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
|
+
|
|
746
1363
|
if (typeof siteId === 'undefined') {
|
|
747
1364
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
748
1365
|
}
|
|
749
1366
|
if (typeof deploymentId === 'undefined') {
|
|
750
1367
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
751
1368
|
}
|
|
1369
|
+
|
|
752
1370
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
753
1371
|
const payload: Payload = {};
|
|
754
1372
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -766,21 +1384,53 @@ export class Sites {
|
|
|
766
1384
|
}
|
|
767
1385
|
|
|
768
1386
|
/**
|
|
769
|
-
* Get a site deployment content by its unique ID. The endpoint response return with a
|
|
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;
|
|
1396
|
+
/**
|
|
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.
|
|
770
1398
|
*
|
|
771
|
-
* @param {string} siteId
|
|
772
|
-
* @param {string} deploymentId
|
|
773
|
-
* @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".
|
|
774
1402
|
* @throws {AppwriteException}
|
|
775
1403
|
* @returns {string}
|
|
1404
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
776
1405
|
*/
|
|
777
|
-
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
|
+
|
|
778
1427
|
if (typeof siteId === 'undefined') {
|
|
779
1428
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
780
1429
|
}
|
|
781
1430
|
if (typeof deploymentId === 'undefined') {
|
|
782
1431
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
783
1432
|
}
|
|
1433
|
+
|
|
784
1434
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
785
1435
|
const payload: Payload = {};
|
|
786
1436
|
if (typeof type !== 'undefined') {
|
|
@@ -801,20 +1451,49 @@ export class Sites {
|
|
|
801
1451
|
}
|
|
802
1452
|
|
|
803
1453
|
/**
|
|
804
|
-
* 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.
|
|
1455
|
+
*
|
|
1456
|
+
* @param {string} params.siteId - Site ID.
|
|
1457
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
1458
|
+
* @throws {AppwriteException}
|
|
1459
|
+
* @returns {Promise<Models.Deployment>}
|
|
1460
|
+
*/
|
|
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.
|
|
805
1464
|
*
|
|
806
|
-
* @param {string} siteId
|
|
807
|
-
* @param {string} deploymentId
|
|
1465
|
+
* @param {string} siteId - Site ID.
|
|
1466
|
+
* @param {string} deploymentId - Deployment ID.
|
|
808
1467
|
* @throws {AppwriteException}
|
|
809
1468
|
* @returns {Promise<Models.Deployment>}
|
|
1469
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
810
1470
|
*/
|
|
811
|
-
updateDeploymentStatus(siteId: string, deploymentId: string): Promise<Models.Deployment
|
|
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
|
+
|
|
812
1490
|
if (typeof siteId === 'undefined') {
|
|
813
1491
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
814
1492
|
}
|
|
815
1493
|
if (typeof deploymentId === 'undefined') {
|
|
816
1494
|
throw new AppwriteException('Missing required parameter: "deploymentId"');
|
|
817
1495
|
}
|
|
1496
|
+
|
|
818
1497
|
const apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
819
1498
|
const payload: Payload = {};
|
|
820
1499
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -834,20 +1513,56 @@ export class Sites {
|
|
|
834
1513
|
/**
|
|
835
1514
|
* Get a list of all site logs. You can use the query params to filter your results.
|
|
836
1515
|
*
|
|
837
|
-
* @param {string} siteId
|
|
838
|
-
* @param {string[]} queries
|
|
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.
|
|
839
1519
|
* @throws {AppwriteException}
|
|
840
1520
|
* @returns {Promise<Models.ExecutionList>}
|
|
841
1521
|
*/
|
|
842
|
-
listLogs(siteId: string, queries?: string[]): Promise<Models.ExecutionList
|
|
1522
|
+
listLogs(params: { siteId: string, queries?: string[], total?: boolean }): Promise<Models.ExecutionList>;
|
|
1523
|
+
/**
|
|
1524
|
+
* Get a list of all site logs. You can use the query params to filter your results.
|
|
1525
|
+
*
|
|
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.
|
|
1529
|
+
* @throws {AppwriteException}
|
|
1530
|
+
* @returns {Promise<Models.ExecutionList>}
|
|
1531
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1532
|
+
*/
|
|
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
|
+
|
|
843
1554
|
if (typeof siteId === 'undefined') {
|
|
844
1555
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
845
1556
|
}
|
|
1557
|
+
|
|
846
1558
|
const apiPath = '/sites/{siteId}/logs'.replace('{siteId}', siteId);
|
|
847
1559
|
const payload: Payload = {};
|
|
848
1560
|
if (typeof queries !== 'undefined') {
|
|
849
1561
|
payload['queries'] = queries;
|
|
850
1562
|
}
|
|
1563
|
+
if (typeof total !== 'undefined') {
|
|
1564
|
+
payload['total'] = total;
|
|
1565
|
+
}
|
|
851
1566
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
852
1567
|
|
|
853
1568
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -864,18 +1579,47 @@ export class Sites {
|
|
|
864
1579
|
/**
|
|
865
1580
|
* Get a site request log by its unique ID.
|
|
866
1581
|
*
|
|
867
|
-
* @param {string} siteId
|
|
868
|
-
* @param {string} logId
|
|
1582
|
+
* @param {string} params.siteId - Site ID.
|
|
1583
|
+
* @param {string} params.logId - Log ID.
|
|
869
1584
|
* @throws {AppwriteException}
|
|
870
1585
|
* @returns {Promise<Models.Execution>}
|
|
871
1586
|
*/
|
|
872
|
-
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
|
+
|
|
873
1616
|
if (typeof siteId === 'undefined') {
|
|
874
1617
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
875
1618
|
}
|
|
876
1619
|
if (typeof logId === 'undefined') {
|
|
877
1620
|
throw new AppwriteException('Missing required parameter: "logId"');
|
|
878
1621
|
}
|
|
1622
|
+
|
|
879
1623
|
const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
|
|
880
1624
|
const payload: Payload = {};
|
|
881
1625
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -894,18 +1638,47 @@ export class Sites {
|
|
|
894
1638
|
/**
|
|
895
1639
|
* Delete a site log by its unique ID.
|
|
896
1640
|
*
|
|
897
|
-
* @param {string} siteId
|
|
898
|
-
* @param {string} logId
|
|
1641
|
+
* @param {string} params.siteId - Site ID.
|
|
1642
|
+
* @param {string} params.logId - Log ID.
|
|
899
1643
|
* @throws {AppwriteException}
|
|
900
1644
|
* @returns {Promise<{}>}
|
|
901
1645
|
*/
|
|
902
|
-
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
|
+
|
|
903
1675
|
if (typeof siteId === 'undefined') {
|
|
904
1676
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
905
1677
|
}
|
|
906
1678
|
if (typeof logId === 'undefined') {
|
|
907
1679
|
throw new AppwriteException('Missing required parameter: "logId"');
|
|
908
1680
|
}
|
|
1681
|
+
|
|
909
1682
|
const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
|
|
910
1683
|
const payload: Payload = {};
|
|
911
1684
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -925,15 +1698,44 @@ export class Sites {
|
|
|
925
1698
|
/**
|
|
926
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.
|
|
927
1700
|
*
|
|
928
|
-
* @param {string} siteId
|
|
929
|
-
* @param {
|
|
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>;
|
|
1707
|
+
/**
|
|
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.
|
|
1709
|
+
*
|
|
1710
|
+
* @param {string} siteId - Site ID.
|
|
1711
|
+
* @param {UsageRange} range - Date range.
|
|
930
1712
|
* @throws {AppwriteException}
|
|
931
1713
|
* @returns {Promise<Models.UsageSite>}
|
|
1714
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
932
1715
|
*/
|
|
933
|
-
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
|
+
|
|
934
1735
|
if (typeof siteId === 'undefined') {
|
|
935
1736
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
936
1737
|
}
|
|
1738
|
+
|
|
937
1739
|
const apiPath = '/sites/{siteId}/usage'.replace('{siteId}', siteId);
|
|
938
1740
|
const payload: Payload = {};
|
|
939
1741
|
if (typeof range !== 'undefined') {
|
|
@@ -955,14 +1757,39 @@ export class Sites {
|
|
|
955
1757
|
/**
|
|
956
1758
|
* Get a list of all variables of a specific site.
|
|
957
1759
|
*
|
|
958
|
-
* @param {string} siteId
|
|
1760
|
+
* @param {string} params.siteId - Site unique ID.
|
|
1761
|
+
* @throws {AppwriteException}
|
|
1762
|
+
* @returns {Promise<Models.VariableList>}
|
|
1763
|
+
*/
|
|
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.
|
|
959
1769
|
* @throws {AppwriteException}
|
|
960
1770
|
* @returns {Promise<Models.VariableList>}
|
|
1771
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
961
1772
|
*/
|
|
962
|
-
listVariables(siteId: string): Promise<Models.VariableList
|
|
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
|
+
|
|
963
1789
|
if (typeof siteId === 'undefined') {
|
|
964
1790
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
965
1791
|
}
|
|
1792
|
+
|
|
966
1793
|
const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
|
|
967
1794
|
const payload: Payload = {};
|
|
968
1795
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -981,14 +1808,48 @@ export class Sites {
|
|
|
981
1808
|
/**
|
|
982
1809
|
* Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
|
|
983
1810
|
*
|
|
984
|
-
* @param {string} siteId
|
|
985
|
-
* @param {string} key
|
|
986
|
-
* @param {string} value
|
|
987
|
-
* @param {boolean} secret
|
|
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>;
|
|
1819
|
+
/**
|
|
1820
|
+
* Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
|
|
1821
|
+
*
|
|
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.
|
|
988
1826
|
* @throws {AppwriteException}
|
|
989
1827
|
* @returns {Promise<Models.Variable>}
|
|
1828
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
990
1829
|
*/
|
|
991
|
-
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
|
+
|
|
992
1853
|
if (typeof siteId === 'undefined') {
|
|
993
1854
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
994
1855
|
}
|
|
@@ -998,6 +1859,7 @@ export class Sites {
|
|
|
998
1859
|
if (typeof value === 'undefined') {
|
|
999
1860
|
throw new AppwriteException('Missing required parameter: "value"');
|
|
1000
1861
|
}
|
|
1862
|
+
|
|
1001
1863
|
const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
|
|
1002
1864
|
const payload: Payload = {};
|
|
1003
1865
|
if (typeof key !== 'undefined') {
|
|
@@ -1026,18 +1888,47 @@ export class Sites {
|
|
|
1026
1888
|
/**
|
|
1027
1889
|
* Get a variable by its unique ID.
|
|
1028
1890
|
*
|
|
1029
|
-
* @param {string} siteId
|
|
1030
|
-
* @param {string} variableId
|
|
1891
|
+
* @param {string} params.siteId - Site unique ID.
|
|
1892
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
1031
1893
|
* @throws {AppwriteException}
|
|
1032
1894
|
* @returns {Promise<Models.Variable>}
|
|
1033
1895
|
*/
|
|
1034
|
-
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
|
+
|
|
1035
1925
|
if (typeof siteId === 'undefined') {
|
|
1036
1926
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
1037
1927
|
}
|
|
1038
1928
|
if (typeof variableId === 'undefined') {
|
|
1039
1929
|
throw new AppwriteException('Missing required parameter: "variableId"');
|
|
1040
1930
|
}
|
|
1931
|
+
|
|
1041
1932
|
const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
1042
1933
|
const payload: Payload = {};
|
|
1043
1934
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -1056,15 +1947,52 @@ export class Sites {
|
|
|
1056
1947
|
/**
|
|
1057
1948
|
* Update variable by its unique ID.
|
|
1058
1949
|
*
|
|
1059
|
-
* @param {string} siteId
|
|
1060
|
-
* @param {string} variableId
|
|
1061
|
-
* @param {string} key
|
|
1062
|
-
* @param {string} value
|
|
1063
|
-
* @param {boolean} secret
|
|
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>;
|
|
1959
|
+
/**
|
|
1960
|
+
* Update variable by its unique ID.
|
|
1961
|
+
*
|
|
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.
|
|
1064
1967
|
* @throws {AppwriteException}
|
|
1065
1968
|
* @returns {Promise<Models.Variable>}
|
|
1969
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1066
1970
|
*/
|
|
1067
|
-
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
|
+
|
|
1068
1996
|
if (typeof siteId === 'undefined') {
|
|
1069
1997
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
1070
1998
|
}
|
|
@@ -1074,6 +2002,7 @@ export class Sites {
|
|
|
1074
2002
|
if (typeof key === 'undefined') {
|
|
1075
2003
|
throw new AppwriteException('Missing required parameter: "key"');
|
|
1076
2004
|
}
|
|
2005
|
+
|
|
1077
2006
|
const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
1078
2007
|
const payload: Payload = {};
|
|
1079
2008
|
if (typeof key !== 'undefined') {
|
|
@@ -1102,18 +2031,47 @@ export class Sites {
|
|
|
1102
2031
|
/**
|
|
1103
2032
|
* Delete a variable by its unique ID.
|
|
1104
2033
|
*
|
|
1105
|
-
* @param {string} siteId
|
|
1106
|
-
* @param {string} variableId
|
|
2034
|
+
* @param {string} params.siteId - Site unique ID.
|
|
2035
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
1107
2036
|
* @throws {AppwriteException}
|
|
1108
2037
|
* @returns {Promise<{}>}
|
|
1109
2038
|
*/
|
|
1110
|
-
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
|
+
|
|
1111
2068
|
if (typeof siteId === 'undefined') {
|
|
1112
2069
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
1113
2070
|
}
|
|
1114
2071
|
if (typeof variableId === 'undefined') {
|
|
1115
2072
|
throw new AppwriteException('Missing required parameter: "variableId"');
|
|
1116
2073
|
}
|
|
2074
|
+
|
|
1117
2075
|
const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
1118
2076
|
const payload: Payload = {};
|
|
1119
2077
|
const uri = new URL(this.client.config.endpoint + apiPath);
|