@appwrite.io/console 8.1.0 → 8.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/sdk.js +1 -1
- package/dist/cjs/sdk.js.map +1 -0
- package/dist/esm/sdk.js +29705 -0
- package/dist/esm/sdk.js.map +1 -0
- package/dist/iife/sdk.js +33515 -0
- package/package.json +5 -1
- package/types/channel.d.ts +74 -0
- package/types/client.d.ts +302 -0
- package/types/enums/adapter.d.ts +4 -0
- package/types/enums/api-service.d.ts +15 -0
- package/types/enums/api.d.ts +5 -0
- package/types/enums/appwrite-migration-resource.d.ts +27 -0
- package/types/enums/attribute-status.d.ts +7 -0
- package/types/enums/auth-method.d.ts +9 -0
- package/types/enums/authentication-factor.d.ts +6 -0
- package/types/enums/authenticator-type.d.ts +3 -0
- package/types/enums/backup-services.d.ts +8 -0
- package/types/enums/billing-plan-group.d.ts +5 -0
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/browser.d.ts +16 -0
- package/types/enums/build-runtime.d.ts +88 -0
- package/types/enums/column-status.d.ts +7 -0
- package/types/enums/compression.d.ts +5 -0
- package/types/enums/console-resource-type.d.ts +3 -0
- package/types/enums/credit-card.d.ts +19 -0
- package/types/enums/database-type.d.ts +6 -0
- package/types/enums/databases-index-type.d.ts +6 -0
- package/types/enums/deployment-download-type.d.ts +4 -0
- package/types/enums/deployment-status.d.ts +8 -0
- package/types/enums/domain-purchase-status.d.ts +6 -0
- package/types/enums/domain-transfer-status-enum.d.ts +10 -0
- package/types/enums/email-template-locale.d.ts +133 -0
- package/types/enums/email-template-type.d.ts +9 -0
- package/types/enums/execution-method.d.ts +9 -0
- package/types/enums/execution-status.d.ts +7 -0
- package/types/enums/execution-trigger.d.ts +5 -0
- package/types/enums/filter-type.d.ts +4 -0
- package/types/enums/firebase-migration-resource.d.ts +12 -0
- package/types/enums/flag.d.ts +197 -0
- package/types/enums/framework.d.ts +17 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/health-antivirus-status.d.ts +5 -0
- package/types/enums/health-check-status.d.ts +4 -0
- package/types/enums/image-format.d.ts +9 -0
- package/types/enums/image-gravity.d.ts +11 -0
- package/types/enums/index-status.d.ts +7 -0
- package/types/enums/message-priority.d.ts +4 -0
- package/types/enums/message-status.d.ts +7 -0
- package/types/enums/messaging-provider-type.d.ts +5 -0
- package/types/enums/n-host-migration-resource.d.ts +13 -0
- package/types/enums/name.d.ts +15 -0
- package/types/enums/o-auth-provider.d.ts +41 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/password-hash.d.ts +13 -0
- package/types/enums/platform-type.d.ts +17 -0
- package/types/enums/platform.d.ts +4 -0
- package/types/enums/project-usage-range.d.ts +4 -0
- package/types/enums/proxy-resource-type.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 +8 -0
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/relation-mutate.d.ts +5 -0
- package/types/enums/relationship-type.d.ts +6 -0
- package/types/enums/resource-type.d.ts +6 -0
- package/types/enums/runtime.d.ts +88 -0
- package/types/enums/runtimes.d.ts +88 -0
- package/types/enums/scopes.d.ts +81 -0
- package/types/enums/sms-template-locale.d.ts +133 -0
- package/types/enums/sms-template-type.d.ts +6 -0
- package/types/enums/smtp-encryption.d.ts +5 -0
- package/types/enums/smtp-secure.d.ts +4 -0
- package/types/enums/status-code.d.ts +6 -0
- package/types/enums/status.d.ts +3 -0
- package/types/enums/supabase-migration-resource.d.ts +13 -0
- package/types/enums/tables-db-index-type.d.ts +6 -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/usage-range.d.ts +5 -0
- package/types/enums/use-cases.d.ts +16 -0
- package/types/enums/vcs-detection-type.d.ts +4 -0
- package/types/enums/vcs-reference-type.d.ts +5 -0
- package/types/id.d.ts +20 -0
- package/{src/index.ts → types/index.d.ts} +1 -1
- package/{src/models.ts → types/models.d.ts} +268 -518
- package/types/operator.d.ts +180 -0
- package/{src/permission.ts → types/permission.d.ts} +6 -20
- package/types/query.d.ts +442 -0
- package/{src/role.ts → types/role.d.ts} +28 -58
- package/types/service.d.ts +11 -0
- package/types/services/account.d.ts +1536 -0
- package/types/services/activities.d.ts +46 -0
- package/types/services/assistant.d.ts +24 -0
- package/{src/services/avatars.ts → types/services/avatars.d.ts} +91 -525
- package/types/services/backups.d.ts +277 -0
- package/types/services/console.d.ts +248 -0
- package/types/services/databases.d.ts +2435 -0
- package/types/services/domains.d.ts +1527 -0
- package/types/services/functions.d.ts +842 -0
- package/types/services/graphql.d.ts +43 -0
- package/types/services/health.d.ts +475 -0
- package/types/services/locale.d.ts +64 -0
- package/types/services/messaging.d.ts +1989 -0
- package/types/services/migrations.d.ts +417 -0
- package/types/services/organizations.d.ts +1009 -0
- package/types/services/project.d.ts +148 -0
- package/types/services/projects.d.ts +1626 -0
- package/types/services/proxy.d.ts +190 -0
- package/types/services/realtime.d.ts +134 -0
- package/types/services/sites.d.ts +800 -0
- package/types/services/storage.d.ts +467 -0
- package/types/services/tables-db.d.ts +2352 -0
- package/types/services/teams.d.ts +366 -0
- package/types/services/tokens.d.ts +119 -0
- package/types/services/users.d.ts +1208 -0
- package/types/services/vcs.d.ts +252 -0
- package/types/services/webhooks.d.ts +165 -0
- package/.github/workflows/autoclose.yml +0 -11
- package/.github/workflows/publish.yml +0 -43
- package/CHANGELOG.md +0 -169
- package/docs/examples/account/create-anonymous-session.md +0 -13
- package/docs/examples/account/create-billing-address.md +0 -20
- package/docs/examples/account/create-email-password-session.md +0 -16
- package/docs/examples/account/create-email-token.md +0 -17
- package/docs/examples/account/create-email-verification.md +0 -15
- package/docs/examples/account/create-jwt.md +0 -15
- package/docs/examples/account/create-key.md +0 -17
- package/docs/examples/account/create-magic-url-token.md +0 -18
- package/docs/examples/account/create-mfa-authenticator.md +0 -15
- package/docs/examples/account/create-mfa-challenge.md +0 -15
- package/docs/examples/account/create-mfa-recovery-codes.md +0 -13
- package/docs/examples/account/create-o-auth-2-session.md +0 -17
- package/docs/examples/account/create-o-auth-2-token.md +0 -17
- package/docs/examples/account/create-payment-method.md +0 -13
- package/docs/examples/account/create-phone-token.md +0 -16
- package/docs/examples/account/create-phone-verification.md +0 -13
- package/docs/examples/account/create-push-target.md +0 -17
- package/docs/examples/account/create-recovery.md +0 -16
- package/docs/examples/account/create-session.md +0 -16
- package/docs/examples/account/create-verification.md +0 -15
- package/docs/examples/account/create.md +0 -18
- package/docs/examples/account/delete-billing-address.md +0 -15
- package/docs/examples/account/delete-identity.md +0 -15
- package/docs/examples/account/delete-key.md +0 -15
- package/docs/examples/account/delete-mfa-authenticator.md +0 -15
- package/docs/examples/account/delete-payment-method.md +0 -15
- package/docs/examples/account/delete-push-target.md +0 -15
- package/docs/examples/account/delete-session.md +0 -15
- package/docs/examples/account/delete-sessions.md +0 -13
- package/docs/examples/account/delete.md +0 -13
- package/docs/examples/account/get-billing-address.md +0 -15
- package/docs/examples/account/get-coupon.md +0 -15
- package/docs/examples/account/get-key.md +0 -15
- package/docs/examples/account/get-mfa-recovery-codes.md +0 -13
- package/docs/examples/account/get-payment-method.md +0 -15
- package/docs/examples/account/get-prefs.md +0 -13
- package/docs/examples/account/get-session.md +0 -15
- package/docs/examples/account/get.md +0 -13
- package/docs/examples/account/list-billing-addresses.md +0 -15
- package/docs/examples/account/list-identities.md +0 -16
- package/docs/examples/account/list-invoices.md +0 -15
- package/docs/examples/account/list-keys.md +0 -15
- package/docs/examples/account/list-logs.md +0 -16
- package/docs/examples/account/list-mfa-factors.md +0 -13
- package/docs/examples/account/list-payment-methods.md +0 -15
- package/docs/examples/account/list-sessions.md +0 -13
- package/docs/examples/account/update-billing-address.md +0 -21
- package/docs/examples/account/update-email-verification.md +0 -16
- package/docs/examples/account/update-email.md +0 -16
- package/docs/examples/account/update-key.md +0 -18
- package/docs/examples/account/update-magic-url-session.md +0 -16
- package/docs/examples/account/update-mfa-authenticator.md +0 -16
- package/docs/examples/account/update-mfa-challenge.md +0 -16
- package/docs/examples/account/update-mfa-recovery-codes.md +0 -13
- package/docs/examples/account/update-mfa.md +0 -15
- package/docs/examples/account/update-name.md +0 -15
- package/docs/examples/account/update-password.md +0 -16
- package/docs/examples/account/update-payment-method-mandate-options.md +0 -15
- package/docs/examples/account/update-payment-method-provider.md +0 -18
- package/docs/examples/account/update-payment-method.md +0 -18
- package/docs/examples/account/update-phone-session.md +0 -16
- package/docs/examples/account/update-phone-verification.md +0 -16
- package/docs/examples/account/update-phone.md +0 -16
- package/docs/examples/account/update-prefs.md +0 -19
- package/docs/examples/account/update-push-target.md +0 -16
- package/docs/examples/account/update-recovery.md +0 -17
- package/docs/examples/account/update-session.md +0 -15
- package/docs/examples/account/update-status.md +0 -13
- package/docs/examples/account/update-verification.md +0 -16
- package/docs/examples/activities/get-event.md +0 -15
- package/docs/examples/activities/list-events.md +0 -15
- package/docs/examples/assistant/chat.md +0 -15
- package/docs/examples/avatars/get-browser.md +0 -18
- package/docs/examples/avatars/get-credit-card.md +0 -18
- package/docs/examples/avatars/get-favicon.md +0 -15
- package/docs/examples/avatars/get-flag.md +0 -18
- package/docs/examples/avatars/get-image.md +0 -17
- package/docs/examples/avatars/get-initials.md +0 -18
- package/docs/examples/avatars/get-qr.md +0 -18
- package/docs/examples/avatars/get-screenshot.md +0 -37
- package/docs/examples/backups/create-archive.md +0 -16
- package/docs/examples/backups/create-policy.md +0 -21
- package/docs/examples/backups/create-restoration.md +0 -18
- package/docs/examples/backups/delete-archive.md +0 -15
- package/docs/examples/backups/delete-policy.md +0 -15
- package/docs/examples/backups/get-archive.md +0 -15
- package/docs/examples/backups/get-policy.md +0 -15
- package/docs/examples/backups/get-restoration.md +0 -15
- package/docs/examples/backups/list-archives.md +0 -15
- package/docs/examples/backups/list-policies.md +0 -15
- package/docs/examples/backups/list-restorations.md +0 -15
- package/docs/examples/backups/update-policy.md +0 -19
- package/docs/examples/console/create-program-membership.md +0 -15
- package/docs/examples/console/create-source.md +0 -19
- package/docs/examples/console/get-campaign.md +0 -15
- package/docs/examples/console/get-coupon.md +0 -15
- package/docs/examples/console/get-plan.md +0 -15
- package/docs/examples/console/get-plans.md +0 -15
- package/docs/examples/console/get-program.md +0 -15
- package/docs/examples/console/get-resource.md +0 -16
- package/docs/examples/console/list-regions.md +0 -13
- package/docs/examples/console/suggest-columns.md +0 -19
- package/docs/examples/console/suggest-indexes.md +0 -18
- package/docs/examples/console/variables.md +0 -13
- package/docs/examples/databases/create-boolean-attribute.md +0 -20
- package/docs/examples/databases/create-collection.md +0 -22
- package/docs/examples/databases/create-datetime-attribute.md +0 -20
- package/docs/examples/databases/create-document.md +0 -26
- package/docs/examples/databases/create-documents.md +0 -18
- package/docs/examples/databases/create-email-attribute.md +0 -20
- package/docs/examples/databases/create-enum-attribute.md +0 -21
- package/docs/examples/databases/create-float-attribute.md +0 -22
- package/docs/examples/databases/create-index.md +0 -21
- package/docs/examples/databases/create-integer-attribute.md +0 -22
- package/docs/examples/databases/create-ip-attribute.md +0 -20
- package/docs/examples/databases/create-line-attribute.md +0 -19
- package/docs/examples/databases/create-longtext-attribute.md +0 -21
- package/docs/examples/databases/create-mediumtext-attribute.md +0 -21
- package/docs/examples/databases/create-operations.md +0 -26
- package/docs/examples/databases/create-point-attribute.md +0 -19
- package/docs/examples/databases/create-polygon-attribute.md +0 -19
- package/docs/examples/databases/create-relationship-attribute.md +0 -22
- package/docs/examples/databases/create-string-attribute.md +0 -22
- package/docs/examples/databases/create-text-attribute.md +0 -21
- package/docs/examples/databases/create-transaction.md +0 -15
- package/docs/examples/databases/create-url-attribute.md +0 -20
- package/docs/examples/databases/create-varchar-attribute.md +0 -22
- package/docs/examples/databases/create.md +0 -17
- package/docs/examples/databases/decrement-document-attribute.md +0 -21
- package/docs/examples/databases/delete-attribute.md +0 -17
- package/docs/examples/databases/delete-collection.md +0 -16
- package/docs/examples/databases/delete-document.md +0 -18
- package/docs/examples/databases/delete-documents.md +0 -18
- package/docs/examples/databases/delete-index.md +0 -17
- package/docs/examples/databases/delete-transaction.md +0 -15
- package/docs/examples/databases/delete.md +0 -15
- package/docs/examples/databases/get-attribute.md +0 -17
- package/docs/examples/databases/get-collection-usage.md +0 -17
- package/docs/examples/databases/get-collection.md +0 -16
- package/docs/examples/databases/get-document.md +0 -19
- package/docs/examples/databases/get-index.md +0 -17
- package/docs/examples/databases/get-transaction.md +0 -15
- package/docs/examples/databases/get-usage.md +0 -16
- package/docs/examples/databases/get.md +0 -15
- package/docs/examples/databases/increment-document-attribute.md +0 -21
- package/docs/examples/databases/list-attributes.md +0 -18
- package/docs/examples/databases/list-collection-logs.md +0 -17
- package/docs/examples/databases/list-collections.md +0 -18
- package/docs/examples/databases/list-document-logs.md +0 -18
- package/docs/examples/databases/list-documents.md +0 -20
- package/docs/examples/databases/list-indexes.md +0 -18
- package/docs/examples/databases/list-logs.md +0 -16
- package/docs/examples/databases/list-transactions.md +0 -15
- package/docs/examples/databases/list-usage.md +0 -15
- package/docs/examples/databases/list.md +0 -17
- package/docs/examples/databases/update-boolean-attribute.md +0 -20
- package/docs/examples/databases/update-collection.md +0 -20
- package/docs/examples/databases/update-datetime-attribute.md +0 -20
- package/docs/examples/databases/update-document.md +0 -26
- package/docs/examples/databases/update-documents.md +0 -25
- package/docs/examples/databases/update-email-attribute.md +0 -20
- package/docs/examples/databases/update-enum-attribute.md +0 -21
- package/docs/examples/databases/update-float-attribute.md +0 -22
- package/docs/examples/databases/update-integer-attribute.md +0 -22
- package/docs/examples/databases/update-ip-attribute.md +0 -20
- package/docs/examples/databases/update-line-attribute.md +0 -20
- package/docs/examples/databases/update-longtext-attribute.md +0 -20
- package/docs/examples/databases/update-mediumtext-attribute.md +0 -20
- package/docs/examples/databases/update-point-attribute.md +0 -20
- package/docs/examples/databases/update-polygon-attribute.md +0 -20
- package/docs/examples/databases/update-relationship-attribute.md +0 -19
- package/docs/examples/databases/update-string-attribute.md +0 -21
- package/docs/examples/databases/update-text-attribute.md +0 -20
- package/docs/examples/databases/update-transaction.md +0 -17
- package/docs/examples/databases/update-url-attribute.md +0 -20
- package/docs/examples/databases/update-varchar-attribute.md +0 -21
- package/docs/examples/databases/update.md +0 -17
- package/docs/examples/databases/upsert-document.md +0 -26
- package/docs/examples/databases/upsert-documents.md +0 -18
- package/docs/examples/domains/create-preset-google-workspace.md +0 -15
- package/docs/examples/domains/create-preset-i-cloud.md +0 -15
- package/docs/examples/domains/create-preset-mailgun.md +0 -15
- package/docs/examples/domains/create-preset-outlook.md +0 -15
- package/docs/examples/domains/create-preset-proton-mail.md +0 -15
- package/docs/examples/domains/create-preset-zoho.md +0 -15
- package/docs/examples/domains/create-purchase.md +0 -26
- package/docs/examples/domains/create-record-a.md +0 -19
- package/docs/examples/domains/create-record-aaaa.md +0 -19
- package/docs/examples/domains/create-record-alias.md +0 -19
- package/docs/examples/domains/create-record-caa.md +0 -19
- package/docs/examples/domains/create-record-cname.md +0 -19
- package/docs/examples/domains/create-record-https.md +0 -19
- package/docs/examples/domains/create-record-mx.md +0 -20
- package/docs/examples/domains/create-record-ns.md +0 -19
- package/docs/examples/domains/create-record-srv.md +0 -22
- package/docs/examples/domains/create-record-txt.md +0 -19
- package/docs/examples/domains/create-transfer-in.md +0 -19
- package/docs/examples/domains/create-transfer-out.md +0 -16
- package/docs/examples/domains/create.md +0 -16
- package/docs/examples/domains/delete-record.md +0 -16
- package/docs/examples/domains/delete.md +0 -15
- package/docs/examples/domains/get-preset-google-workspace.md +0 -15
- package/docs/examples/domains/get-preset-i-cloud.md +0 -15
- package/docs/examples/domains/get-preset-mailgun.md +0 -15
- package/docs/examples/domains/get-preset-outlook.md +0 -15
- package/docs/examples/domains/get-preset-proton-mail.md +0 -15
- package/docs/examples/domains/get-preset-zoho.md +0 -15
- package/docs/examples/domains/get-price.md +0 -17
- package/docs/examples/domains/get-record.md +0 -16
- package/docs/examples/domains/get-transfer-status.md +0 -15
- package/docs/examples/domains/get-zone.md +0 -15
- package/docs/examples/domains/get.md +0 -15
- package/docs/examples/domains/list-records.md +0 -16
- package/docs/examples/domains/list-suggestions.md +0 -20
- package/docs/examples/domains/list.md +0 -16
- package/docs/examples/domains/update-auto-renewal.md +0 -16
- package/docs/examples/domains/update-nameservers.md +0 -15
- package/docs/examples/domains/update-purchase.md +0 -16
- package/docs/examples/domains/update-record-a.md +0 -20
- package/docs/examples/domains/update-record-aaaa.md +0 -20
- package/docs/examples/domains/update-record-alias.md +0 -20
- package/docs/examples/domains/update-record-caa.md +0 -20
- package/docs/examples/domains/update-record-cname.md +0 -20
- package/docs/examples/domains/update-record-https.md +0 -20
- package/docs/examples/domains/update-record-mx.md +0 -21
- package/docs/examples/domains/update-record-ns.md +0 -20
- package/docs/examples/domains/update-record-srv.md +0 -23
- package/docs/examples/domains/update-record-txt.md +0 -20
- package/docs/examples/domains/update-team.md +0 -16
- package/docs/examples/domains/update-transfer-in.md +0 -16
- package/docs/examples/domains/update-zone.md +0 -16
- package/docs/examples/functions/create-deployment.md +0 -19
- package/docs/examples/functions/create-duplicate-deployment.md +0 -17
- package/docs/examples/functions/create-execution.md +0 -21
- package/docs/examples/functions/create-template-deployment.md +0 -21
- package/docs/examples/functions/create-variable.md +0 -18
- package/docs/examples/functions/create-vcs-deployment.md +0 -18
- package/docs/examples/functions/create.md +0 -34
- package/docs/examples/functions/delete-deployment.md +0 -16
- package/docs/examples/functions/delete-execution.md +0 -16
- package/docs/examples/functions/delete-variable.md +0 -16
- package/docs/examples/functions/delete.md +0 -15
- package/docs/examples/functions/get-deployment-download.md +0 -17
- package/docs/examples/functions/get-deployment.md +0 -16
- package/docs/examples/functions/get-execution.md +0 -16
- package/docs/examples/functions/get-template.md +0 -15
- package/docs/examples/functions/get-usage.md +0 -16
- package/docs/examples/functions/get-variable.md +0 -16
- package/docs/examples/functions/get.md +0 -15
- package/docs/examples/functions/list-deployments.md +0 -18
- package/docs/examples/functions/list-executions.md +0 -17
- package/docs/examples/functions/list-runtimes.md +0 -13
- package/docs/examples/functions/list-specifications.md +0 -13
- package/docs/examples/functions/list-templates.md +0 -19
- package/docs/examples/functions/list-usage.md +0 -15
- package/docs/examples/functions/list-variables.md +0 -15
- package/docs/examples/functions/list.md +0 -17
- package/docs/examples/functions/update-deployment-status.md +0 -16
- package/docs/examples/functions/update-function-deployment.md +0 -16
- package/docs/examples/functions/update-variable.md +0 -19
- package/docs/examples/functions/update.md +0 -34
- package/docs/examples/graphql/mutation.md +0 -15
- package/docs/examples/graphql/query.md +0 -15
- package/docs/examples/health/get-antivirus.md +0 -13
- package/docs/examples/health/get-cache.md +0 -13
- package/docs/examples/health/get-certificate.md +0 -15
- package/docs/examples/health/get-console-pausing.md +0 -16
- package/docs/examples/health/get-db.md +0 -13
- package/docs/examples/health/get-failed-jobs.md +0 -16
- package/docs/examples/health/get-pub-sub.md +0 -13
- package/docs/examples/health/get-queue-audits.md +0 -15
- package/docs/examples/health/get-queue-billing-project-aggregation.md +0 -15
- package/docs/examples/health/get-queue-billing-team-aggregation.md +0 -15
- package/docs/examples/health/get-queue-builds.md +0 -15
- package/docs/examples/health/get-queue-certificates.md +0 -15
- package/docs/examples/health/get-queue-databases.md +0 -16
- package/docs/examples/health/get-queue-deletes.md +0 -15
- package/docs/examples/health/get-queue-functions.md +0 -15
- package/docs/examples/health/get-queue-logs.md +0 -15
- package/docs/examples/health/get-queue-mails.md +0 -15
- package/docs/examples/health/get-queue-messaging.md +0 -15
- package/docs/examples/health/get-queue-migrations.md +0 -15
- package/docs/examples/health/get-queue-priority-builds.md +0 -15
- package/docs/examples/health/get-queue-region-manager.md +0 -15
- package/docs/examples/health/get-queue-stats-resources.md +0 -15
- package/docs/examples/health/get-queue-threats.md +0 -15
- package/docs/examples/health/get-queue-usage.md +0 -15
- package/docs/examples/health/get-queue-webhooks.md +0 -15
- package/docs/examples/health/get-storage-local.md +0 -13
- package/docs/examples/health/get-storage.md +0 -13
- package/docs/examples/health/get-time.md +0 -13
- package/docs/examples/health/get.md +0 -13
- package/docs/examples/locale/get.md +0 -13
- package/docs/examples/locale/list-codes.md +0 -13
- package/docs/examples/locale/list-continents.md +0 -13
- package/docs/examples/locale/list-countries-eu.md +0 -13
- package/docs/examples/locale/list-countries-phones.md +0 -13
- package/docs/examples/locale/list-countries.md +0 -13
- package/docs/examples/locale/list-currencies.md +0 -13
- package/docs/examples/locale/list-languages.md +0 -13
- package/docs/examples/messaging/create-apns-provider.md +0 -22
- package/docs/examples/messaging/create-email.md +0 -26
- package/docs/examples/messaging/create-fcm-provider.md +0 -18
- package/docs/examples/messaging/create-mailgun-provider.md +0 -24
- package/docs/examples/messaging/create-msg-91-provider.md +0 -20
- package/docs/examples/messaging/create-push.md +0 -33
- package/docs/examples/messaging/create-resend-provider.md +0 -22
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -22
- package/docs/examples/messaging/create-sms.md +0 -21
- package/docs/examples/messaging/create-smtp-provider.md +0 -28
- package/docs/examples/messaging/create-subscriber.md +0 -17
- package/docs/examples/messaging/create-telesign-provider.md +0 -20
- package/docs/examples/messaging/create-textmagic-provider.md +0 -20
- package/docs/examples/messaging/create-topic.md +0 -17
- package/docs/examples/messaging/create-twilio-provider.md +0 -20
- package/docs/examples/messaging/create-vonage-provider.md +0 -20
- package/docs/examples/messaging/delete-provider.md +0 -15
- package/docs/examples/messaging/delete-subscriber.md +0 -16
- package/docs/examples/messaging/delete-topic.md +0 -15
- package/docs/examples/messaging/delete.md +0 -15
- package/docs/examples/messaging/get-message.md +0 -15
- package/docs/examples/messaging/get-provider.md +0 -15
- package/docs/examples/messaging/get-subscriber.md +0 -16
- package/docs/examples/messaging/get-topic.md +0 -15
- package/docs/examples/messaging/list-message-logs.md +0 -17
- package/docs/examples/messaging/list-messages.md +0 -17
- package/docs/examples/messaging/list-provider-logs.md +0 -17
- package/docs/examples/messaging/list-providers.md +0 -17
- package/docs/examples/messaging/list-subscriber-logs.md +0 -17
- package/docs/examples/messaging/list-subscribers.md +0 -18
- package/docs/examples/messaging/list-targets.md +0 -17
- package/docs/examples/messaging/list-topic-logs.md +0 -17
- package/docs/examples/messaging/list-topics.md +0 -17
- package/docs/examples/messaging/update-apns-provider.md +0 -22
- package/docs/examples/messaging/update-email.md +0 -26
- package/docs/examples/messaging/update-fcm-provider.md +0 -18
- package/docs/examples/messaging/update-mailgun-provider.md +0 -24
- package/docs/examples/messaging/update-msg-91-provider.md +0 -20
- package/docs/examples/messaging/update-push.md +0 -33
- package/docs/examples/messaging/update-resend-provider.md +0 -22
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -22
- package/docs/examples/messaging/update-sms.md +0 -21
- package/docs/examples/messaging/update-smtp-provider.md +0 -28
- package/docs/examples/messaging/update-telesign-provider.md +0 -20
- package/docs/examples/messaging/update-textmagic-provider.md +0 -20
- package/docs/examples/messaging/update-topic.md +0 -17
- package/docs/examples/messaging/update-twilio-provider.md +0 -20
- package/docs/examples/messaging/update-vonage-provider.md +0 -20
- package/docs/examples/migrations/create-appwrite-migration.md +0 -18
- package/docs/examples/migrations/create-csv-export.md +0 -23
- package/docs/examples/migrations/create-csv-import.md +0 -18
- package/docs/examples/migrations/create-firebase-migration.md +0 -16
- package/docs/examples/migrations/create-n-host-migration.md +0 -22
- package/docs/examples/migrations/create-supabase-migration.md +0 -21
- package/docs/examples/migrations/delete.md +0 -15
- package/docs/examples/migrations/get-appwrite-report.md +0 -18
- package/docs/examples/migrations/get-firebase-report.md +0 -16
- package/docs/examples/migrations/get-n-host-report.md +0 -22
- package/docs/examples/migrations/get-supabase-report.md +0 -21
- package/docs/examples/migrations/get.md +0 -15
- package/docs/examples/migrations/list.md +0 -17
- package/docs/examples/migrations/retry.md +0 -15
- package/docs/examples/organizations/add-credit.md +0 -16
- package/docs/examples/organizations/cancel-downgrade.md +0 -15
- package/docs/examples/organizations/create-downgrade-feedback.md +0 -19
- package/docs/examples/organizations/create-invoice-payment.md +0 -17
- package/docs/examples/organizations/create-key.md +0 -18
- package/docs/examples/organizations/create.md +0 -24
- package/docs/examples/organizations/delete-backup-payment-method.md +0 -15
- package/docs/examples/organizations/delete-billing-address.md +0 -15
- package/docs/examples/organizations/delete-default-payment-method.md +0 -15
- package/docs/examples/organizations/delete-key.md +0 -16
- package/docs/examples/organizations/delete.md +0 -15
- package/docs/examples/organizations/estimation-create-organization.md +0 -19
- package/docs/examples/organizations/estimation-delete-organization.md +0 -15
- package/docs/examples/organizations/estimation-update-plan.md +0 -18
- package/docs/examples/organizations/get-aggregation.md +0 -18
- package/docs/examples/organizations/get-available-credits.md +0 -15
- package/docs/examples/organizations/get-billing-address.md +0 -16
- package/docs/examples/organizations/get-credit.md +0 -16
- package/docs/examples/organizations/get-invoice-download.md +0 -16
- package/docs/examples/organizations/get-invoice-view.md +0 -16
- package/docs/examples/organizations/get-invoice.md +0 -16
- package/docs/examples/organizations/get-key.md +0 -16
- package/docs/examples/organizations/get-payment-method.md +0 -16
- package/docs/examples/organizations/get-plan.md +0 -15
- package/docs/examples/organizations/get-scopes.md +0 -16
- package/docs/examples/organizations/get-usage.md +0 -17
- package/docs/examples/organizations/list-aggregations.md +0 -16
- package/docs/examples/organizations/list-credits.md +0 -16
- package/docs/examples/organizations/list-invoices.md +0 -16
- package/docs/examples/organizations/list-keys.md +0 -16
- package/docs/examples/organizations/list-regions.md +0 -15
- package/docs/examples/organizations/list.md +0 -16
- package/docs/examples/organizations/set-backup-payment-method.md +0 -16
- package/docs/examples/organizations/set-billing-address.md +0 -16
- package/docs/examples/organizations/set-billing-email.md +0 -16
- package/docs/examples/organizations/set-billing-tax-id.md +0 -16
- package/docs/examples/organizations/set-default-payment-method.md +0 -16
- package/docs/examples/organizations/update-budget.md +0 -17
- package/docs/examples/organizations/update-key.md +0 -19
- package/docs/examples/organizations/update-plan.md +0 -22
- package/docs/examples/organizations/validate-invoice.md +0 -16
- package/docs/examples/organizations/validate-payment.md +0 -16
- package/docs/examples/project/create-variable.md +0 -18
- package/docs/examples/project/delete-variable.md +0 -15
- package/docs/examples/project/get-usage.md +0 -17
- package/docs/examples/project/get-variable.md +0 -15
- package/docs/examples/project/list-variables.md +0 -16
- package/docs/examples/project/update-variable.md +0 -18
- package/docs/examples/projects/create-dev-key.md +0 -17
- package/docs/examples/projects/create-jwt.md +0 -17
- package/docs/examples/projects/create-key.md +0 -19
- package/docs/examples/projects/create-platform.md +0 -20
- package/docs/examples/projects/create-schedule.md +0 -20
- package/docs/examples/projects/create-smtp-test.md +0 -24
- package/docs/examples/projects/create.md +0 -27
- package/docs/examples/projects/delete-dev-key.md +0 -16
- package/docs/examples/projects/delete-email-template.md +0 -17
- package/docs/examples/projects/delete-key.md +0 -16
- package/docs/examples/projects/delete-platform.md +0 -16
- package/docs/examples/projects/delete-sms-template.md +0 -17
- package/docs/examples/projects/delete.md +0 -15
- package/docs/examples/projects/get-dev-key.md +0 -16
- package/docs/examples/projects/get-email-template.md +0 -17
- package/docs/examples/projects/get-key.md +0 -16
- package/docs/examples/projects/get-platform.md +0 -16
- package/docs/examples/projects/get-schedule.md +0 -16
- package/docs/examples/projects/get-sms-template.md +0 -17
- package/docs/examples/projects/get.md +0 -15
- package/docs/examples/projects/list-dev-keys.md +0 -16
- package/docs/examples/projects/list-keys.md +0 -17
- package/docs/examples/projects/list-platforms.md +0 -16
- package/docs/examples/projects/list-schedules.md +0 -17
- package/docs/examples/projects/list.md +0 -17
- package/docs/examples/projects/update-api-status-all.md +0 -16
- package/docs/examples/projects/update-api-status.md +0 -17
- package/docs/examples/projects/update-auth-duration.md +0 -16
- package/docs/examples/projects/update-auth-limit.md +0 -16
- package/docs/examples/projects/update-auth-password-dictionary.md +0 -16
- package/docs/examples/projects/update-auth-password-history.md +0 -16
- package/docs/examples/projects/update-auth-sessions-limit.md +0 -16
- package/docs/examples/projects/update-auth-status.md +0 -17
- package/docs/examples/projects/update-console-access.md +0 -15
- package/docs/examples/projects/update-dev-key.md +0 -18
- package/docs/examples/projects/update-email-template.md +0 -22
- package/docs/examples/projects/update-key.md +0 -19
- package/docs/examples/projects/update-labels.md +0 -16
- package/docs/examples/projects/update-memberships-privacy.md +0 -18
- package/docs/examples/projects/update-mock-numbers.md +0 -16
- package/docs/examples/projects/update-o-auth-2.md +0 -19
- package/docs/examples/projects/update-personal-data-check.md +0 -16
- package/docs/examples/projects/update-platform.md +0 -20
- package/docs/examples/projects/update-service-status-all.md +0 -16
- package/docs/examples/projects/update-service-status.md +0 -17
- package/docs/examples/projects/update-session-alerts.md +0 -16
- package/docs/examples/projects/update-session-invalidation.md +0 -16
- package/docs/examples/projects/update-sms-template.md +0 -18
- package/docs/examples/projects/update-smtp.md +0 -24
- package/docs/examples/projects/update-status.md +0 -16
- package/docs/examples/projects/update-team.md +0 -16
- package/docs/examples/projects/update.md +0 -25
- package/docs/examples/proxy/create-api-rule.md +0 -15
- package/docs/examples/proxy/create-function-rule.md +0 -17
- package/docs/examples/proxy/create-redirect-rule.md +0 -19
- package/docs/examples/proxy/create-site-rule.md +0 -17
- package/docs/examples/proxy/delete-rule.md +0 -15
- package/docs/examples/proxy/get-rule.md +0 -15
- package/docs/examples/proxy/list-rules.md +0 -17
- package/docs/examples/proxy/update-rule-verification.md +0 -15
- package/docs/examples/sites/create-deployment.md +0 -20
- package/docs/examples/sites/create-duplicate-deployment.md +0 -16
- package/docs/examples/sites/create-template-deployment.md +0 -21
- package/docs/examples/sites/create-variable.md +0 -18
- package/docs/examples/sites/create-vcs-deployment.md +0 -18
- package/docs/examples/sites/create.md +0 -35
- package/docs/examples/sites/delete-deployment.md +0 -16
- package/docs/examples/sites/delete-log.md +0 -16
- package/docs/examples/sites/delete-variable.md +0 -16
- package/docs/examples/sites/delete.md +0 -15
- package/docs/examples/sites/get-deployment-download.md +0 -17
- package/docs/examples/sites/get-deployment.md +0 -16
- package/docs/examples/sites/get-log.md +0 -16
- package/docs/examples/sites/get-template.md +0 -15
- package/docs/examples/sites/get-usage.md +0 -16
- package/docs/examples/sites/get-variable.md +0 -16
- package/docs/examples/sites/get.md +0 -15
- package/docs/examples/sites/list-deployments.md +0 -18
- package/docs/examples/sites/list-frameworks.md +0 -13
- package/docs/examples/sites/list-logs.md +0 -17
- package/docs/examples/sites/list-specifications.md +0 -13
- package/docs/examples/sites/list-templates.md +0 -18
- package/docs/examples/sites/list-usage.md +0 -15
- package/docs/examples/sites/list-variables.md +0 -15
- package/docs/examples/sites/list.md +0 -17
- package/docs/examples/sites/update-deployment-status.md +0 -16
- package/docs/examples/sites/update-site-deployment.md +0 -16
- package/docs/examples/sites/update-variable.md +0 -19
- package/docs/examples/sites/update.md +0 -35
- package/docs/examples/storage/create-bucket.md +0 -25
- package/docs/examples/storage/create-file.md +0 -18
- package/docs/examples/storage/delete-bucket.md +0 -15
- package/docs/examples/storage/delete-file.md +0 -16
- package/docs/examples/storage/get-bucket-usage.md +0 -16
- package/docs/examples/storage/get-bucket.md +0 -15
- package/docs/examples/storage/get-file-download.md +0 -17
- package/docs/examples/storage/get-file-preview.md +0 -28
- package/docs/examples/storage/get-file-view.md +0 -17
- package/docs/examples/storage/get-file.md +0 -16
- package/docs/examples/storage/get-usage.md +0 -15
- package/docs/examples/storage/list-buckets.md +0 -17
- package/docs/examples/storage/list-files.md +0 -18
- package/docs/examples/storage/update-bucket.md +0 -25
- package/docs/examples/storage/update-file.md +0 -18
- package/docs/examples/tablesdb/create-boolean-column.md +0 -20
- package/docs/examples/tablesdb/create-datetime-column.md +0 -20
- package/docs/examples/tablesdb/create-email-column.md +0 -20
- package/docs/examples/tablesdb/create-enum-column.md +0 -21
- package/docs/examples/tablesdb/create-float-column.md +0 -22
- package/docs/examples/tablesdb/create-index.md +0 -21
- package/docs/examples/tablesdb/create-integer-column.md +0 -22
- package/docs/examples/tablesdb/create-ip-column.md +0 -20
- package/docs/examples/tablesdb/create-line-column.md +0 -19
- package/docs/examples/tablesdb/create-longtext-column.md +0 -21
- package/docs/examples/tablesdb/create-mediumtext-column.md +0 -21
- package/docs/examples/tablesdb/create-operations.md +0 -26
- package/docs/examples/tablesdb/create-point-column.md +0 -19
- package/docs/examples/tablesdb/create-polygon-column.md +0 -19
- package/docs/examples/tablesdb/create-relationship-column.md +0 -22
- package/docs/examples/tablesdb/create-row.md +0 -26
- package/docs/examples/tablesdb/create-rows.md +0 -18
- package/docs/examples/tablesdb/create-string-column.md +0 -22
- package/docs/examples/tablesdb/create-table.md +0 -22
- package/docs/examples/tablesdb/create-text-column.md +0 -21
- package/docs/examples/tablesdb/create-transaction.md +0 -15
- package/docs/examples/tablesdb/create-url-column.md +0 -20
- package/docs/examples/tablesdb/create-varchar-column.md +0 -22
- package/docs/examples/tablesdb/create.md +0 -17
- package/docs/examples/tablesdb/decrement-row-column.md +0 -21
- package/docs/examples/tablesdb/delete-column.md +0 -17
- package/docs/examples/tablesdb/delete-index.md +0 -17
- package/docs/examples/tablesdb/delete-row.md +0 -18
- package/docs/examples/tablesdb/delete-rows.md +0 -18
- package/docs/examples/tablesdb/delete-table.md +0 -16
- package/docs/examples/tablesdb/delete-transaction.md +0 -15
- package/docs/examples/tablesdb/delete.md +0 -15
- package/docs/examples/tablesdb/get-column.md +0 -17
- package/docs/examples/tablesdb/get-index.md +0 -17
- package/docs/examples/tablesdb/get-row.md +0 -19
- package/docs/examples/tablesdb/get-table-usage.md +0 -17
- package/docs/examples/tablesdb/get-table.md +0 -16
- package/docs/examples/tablesdb/get-transaction.md +0 -15
- package/docs/examples/tablesdb/get-usage.md +0 -16
- package/docs/examples/tablesdb/get.md +0 -15
- package/docs/examples/tablesdb/increment-row-column.md +0 -21
- package/docs/examples/tablesdb/list-columns.md +0 -18
- package/docs/examples/tablesdb/list-indexes.md +0 -18
- package/docs/examples/tablesdb/list-row-logs.md +0 -18
- package/docs/examples/tablesdb/list-rows.md +0 -20
- package/docs/examples/tablesdb/list-table-logs.md +0 -17
- package/docs/examples/tablesdb/list-tables.md +0 -18
- package/docs/examples/tablesdb/list-transactions.md +0 -15
- package/docs/examples/tablesdb/list-usage.md +0 -15
- package/docs/examples/tablesdb/list.md +0 -17
- package/docs/examples/tablesdb/update-boolean-column.md +0 -20
- package/docs/examples/tablesdb/update-datetime-column.md +0 -20
- package/docs/examples/tablesdb/update-email-column.md +0 -20
- package/docs/examples/tablesdb/update-enum-column.md +0 -21
- package/docs/examples/tablesdb/update-float-column.md +0 -22
- package/docs/examples/tablesdb/update-integer-column.md +0 -22
- package/docs/examples/tablesdb/update-ip-column.md +0 -20
- package/docs/examples/tablesdb/update-line-column.md +0 -20
- package/docs/examples/tablesdb/update-longtext-column.md +0 -20
- package/docs/examples/tablesdb/update-mediumtext-column.md +0 -20
- package/docs/examples/tablesdb/update-point-column.md +0 -20
- package/docs/examples/tablesdb/update-polygon-column.md +0 -20
- package/docs/examples/tablesdb/update-relationship-column.md +0 -19
- package/docs/examples/tablesdb/update-row.md +0 -26
- package/docs/examples/tablesdb/update-rows.md +0 -25
- package/docs/examples/tablesdb/update-string-column.md +0 -21
- package/docs/examples/tablesdb/update-table.md +0 -20
- package/docs/examples/tablesdb/update-text-column.md +0 -20
- package/docs/examples/tablesdb/update-transaction.md +0 -17
- package/docs/examples/tablesdb/update-url-column.md +0 -20
- package/docs/examples/tablesdb/update-varchar-column.md +0 -21
- package/docs/examples/tablesdb/update.md +0 -17
- package/docs/examples/tablesdb/upsert-row.md +0 -26
- package/docs/examples/tablesdb/upsert-rows.md +0 -18
- package/docs/examples/teams/create-membership.md +0 -21
- package/docs/examples/teams/create.md +0 -17
- package/docs/examples/teams/delete-membership.md +0 -16
- package/docs/examples/teams/delete.md +0 -15
- package/docs/examples/teams/get-membership.md +0 -16
- package/docs/examples/teams/get-prefs.md +0 -15
- package/docs/examples/teams/get.md +0 -15
- package/docs/examples/teams/list-logs.md +0 -17
- package/docs/examples/teams/list-memberships.md +0 -18
- package/docs/examples/teams/list.md +0 -17
- package/docs/examples/teams/update-membership-status.md +0 -18
- package/docs/examples/teams/update-membership.md +0 -17
- package/docs/examples/teams/update-name.md +0 -16
- package/docs/examples/teams/update-prefs.md +0 -16
- package/docs/examples/tokens/create-file-token.md +0 -17
- package/docs/examples/tokens/delete.md +0 -15
- package/docs/examples/tokens/get.md +0 -15
- package/docs/examples/tokens/list.md +0 -18
- package/docs/examples/tokens/update.md +0 -16
- package/docs/examples/users/create-argon-2-user.md +0 -18
- package/docs/examples/users/create-bcrypt-user.md +0 -18
- package/docs/examples/users/create-jwt.md +0 -17
- package/docs/examples/users/create-md-5-user.md +0 -18
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -15
- package/docs/examples/users/create-ph-pass-user.md +0 -18
- package/docs/examples/users/create-scrypt-modified-user.md +0 -21
- package/docs/examples/users/create-scrypt-user.md +0 -23
- package/docs/examples/users/create-session.md +0 -15
- package/docs/examples/users/create-sha-user.md +0 -19
- package/docs/examples/users/create-target.md +0 -20
- package/docs/examples/users/create-token.md +0 -17
- package/docs/examples/users/create.md +0 -19
- package/docs/examples/users/delete-identity.md +0 -15
- package/docs/examples/users/delete-mfa-authenticator.md +0 -16
- package/docs/examples/users/delete-session.md +0 -16
- package/docs/examples/users/delete-sessions.md +0 -15
- package/docs/examples/users/delete-target.md +0 -16
- package/docs/examples/users/delete.md +0 -15
- package/docs/examples/users/get-mfa-recovery-codes.md +0 -15
- package/docs/examples/users/get-prefs.md +0 -15
- package/docs/examples/users/get-target.md +0 -16
- package/docs/examples/users/get-usage.md +0 -15
- package/docs/examples/users/get.md +0 -15
- package/docs/examples/users/list-identities.md +0 -17
- package/docs/examples/users/list-logs.md +0 -17
- package/docs/examples/users/list-memberships.md +0 -18
- package/docs/examples/users/list-mfa-factors.md +0 -15
- package/docs/examples/users/list-sessions.md +0 -16
- package/docs/examples/users/list-targets.md +0 -17
- package/docs/examples/users/list.md +0 -17
- package/docs/examples/users/update-email-verification.md +0 -16
- package/docs/examples/users/update-email.md +0 -16
- package/docs/examples/users/update-impersonator.md +0 -16
- package/docs/examples/users/update-labels.md +0 -16
- package/docs/examples/users/update-mfa-recovery-codes.md +0 -15
- package/docs/examples/users/update-mfa.md +0 -16
- package/docs/examples/users/update-name.md +0 -16
- package/docs/examples/users/update-password.md +0 -16
- package/docs/examples/users/update-phone-verification.md +0 -16
- package/docs/examples/users/update-phone.md +0 -16
- package/docs/examples/users/update-prefs.md +0 -16
- package/docs/examples/users/update-status.md +0 -16
- package/docs/examples/users/update-target.md +0 -19
- package/docs/examples/vcs/create-repository-detection.md +0 -18
- package/docs/examples/vcs/create-repository.md +0 -17
- package/docs/examples/vcs/delete-installation.md +0 -15
- package/docs/examples/vcs/get-installation.md +0 -15
- package/docs/examples/vcs/get-repository-contents.md +0 -18
- package/docs/examples/vcs/get-repository.md +0 -16
- package/docs/examples/vcs/list-installations.md +0 -17
- package/docs/examples/vcs/list-repositories.md +0 -18
- package/docs/examples/vcs/list-repository-branches.md +0 -16
- package/docs/examples/vcs/update-external-deployments.md +0 -17
- package/docs/examples/webhooks/create.md +0 -22
- package/docs/examples/webhooks/delete.md +0 -15
- package/docs/examples/webhooks/get.md +0 -15
- package/docs/examples/webhooks/list.md +0 -16
- package/docs/examples/webhooks/update-signature.md +0 -15
- package/docs/examples/webhooks/update.md +0 -22
- package/rollup.config.js +0 -44
- package/src/channel.ts +0 -158
- package/src/client.ts +0 -1085
- package/src/enums/adapter.ts +0 -4
- package/src/enums/api-service.ts +0 -15
- package/src/enums/api.ts +0 -5
- package/src/enums/appwrite-migration-resource.ts +0 -27
- package/src/enums/attribute-status.ts +0 -7
- package/src/enums/auth-method.ts +0 -9
- package/src/enums/authentication-factor.ts +0 -6
- package/src/enums/authenticator-type.ts +0 -3
- package/src/enums/backup-services.ts +0 -8
- package/src/enums/billing-plan-group.ts +0 -5
- package/src/enums/browser-permission.ts +0 -22
- package/src/enums/browser.ts +0 -16
- package/src/enums/build-runtime.ts +0 -88
- package/src/enums/column-status.ts +0 -7
- package/src/enums/compression.ts +0 -5
- package/src/enums/console-resource-type.ts +0 -3
- package/src/enums/credit-card.ts +0 -19
- package/src/enums/database-type.ts +0 -6
- package/src/enums/databases-index-type.ts +0 -6
- package/src/enums/deployment-download-type.ts +0 -4
- package/src/enums/deployment-status.ts +0 -8
- package/src/enums/domain-purchase-status.ts +0 -6
- package/src/enums/domain-transfer-status-enum.ts +0 -10
- package/src/enums/email-template-locale.ts +0 -133
- package/src/enums/email-template-type.ts +0 -9
- package/src/enums/execution-method.ts +0 -9
- package/src/enums/execution-status.ts +0 -7
- package/src/enums/execution-trigger.ts +0 -5
- package/src/enums/filter-type.ts +0 -4
- package/src/enums/firebase-migration-resource.ts +0 -12
- package/src/enums/flag.ts +0 -197
- package/src/enums/framework.ts +0 -17
- package/src/enums/frameworks.ts +0 -17
- package/src/enums/health-antivirus-status.ts +0 -5
- package/src/enums/health-check-status.ts +0 -4
- package/src/enums/image-format.ts +0 -9
- package/src/enums/image-gravity.ts +0 -11
- package/src/enums/index-status.ts +0 -7
- package/src/enums/message-priority.ts +0 -4
- package/src/enums/message-status.ts +0 -7
- package/src/enums/messaging-provider-type.ts +0 -5
- package/src/enums/n-host-migration-resource.ts +0 -13
- package/src/enums/name.ts +0 -15
- package/src/enums/o-auth-provider.ts +0 -41
- package/src/enums/order-by.ts +0 -4
- package/src/enums/password-hash.ts +0 -13
- package/src/enums/platform-type.ts +0 -17
- package/src/enums/platform.ts +0 -4
- package/src/enums/project-usage-range.ts +0 -4
- package/src/enums/proxy-resource-type.ts +0 -4
- package/src/enums/proxy-rule-deployment-resource-type.ts +0 -4
- package/src/enums/proxy-rule-status.ts +0 -6
- package/src/enums/region.ts +0 -8
- package/src/enums/registration-type.ts +0 -6
- package/src/enums/relation-mutate.ts +0 -5
- package/src/enums/relationship-type.ts +0 -6
- package/src/enums/resource-type.ts +0 -6
- package/src/enums/runtime.ts +0 -88
- package/src/enums/runtimes.ts +0 -88
- package/src/enums/scopes.ts +0 -81
- package/src/enums/sms-template-locale.ts +0 -133
- package/src/enums/sms-template-type.ts +0 -6
- package/src/enums/smtp-encryption.ts +0 -5
- package/src/enums/smtp-secure.ts +0 -4
- package/src/enums/status-code.ts +0 -6
- package/src/enums/status.ts +0 -3
- package/src/enums/supabase-migration-resource.ts +0 -13
- package/src/enums/tables-db-index-type.ts +0 -6
- package/src/enums/template-reference-type.ts +0 -5
- package/src/enums/theme.ts +0 -4
- package/src/enums/timezone.ts +0 -421
- package/src/enums/usage-range.ts +0 -5
- package/src/enums/use-cases.ts +0 -16
- package/src/enums/vcs-detection-type.ts +0 -4
- package/src/enums/vcs-reference-type.ts +0 -5
- package/src/id.ts +0 -47
- package/src/operator.ts +0 -308
- package/src/query.ts +0 -576
- package/src/service.ts +0 -30
- package/src/services/account.ts +0 -4293
- package/src/services/activities.ts +0 -116
- package/src/services/assistant.ts +0 -67
- package/src/services/backups.ts +0 -754
- package/src/services/console.ts +0 -678
- package/src/services/databases.ts +0 -6376
- package/src/services/domains.ts +0 -4064
- package/src/services/functions.ts +0 -2224
- package/src/services/graphql.ts +0 -124
- package/src/services/health.ts +0 -1296
- package/src/services/locale.ts +0 -198
- package/src/services/messaging.ts +0 -5194
- package/src/services/migrations.ts +0 -1207
- package/src/services/organizations.ts +0 -2742
- package/src/services/project.ts +0 -404
- package/src/services/projects.ts +0 -4431
- package/src/services/proxy.ts +0 -532
- package/src/services/realtime.ts +0 -537
- package/src/services/sites.ts +0 -2131
- package/src/services/storage.ts +0 -1196
- package/src/services/tables-db.ts +0 -6256
- package/src/services/teams.ts +0 -959
- package/src/services/tokens.ts +0 -315
- package/src/services/users.ts +0 -3324
- package/src/services/vcs.ts +0 -676
- package/src/services/webhooks.ts +0 -451
- package/tsconfig.json +0 -24
package/src/services/projects.ts
DELETED
|
@@ -1,4431 +0,0 @@
|
|
|
1
|
-
import { Service } from '../service';
|
|
2
|
-
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
|
-
import type { Models } from '../models';
|
|
4
|
-
|
|
5
|
-
import { Region } from '../enums/region';
|
|
6
|
-
import { Api } from '../enums/api';
|
|
7
|
-
import { AuthMethod } from '../enums/auth-method';
|
|
8
|
-
import { Scopes } from '../enums/scopes';
|
|
9
|
-
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
10
|
-
import { PlatformType } from '../enums/platform-type';
|
|
11
|
-
import { ResourceType } from '../enums/resource-type';
|
|
12
|
-
import { ApiService } from '../enums/api-service';
|
|
13
|
-
import { SMTPSecure } from '../enums/smtp-secure';
|
|
14
|
-
import { Status } from '../enums/status';
|
|
15
|
-
import { EmailTemplateType } from '../enums/email-template-type';
|
|
16
|
-
import { EmailTemplateLocale } from '../enums/email-template-locale';
|
|
17
|
-
import { SmsTemplateType } from '../enums/sms-template-type';
|
|
18
|
-
import { SmsTemplateLocale } from '../enums/sms-template-locale';
|
|
19
|
-
|
|
20
|
-
export class Projects {
|
|
21
|
-
client: Client;
|
|
22
|
-
|
|
23
|
-
constructor(client: Client) {
|
|
24
|
-
this.client = client;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Get a list of all projects. You can use the query params to filter your results.
|
|
29
|
-
*
|
|
30
|
-
* @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, teamId, labels, search
|
|
31
|
-
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
32
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
33
|
-
* @throws {AppwriteException}
|
|
34
|
-
* @returns {Promise<Models.ProjectList>}
|
|
35
|
-
*/
|
|
36
|
-
list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.ProjectList>;
|
|
37
|
-
/**
|
|
38
|
-
* Get a list of all projects. You can use the query params to filter your results.
|
|
39
|
-
*
|
|
40
|
-
* @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, teamId, labels, search
|
|
41
|
-
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
42
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
43
|
-
* @throws {AppwriteException}
|
|
44
|
-
* @returns {Promise<Models.ProjectList>}
|
|
45
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
46
|
-
*/
|
|
47
|
-
list(queries?: string[], search?: string, total?: boolean): Promise<Models.ProjectList>;
|
|
48
|
-
list(
|
|
49
|
-
paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],
|
|
50
|
-
...rest: [(string)?, (boolean)?]
|
|
51
|
-
): Promise<Models.ProjectList> {
|
|
52
|
-
let params: { queries?: string[], search?: string, total?: boolean };
|
|
53
|
-
|
|
54
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
55
|
-
params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };
|
|
56
|
-
} else {
|
|
57
|
-
params = {
|
|
58
|
-
queries: paramsOrFirst as string[],
|
|
59
|
-
search: rest[0] as string,
|
|
60
|
-
total: rest[1] as boolean
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const queries = params.queries;
|
|
65
|
-
const search = params.search;
|
|
66
|
-
const total = params.total;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const apiPath = '/projects';
|
|
70
|
-
const payload: Payload = {};
|
|
71
|
-
if (typeof queries !== 'undefined') {
|
|
72
|
-
payload['queries'] = queries;
|
|
73
|
-
}
|
|
74
|
-
if (typeof search !== 'undefined') {
|
|
75
|
-
payload['search'] = search;
|
|
76
|
-
}
|
|
77
|
-
if (typeof total !== 'undefined') {
|
|
78
|
-
payload['total'] = total;
|
|
79
|
-
}
|
|
80
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
81
|
-
|
|
82
|
-
const apiHeaders: { [header: string]: string } = {
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return this.client.call(
|
|
86
|
-
'get',
|
|
87
|
-
uri,
|
|
88
|
-
apiHeaders,
|
|
89
|
-
payload
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Create a new project. You can create a maximum of 100 projects per account.
|
|
95
|
-
*
|
|
96
|
-
* @param {string} params.projectId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
|
|
97
|
-
* @param {string} params.name - Project name. Max length: 128 chars.
|
|
98
|
-
* @param {string} params.teamId - Team unique ID.
|
|
99
|
-
* @param {Region} params.region - Project Region.
|
|
100
|
-
* @param {string} params.description - Project description. Max length: 256 chars.
|
|
101
|
-
* @param {string} params.logo - Project logo.
|
|
102
|
-
* @param {string} params.url - Project URL.
|
|
103
|
-
* @param {string} params.legalName - Project legal Name. Max length: 256 chars.
|
|
104
|
-
* @param {string} params.legalCountry - Project legal Country. Max length: 256 chars.
|
|
105
|
-
* @param {string} params.legalState - Project legal State. Max length: 256 chars.
|
|
106
|
-
* @param {string} params.legalCity - Project legal City. Max length: 256 chars.
|
|
107
|
-
* @param {string} params.legalAddress - Project legal Address. Max length: 256 chars.
|
|
108
|
-
* @param {string} params.legalTaxId - Project legal Tax ID. Max length: 256 chars.
|
|
109
|
-
* @throws {AppwriteException}
|
|
110
|
-
* @returns {Promise<Models.Project>}
|
|
111
|
-
*/
|
|
112
|
-
create(params: { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string }): Promise<Models.Project>;
|
|
113
|
-
/**
|
|
114
|
-
* Create a new project. You can create a maximum of 100 projects per account.
|
|
115
|
-
*
|
|
116
|
-
* @param {string} projectId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
|
|
117
|
-
* @param {string} name - Project name. Max length: 128 chars.
|
|
118
|
-
* @param {string} teamId - Team unique ID.
|
|
119
|
-
* @param {Region} region - Project Region.
|
|
120
|
-
* @param {string} description - Project description. Max length: 256 chars.
|
|
121
|
-
* @param {string} logo - Project logo.
|
|
122
|
-
* @param {string} url - Project URL.
|
|
123
|
-
* @param {string} legalName - Project legal Name. Max length: 256 chars.
|
|
124
|
-
* @param {string} legalCountry - Project legal Country. Max length: 256 chars.
|
|
125
|
-
* @param {string} legalState - Project legal State. Max length: 256 chars.
|
|
126
|
-
* @param {string} legalCity - Project legal City. Max length: 256 chars.
|
|
127
|
-
* @param {string} legalAddress - Project legal Address. Max length: 256 chars.
|
|
128
|
-
* @param {string} legalTaxId - Project legal Tax ID. Max length: 256 chars.
|
|
129
|
-
* @throws {AppwriteException}
|
|
130
|
-
* @returns {Promise<Models.Project>}
|
|
131
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
132
|
-
*/
|
|
133
|
-
create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project>;
|
|
134
|
-
create(
|
|
135
|
-
paramsOrFirst: { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string } | string,
|
|
136
|
-
...rest: [(string)?, (string)?, (Region)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?]
|
|
137
|
-
): Promise<Models.Project> {
|
|
138
|
-
let params: { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
|
|
139
|
-
|
|
140
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
141
|
-
params = (paramsOrFirst || {}) as { projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
|
|
142
|
-
} else {
|
|
143
|
-
params = {
|
|
144
|
-
projectId: paramsOrFirst as string,
|
|
145
|
-
name: rest[0] as string,
|
|
146
|
-
teamId: rest[1] as string,
|
|
147
|
-
region: rest[2] as Region,
|
|
148
|
-
description: rest[3] as string,
|
|
149
|
-
logo: rest[4] as string,
|
|
150
|
-
url: rest[5] as string,
|
|
151
|
-
legalName: rest[6] as string,
|
|
152
|
-
legalCountry: rest[7] as string,
|
|
153
|
-
legalState: rest[8] as string,
|
|
154
|
-
legalCity: rest[9] as string,
|
|
155
|
-
legalAddress: rest[10] as string,
|
|
156
|
-
legalTaxId: rest[11] as string
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const projectId = params.projectId;
|
|
161
|
-
const name = params.name;
|
|
162
|
-
const teamId = params.teamId;
|
|
163
|
-
const region = params.region;
|
|
164
|
-
const description = params.description;
|
|
165
|
-
const logo = params.logo;
|
|
166
|
-
const url = params.url;
|
|
167
|
-
const legalName = params.legalName;
|
|
168
|
-
const legalCountry = params.legalCountry;
|
|
169
|
-
const legalState = params.legalState;
|
|
170
|
-
const legalCity = params.legalCity;
|
|
171
|
-
const legalAddress = params.legalAddress;
|
|
172
|
-
const legalTaxId = params.legalTaxId;
|
|
173
|
-
|
|
174
|
-
if (typeof projectId === 'undefined') {
|
|
175
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
176
|
-
}
|
|
177
|
-
if (typeof name === 'undefined') {
|
|
178
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
179
|
-
}
|
|
180
|
-
if (typeof teamId === 'undefined') {
|
|
181
|
-
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const apiPath = '/projects';
|
|
185
|
-
const payload: Payload = {};
|
|
186
|
-
if (typeof projectId !== 'undefined') {
|
|
187
|
-
payload['projectId'] = projectId;
|
|
188
|
-
}
|
|
189
|
-
if (typeof name !== 'undefined') {
|
|
190
|
-
payload['name'] = name;
|
|
191
|
-
}
|
|
192
|
-
if (typeof teamId !== 'undefined') {
|
|
193
|
-
payload['teamId'] = teamId;
|
|
194
|
-
}
|
|
195
|
-
if (typeof region !== 'undefined') {
|
|
196
|
-
payload['region'] = region;
|
|
197
|
-
}
|
|
198
|
-
if (typeof description !== 'undefined') {
|
|
199
|
-
payload['description'] = description;
|
|
200
|
-
}
|
|
201
|
-
if (typeof logo !== 'undefined') {
|
|
202
|
-
payload['logo'] = logo;
|
|
203
|
-
}
|
|
204
|
-
if (typeof url !== 'undefined') {
|
|
205
|
-
payload['url'] = url;
|
|
206
|
-
}
|
|
207
|
-
if (typeof legalName !== 'undefined') {
|
|
208
|
-
payload['legalName'] = legalName;
|
|
209
|
-
}
|
|
210
|
-
if (typeof legalCountry !== 'undefined') {
|
|
211
|
-
payload['legalCountry'] = legalCountry;
|
|
212
|
-
}
|
|
213
|
-
if (typeof legalState !== 'undefined') {
|
|
214
|
-
payload['legalState'] = legalState;
|
|
215
|
-
}
|
|
216
|
-
if (typeof legalCity !== 'undefined') {
|
|
217
|
-
payload['legalCity'] = legalCity;
|
|
218
|
-
}
|
|
219
|
-
if (typeof legalAddress !== 'undefined') {
|
|
220
|
-
payload['legalAddress'] = legalAddress;
|
|
221
|
-
}
|
|
222
|
-
if (typeof legalTaxId !== 'undefined') {
|
|
223
|
-
payload['legalTaxId'] = legalTaxId;
|
|
224
|
-
}
|
|
225
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
226
|
-
|
|
227
|
-
const apiHeaders: { [header: string]: string } = {
|
|
228
|
-
'content-type': 'application/json',
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return this.client.call(
|
|
232
|
-
'post',
|
|
233
|
-
uri,
|
|
234
|
-
apiHeaders,
|
|
235
|
-
payload
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata.
|
|
241
|
-
*
|
|
242
|
-
* @param {string} params.projectId - Project unique ID.
|
|
243
|
-
* @throws {AppwriteException}
|
|
244
|
-
* @returns {Promise<Models.Project>}
|
|
245
|
-
*/
|
|
246
|
-
get(params: { projectId: string }): Promise<Models.Project>;
|
|
247
|
-
/**
|
|
248
|
-
* Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata.
|
|
249
|
-
*
|
|
250
|
-
* @param {string} projectId - Project unique ID.
|
|
251
|
-
* @throws {AppwriteException}
|
|
252
|
-
* @returns {Promise<Models.Project>}
|
|
253
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
254
|
-
*/
|
|
255
|
-
get(projectId: string): Promise<Models.Project>;
|
|
256
|
-
get(
|
|
257
|
-
paramsOrFirst: { projectId: string } | string
|
|
258
|
-
): Promise<Models.Project> {
|
|
259
|
-
let params: { projectId: string };
|
|
260
|
-
|
|
261
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
262
|
-
params = (paramsOrFirst || {}) as { projectId: string };
|
|
263
|
-
} else {
|
|
264
|
-
params = {
|
|
265
|
-
projectId: paramsOrFirst as string
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const projectId = params.projectId;
|
|
270
|
-
|
|
271
|
-
if (typeof projectId === 'undefined') {
|
|
272
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
276
|
-
const payload: Payload = {};
|
|
277
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
278
|
-
|
|
279
|
-
const apiHeaders: { [header: string]: string } = {
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
return this.client.call(
|
|
283
|
-
'get',
|
|
284
|
-
uri,
|
|
285
|
-
apiHeaders,
|
|
286
|
-
payload
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Update a project by its unique ID.
|
|
292
|
-
*
|
|
293
|
-
* @param {string} params.projectId - Project unique ID.
|
|
294
|
-
* @param {string} params.name - Project name. Max length: 128 chars.
|
|
295
|
-
* @param {string} params.description - Project description. Max length: 256 chars.
|
|
296
|
-
* @param {string} params.logo - Project logo.
|
|
297
|
-
* @param {string} params.url - Project URL.
|
|
298
|
-
* @param {string} params.legalName - Project legal name. Max length: 256 chars.
|
|
299
|
-
* @param {string} params.legalCountry - Project legal country. Max length: 256 chars.
|
|
300
|
-
* @param {string} params.legalState - Project legal state. Max length: 256 chars.
|
|
301
|
-
* @param {string} params.legalCity - Project legal city. Max length: 256 chars.
|
|
302
|
-
* @param {string} params.legalAddress - Project legal address. Max length: 256 chars.
|
|
303
|
-
* @param {string} params.legalTaxId - Project legal tax ID. Max length: 256 chars.
|
|
304
|
-
* @throws {AppwriteException}
|
|
305
|
-
* @returns {Promise<Models.Project>}
|
|
306
|
-
*/
|
|
307
|
-
update(params: { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string }): Promise<Models.Project>;
|
|
308
|
-
/**
|
|
309
|
-
* Update a project by its unique ID.
|
|
310
|
-
*
|
|
311
|
-
* @param {string} projectId - Project unique ID.
|
|
312
|
-
* @param {string} name - Project name. Max length: 128 chars.
|
|
313
|
-
* @param {string} description - Project description. Max length: 256 chars.
|
|
314
|
-
* @param {string} logo - Project logo.
|
|
315
|
-
* @param {string} url - Project URL.
|
|
316
|
-
* @param {string} legalName - Project legal name. Max length: 256 chars.
|
|
317
|
-
* @param {string} legalCountry - Project legal country. Max length: 256 chars.
|
|
318
|
-
* @param {string} legalState - Project legal state. Max length: 256 chars.
|
|
319
|
-
* @param {string} legalCity - Project legal city. Max length: 256 chars.
|
|
320
|
-
* @param {string} legalAddress - Project legal address. Max length: 256 chars.
|
|
321
|
-
* @param {string} legalTaxId - Project legal tax ID. Max length: 256 chars.
|
|
322
|
-
* @throws {AppwriteException}
|
|
323
|
-
* @returns {Promise<Models.Project>}
|
|
324
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
325
|
-
*/
|
|
326
|
-
update(projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project>;
|
|
327
|
-
update(
|
|
328
|
-
paramsOrFirst: { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string } | string,
|
|
329
|
-
...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?]
|
|
330
|
-
): Promise<Models.Project> {
|
|
331
|
-
let params: { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
|
|
332
|
-
|
|
333
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
334
|
-
params = (paramsOrFirst || {}) as { projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string };
|
|
335
|
-
} else {
|
|
336
|
-
params = {
|
|
337
|
-
projectId: paramsOrFirst as string,
|
|
338
|
-
name: rest[0] as string,
|
|
339
|
-
description: rest[1] as string,
|
|
340
|
-
logo: rest[2] as string,
|
|
341
|
-
url: rest[3] as string,
|
|
342
|
-
legalName: rest[4] as string,
|
|
343
|
-
legalCountry: rest[5] as string,
|
|
344
|
-
legalState: rest[6] as string,
|
|
345
|
-
legalCity: rest[7] as string,
|
|
346
|
-
legalAddress: rest[8] as string,
|
|
347
|
-
legalTaxId: rest[9] as string
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
const projectId = params.projectId;
|
|
352
|
-
const name = params.name;
|
|
353
|
-
const description = params.description;
|
|
354
|
-
const logo = params.logo;
|
|
355
|
-
const url = params.url;
|
|
356
|
-
const legalName = params.legalName;
|
|
357
|
-
const legalCountry = params.legalCountry;
|
|
358
|
-
const legalState = params.legalState;
|
|
359
|
-
const legalCity = params.legalCity;
|
|
360
|
-
const legalAddress = params.legalAddress;
|
|
361
|
-
const legalTaxId = params.legalTaxId;
|
|
362
|
-
|
|
363
|
-
if (typeof projectId === 'undefined') {
|
|
364
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
365
|
-
}
|
|
366
|
-
if (typeof name === 'undefined') {
|
|
367
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
371
|
-
const payload: Payload = {};
|
|
372
|
-
if (typeof name !== 'undefined') {
|
|
373
|
-
payload['name'] = name;
|
|
374
|
-
}
|
|
375
|
-
if (typeof description !== 'undefined') {
|
|
376
|
-
payload['description'] = description;
|
|
377
|
-
}
|
|
378
|
-
if (typeof logo !== 'undefined') {
|
|
379
|
-
payload['logo'] = logo;
|
|
380
|
-
}
|
|
381
|
-
if (typeof url !== 'undefined') {
|
|
382
|
-
payload['url'] = url;
|
|
383
|
-
}
|
|
384
|
-
if (typeof legalName !== 'undefined') {
|
|
385
|
-
payload['legalName'] = legalName;
|
|
386
|
-
}
|
|
387
|
-
if (typeof legalCountry !== 'undefined') {
|
|
388
|
-
payload['legalCountry'] = legalCountry;
|
|
389
|
-
}
|
|
390
|
-
if (typeof legalState !== 'undefined') {
|
|
391
|
-
payload['legalState'] = legalState;
|
|
392
|
-
}
|
|
393
|
-
if (typeof legalCity !== 'undefined') {
|
|
394
|
-
payload['legalCity'] = legalCity;
|
|
395
|
-
}
|
|
396
|
-
if (typeof legalAddress !== 'undefined') {
|
|
397
|
-
payload['legalAddress'] = legalAddress;
|
|
398
|
-
}
|
|
399
|
-
if (typeof legalTaxId !== 'undefined') {
|
|
400
|
-
payload['legalTaxId'] = legalTaxId;
|
|
401
|
-
}
|
|
402
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
403
|
-
|
|
404
|
-
const apiHeaders: { [header: string]: string } = {
|
|
405
|
-
'content-type': 'application/json',
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return this.client.call(
|
|
409
|
-
'patch',
|
|
410
|
-
uri,
|
|
411
|
-
apiHeaders,
|
|
412
|
-
payload
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Delete a project by its unique ID.
|
|
418
|
-
*
|
|
419
|
-
* @param {string} params.projectId - Project unique ID.
|
|
420
|
-
* @throws {AppwriteException}
|
|
421
|
-
* @returns {Promise<{}>}
|
|
422
|
-
*/
|
|
423
|
-
delete(params: { projectId: string }): Promise<{}>;
|
|
424
|
-
/**
|
|
425
|
-
* Delete a project by its unique ID.
|
|
426
|
-
*
|
|
427
|
-
* @param {string} projectId - Project unique ID.
|
|
428
|
-
* @throws {AppwriteException}
|
|
429
|
-
* @returns {Promise<{}>}
|
|
430
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
431
|
-
*/
|
|
432
|
-
delete(projectId: string): Promise<{}>;
|
|
433
|
-
delete(
|
|
434
|
-
paramsOrFirst: { projectId: string } | string
|
|
435
|
-
): Promise<{}> {
|
|
436
|
-
let params: { projectId: string };
|
|
437
|
-
|
|
438
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
439
|
-
params = (paramsOrFirst || {}) as { projectId: string };
|
|
440
|
-
} else {
|
|
441
|
-
params = {
|
|
442
|
-
projectId: paramsOrFirst as string
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
const projectId = params.projectId;
|
|
447
|
-
|
|
448
|
-
if (typeof projectId === 'undefined') {
|
|
449
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
453
|
-
const payload: Payload = {};
|
|
454
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
455
|
-
|
|
456
|
-
const apiHeaders: { [header: string]: string } = {
|
|
457
|
-
'content-type': 'application/json',
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
return this.client.call(
|
|
461
|
-
'delete',
|
|
462
|
-
uri,
|
|
463
|
-
apiHeaders,
|
|
464
|
-
payload
|
|
465
|
-
);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
|
|
470
|
-
*
|
|
471
|
-
* @param {string} params.projectId - Project unique ID.
|
|
472
|
-
* @param {Api} params.api - API name.
|
|
473
|
-
* @param {boolean} params.status - API status.
|
|
474
|
-
* @throws {AppwriteException}
|
|
475
|
-
* @returns {Promise<Models.Project>}
|
|
476
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateAPIStatus` instead.
|
|
477
|
-
*/
|
|
478
|
-
updateApiStatus(params: { projectId: string, api: Api, status: boolean }): Promise<Models.Project>;
|
|
479
|
-
/**
|
|
480
|
-
* Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
|
|
481
|
-
*
|
|
482
|
-
* @param {string} projectId - Project unique ID.
|
|
483
|
-
* @param {Api} api - API name.
|
|
484
|
-
* @param {boolean} status - API status.
|
|
485
|
-
* @throws {AppwriteException}
|
|
486
|
-
* @returns {Promise<Models.Project>}
|
|
487
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
488
|
-
*/
|
|
489
|
-
updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project>;
|
|
490
|
-
updateApiStatus(
|
|
491
|
-
paramsOrFirst: { projectId: string, api: Api, status: boolean } | string,
|
|
492
|
-
...rest: [(Api)?, (boolean)?]
|
|
493
|
-
): Promise<Models.Project> {
|
|
494
|
-
let params: { projectId: string, api: Api, status: boolean };
|
|
495
|
-
|
|
496
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
497
|
-
params = (paramsOrFirst || {}) as { projectId: string, api: Api, status: boolean };
|
|
498
|
-
} else {
|
|
499
|
-
params = {
|
|
500
|
-
projectId: paramsOrFirst as string,
|
|
501
|
-
api: rest[0] as Api,
|
|
502
|
-
status: rest[1] as boolean
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
const projectId = params.projectId;
|
|
507
|
-
const api = params.api;
|
|
508
|
-
const status = params.status;
|
|
509
|
-
|
|
510
|
-
if (typeof projectId === 'undefined') {
|
|
511
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
512
|
-
}
|
|
513
|
-
if (typeof api === 'undefined') {
|
|
514
|
-
throw new AppwriteException('Missing required parameter: "api"');
|
|
515
|
-
}
|
|
516
|
-
if (typeof status === 'undefined') {
|
|
517
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
|
|
521
|
-
const payload: Payload = {};
|
|
522
|
-
if (typeof api !== 'undefined') {
|
|
523
|
-
payload['api'] = api;
|
|
524
|
-
}
|
|
525
|
-
if (typeof status !== 'undefined') {
|
|
526
|
-
payload['status'] = status;
|
|
527
|
-
}
|
|
528
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
529
|
-
|
|
530
|
-
const apiHeaders: { [header: string]: string } = {
|
|
531
|
-
'content-type': 'application/json',
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
return this.client.call(
|
|
535
|
-
'patch',
|
|
536
|
-
uri,
|
|
537
|
-
apiHeaders,
|
|
538
|
-
payload
|
|
539
|
-
);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
|
|
544
|
-
*
|
|
545
|
-
* @param {string} params.projectId - Project unique ID.
|
|
546
|
-
* @param {Api} params.api - API name.
|
|
547
|
-
* @param {boolean} params.status - API status.
|
|
548
|
-
* @throws {AppwriteException}
|
|
549
|
-
* @returns {Promise<Models.Project>}
|
|
550
|
-
*/
|
|
551
|
-
updateAPIStatus(params: { projectId: string, api: Api, status: boolean }): Promise<Models.Project>;
|
|
552
|
-
/**
|
|
553
|
-
* Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
|
|
554
|
-
*
|
|
555
|
-
* @param {string} projectId - Project unique ID.
|
|
556
|
-
* @param {Api} api - API name.
|
|
557
|
-
* @param {boolean} status - API status.
|
|
558
|
-
* @throws {AppwriteException}
|
|
559
|
-
* @returns {Promise<Models.Project>}
|
|
560
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
561
|
-
*/
|
|
562
|
-
updateAPIStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project>;
|
|
563
|
-
updateAPIStatus(
|
|
564
|
-
paramsOrFirst: { projectId: string, api: Api, status: boolean } | string,
|
|
565
|
-
...rest: [(Api)?, (boolean)?]
|
|
566
|
-
): Promise<Models.Project> {
|
|
567
|
-
let params: { projectId: string, api: Api, status: boolean };
|
|
568
|
-
|
|
569
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
570
|
-
params = (paramsOrFirst || {}) as { projectId: string, api: Api, status: boolean };
|
|
571
|
-
} else {
|
|
572
|
-
params = {
|
|
573
|
-
projectId: paramsOrFirst as string,
|
|
574
|
-
api: rest[0] as Api,
|
|
575
|
-
status: rest[1] as boolean
|
|
576
|
-
};
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
const projectId = params.projectId;
|
|
580
|
-
const api = params.api;
|
|
581
|
-
const status = params.status;
|
|
582
|
-
|
|
583
|
-
if (typeof projectId === 'undefined') {
|
|
584
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
585
|
-
}
|
|
586
|
-
if (typeof api === 'undefined') {
|
|
587
|
-
throw new AppwriteException('Missing required parameter: "api"');
|
|
588
|
-
}
|
|
589
|
-
if (typeof status === 'undefined') {
|
|
590
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
|
|
594
|
-
const payload: Payload = {};
|
|
595
|
-
if (typeof api !== 'undefined') {
|
|
596
|
-
payload['api'] = api;
|
|
597
|
-
}
|
|
598
|
-
if (typeof status !== 'undefined') {
|
|
599
|
-
payload['status'] = status;
|
|
600
|
-
}
|
|
601
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
602
|
-
|
|
603
|
-
const apiHeaders: { [header: string]: string } = {
|
|
604
|
-
'content-type': 'application/json',
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
return this.client.call(
|
|
608
|
-
'patch',
|
|
609
|
-
uri,
|
|
610
|
-
apiHeaders,
|
|
611
|
-
payload
|
|
612
|
-
);
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
|
|
617
|
-
*
|
|
618
|
-
* @param {string} params.projectId - Project unique ID.
|
|
619
|
-
* @param {boolean} params.status - API status.
|
|
620
|
-
* @throws {AppwriteException}
|
|
621
|
-
* @returns {Promise<Models.Project>}
|
|
622
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateAPIStatusAll` instead.
|
|
623
|
-
*/
|
|
624
|
-
updateApiStatusAll(params: { projectId: string, status: boolean }): Promise<Models.Project>;
|
|
625
|
-
/**
|
|
626
|
-
* Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
|
|
627
|
-
*
|
|
628
|
-
* @param {string} projectId - Project unique ID.
|
|
629
|
-
* @param {boolean} status - API status.
|
|
630
|
-
* @throws {AppwriteException}
|
|
631
|
-
* @returns {Promise<Models.Project>}
|
|
632
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
633
|
-
*/
|
|
634
|
-
updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project>;
|
|
635
|
-
updateApiStatusAll(
|
|
636
|
-
paramsOrFirst: { projectId: string, status: boolean } | string,
|
|
637
|
-
...rest: [(boolean)?]
|
|
638
|
-
): Promise<Models.Project> {
|
|
639
|
-
let params: { projectId: string, status: boolean };
|
|
640
|
-
|
|
641
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
642
|
-
params = (paramsOrFirst || {}) as { projectId: string, status: boolean };
|
|
643
|
-
} else {
|
|
644
|
-
params = {
|
|
645
|
-
projectId: paramsOrFirst as string,
|
|
646
|
-
status: rest[0] as boolean
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
const projectId = params.projectId;
|
|
651
|
-
const status = params.status;
|
|
652
|
-
|
|
653
|
-
if (typeof projectId === 'undefined') {
|
|
654
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
655
|
-
}
|
|
656
|
-
if (typeof status === 'undefined') {
|
|
657
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
|
|
661
|
-
const payload: Payload = {};
|
|
662
|
-
if (typeof status !== 'undefined') {
|
|
663
|
-
payload['status'] = status;
|
|
664
|
-
}
|
|
665
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
666
|
-
|
|
667
|
-
const apiHeaders: { [header: string]: string } = {
|
|
668
|
-
'content-type': 'application/json',
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
return this.client.call(
|
|
672
|
-
'patch',
|
|
673
|
-
uri,
|
|
674
|
-
apiHeaders,
|
|
675
|
-
payload
|
|
676
|
-
);
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
|
|
681
|
-
*
|
|
682
|
-
* @param {string} params.projectId - Project unique ID.
|
|
683
|
-
* @param {boolean} params.status - API status.
|
|
684
|
-
* @throws {AppwriteException}
|
|
685
|
-
* @returns {Promise<Models.Project>}
|
|
686
|
-
*/
|
|
687
|
-
updateAPIStatusAll(params: { projectId: string, status: boolean }): Promise<Models.Project>;
|
|
688
|
-
/**
|
|
689
|
-
* Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
|
|
690
|
-
*
|
|
691
|
-
* @param {string} projectId - Project unique ID.
|
|
692
|
-
* @param {boolean} status - API status.
|
|
693
|
-
* @throws {AppwriteException}
|
|
694
|
-
* @returns {Promise<Models.Project>}
|
|
695
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
696
|
-
*/
|
|
697
|
-
updateAPIStatusAll(projectId: string, status: boolean): Promise<Models.Project>;
|
|
698
|
-
updateAPIStatusAll(
|
|
699
|
-
paramsOrFirst: { projectId: string, status: boolean } | string,
|
|
700
|
-
...rest: [(boolean)?]
|
|
701
|
-
): Promise<Models.Project> {
|
|
702
|
-
let params: { projectId: string, status: boolean };
|
|
703
|
-
|
|
704
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
705
|
-
params = (paramsOrFirst || {}) as { projectId: string, status: boolean };
|
|
706
|
-
} else {
|
|
707
|
-
params = {
|
|
708
|
-
projectId: paramsOrFirst as string,
|
|
709
|
-
status: rest[0] as boolean
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
const projectId = params.projectId;
|
|
714
|
-
const status = params.status;
|
|
715
|
-
|
|
716
|
-
if (typeof projectId === 'undefined') {
|
|
717
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
718
|
-
}
|
|
719
|
-
if (typeof status === 'undefined') {
|
|
720
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
|
|
724
|
-
const payload: Payload = {};
|
|
725
|
-
if (typeof status !== 'undefined') {
|
|
726
|
-
payload['status'] = status;
|
|
727
|
-
}
|
|
728
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
729
|
-
|
|
730
|
-
const apiHeaders: { [header: string]: string } = {
|
|
731
|
-
'content-type': 'application/json',
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
return this.client.call(
|
|
735
|
-
'patch',
|
|
736
|
-
uri,
|
|
737
|
-
apiHeaders,
|
|
738
|
-
payload
|
|
739
|
-
);
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
/**
|
|
743
|
-
* Update how long sessions created within a project should stay active for.
|
|
744
|
-
*
|
|
745
|
-
* @param {string} params.projectId - Project unique ID.
|
|
746
|
-
* @param {number} params.duration - Project session length in seconds. Max length: 31536000 seconds.
|
|
747
|
-
* @throws {AppwriteException}
|
|
748
|
-
* @returns {Promise<Models.Project>}
|
|
749
|
-
*/
|
|
750
|
-
updateAuthDuration(params: { projectId: string, duration: number }): Promise<Models.Project>;
|
|
751
|
-
/**
|
|
752
|
-
* Update how long sessions created within a project should stay active for.
|
|
753
|
-
*
|
|
754
|
-
* @param {string} projectId - Project unique ID.
|
|
755
|
-
* @param {number} duration - Project session length in seconds. Max length: 31536000 seconds.
|
|
756
|
-
* @throws {AppwriteException}
|
|
757
|
-
* @returns {Promise<Models.Project>}
|
|
758
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
759
|
-
*/
|
|
760
|
-
updateAuthDuration(projectId: string, duration: number): Promise<Models.Project>;
|
|
761
|
-
updateAuthDuration(
|
|
762
|
-
paramsOrFirst: { projectId: string, duration: number } | string,
|
|
763
|
-
...rest: [(number)?]
|
|
764
|
-
): Promise<Models.Project> {
|
|
765
|
-
let params: { projectId: string, duration: number };
|
|
766
|
-
|
|
767
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
768
|
-
params = (paramsOrFirst || {}) as { projectId: string, duration: number };
|
|
769
|
-
} else {
|
|
770
|
-
params = {
|
|
771
|
-
projectId: paramsOrFirst as string,
|
|
772
|
-
duration: rest[0] as number
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
const projectId = params.projectId;
|
|
777
|
-
const duration = params.duration;
|
|
778
|
-
|
|
779
|
-
if (typeof projectId === 'undefined') {
|
|
780
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
781
|
-
}
|
|
782
|
-
if (typeof duration === 'undefined') {
|
|
783
|
-
throw new AppwriteException('Missing required parameter: "duration"');
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
|
|
787
|
-
const payload: Payload = {};
|
|
788
|
-
if (typeof duration !== 'undefined') {
|
|
789
|
-
payload['duration'] = duration;
|
|
790
|
-
}
|
|
791
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
792
|
-
|
|
793
|
-
const apiHeaders: { [header: string]: string } = {
|
|
794
|
-
'content-type': 'application/json',
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
return this.client.call(
|
|
798
|
-
'patch',
|
|
799
|
-
uri,
|
|
800
|
-
apiHeaders,
|
|
801
|
-
payload
|
|
802
|
-
);
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
|
|
807
|
-
*
|
|
808
|
-
* @param {string} params.projectId - Project unique ID.
|
|
809
|
-
* @param {number} params.limit - Set the max number of users allowed in this project. Use 0 for unlimited.
|
|
810
|
-
* @throws {AppwriteException}
|
|
811
|
-
* @returns {Promise<Models.Project>}
|
|
812
|
-
*/
|
|
813
|
-
updateAuthLimit(params: { projectId: string, limit: number }): Promise<Models.Project>;
|
|
814
|
-
/**
|
|
815
|
-
* Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
|
|
816
|
-
*
|
|
817
|
-
* @param {string} projectId - Project unique ID.
|
|
818
|
-
* @param {number} limit - Set the max number of users allowed in this project. Use 0 for unlimited.
|
|
819
|
-
* @throws {AppwriteException}
|
|
820
|
-
* @returns {Promise<Models.Project>}
|
|
821
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
822
|
-
*/
|
|
823
|
-
updateAuthLimit(projectId: string, limit: number): Promise<Models.Project>;
|
|
824
|
-
updateAuthLimit(
|
|
825
|
-
paramsOrFirst: { projectId: string, limit: number } | string,
|
|
826
|
-
...rest: [(number)?]
|
|
827
|
-
): Promise<Models.Project> {
|
|
828
|
-
let params: { projectId: string, limit: number };
|
|
829
|
-
|
|
830
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
831
|
-
params = (paramsOrFirst || {}) as { projectId: string, limit: number };
|
|
832
|
-
} else {
|
|
833
|
-
params = {
|
|
834
|
-
projectId: paramsOrFirst as string,
|
|
835
|
-
limit: rest[0] as number
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
const projectId = params.projectId;
|
|
840
|
-
const limit = params.limit;
|
|
841
|
-
|
|
842
|
-
if (typeof projectId === 'undefined') {
|
|
843
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
844
|
-
}
|
|
845
|
-
if (typeof limit === 'undefined') {
|
|
846
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
|
|
850
|
-
const payload: Payload = {};
|
|
851
|
-
if (typeof limit !== 'undefined') {
|
|
852
|
-
payload['limit'] = limit;
|
|
853
|
-
}
|
|
854
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
855
|
-
|
|
856
|
-
const apiHeaders: { [header: string]: string } = {
|
|
857
|
-
'content-type': 'application/json',
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
return this.client.call(
|
|
861
|
-
'patch',
|
|
862
|
-
uri,
|
|
863
|
-
apiHeaders,
|
|
864
|
-
payload
|
|
865
|
-
);
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
/**
|
|
869
|
-
* Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
|
|
870
|
-
*
|
|
871
|
-
* @param {string} params.projectId - Project unique ID.
|
|
872
|
-
* @param {number} params.limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
|
|
873
|
-
* @throws {AppwriteException}
|
|
874
|
-
* @returns {Promise<Models.Project>}
|
|
875
|
-
*/
|
|
876
|
-
updateAuthSessionsLimit(params: { projectId: string, limit: number }): Promise<Models.Project>;
|
|
877
|
-
/**
|
|
878
|
-
* Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
|
|
879
|
-
*
|
|
880
|
-
* @param {string} projectId - Project unique ID.
|
|
881
|
-
* @param {number} limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
|
|
882
|
-
* @throws {AppwriteException}
|
|
883
|
-
* @returns {Promise<Models.Project>}
|
|
884
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
885
|
-
*/
|
|
886
|
-
updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project>;
|
|
887
|
-
updateAuthSessionsLimit(
|
|
888
|
-
paramsOrFirst: { projectId: string, limit: number } | string,
|
|
889
|
-
...rest: [(number)?]
|
|
890
|
-
): Promise<Models.Project> {
|
|
891
|
-
let params: { projectId: string, limit: number };
|
|
892
|
-
|
|
893
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
894
|
-
params = (paramsOrFirst || {}) as { projectId: string, limit: number };
|
|
895
|
-
} else {
|
|
896
|
-
params = {
|
|
897
|
-
projectId: paramsOrFirst as string,
|
|
898
|
-
limit: rest[0] as number
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
const projectId = params.projectId;
|
|
903
|
-
const limit = params.limit;
|
|
904
|
-
|
|
905
|
-
if (typeof projectId === 'undefined') {
|
|
906
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
907
|
-
}
|
|
908
|
-
if (typeof limit === 'undefined') {
|
|
909
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
|
|
913
|
-
const payload: Payload = {};
|
|
914
|
-
if (typeof limit !== 'undefined') {
|
|
915
|
-
payload['limit'] = limit;
|
|
916
|
-
}
|
|
917
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
918
|
-
|
|
919
|
-
const apiHeaders: { [header: string]: string } = {
|
|
920
|
-
'content-type': 'application/json',
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
return this.client.call(
|
|
924
|
-
'patch',
|
|
925
|
-
uri,
|
|
926
|
-
apiHeaders,
|
|
927
|
-
payload
|
|
928
|
-
);
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
/**
|
|
932
|
-
* Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status.
|
|
933
|
-
*
|
|
934
|
-
* @param {string} params.projectId - Project unique ID.
|
|
935
|
-
* @param {boolean} params.userName - Set to true to show userName to members of a team.
|
|
936
|
-
* @param {boolean} params.userEmail - Set to true to show email to members of a team.
|
|
937
|
-
* @param {boolean} params.mfa - Set to true to show mfa to members of a team.
|
|
938
|
-
* @throws {AppwriteException}
|
|
939
|
-
* @returns {Promise<Models.Project>}
|
|
940
|
-
*/
|
|
941
|
-
updateMembershipsPrivacy(params: { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean }): Promise<Models.Project>;
|
|
942
|
-
/**
|
|
943
|
-
* Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status.
|
|
944
|
-
*
|
|
945
|
-
* @param {string} projectId - Project unique ID.
|
|
946
|
-
* @param {boolean} userName - Set to true to show userName to members of a team.
|
|
947
|
-
* @param {boolean} userEmail - Set to true to show email to members of a team.
|
|
948
|
-
* @param {boolean} mfa - Set to true to show mfa to members of a team.
|
|
949
|
-
* @throws {AppwriteException}
|
|
950
|
-
* @returns {Promise<Models.Project>}
|
|
951
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
952
|
-
*/
|
|
953
|
-
updateMembershipsPrivacy(projectId: string, userName: boolean, userEmail: boolean, mfa: boolean): Promise<Models.Project>;
|
|
954
|
-
updateMembershipsPrivacy(
|
|
955
|
-
paramsOrFirst: { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean } | string,
|
|
956
|
-
...rest: [(boolean)?, (boolean)?, (boolean)?]
|
|
957
|
-
): Promise<Models.Project> {
|
|
958
|
-
let params: { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean };
|
|
959
|
-
|
|
960
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
961
|
-
params = (paramsOrFirst || {}) as { projectId: string, userName: boolean, userEmail: boolean, mfa: boolean };
|
|
962
|
-
} else {
|
|
963
|
-
params = {
|
|
964
|
-
projectId: paramsOrFirst as string,
|
|
965
|
-
userName: rest[0] as boolean,
|
|
966
|
-
userEmail: rest[1] as boolean,
|
|
967
|
-
mfa: rest[2] as boolean
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
const projectId = params.projectId;
|
|
972
|
-
const userName = params.userName;
|
|
973
|
-
const userEmail = params.userEmail;
|
|
974
|
-
const mfa = params.mfa;
|
|
975
|
-
|
|
976
|
-
if (typeof projectId === 'undefined') {
|
|
977
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
978
|
-
}
|
|
979
|
-
if (typeof userName === 'undefined') {
|
|
980
|
-
throw new AppwriteException('Missing required parameter: "userName"');
|
|
981
|
-
}
|
|
982
|
-
if (typeof userEmail === 'undefined') {
|
|
983
|
-
throw new AppwriteException('Missing required parameter: "userEmail"');
|
|
984
|
-
}
|
|
985
|
-
if (typeof mfa === 'undefined') {
|
|
986
|
-
throw new AppwriteException('Missing required parameter: "mfa"');
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
const apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
|
|
990
|
-
const payload: Payload = {};
|
|
991
|
-
if (typeof userName !== 'undefined') {
|
|
992
|
-
payload['userName'] = userName;
|
|
993
|
-
}
|
|
994
|
-
if (typeof userEmail !== 'undefined') {
|
|
995
|
-
payload['userEmail'] = userEmail;
|
|
996
|
-
}
|
|
997
|
-
if (typeof mfa !== 'undefined') {
|
|
998
|
-
payload['mfa'] = mfa;
|
|
999
|
-
}
|
|
1000
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1001
|
-
|
|
1002
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1003
|
-
'content-type': 'application/json',
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
return this.client.call(
|
|
1007
|
-
'patch',
|
|
1008
|
-
uri,
|
|
1009
|
-
apiHeaders,
|
|
1010
|
-
payload
|
|
1011
|
-
);
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development.
|
|
1016
|
-
*
|
|
1017
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1018
|
-
* @param {object[]} params.numbers - An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.
|
|
1019
|
-
* @throws {AppwriteException}
|
|
1020
|
-
* @returns {Promise<Models.Project>}
|
|
1021
|
-
*/
|
|
1022
|
-
updateMockNumbers(params: { projectId: string, numbers: object[] }): Promise<Models.Project>;
|
|
1023
|
-
/**
|
|
1024
|
-
* Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development.
|
|
1025
|
-
*
|
|
1026
|
-
* @param {string} projectId - Project unique ID.
|
|
1027
|
-
* @param {object[]} numbers - An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.
|
|
1028
|
-
* @throws {AppwriteException}
|
|
1029
|
-
* @returns {Promise<Models.Project>}
|
|
1030
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1031
|
-
*/
|
|
1032
|
-
updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project>;
|
|
1033
|
-
updateMockNumbers(
|
|
1034
|
-
paramsOrFirst: { projectId: string, numbers: object[] } | string,
|
|
1035
|
-
...rest: [(object[])?]
|
|
1036
|
-
): Promise<Models.Project> {
|
|
1037
|
-
let params: { projectId: string, numbers: object[] };
|
|
1038
|
-
|
|
1039
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1040
|
-
params = (paramsOrFirst || {}) as { projectId: string, numbers: object[] };
|
|
1041
|
-
} else {
|
|
1042
|
-
params = {
|
|
1043
|
-
projectId: paramsOrFirst as string,
|
|
1044
|
-
numbers: rest[0] as object[]
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
const projectId = params.projectId;
|
|
1049
|
-
const numbers = params.numbers;
|
|
1050
|
-
|
|
1051
|
-
if (typeof projectId === 'undefined') {
|
|
1052
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1053
|
-
}
|
|
1054
|
-
if (typeof numbers === 'undefined') {
|
|
1055
|
-
throw new AppwriteException('Missing required parameter: "numbers"');
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
|
|
1059
|
-
const payload: Payload = {};
|
|
1060
|
-
if (typeof numbers !== 'undefined') {
|
|
1061
|
-
payload['numbers'] = numbers;
|
|
1062
|
-
}
|
|
1063
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1064
|
-
|
|
1065
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1066
|
-
'content-type': 'application/json',
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
return this.client.call(
|
|
1070
|
-
'patch',
|
|
1071
|
-
uri,
|
|
1072
|
-
apiHeaders,
|
|
1073
|
-
payload
|
|
1074
|
-
);
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords.
|
|
1079
|
-
*
|
|
1080
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1081
|
-
* @param {boolean} params.enabled - Set whether or not to enable checking user's password against most commonly used passwords. Default is false.
|
|
1082
|
-
* @throws {AppwriteException}
|
|
1083
|
-
* @returns {Promise<Models.Project>}
|
|
1084
|
-
*/
|
|
1085
|
-
updateAuthPasswordDictionary(params: { projectId: string, enabled: boolean }): Promise<Models.Project>;
|
|
1086
|
-
/**
|
|
1087
|
-
* Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords.
|
|
1088
|
-
*
|
|
1089
|
-
* @param {string} projectId - Project unique ID.
|
|
1090
|
-
* @param {boolean} enabled - Set whether or not to enable checking user's password against most commonly used passwords. Default is false.
|
|
1091
|
-
* @throws {AppwriteException}
|
|
1092
|
-
* @returns {Promise<Models.Project>}
|
|
1093
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1094
|
-
*/
|
|
1095
|
-
updateAuthPasswordDictionary(projectId: string, enabled: boolean): Promise<Models.Project>;
|
|
1096
|
-
updateAuthPasswordDictionary(
|
|
1097
|
-
paramsOrFirst: { projectId: string, enabled: boolean } | string,
|
|
1098
|
-
...rest: [(boolean)?]
|
|
1099
|
-
): Promise<Models.Project> {
|
|
1100
|
-
let params: { projectId: string, enabled: boolean };
|
|
1101
|
-
|
|
1102
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1103
|
-
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean };
|
|
1104
|
-
} else {
|
|
1105
|
-
params = {
|
|
1106
|
-
projectId: paramsOrFirst as string,
|
|
1107
|
-
enabled: rest[0] as boolean
|
|
1108
|
-
};
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
const projectId = params.projectId;
|
|
1112
|
-
const enabled = params.enabled;
|
|
1113
|
-
|
|
1114
|
-
if (typeof projectId === 'undefined') {
|
|
1115
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1116
|
-
}
|
|
1117
|
-
if (typeof enabled === 'undefined') {
|
|
1118
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
|
|
1122
|
-
const payload: Payload = {};
|
|
1123
|
-
if (typeof enabled !== 'undefined') {
|
|
1124
|
-
payload['enabled'] = enabled;
|
|
1125
|
-
}
|
|
1126
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1127
|
-
|
|
1128
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1129
|
-
'content-type': 'application/json',
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
return this.client.call(
|
|
1133
|
-
'patch',
|
|
1134
|
-
uri,
|
|
1135
|
-
apiHeaders,
|
|
1136
|
-
payload
|
|
1137
|
-
);
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
/**
|
|
1141
|
-
* Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
|
|
1142
|
-
*
|
|
1143
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1144
|
-
* @param {number} params.limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
|
|
1145
|
-
* @throws {AppwriteException}
|
|
1146
|
-
* @returns {Promise<Models.Project>}
|
|
1147
|
-
*/
|
|
1148
|
-
updateAuthPasswordHistory(params: { projectId: string, limit: number }): Promise<Models.Project>;
|
|
1149
|
-
/**
|
|
1150
|
-
* Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
|
|
1151
|
-
*
|
|
1152
|
-
* @param {string} projectId - Project unique ID.
|
|
1153
|
-
* @param {number} limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
|
|
1154
|
-
* @throws {AppwriteException}
|
|
1155
|
-
* @returns {Promise<Models.Project>}
|
|
1156
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1157
|
-
*/
|
|
1158
|
-
updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project>;
|
|
1159
|
-
updateAuthPasswordHistory(
|
|
1160
|
-
paramsOrFirst: { projectId: string, limit: number } | string,
|
|
1161
|
-
...rest: [(number)?]
|
|
1162
|
-
): Promise<Models.Project> {
|
|
1163
|
-
let params: { projectId: string, limit: number };
|
|
1164
|
-
|
|
1165
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1166
|
-
params = (paramsOrFirst || {}) as { projectId: string, limit: number };
|
|
1167
|
-
} else {
|
|
1168
|
-
params = {
|
|
1169
|
-
projectId: paramsOrFirst as string,
|
|
1170
|
-
limit: rest[0] as number
|
|
1171
|
-
};
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
const projectId = params.projectId;
|
|
1175
|
-
const limit = params.limit;
|
|
1176
|
-
|
|
1177
|
-
if (typeof projectId === 'undefined') {
|
|
1178
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1179
|
-
}
|
|
1180
|
-
if (typeof limit === 'undefined') {
|
|
1181
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
|
|
1185
|
-
const payload: Payload = {};
|
|
1186
|
-
if (typeof limit !== 'undefined') {
|
|
1187
|
-
payload['limit'] = limit;
|
|
1188
|
-
}
|
|
1189
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1190
|
-
|
|
1191
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1192
|
-
'content-type': 'application/json',
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
return this.client.call(
|
|
1196
|
-
'patch',
|
|
1197
|
-
uri,
|
|
1198
|
-
apiHeaders,
|
|
1199
|
-
payload
|
|
1200
|
-
);
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
|
|
1205
|
-
*
|
|
1206
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1207
|
-
* @param {boolean} params.enabled - Set whether or not to check a password for similarity with personal data. Default is false.
|
|
1208
|
-
* @throws {AppwriteException}
|
|
1209
|
-
* @returns {Promise<Models.Project>}
|
|
1210
|
-
*/
|
|
1211
|
-
updatePersonalDataCheck(params: { projectId: string, enabled: boolean }): Promise<Models.Project>;
|
|
1212
|
-
/**
|
|
1213
|
-
* Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
|
|
1214
|
-
*
|
|
1215
|
-
* @param {string} projectId - Project unique ID.
|
|
1216
|
-
* @param {boolean} enabled - Set whether or not to check a password for similarity with personal data. Default is false.
|
|
1217
|
-
* @throws {AppwriteException}
|
|
1218
|
-
* @returns {Promise<Models.Project>}
|
|
1219
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1220
|
-
*/
|
|
1221
|
-
updatePersonalDataCheck(projectId: string, enabled: boolean): Promise<Models.Project>;
|
|
1222
|
-
updatePersonalDataCheck(
|
|
1223
|
-
paramsOrFirst: { projectId: string, enabled: boolean } | string,
|
|
1224
|
-
...rest: [(boolean)?]
|
|
1225
|
-
): Promise<Models.Project> {
|
|
1226
|
-
let params: { projectId: string, enabled: boolean };
|
|
1227
|
-
|
|
1228
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1229
|
-
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean };
|
|
1230
|
-
} else {
|
|
1231
|
-
params = {
|
|
1232
|
-
projectId: paramsOrFirst as string,
|
|
1233
|
-
enabled: rest[0] as boolean
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
const projectId = params.projectId;
|
|
1238
|
-
const enabled = params.enabled;
|
|
1239
|
-
|
|
1240
|
-
if (typeof projectId === 'undefined') {
|
|
1241
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1242
|
-
}
|
|
1243
|
-
if (typeof enabled === 'undefined') {
|
|
1244
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
|
|
1248
|
-
const payload: Payload = {};
|
|
1249
|
-
if (typeof enabled !== 'undefined') {
|
|
1250
|
-
payload['enabled'] = enabled;
|
|
1251
|
-
}
|
|
1252
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1253
|
-
|
|
1254
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1255
|
-
'content-type': 'application/json',
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
return this.client.call(
|
|
1259
|
-
'patch',
|
|
1260
|
-
uri,
|
|
1261
|
-
apiHeaders,
|
|
1262
|
-
payload
|
|
1263
|
-
);
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
|
|
1268
|
-
*
|
|
1269
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1270
|
-
* @param {boolean} params.alerts - Set to true to enable session emails.
|
|
1271
|
-
* @throws {AppwriteException}
|
|
1272
|
-
* @returns {Promise<Models.Project>}
|
|
1273
|
-
*/
|
|
1274
|
-
updateSessionAlerts(params: { projectId: string, alerts: boolean }): Promise<Models.Project>;
|
|
1275
|
-
/**
|
|
1276
|
-
* Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
|
|
1277
|
-
*
|
|
1278
|
-
* @param {string} projectId - Project unique ID.
|
|
1279
|
-
* @param {boolean} alerts - Set to true to enable session emails.
|
|
1280
|
-
* @throws {AppwriteException}
|
|
1281
|
-
* @returns {Promise<Models.Project>}
|
|
1282
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1283
|
-
*/
|
|
1284
|
-
updateSessionAlerts(projectId: string, alerts: boolean): Promise<Models.Project>;
|
|
1285
|
-
updateSessionAlerts(
|
|
1286
|
-
paramsOrFirst: { projectId: string, alerts: boolean } | string,
|
|
1287
|
-
...rest: [(boolean)?]
|
|
1288
|
-
): Promise<Models.Project> {
|
|
1289
|
-
let params: { projectId: string, alerts: boolean };
|
|
1290
|
-
|
|
1291
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1292
|
-
params = (paramsOrFirst || {}) as { projectId: string, alerts: boolean };
|
|
1293
|
-
} else {
|
|
1294
|
-
params = {
|
|
1295
|
-
projectId: paramsOrFirst as string,
|
|
1296
|
-
alerts: rest[0] as boolean
|
|
1297
|
-
};
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
const projectId = params.projectId;
|
|
1301
|
-
const alerts = params.alerts;
|
|
1302
|
-
|
|
1303
|
-
if (typeof projectId === 'undefined') {
|
|
1304
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1305
|
-
}
|
|
1306
|
-
if (typeof alerts === 'undefined') {
|
|
1307
|
-
throw new AppwriteException('Missing required parameter: "alerts"');
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
|
|
1311
|
-
const payload: Payload = {};
|
|
1312
|
-
if (typeof alerts !== 'undefined') {
|
|
1313
|
-
payload['alerts'] = alerts;
|
|
1314
|
-
}
|
|
1315
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1316
|
-
|
|
1317
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1318
|
-
'content-type': 'application/json',
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
return this.client.call(
|
|
1322
|
-
'patch',
|
|
1323
|
-
uri,
|
|
1324
|
-
apiHeaders,
|
|
1325
|
-
payload
|
|
1326
|
-
);
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
/**
|
|
1330
|
-
* Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.
|
|
1331
|
-
*
|
|
1332
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1333
|
-
* @param {boolean} params.enabled - Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change
|
|
1334
|
-
* @throws {AppwriteException}
|
|
1335
|
-
* @returns {Promise<Models.Project>}
|
|
1336
|
-
*/
|
|
1337
|
-
updateSessionInvalidation(params: { projectId: string, enabled: boolean }): Promise<Models.Project>;
|
|
1338
|
-
/**
|
|
1339
|
-
* Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.
|
|
1340
|
-
*
|
|
1341
|
-
* @param {string} projectId - Project unique ID.
|
|
1342
|
-
* @param {boolean} enabled - Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change
|
|
1343
|
-
* @throws {AppwriteException}
|
|
1344
|
-
* @returns {Promise<Models.Project>}
|
|
1345
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1346
|
-
*/
|
|
1347
|
-
updateSessionInvalidation(projectId: string, enabled: boolean): Promise<Models.Project>;
|
|
1348
|
-
updateSessionInvalidation(
|
|
1349
|
-
paramsOrFirst: { projectId: string, enabled: boolean } | string,
|
|
1350
|
-
...rest: [(boolean)?]
|
|
1351
|
-
): Promise<Models.Project> {
|
|
1352
|
-
let params: { projectId: string, enabled: boolean };
|
|
1353
|
-
|
|
1354
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1355
|
-
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean };
|
|
1356
|
-
} else {
|
|
1357
|
-
params = {
|
|
1358
|
-
projectId: paramsOrFirst as string,
|
|
1359
|
-
enabled: rest[0] as boolean
|
|
1360
|
-
};
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
const projectId = params.projectId;
|
|
1364
|
-
const enabled = params.enabled;
|
|
1365
|
-
|
|
1366
|
-
if (typeof projectId === 'undefined') {
|
|
1367
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1368
|
-
}
|
|
1369
|
-
if (typeof enabled === 'undefined') {
|
|
1370
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
const apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
|
|
1374
|
-
const payload: Payload = {};
|
|
1375
|
-
if (typeof enabled !== 'undefined') {
|
|
1376
|
-
payload['enabled'] = enabled;
|
|
1377
|
-
}
|
|
1378
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1379
|
-
|
|
1380
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1381
|
-
'content-type': 'application/json',
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
return this.client.call(
|
|
1385
|
-
'patch',
|
|
1386
|
-
uri,
|
|
1387
|
-
apiHeaders,
|
|
1388
|
-
payload
|
|
1389
|
-
);
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
/**
|
|
1393
|
-
* Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project.
|
|
1394
|
-
*
|
|
1395
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1396
|
-
* @param {AuthMethod} params.method - Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
1397
|
-
* @param {boolean} params.status - Set the status of this auth method.
|
|
1398
|
-
* @throws {AppwriteException}
|
|
1399
|
-
* @returns {Promise<Models.Project>}
|
|
1400
|
-
*/
|
|
1401
|
-
updateAuthStatus(params: { projectId: string, method: AuthMethod, status: boolean }): Promise<Models.Project>;
|
|
1402
|
-
/**
|
|
1403
|
-
* Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project.
|
|
1404
|
-
*
|
|
1405
|
-
* @param {string} projectId - Project unique ID.
|
|
1406
|
-
* @param {AuthMethod} method - Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
1407
|
-
* @param {boolean} status - Set the status of this auth method.
|
|
1408
|
-
* @throws {AppwriteException}
|
|
1409
|
-
* @returns {Promise<Models.Project>}
|
|
1410
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1411
|
-
*/
|
|
1412
|
-
updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project>;
|
|
1413
|
-
updateAuthStatus(
|
|
1414
|
-
paramsOrFirst: { projectId: string, method: AuthMethod, status: boolean } | string,
|
|
1415
|
-
...rest: [(AuthMethod)?, (boolean)?]
|
|
1416
|
-
): Promise<Models.Project> {
|
|
1417
|
-
let params: { projectId: string, method: AuthMethod, status: boolean };
|
|
1418
|
-
|
|
1419
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1420
|
-
params = (paramsOrFirst || {}) as { projectId: string, method: AuthMethod, status: boolean };
|
|
1421
|
-
} else {
|
|
1422
|
-
params = {
|
|
1423
|
-
projectId: paramsOrFirst as string,
|
|
1424
|
-
method: rest[0] as AuthMethod,
|
|
1425
|
-
status: rest[1] as boolean
|
|
1426
|
-
};
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
const projectId = params.projectId;
|
|
1430
|
-
const method = params.method;
|
|
1431
|
-
const status = params.status;
|
|
1432
|
-
|
|
1433
|
-
if (typeof projectId === 'undefined') {
|
|
1434
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1435
|
-
}
|
|
1436
|
-
if (typeof method === 'undefined') {
|
|
1437
|
-
throw new AppwriteException('Missing required parameter: "method"');
|
|
1438
|
-
}
|
|
1439
|
-
if (typeof status === 'undefined') {
|
|
1440
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
|
|
1444
|
-
const payload: Payload = {};
|
|
1445
|
-
if (typeof status !== 'undefined') {
|
|
1446
|
-
payload['status'] = status;
|
|
1447
|
-
}
|
|
1448
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1449
|
-
|
|
1450
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1451
|
-
'content-type': 'application/json',
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
return this.client.call(
|
|
1455
|
-
'patch',
|
|
1456
|
-
uri,
|
|
1457
|
-
apiHeaders,
|
|
1458
|
-
payload
|
|
1459
|
-
);
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
/**
|
|
1463
|
-
* Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
1464
|
-
*
|
|
1465
|
-
*
|
|
1466
|
-
* @param {string} params.projectId - Project ID
|
|
1467
|
-
* @throws {AppwriteException}
|
|
1468
|
-
* @returns {Promise<{}>}
|
|
1469
|
-
*/
|
|
1470
|
-
updateConsoleAccess(params: { projectId: string }): Promise<{}>;
|
|
1471
|
-
/**
|
|
1472
|
-
* Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
1473
|
-
*
|
|
1474
|
-
*
|
|
1475
|
-
* @param {string} projectId - Project ID
|
|
1476
|
-
* @throws {AppwriteException}
|
|
1477
|
-
* @returns {Promise<{}>}
|
|
1478
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1479
|
-
*/
|
|
1480
|
-
updateConsoleAccess(projectId: string): Promise<{}>;
|
|
1481
|
-
updateConsoleAccess(
|
|
1482
|
-
paramsOrFirst: { projectId: string } | string
|
|
1483
|
-
): Promise<{}> {
|
|
1484
|
-
let params: { projectId: string };
|
|
1485
|
-
|
|
1486
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1487
|
-
params = (paramsOrFirst || {}) as { projectId: string };
|
|
1488
|
-
} else {
|
|
1489
|
-
params = {
|
|
1490
|
-
projectId: paramsOrFirst as string
|
|
1491
|
-
};
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
const projectId = params.projectId;
|
|
1495
|
-
|
|
1496
|
-
if (typeof projectId === 'undefined') {
|
|
1497
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
const apiPath = '/projects/{projectId}/console-access'.replace('{projectId}', projectId);
|
|
1501
|
-
const payload: Payload = {};
|
|
1502
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1503
|
-
|
|
1504
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1505
|
-
'content-type': 'application/json',
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
return this.client.call(
|
|
1509
|
-
'patch',
|
|
1510
|
-
uri,
|
|
1511
|
-
apiHeaders,
|
|
1512
|
-
payload
|
|
1513
|
-
);
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
/**
|
|
1517
|
-
* List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
|
|
1518
|
-
*
|
|
1519
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1520
|
-
* @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: accessedAt, expire
|
|
1521
|
-
* @throws {AppwriteException}
|
|
1522
|
-
* @returns {Promise<Models.DevKeyList>}
|
|
1523
|
-
*/
|
|
1524
|
-
listDevKeys(params: { projectId: string, queries?: string[] }): Promise<Models.DevKeyList>;
|
|
1525
|
-
/**
|
|
1526
|
-
* List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
|
|
1527
|
-
*
|
|
1528
|
-
* @param {string} projectId - Project unique ID.
|
|
1529
|
-
* @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: accessedAt, expire
|
|
1530
|
-
* @throws {AppwriteException}
|
|
1531
|
-
* @returns {Promise<Models.DevKeyList>}
|
|
1532
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1533
|
-
*/
|
|
1534
|
-
listDevKeys(projectId: string, queries?: string[]): Promise<Models.DevKeyList>;
|
|
1535
|
-
listDevKeys(
|
|
1536
|
-
paramsOrFirst: { projectId: string, queries?: string[] } | string,
|
|
1537
|
-
...rest: [(string[])?]
|
|
1538
|
-
): Promise<Models.DevKeyList> {
|
|
1539
|
-
let params: { projectId: string, queries?: string[] };
|
|
1540
|
-
|
|
1541
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1542
|
-
params = (paramsOrFirst || {}) as { projectId: string, queries?: string[] };
|
|
1543
|
-
} else {
|
|
1544
|
-
params = {
|
|
1545
|
-
projectId: paramsOrFirst as string,
|
|
1546
|
-
queries: rest[0] as string[]
|
|
1547
|
-
};
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
const projectId = params.projectId;
|
|
1551
|
-
const queries = params.queries;
|
|
1552
|
-
|
|
1553
|
-
if (typeof projectId === 'undefined') {
|
|
1554
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
|
|
1558
|
-
const payload: Payload = {};
|
|
1559
|
-
if (typeof queries !== 'undefined') {
|
|
1560
|
-
payload['queries'] = queries;
|
|
1561
|
-
}
|
|
1562
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1563
|
-
|
|
1564
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
return this.client.call(
|
|
1568
|
-
'get',
|
|
1569
|
-
uri,
|
|
1570
|
-
apiHeaders,
|
|
1571
|
-
payload
|
|
1572
|
-
);
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
/**
|
|
1576
|
-
* Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
|
|
1577
|
-
*
|
|
1578
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1579
|
-
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
1580
|
-
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
1581
|
-
* @throws {AppwriteException}
|
|
1582
|
-
* @returns {Promise<Models.DevKey>}
|
|
1583
|
-
*/
|
|
1584
|
-
createDevKey(params: { projectId: string, name: string, expire: string }): Promise<Models.DevKey>;
|
|
1585
|
-
/**
|
|
1586
|
-
* Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
|
|
1587
|
-
*
|
|
1588
|
-
* @param {string} projectId - Project unique ID.
|
|
1589
|
-
* @param {string} name - Key name. Max length: 128 chars.
|
|
1590
|
-
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
1591
|
-
* @throws {AppwriteException}
|
|
1592
|
-
* @returns {Promise<Models.DevKey>}
|
|
1593
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1594
|
-
*/
|
|
1595
|
-
createDevKey(projectId: string, name: string, expire: string): Promise<Models.DevKey>;
|
|
1596
|
-
createDevKey(
|
|
1597
|
-
paramsOrFirst: { projectId: string, name: string, expire: string } | string,
|
|
1598
|
-
...rest: [(string)?, (string)?]
|
|
1599
|
-
): Promise<Models.DevKey> {
|
|
1600
|
-
let params: { projectId: string, name: string, expire: string };
|
|
1601
|
-
|
|
1602
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1603
|
-
params = (paramsOrFirst || {}) as { projectId: string, name: string, expire: string };
|
|
1604
|
-
} else {
|
|
1605
|
-
params = {
|
|
1606
|
-
projectId: paramsOrFirst as string,
|
|
1607
|
-
name: rest[0] as string,
|
|
1608
|
-
expire: rest[1] as string
|
|
1609
|
-
};
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
const projectId = params.projectId;
|
|
1613
|
-
const name = params.name;
|
|
1614
|
-
const expire = params.expire;
|
|
1615
|
-
|
|
1616
|
-
if (typeof projectId === 'undefined') {
|
|
1617
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1618
|
-
}
|
|
1619
|
-
if (typeof name === 'undefined') {
|
|
1620
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
1621
|
-
}
|
|
1622
|
-
if (typeof expire === 'undefined') {
|
|
1623
|
-
throw new AppwriteException('Missing required parameter: "expire"');
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
|
|
1627
|
-
const payload: Payload = {};
|
|
1628
|
-
if (typeof name !== 'undefined') {
|
|
1629
|
-
payload['name'] = name;
|
|
1630
|
-
}
|
|
1631
|
-
if (typeof expire !== 'undefined') {
|
|
1632
|
-
payload['expire'] = expire;
|
|
1633
|
-
}
|
|
1634
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1635
|
-
|
|
1636
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1637
|
-
'content-type': 'application/json',
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
return this.client.call(
|
|
1641
|
-
'post',
|
|
1642
|
-
uri,
|
|
1643
|
-
apiHeaders,
|
|
1644
|
-
payload
|
|
1645
|
-
);
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
/**
|
|
1649
|
-
* Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
|
|
1650
|
-
*
|
|
1651
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1652
|
-
* @param {string} params.keyId - Key unique ID.
|
|
1653
|
-
* @throws {AppwriteException}
|
|
1654
|
-
* @returns {Promise<Models.DevKey>}
|
|
1655
|
-
*/
|
|
1656
|
-
getDevKey(params: { projectId: string, keyId: string }): Promise<Models.DevKey>;
|
|
1657
|
-
/**
|
|
1658
|
-
* Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
|
|
1659
|
-
*
|
|
1660
|
-
* @param {string} projectId - Project unique ID.
|
|
1661
|
-
* @param {string} keyId - Key unique ID.
|
|
1662
|
-
* @throws {AppwriteException}
|
|
1663
|
-
* @returns {Promise<Models.DevKey>}
|
|
1664
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1665
|
-
*/
|
|
1666
|
-
getDevKey(projectId: string, keyId: string): Promise<Models.DevKey>;
|
|
1667
|
-
getDevKey(
|
|
1668
|
-
paramsOrFirst: { projectId: string, keyId: string } | string,
|
|
1669
|
-
...rest: [(string)?]
|
|
1670
|
-
): Promise<Models.DevKey> {
|
|
1671
|
-
let params: { projectId: string, keyId: string };
|
|
1672
|
-
|
|
1673
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1674
|
-
params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
|
|
1675
|
-
} else {
|
|
1676
|
-
params = {
|
|
1677
|
-
projectId: paramsOrFirst as string,
|
|
1678
|
-
keyId: rest[0] as string
|
|
1679
|
-
};
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
const projectId = params.projectId;
|
|
1683
|
-
const keyId = params.keyId;
|
|
1684
|
-
|
|
1685
|
-
if (typeof projectId === 'undefined') {
|
|
1686
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1687
|
-
}
|
|
1688
|
-
if (typeof keyId === 'undefined') {
|
|
1689
|
-
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
1693
|
-
const payload: Payload = {};
|
|
1694
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1695
|
-
|
|
1696
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
return this.client.call(
|
|
1700
|
-
'get',
|
|
1701
|
-
uri,
|
|
1702
|
-
apiHeaders,
|
|
1703
|
-
payload
|
|
1704
|
-
);
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
/**
|
|
1708
|
-
* Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'
|
|
1709
|
-
*
|
|
1710
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1711
|
-
* @param {string} params.keyId - Key unique ID.
|
|
1712
|
-
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
1713
|
-
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
1714
|
-
* @throws {AppwriteException}
|
|
1715
|
-
* @returns {Promise<Models.DevKey>}
|
|
1716
|
-
*/
|
|
1717
|
-
updateDevKey(params: { projectId: string, keyId: string, name: string, expire: string }): Promise<Models.DevKey>;
|
|
1718
|
-
/**
|
|
1719
|
-
* Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'
|
|
1720
|
-
*
|
|
1721
|
-
* @param {string} projectId - Project unique ID.
|
|
1722
|
-
* @param {string} keyId - Key unique ID.
|
|
1723
|
-
* @param {string} name - Key name. Max length: 128 chars.
|
|
1724
|
-
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
1725
|
-
* @throws {AppwriteException}
|
|
1726
|
-
* @returns {Promise<Models.DevKey>}
|
|
1727
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1728
|
-
*/
|
|
1729
|
-
updateDevKey(projectId: string, keyId: string, name: string, expire: string): Promise<Models.DevKey>;
|
|
1730
|
-
updateDevKey(
|
|
1731
|
-
paramsOrFirst: { projectId: string, keyId: string, name: string, expire: string } | string,
|
|
1732
|
-
...rest: [(string)?, (string)?, (string)?]
|
|
1733
|
-
): Promise<Models.DevKey> {
|
|
1734
|
-
let params: { projectId: string, keyId: string, name: string, expire: string };
|
|
1735
|
-
|
|
1736
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1737
|
-
params = (paramsOrFirst || {}) as { projectId: string, keyId: string, name: string, expire: string };
|
|
1738
|
-
} else {
|
|
1739
|
-
params = {
|
|
1740
|
-
projectId: paramsOrFirst as string,
|
|
1741
|
-
keyId: rest[0] as string,
|
|
1742
|
-
name: rest[1] as string,
|
|
1743
|
-
expire: rest[2] as string
|
|
1744
|
-
};
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
const projectId = params.projectId;
|
|
1748
|
-
const keyId = params.keyId;
|
|
1749
|
-
const name = params.name;
|
|
1750
|
-
const expire = params.expire;
|
|
1751
|
-
|
|
1752
|
-
if (typeof projectId === 'undefined') {
|
|
1753
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1754
|
-
}
|
|
1755
|
-
if (typeof keyId === 'undefined') {
|
|
1756
|
-
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1757
|
-
}
|
|
1758
|
-
if (typeof name === 'undefined') {
|
|
1759
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
1760
|
-
}
|
|
1761
|
-
if (typeof expire === 'undefined') {
|
|
1762
|
-
throw new AppwriteException('Missing required parameter: "expire"');
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
1766
|
-
const payload: Payload = {};
|
|
1767
|
-
if (typeof name !== 'undefined') {
|
|
1768
|
-
payload['name'] = name;
|
|
1769
|
-
}
|
|
1770
|
-
if (typeof expire !== 'undefined') {
|
|
1771
|
-
payload['expire'] = expire;
|
|
1772
|
-
}
|
|
1773
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1774
|
-
|
|
1775
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1776
|
-
'content-type': 'application/json',
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
return this.client.call(
|
|
1780
|
-
'put',
|
|
1781
|
-
uri,
|
|
1782
|
-
apiHeaders,
|
|
1783
|
-
payload
|
|
1784
|
-
);
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
/**
|
|
1788
|
-
* Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.
|
|
1789
|
-
*
|
|
1790
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1791
|
-
* @param {string} params.keyId - Key unique ID.
|
|
1792
|
-
* @throws {AppwriteException}
|
|
1793
|
-
* @returns {Promise<{}>}
|
|
1794
|
-
*/
|
|
1795
|
-
deleteDevKey(params: { projectId: string, keyId: string }): Promise<{}>;
|
|
1796
|
-
/**
|
|
1797
|
-
* Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.
|
|
1798
|
-
*
|
|
1799
|
-
* @param {string} projectId - Project unique ID.
|
|
1800
|
-
* @param {string} keyId - Key unique ID.
|
|
1801
|
-
* @throws {AppwriteException}
|
|
1802
|
-
* @returns {Promise<{}>}
|
|
1803
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1804
|
-
*/
|
|
1805
|
-
deleteDevKey(projectId: string, keyId: string): Promise<{}>;
|
|
1806
|
-
deleteDevKey(
|
|
1807
|
-
paramsOrFirst: { projectId: string, keyId: string } | string,
|
|
1808
|
-
...rest: [(string)?]
|
|
1809
|
-
): Promise<{}> {
|
|
1810
|
-
let params: { projectId: string, keyId: string };
|
|
1811
|
-
|
|
1812
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1813
|
-
params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
|
|
1814
|
-
} else {
|
|
1815
|
-
params = {
|
|
1816
|
-
projectId: paramsOrFirst as string,
|
|
1817
|
-
keyId: rest[0] as string
|
|
1818
|
-
};
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
const projectId = params.projectId;
|
|
1822
|
-
const keyId = params.keyId;
|
|
1823
|
-
|
|
1824
|
-
if (typeof projectId === 'undefined') {
|
|
1825
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1826
|
-
}
|
|
1827
|
-
if (typeof keyId === 'undefined') {
|
|
1828
|
-
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
1832
|
-
const payload: Payload = {};
|
|
1833
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1834
|
-
|
|
1835
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1836
|
-
'content-type': 'application/json',
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
return this.client.call(
|
|
1840
|
-
'delete',
|
|
1841
|
-
uri,
|
|
1842
|
-
apiHeaders,
|
|
1843
|
-
payload
|
|
1844
|
-
);
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
/**
|
|
1848
|
-
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
1849
|
-
*
|
|
1850
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1851
|
-
* @param {Scopes[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
1852
|
-
* @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
1853
|
-
* @throws {AppwriteException}
|
|
1854
|
-
* @returns {Promise<Models.Jwt>}
|
|
1855
|
-
*/
|
|
1856
|
-
createJWT(params: { projectId: string, scopes: Scopes[], duration?: number }): Promise<Models.Jwt>;
|
|
1857
|
-
/**
|
|
1858
|
-
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
1859
|
-
*
|
|
1860
|
-
* @param {string} projectId - Project unique ID.
|
|
1861
|
-
* @param {Scopes[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
1862
|
-
* @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
1863
|
-
* @throws {AppwriteException}
|
|
1864
|
-
* @returns {Promise<Models.Jwt>}
|
|
1865
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1866
|
-
*/
|
|
1867
|
-
createJWT(projectId: string, scopes: Scopes[], duration?: number): Promise<Models.Jwt>;
|
|
1868
|
-
createJWT(
|
|
1869
|
-
paramsOrFirst: { projectId: string, scopes: Scopes[], duration?: number } | string,
|
|
1870
|
-
...rest: [(Scopes[])?, (number)?]
|
|
1871
|
-
): Promise<Models.Jwt> {
|
|
1872
|
-
let params: { projectId: string, scopes: Scopes[], duration?: number };
|
|
1873
|
-
|
|
1874
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1875
|
-
params = (paramsOrFirst || {}) as { projectId: string, scopes: Scopes[], duration?: number };
|
|
1876
|
-
} else {
|
|
1877
|
-
params = {
|
|
1878
|
-
projectId: paramsOrFirst as string,
|
|
1879
|
-
scopes: rest[0] as Scopes[],
|
|
1880
|
-
duration: rest[1] as number
|
|
1881
|
-
};
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
const projectId = params.projectId;
|
|
1885
|
-
const scopes = params.scopes;
|
|
1886
|
-
const duration = params.duration;
|
|
1887
|
-
|
|
1888
|
-
if (typeof projectId === 'undefined') {
|
|
1889
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1890
|
-
}
|
|
1891
|
-
if (typeof scopes === 'undefined') {
|
|
1892
|
-
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
|
|
1896
|
-
const payload: Payload = {};
|
|
1897
|
-
if (typeof scopes !== 'undefined') {
|
|
1898
|
-
payload['scopes'] = scopes;
|
|
1899
|
-
}
|
|
1900
|
-
if (typeof duration !== 'undefined') {
|
|
1901
|
-
payload['duration'] = duration;
|
|
1902
|
-
}
|
|
1903
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1904
|
-
|
|
1905
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1906
|
-
'content-type': 'application/json',
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
return this.client.call(
|
|
1910
|
-
'post',
|
|
1911
|
-
uri,
|
|
1912
|
-
apiHeaders,
|
|
1913
|
-
payload
|
|
1914
|
-
);
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
/**
|
|
1918
|
-
* Get a list of all API keys from the current project.
|
|
1919
|
-
*
|
|
1920
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1921
|
-
* @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: expire, accessedAt, name, scopes
|
|
1922
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1923
|
-
* @throws {AppwriteException}
|
|
1924
|
-
* @returns {Promise<Models.KeyList>}
|
|
1925
|
-
*/
|
|
1926
|
-
listKeys(params: { projectId: string, queries?: string[], total?: boolean }): Promise<Models.KeyList>;
|
|
1927
|
-
/**
|
|
1928
|
-
* Get a list of all API keys from the current project.
|
|
1929
|
-
*
|
|
1930
|
-
* @param {string} projectId - Project unique ID.
|
|
1931
|
-
* @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: expire, accessedAt, name, scopes
|
|
1932
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1933
|
-
* @throws {AppwriteException}
|
|
1934
|
-
* @returns {Promise<Models.KeyList>}
|
|
1935
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1936
|
-
*/
|
|
1937
|
-
listKeys(projectId: string, queries?: string[], total?: boolean): Promise<Models.KeyList>;
|
|
1938
|
-
listKeys(
|
|
1939
|
-
paramsOrFirst: { projectId: string, queries?: string[], total?: boolean } | string,
|
|
1940
|
-
...rest: [(string[])?, (boolean)?]
|
|
1941
|
-
): Promise<Models.KeyList> {
|
|
1942
|
-
let params: { projectId: string, queries?: string[], total?: boolean };
|
|
1943
|
-
|
|
1944
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1945
|
-
params = (paramsOrFirst || {}) as { projectId: string, queries?: string[], total?: boolean };
|
|
1946
|
-
} else {
|
|
1947
|
-
params = {
|
|
1948
|
-
projectId: paramsOrFirst as string,
|
|
1949
|
-
queries: rest[0] as string[],
|
|
1950
|
-
total: rest[1] as boolean
|
|
1951
|
-
};
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
const projectId = params.projectId;
|
|
1955
|
-
const queries = params.queries;
|
|
1956
|
-
const total = params.total;
|
|
1957
|
-
|
|
1958
|
-
if (typeof projectId === 'undefined') {
|
|
1959
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
1963
|
-
const payload: Payload = {};
|
|
1964
|
-
if (typeof queries !== 'undefined') {
|
|
1965
|
-
payload['queries'] = queries;
|
|
1966
|
-
}
|
|
1967
|
-
if (typeof total !== 'undefined') {
|
|
1968
|
-
payload['total'] = total;
|
|
1969
|
-
}
|
|
1970
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1971
|
-
|
|
1972
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
return this.client.call(
|
|
1976
|
-
'get',
|
|
1977
|
-
uri,
|
|
1978
|
-
apiHeaders,
|
|
1979
|
-
payload
|
|
1980
|
-
);
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
/**
|
|
1984
|
-
* Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
|
|
1985
|
-
*
|
|
1986
|
-
* @param {string} params.projectId - Project unique ID.
|
|
1987
|
-
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
1988
|
-
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
1989
|
-
* @param {string} params.keyId - Key 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.
|
|
1990
|
-
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
1991
|
-
* @throws {AppwriteException}
|
|
1992
|
-
* @returns {Promise<Models.Key>}
|
|
1993
|
-
*/
|
|
1994
|
-
createKey(params: { projectId: string, name: string, scopes?: Scopes[], keyId?: string, expire?: string }): Promise<Models.Key>;
|
|
1995
|
-
/**
|
|
1996
|
-
* Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
|
|
1997
|
-
*
|
|
1998
|
-
* @param {string} projectId - Project unique ID.
|
|
1999
|
-
* @param {string} name - Key name. Max length: 128 chars.
|
|
2000
|
-
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
2001
|
-
* @param {string} keyId - Key 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.
|
|
2002
|
-
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
2003
|
-
* @throws {AppwriteException}
|
|
2004
|
-
* @returns {Promise<Models.Key>}
|
|
2005
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2006
|
-
*/
|
|
2007
|
-
createKey(projectId: string, name: string, scopes?: Scopes[], keyId?: string, expire?: string): Promise<Models.Key>;
|
|
2008
|
-
createKey(
|
|
2009
|
-
paramsOrFirst: { projectId: string, name: string, scopes?: Scopes[], keyId?: string, expire?: string } | string,
|
|
2010
|
-
...rest: [(string)?, (Scopes[])?, (string)?, (string)?]
|
|
2011
|
-
): Promise<Models.Key> {
|
|
2012
|
-
let params: { projectId: string, name: string, scopes?: Scopes[], keyId?: string, expire?: string };
|
|
2013
|
-
|
|
2014
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2015
|
-
params = (paramsOrFirst || {}) as { projectId: string, name: string, scopes?: Scopes[], keyId?: string, expire?: string };
|
|
2016
|
-
} else {
|
|
2017
|
-
params = {
|
|
2018
|
-
projectId: paramsOrFirst as string,
|
|
2019
|
-
name: rest[0] as string,
|
|
2020
|
-
scopes: rest[1] as Scopes[],
|
|
2021
|
-
keyId: rest[2] as string,
|
|
2022
|
-
expire: rest[3] as string
|
|
2023
|
-
};
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
const projectId = params.projectId;
|
|
2027
|
-
const name = params.name;
|
|
2028
|
-
const scopes = params.scopes;
|
|
2029
|
-
const keyId = params.keyId;
|
|
2030
|
-
const expire = params.expire;
|
|
2031
|
-
|
|
2032
|
-
if (typeof projectId === 'undefined') {
|
|
2033
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2034
|
-
}
|
|
2035
|
-
if (typeof name === 'undefined') {
|
|
2036
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
2037
|
-
}
|
|
2038
|
-
if (typeof scopes === 'undefined') {
|
|
2039
|
-
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
2043
|
-
const payload: Payload = {};
|
|
2044
|
-
if (typeof keyId !== 'undefined') {
|
|
2045
|
-
payload['keyId'] = keyId;
|
|
2046
|
-
}
|
|
2047
|
-
if (typeof name !== 'undefined') {
|
|
2048
|
-
payload['name'] = name;
|
|
2049
|
-
}
|
|
2050
|
-
if (typeof scopes !== 'undefined') {
|
|
2051
|
-
payload['scopes'] = scopes;
|
|
2052
|
-
}
|
|
2053
|
-
if (typeof expire !== 'undefined') {
|
|
2054
|
-
payload['expire'] = expire;
|
|
2055
|
-
}
|
|
2056
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2057
|
-
|
|
2058
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2059
|
-
'content-type': 'application/json',
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
return this.client.call(
|
|
2063
|
-
'post',
|
|
2064
|
-
uri,
|
|
2065
|
-
apiHeaders,
|
|
2066
|
-
payload
|
|
2067
|
-
);
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
* Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
|
|
2072
|
-
*
|
|
2073
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2074
|
-
* @param {string} params.keyId - Key unique ID.
|
|
2075
|
-
* @throws {AppwriteException}
|
|
2076
|
-
* @returns {Promise<Models.Key>}
|
|
2077
|
-
*/
|
|
2078
|
-
getKey(params: { projectId: string, keyId: string }): Promise<Models.Key>;
|
|
2079
|
-
/**
|
|
2080
|
-
* Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
|
|
2081
|
-
*
|
|
2082
|
-
* @param {string} projectId - Project unique ID.
|
|
2083
|
-
* @param {string} keyId - Key unique ID.
|
|
2084
|
-
* @throws {AppwriteException}
|
|
2085
|
-
* @returns {Promise<Models.Key>}
|
|
2086
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2087
|
-
*/
|
|
2088
|
-
getKey(projectId: string, keyId: string): Promise<Models.Key>;
|
|
2089
|
-
getKey(
|
|
2090
|
-
paramsOrFirst: { projectId: string, keyId: string } | string,
|
|
2091
|
-
...rest: [(string)?]
|
|
2092
|
-
): Promise<Models.Key> {
|
|
2093
|
-
let params: { projectId: string, keyId: string };
|
|
2094
|
-
|
|
2095
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2096
|
-
params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
|
|
2097
|
-
} else {
|
|
2098
|
-
params = {
|
|
2099
|
-
projectId: paramsOrFirst as string,
|
|
2100
|
-
keyId: rest[0] as string
|
|
2101
|
-
};
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
const projectId = params.projectId;
|
|
2105
|
-
const keyId = params.keyId;
|
|
2106
|
-
|
|
2107
|
-
if (typeof projectId === 'undefined') {
|
|
2108
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2109
|
-
}
|
|
2110
|
-
if (typeof keyId === 'undefined') {
|
|
2111
|
-
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
2115
|
-
const payload: Payload = {};
|
|
2116
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2117
|
-
|
|
2118
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
return this.client.call(
|
|
2122
|
-
'get',
|
|
2123
|
-
uri,
|
|
2124
|
-
apiHeaders,
|
|
2125
|
-
payload
|
|
2126
|
-
);
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
/**
|
|
2130
|
-
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
2131
|
-
*
|
|
2132
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2133
|
-
* @param {string} params.keyId - Key unique ID.
|
|
2134
|
-
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
2135
|
-
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 events are allowed.
|
|
2136
|
-
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
2137
|
-
* @throws {AppwriteException}
|
|
2138
|
-
* @returns {Promise<Models.Key>}
|
|
2139
|
-
*/
|
|
2140
|
-
updateKey(params: { projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string }): Promise<Models.Key>;
|
|
2141
|
-
/**
|
|
2142
|
-
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
2143
|
-
*
|
|
2144
|
-
* @param {string} projectId - Project unique ID.
|
|
2145
|
-
* @param {string} keyId - Key unique ID.
|
|
2146
|
-
* @param {string} name - Key name. Max length: 128 chars.
|
|
2147
|
-
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 events are allowed.
|
|
2148
|
-
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
2149
|
-
* @throws {AppwriteException}
|
|
2150
|
-
* @returns {Promise<Models.Key>}
|
|
2151
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2152
|
-
*/
|
|
2153
|
-
updateKey(projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string): Promise<Models.Key>;
|
|
2154
|
-
updateKey(
|
|
2155
|
-
paramsOrFirst: { projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string } | string,
|
|
2156
|
-
...rest: [(string)?, (string)?, (Scopes[])?, (string)?]
|
|
2157
|
-
): Promise<Models.Key> {
|
|
2158
|
-
let params: { projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string };
|
|
2159
|
-
|
|
2160
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2161
|
-
params = (paramsOrFirst || {}) as { projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string };
|
|
2162
|
-
} else {
|
|
2163
|
-
params = {
|
|
2164
|
-
projectId: paramsOrFirst as string,
|
|
2165
|
-
keyId: rest[0] as string,
|
|
2166
|
-
name: rest[1] as string,
|
|
2167
|
-
scopes: rest[2] as Scopes[],
|
|
2168
|
-
expire: rest[3] as string
|
|
2169
|
-
};
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
const projectId = params.projectId;
|
|
2173
|
-
const keyId = params.keyId;
|
|
2174
|
-
const name = params.name;
|
|
2175
|
-
const scopes = params.scopes;
|
|
2176
|
-
const expire = params.expire;
|
|
2177
|
-
|
|
2178
|
-
if (typeof projectId === 'undefined') {
|
|
2179
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2180
|
-
}
|
|
2181
|
-
if (typeof keyId === 'undefined') {
|
|
2182
|
-
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
2183
|
-
}
|
|
2184
|
-
if (typeof name === 'undefined') {
|
|
2185
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
2186
|
-
}
|
|
2187
|
-
if (typeof scopes === 'undefined') {
|
|
2188
|
-
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
2192
|
-
const payload: Payload = {};
|
|
2193
|
-
if (typeof name !== 'undefined') {
|
|
2194
|
-
payload['name'] = name;
|
|
2195
|
-
}
|
|
2196
|
-
if (typeof scopes !== 'undefined') {
|
|
2197
|
-
payload['scopes'] = scopes;
|
|
2198
|
-
}
|
|
2199
|
-
if (typeof expire !== 'undefined') {
|
|
2200
|
-
payload['expire'] = expire;
|
|
2201
|
-
}
|
|
2202
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2203
|
-
|
|
2204
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2205
|
-
'content-type': 'application/json',
|
|
2206
|
-
}
|
|
2207
|
-
|
|
2208
|
-
return this.client.call(
|
|
2209
|
-
'put',
|
|
2210
|
-
uri,
|
|
2211
|
-
apiHeaders,
|
|
2212
|
-
payload
|
|
2213
|
-
);
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
/**
|
|
2217
|
-
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
2218
|
-
*
|
|
2219
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2220
|
-
* @param {string} params.keyId - Key unique ID.
|
|
2221
|
-
* @throws {AppwriteException}
|
|
2222
|
-
* @returns {Promise<{}>}
|
|
2223
|
-
*/
|
|
2224
|
-
deleteKey(params: { projectId: string, keyId: string }): Promise<{}>;
|
|
2225
|
-
/**
|
|
2226
|
-
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
2227
|
-
*
|
|
2228
|
-
* @param {string} projectId - Project unique ID.
|
|
2229
|
-
* @param {string} keyId - Key unique ID.
|
|
2230
|
-
* @throws {AppwriteException}
|
|
2231
|
-
* @returns {Promise<{}>}
|
|
2232
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2233
|
-
*/
|
|
2234
|
-
deleteKey(projectId: string, keyId: string): Promise<{}>;
|
|
2235
|
-
deleteKey(
|
|
2236
|
-
paramsOrFirst: { projectId: string, keyId: string } | string,
|
|
2237
|
-
...rest: [(string)?]
|
|
2238
|
-
): Promise<{}> {
|
|
2239
|
-
let params: { projectId: string, keyId: string };
|
|
2240
|
-
|
|
2241
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2242
|
-
params = (paramsOrFirst || {}) as { projectId: string, keyId: string };
|
|
2243
|
-
} else {
|
|
2244
|
-
params = {
|
|
2245
|
-
projectId: paramsOrFirst as string,
|
|
2246
|
-
keyId: rest[0] as string
|
|
2247
|
-
};
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
const projectId = params.projectId;
|
|
2251
|
-
const keyId = params.keyId;
|
|
2252
|
-
|
|
2253
|
-
if (typeof projectId === 'undefined') {
|
|
2254
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2255
|
-
}
|
|
2256
|
-
if (typeof keyId === 'undefined') {
|
|
2257
|
-
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
2258
|
-
}
|
|
2259
|
-
|
|
2260
|
-
const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
2261
|
-
const payload: Payload = {};
|
|
2262
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2263
|
-
|
|
2264
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2265
|
-
'content-type': 'application/json',
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
return this.client.call(
|
|
2269
|
-
'delete',
|
|
2270
|
-
uri,
|
|
2271
|
-
apiHeaders,
|
|
2272
|
-
payload
|
|
2273
|
-
);
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
/**
|
|
2277
|
-
* Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.
|
|
2278
|
-
*
|
|
2279
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2280
|
-
* @param {string[]} params.labels - Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
2281
|
-
* @throws {AppwriteException}
|
|
2282
|
-
* @returns {Promise<Models.Project>}
|
|
2283
|
-
*/
|
|
2284
|
-
updateLabels(params: { projectId: string, labels: string[] }): Promise<Models.Project>;
|
|
2285
|
-
/**
|
|
2286
|
-
* Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.
|
|
2287
|
-
*
|
|
2288
|
-
* @param {string} projectId - Project unique ID.
|
|
2289
|
-
* @param {string[]} labels - Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
2290
|
-
* @throws {AppwriteException}
|
|
2291
|
-
* @returns {Promise<Models.Project>}
|
|
2292
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2293
|
-
*/
|
|
2294
|
-
updateLabels(projectId: string, labels: string[]): Promise<Models.Project>;
|
|
2295
|
-
updateLabels(
|
|
2296
|
-
paramsOrFirst: { projectId: string, labels: string[] } | string,
|
|
2297
|
-
...rest: [(string[])?]
|
|
2298
|
-
): Promise<Models.Project> {
|
|
2299
|
-
let params: { projectId: string, labels: string[] };
|
|
2300
|
-
|
|
2301
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2302
|
-
params = (paramsOrFirst || {}) as { projectId: string, labels: string[] };
|
|
2303
|
-
} else {
|
|
2304
|
-
params = {
|
|
2305
|
-
projectId: paramsOrFirst as string,
|
|
2306
|
-
labels: rest[0] as string[]
|
|
2307
|
-
};
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
|
-
const projectId = params.projectId;
|
|
2311
|
-
const labels = params.labels;
|
|
2312
|
-
|
|
2313
|
-
if (typeof projectId === 'undefined') {
|
|
2314
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2315
|
-
}
|
|
2316
|
-
if (typeof labels === 'undefined') {
|
|
2317
|
-
throw new AppwriteException('Missing required parameter: "labels"');
|
|
2318
|
-
}
|
|
2319
|
-
|
|
2320
|
-
const apiPath = '/projects/{projectId}/labels'.replace('{projectId}', projectId);
|
|
2321
|
-
const payload: Payload = {};
|
|
2322
|
-
if (typeof labels !== 'undefined') {
|
|
2323
|
-
payload['labels'] = labels;
|
|
2324
|
-
}
|
|
2325
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2326
|
-
|
|
2327
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2328
|
-
'content-type': 'application/json',
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
|
-
return this.client.call(
|
|
2332
|
-
'put',
|
|
2333
|
-
uri,
|
|
2334
|
-
apiHeaders,
|
|
2335
|
-
payload
|
|
2336
|
-
);
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
|
-
/**
|
|
2340
|
-
* Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
|
|
2341
|
-
*
|
|
2342
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2343
|
-
* @param {OAuthProvider} params.provider - Provider Name
|
|
2344
|
-
* @param {string} params.appId - Provider app ID. Max length: 256 chars.
|
|
2345
|
-
* @param {string} params.secret - Provider secret key. Max length: 512 chars.
|
|
2346
|
-
* @param {boolean} params.enabled - Provider status. Set to 'false' to disable new session creation.
|
|
2347
|
-
* @throws {AppwriteException}
|
|
2348
|
-
* @returns {Promise<Models.Project>}
|
|
2349
|
-
*/
|
|
2350
|
-
updateOAuth2(params: { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean }): Promise<Models.Project>;
|
|
2351
|
-
/**
|
|
2352
|
-
* Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
|
|
2353
|
-
*
|
|
2354
|
-
* @param {string} projectId - Project unique ID.
|
|
2355
|
-
* @param {OAuthProvider} provider - Provider Name
|
|
2356
|
-
* @param {string} appId - Provider app ID. Max length: 256 chars.
|
|
2357
|
-
* @param {string} secret - Provider secret key. Max length: 512 chars.
|
|
2358
|
-
* @param {boolean} enabled - Provider status. Set to 'false' to disable new session creation.
|
|
2359
|
-
* @throws {AppwriteException}
|
|
2360
|
-
* @returns {Promise<Models.Project>}
|
|
2361
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2362
|
-
*/
|
|
2363
|
-
updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project>;
|
|
2364
|
-
updateOAuth2(
|
|
2365
|
-
paramsOrFirst: { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean } | string,
|
|
2366
|
-
...rest: [(OAuthProvider)?, (string)?, (string)?, (boolean)?]
|
|
2367
|
-
): Promise<Models.Project> {
|
|
2368
|
-
let params: { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean };
|
|
2369
|
-
|
|
2370
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2371
|
-
params = (paramsOrFirst || {}) as { projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean };
|
|
2372
|
-
} else {
|
|
2373
|
-
params = {
|
|
2374
|
-
projectId: paramsOrFirst as string,
|
|
2375
|
-
provider: rest[0] as OAuthProvider,
|
|
2376
|
-
appId: rest[1] as string,
|
|
2377
|
-
secret: rest[2] as string,
|
|
2378
|
-
enabled: rest[3] as boolean
|
|
2379
|
-
};
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
const projectId = params.projectId;
|
|
2383
|
-
const provider = params.provider;
|
|
2384
|
-
const appId = params.appId;
|
|
2385
|
-
const secret = params.secret;
|
|
2386
|
-
const enabled = params.enabled;
|
|
2387
|
-
|
|
2388
|
-
if (typeof projectId === 'undefined') {
|
|
2389
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2390
|
-
}
|
|
2391
|
-
if (typeof provider === 'undefined') {
|
|
2392
|
-
throw new AppwriteException('Missing required parameter: "provider"');
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
|
-
const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
|
|
2396
|
-
const payload: Payload = {};
|
|
2397
|
-
if (typeof provider !== 'undefined') {
|
|
2398
|
-
payload['provider'] = provider;
|
|
2399
|
-
}
|
|
2400
|
-
if (typeof appId !== 'undefined') {
|
|
2401
|
-
payload['appId'] = appId;
|
|
2402
|
-
}
|
|
2403
|
-
if (typeof secret !== 'undefined') {
|
|
2404
|
-
payload['secret'] = secret;
|
|
2405
|
-
}
|
|
2406
|
-
if (typeof enabled !== 'undefined') {
|
|
2407
|
-
payload['enabled'] = enabled;
|
|
2408
|
-
}
|
|
2409
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2410
|
-
|
|
2411
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2412
|
-
'content-type': 'application/json',
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2415
|
-
return this.client.call(
|
|
2416
|
-
'patch',
|
|
2417
|
-
uri,
|
|
2418
|
-
apiHeaders,
|
|
2419
|
-
payload
|
|
2420
|
-
);
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2423
|
-
/**
|
|
2424
|
-
* Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
|
|
2425
|
-
*
|
|
2426
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2427
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
2428
|
-
* @throws {AppwriteException}
|
|
2429
|
-
* @returns {Promise<Models.PlatformList>}
|
|
2430
|
-
*/
|
|
2431
|
-
listPlatforms(params: { projectId: string, total?: boolean }): Promise<Models.PlatformList>;
|
|
2432
|
-
/**
|
|
2433
|
-
* Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
|
|
2434
|
-
*
|
|
2435
|
-
* @param {string} projectId - Project unique ID.
|
|
2436
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
2437
|
-
* @throws {AppwriteException}
|
|
2438
|
-
* @returns {Promise<Models.PlatformList>}
|
|
2439
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2440
|
-
*/
|
|
2441
|
-
listPlatforms(projectId: string, total?: boolean): Promise<Models.PlatformList>;
|
|
2442
|
-
listPlatforms(
|
|
2443
|
-
paramsOrFirst: { projectId: string, total?: boolean } | string,
|
|
2444
|
-
...rest: [(boolean)?]
|
|
2445
|
-
): Promise<Models.PlatformList> {
|
|
2446
|
-
let params: { projectId: string, total?: boolean };
|
|
2447
|
-
|
|
2448
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2449
|
-
params = (paramsOrFirst || {}) as { projectId: string, total?: boolean };
|
|
2450
|
-
} else {
|
|
2451
|
-
params = {
|
|
2452
|
-
projectId: paramsOrFirst as string,
|
|
2453
|
-
total: rest[0] as boolean
|
|
2454
|
-
};
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
const projectId = params.projectId;
|
|
2458
|
-
const total = params.total;
|
|
2459
|
-
|
|
2460
|
-
if (typeof projectId === 'undefined') {
|
|
2461
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
2465
|
-
const payload: Payload = {};
|
|
2466
|
-
if (typeof total !== 'undefined') {
|
|
2467
|
-
payload['total'] = total;
|
|
2468
|
-
}
|
|
2469
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2470
|
-
|
|
2471
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
return this.client.call(
|
|
2475
|
-
'get',
|
|
2476
|
-
uri,
|
|
2477
|
-
apiHeaders,
|
|
2478
|
-
payload
|
|
2479
|
-
);
|
|
2480
|
-
}
|
|
2481
|
-
|
|
2482
|
-
/**
|
|
2483
|
-
* Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
|
|
2484
|
-
*
|
|
2485
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2486
|
-
* @param {PlatformType} params.type - Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.
|
|
2487
|
-
* @param {string} params.name - Platform name. Max length: 128 chars.
|
|
2488
|
-
* @param {string} params.key - Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
|
|
2489
|
-
* @param {string} params.store - App store or Google Play store ID. Max length: 256 chars.
|
|
2490
|
-
* @param {string} params.hostname - Platform client hostname. Max length: 256 chars.
|
|
2491
|
-
* @throws {AppwriteException}
|
|
2492
|
-
* @returns {Promise<Models.Platform>}
|
|
2493
|
-
*/
|
|
2494
|
-
createPlatform(params: { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string }): Promise<Models.Platform>;
|
|
2495
|
-
/**
|
|
2496
|
-
* Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
|
|
2497
|
-
*
|
|
2498
|
-
* @param {string} projectId - Project unique ID.
|
|
2499
|
-
* @param {PlatformType} type - Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.
|
|
2500
|
-
* @param {string} name - Platform name. Max length: 128 chars.
|
|
2501
|
-
* @param {string} key - Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
|
|
2502
|
-
* @param {string} store - App store or Google Play store ID. Max length: 256 chars.
|
|
2503
|
-
* @param {string} hostname - Platform client hostname. Max length: 256 chars.
|
|
2504
|
-
* @throws {AppwriteException}
|
|
2505
|
-
* @returns {Promise<Models.Platform>}
|
|
2506
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2507
|
-
*/
|
|
2508
|
-
createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform>;
|
|
2509
|
-
createPlatform(
|
|
2510
|
-
paramsOrFirst: { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string } | string,
|
|
2511
|
-
...rest: [(PlatformType)?, (string)?, (string)?, (string)?, (string)?]
|
|
2512
|
-
): Promise<Models.Platform> {
|
|
2513
|
-
let params: { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string };
|
|
2514
|
-
|
|
2515
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2516
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string };
|
|
2517
|
-
} else {
|
|
2518
|
-
params = {
|
|
2519
|
-
projectId: paramsOrFirst as string,
|
|
2520
|
-
type: rest[0] as PlatformType,
|
|
2521
|
-
name: rest[1] as string,
|
|
2522
|
-
key: rest[2] as string,
|
|
2523
|
-
store: rest[3] as string,
|
|
2524
|
-
hostname: rest[4] as string
|
|
2525
|
-
};
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
const projectId = params.projectId;
|
|
2529
|
-
const type = params.type;
|
|
2530
|
-
const name = params.name;
|
|
2531
|
-
const key = params.key;
|
|
2532
|
-
const store = params.store;
|
|
2533
|
-
const hostname = params.hostname;
|
|
2534
|
-
|
|
2535
|
-
if (typeof projectId === 'undefined') {
|
|
2536
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2537
|
-
}
|
|
2538
|
-
if (typeof type === 'undefined') {
|
|
2539
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
2540
|
-
}
|
|
2541
|
-
if (typeof name === 'undefined') {
|
|
2542
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
2546
|
-
const payload: Payload = {};
|
|
2547
|
-
if (typeof type !== 'undefined') {
|
|
2548
|
-
payload['type'] = type;
|
|
2549
|
-
}
|
|
2550
|
-
if (typeof name !== 'undefined') {
|
|
2551
|
-
payload['name'] = name;
|
|
2552
|
-
}
|
|
2553
|
-
if (typeof key !== 'undefined') {
|
|
2554
|
-
payload['key'] = key;
|
|
2555
|
-
}
|
|
2556
|
-
if (typeof store !== 'undefined') {
|
|
2557
|
-
payload['store'] = store;
|
|
2558
|
-
}
|
|
2559
|
-
if (typeof hostname !== 'undefined') {
|
|
2560
|
-
payload['hostname'] = hostname;
|
|
2561
|
-
}
|
|
2562
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2563
|
-
|
|
2564
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2565
|
-
'content-type': 'application/json',
|
|
2566
|
-
}
|
|
2567
|
-
|
|
2568
|
-
return this.client.call(
|
|
2569
|
-
'post',
|
|
2570
|
-
uri,
|
|
2571
|
-
apiHeaders,
|
|
2572
|
-
payload
|
|
2573
|
-
);
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
/**
|
|
2577
|
-
* Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.
|
|
2578
|
-
*
|
|
2579
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2580
|
-
* @param {string} params.platformId - Platform unique ID.
|
|
2581
|
-
* @throws {AppwriteException}
|
|
2582
|
-
* @returns {Promise<Models.Platform>}
|
|
2583
|
-
*/
|
|
2584
|
-
getPlatform(params: { projectId: string, platformId: string }): Promise<Models.Platform>;
|
|
2585
|
-
/**
|
|
2586
|
-
* Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.
|
|
2587
|
-
*
|
|
2588
|
-
* @param {string} projectId - Project unique ID.
|
|
2589
|
-
* @param {string} platformId - Platform unique ID.
|
|
2590
|
-
* @throws {AppwriteException}
|
|
2591
|
-
* @returns {Promise<Models.Platform>}
|
|
2592
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2593
|
-
*/
|
|
2594
|
-
getPlatform(projectId: string, platformId: string): Promise<Models.Platform>;
|
|
2595
|
-
getPlatform(
|
|
2596
|
-
paramsOrFirst: { projectId: string, platformId: string } | string,
|
|
2597
|
-
...rest: [(string)?]
|
|
2598
|
-
): Promise<Models.Platform> {
|
|
2599
|
-
let params: { projectId: string, platformId: string };
|
|
2600
|
-
|
|
2601
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2602
|
-
params = (paramsOrFirst || {}) as { projectId: string, platformId: string };
|
|
2603
|
-
} else {
|
|
2604
|
-
params = {
|
|
2605
|
-
projectId: paramsOrFirst as string,
|
|
2606
|
-
platformId: rest[0] as string
|
|
2607
|
-
};
|
|
2608
|
-
}
|
|
2609
|
-
|
|
2610
|
-
const projectId = params.projectId;
|
|
2611
|
-
const platformId = params.platformId;
|
|
2612
|
-
|
|
2613
|
-
if (typeof projectId === 'undefined') {
|
|
2614
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2615
|
-
}
|
|
2616
|
-
if (typeof platformId === 'undefined') {
|
|
2617
|
-
throw new AppwriteException('Missing required parameter: "platformId"');
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
2621
|
-
const payload: Payload = {};
|
|
2622
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2623
|
-
|
|
2624
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
return this.client.call(
|
|
2628
|
-
'get',
|
|
2629
|
-
uri,
|
|
2630
|
-
apiHeaders,
|
|
2631
|
-
payload
|
|
2632
|
-
);
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
/**
|
|
2636
|
-
* Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname.
|
|
2637
|
-
*
|
|
2638
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2639
|
-
* @param {string} params.platformId - Platform unique ID.
|
|
2640
|
-
* @param {string} params.name - Platform name. Max length: 128 chars.
|
|
2641
|
-
* @param {string} params.key - Package name for android or bundle ID for iOS. Max length: 256 chars.
|
|
2642
|
-
* @param {string} params.store - App store or Google Play store ID. Max length: 256 chars.
|
|
2643
|
-
* @param {string} params.hostname - Platform client URL. Max length: 256 chars.
|
|
2644
|
-
* @throws {AppwriteException}
|
|
2645
|
-
* @returns {Promise<Models.Platform>}
|
|
2646
|
-
*/
|
|
2647
|
-
updatePlatform(params: { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string }): Promise<Models.Platform>;
|
|
2648
|
-
/**
|
|
2649
|
-
* Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname.
|
|
2650
|
-
*
|
|
2651
|
-
* @param {string} projectId - Project unique ID.
|
|
2652
|
-
* @param {string} platformId - Platform unique ID.
|
|
2653
|
-
* @param {string} name - Platform name. Max length: 128 chars.
|
|
2654
|
-
* @param {string} key - Package name for android or bundle ID for iOS. Max length: 256 chars.
|
|
2655
|
-
* @param {string} store - App store or Google Play store ID. Max length: 256 chars.
|
|
2656
|
-
* @param {string} hostname - Platform client URL. Max length: 256 chars.
|
|
2657
|
-
* @throws {AppwriteException}
|
|
2658
|
-
* @returns {Promise<Models.Platform>}
|
|
2659
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2660
|
-
*/
|
|
2661
|
-
updatePlatform(projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform>;
|
|
2662
|
-
updatePlatform(
|
|
2663
|
-
paramsOrFirst: { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string } | string,
|
|
2664
|
-
...rest: [(string)?, (string)?, (string)?, (string)?, (string)?]
|
|
2665
|
-
): Promise<Models.Platform> {
|
|
2666
|
-
let params: { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string };
|
|
2667
|
-
|
|
2668
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2669
|
-
params = (paramsOrFirst || {}) as { projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string };
|
|
2670
|
-
} else {
|
|
2671
|
-
params = {
|
|
2672
|
-
projectId: paramsOrFirst as string,
|
|
2673
|
-
platformId: rest[0] as string,
|
|
2674
|
-
name: rest[1] as string,
|
|
2675
|
-
key: rest[2] as string,
|
|
2676
|
-
store: rest[3] as string,
|
|
2677
|
-
hostname: rest[4] as string
|
|
2678
|
-
};
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
const projectId = params.projectId;
|
|
2682
|
-
const platformId = params.platformId;
|
|
2683
|
-
const name = params.name;
|
|
2684
|
-
const key = params.key;
|
|
2685
|
-
const store = params.store;
|
|
2686
|
-
const hostname = params.hostname;
|
|
2687
|
-
|
|
2688
|
-
if (typeof projectId === 'undefined') {
|
|
2689
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2690
|
-
}
|
|
2691
|
-
if (typeof platformId === 'undefined') {
|
|
2692
|
-
throw new AppwriteException('Missing required parameter: "platformId"');
|
|
2693
|
-
}
|
|
2694
|
-
if (typeof name === 'undefined') {
|
|
2695
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
2699
|
-
const payload: Payload = {};
|
|
2700
|
-
if (typeof name !== 'undefined') {
|
|
2701
|
-
payload['name'] = name;
|
|
2702
|
-
}
|
|
2703
|
-
if (typeof key !== 'undefined') {
|
|
2704
|
-
payload['key'] = key;
|
|
2705
|
-
}
|
|
2706
|
-
if (typeof store !== 'undefined') {
|
|
2707
|
-
payload['store'] = store;
|
|
2708
|
-
}
|
|
2709
|
-
if (typeof hostname !== 'undefined') {
|
|
2710
|
-
payload['hostname'] = hostname;
|
|
2711
|
-
}
|
|
2712
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2713
|
-
|
|
2714
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2715
|
-
'content-type': 'application/json',
|
|
2716
|
-
}
|
|
2717
|
-
|
|
2718
|
-
return this.client.call(
|
|
2719
|
-
'put',
|
|
2720
|
-
uri,
|
|
2721
|
-
apiHeaders,
|
|
2722
|
-
payload
|
|
2723
|
-
);
|
|
2724
|
-
}
|
|
2725
|
-
|
|
2726
|
-
/**
|
|
2727
|
-
* Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
|
|
2728
|
-
*
|
|
2729
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2730
|
-
* @param {string} params.platformId - Platform unique ID.
|
|
2731
|
-
* @throws {AppwriteException}
|
|
2732
|
-
* @returns {Promise<{}>}
|
|
2733
|
-
*/
|
|
2734
|
-
deletePlatform(params: { projectId: string, platformId: string }): Promise<{}>;
|
|
2735
|
-
/**
|
|
2736
|
-
* Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
|
|
2737
|
-
*
|
|
2738
|
-
* @param {string} projectId - Project unique ID.
|
|
2739
|
-
* @param {string} platformId - Platform unique ID.
|
|
2740
|
-
* @throws {AppwriteException}
|
|
2741
|
-
* @returns {Promise<{}>}
|
|
2742
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2743
|
-
*/
|
|
2744
|
-
deletePlatform(projectId: string, platformId: string): Promise<{}>;
|
|
2745
|
-
deletePlatform(
|
|
2746
|
-
paramsOrFirst: { projectId: string, platformId: string } | string,
|
|
2747
|
-
...rest: [(string)?]
|
|
2748
|
-
): Promise<{}> {
|
|
2749
|
-
let params: { projectId: string, platformId: string };
|
|
2750
|
-
|
|
2751
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2752
|
-
params = (paramsOrFirst || {}) as { projectId: string, platformId: string };
|
|
2753
|
-
} else {
|
|
2754
|
-
params = {
|
|
2755
|
-
projectId: paramsOrFirst as string,
|
|
2756
|
-
platformId: rest[0] as string
|
|
2757
|
-
};
|
|
2758
|
-
}
|
|
2759
|
-
|
|
2760
|
-
const projectId = params.projectId;
|
|
2761
|
-
const platformId = params.platformId;
|
|
2762
|
-
|
|
2763
|
-
if (typeof projectId === 'undefined') {
|
|
2764
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2765
|
-
}
|
|
2766
|
-
if (typeof platformId === 'undefined') {
|
|
2767
|
-
throw new AppwriteException('Missing required parameter: "platformId"');
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
2771
|
-
const payload: Payload = {};
|
|
2772
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2773
|
-
|
|
2774
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2775
|
-
'content-type': 'application/json',
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
return this.client.call(
|
|
2779
|
-
'delete',
|
|
2780
|
-
uri,
|
|
2781
|
-
apiHeaders,
|
|
2782
|
-
payload
|
|
2783
|
-
);
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
/**
|
|
2787
|
-
* Get a list of all the project's schedules. You can use the query params to filter your results.
|
|
2788
|
-
*
|
|
2789
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2790
|
-
* @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: resourceType, resourceId, projectId, schedule, active, region
|
|
2791
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
2792
|
-
* @throws {AppwriteException}
|
|
2793
|
-
* @returns {Promise<Models.ScheduleList>}
|
|
2794
|
-
*/
|
|
2795
|
-
listSchedules(params: { projectId: string, queries?: string[], total?: boolean }): Promise<Models.ScheduleList>;
|
|
2796
|
-
/**
|
|
2797
|
-
* Get a list of all the project's schedules. You can use the query params to filter your results.
|
|
2798
|
-
*
|
|
2799
|
-
* @param {string} projectId - Project unique ID.
|
|
2800
|
-
* @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: resourceType, resourceId, projectId, schedule, active, region
|
|
2801
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
2802
|
-
* @throws {AppwriteException}
|
|
2803
|
-
* @returns {Promise<Models.ScheduleList>}
|
|
2804
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2805
|
-
*/
|
|
2806
|
-
listSchedules(projectId: string, queries?: string[], total?: boolean): Promise<Models.ScheduleList>;
|
|
2807
|
-
listSchedules(
|
|
2808
|
-
paramsOrFirst: { projectId: string, queries?: string[], total?: boolean } | string,
|
|
2809
|
-
...rest: [(string[])?, (boolean)?]
|
|
2810
|
-
): Promise<Models.ScheduleList> {
|
|
2811
|
-
let params: { projectId: string, queries?: string[], total?: boolean };
|
|
2812
|
-
|
|
2813
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2814
|
-
params = (paramsOrFirst || {}) as { projectId: string, queries?: string[], total?: boolean };
|
|
2815
|
-
} else {
|
|
2816
|
-
params = {
|
|
2817
|
-
projectId: paramsOrFirst as string,
|
|
2818
|
-
queries: rest[0] as string[],
|
|
2819
|
-
total: rest[1] as boolean
|
|
2820
|
-
};
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
const projectId = params.projectId;
|
|
2824
|
-
const queries = params.queries;
|
|
2825
|
-
const total = params.total;
|
|
2826
|
-
|
|
2827
|
-
if (typeof projectId === 'undefined') {
|
|
2828
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
const apiPath = '/projects/{projectId}/schedules'.replace('{projectId}', projectId);
|
|
2832
|
-
const payload: Payload = {};
|
|
2833
|
-
if (typeof queries !== 'undefined') {
|
|
2834
|
-
payload['queries'] = queries;
|
|
2835
|
-
}
|
|
2836
|
-
if (typeof total !== 'undefined') {
|
|
2837
|
-
payload['total'] = total;
|
|
2838
|
-
}
|
|
2839
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2840
|
-
|
|
2841
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
|
-
return this.client.call(
|
|
2845
|
-
'get',
|
|
2846
|
-
uri,
|
|
2847
|
-
apiHeaders,
|
|
2848
|
-
payload
|
|
2849
|
-
);
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
/**
|
|
2853
|
-
* Create a new schedule for a resource.
|
|
2854
|
-
*
|
|
2855
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2856
|
-
* @param {ResourceType} params.resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
|
|
2857
|
-
* @param {string} params.resourceId - The resource ID to associate with this schedule.
|
|
2858
|
-
* @param {string} params.schedule - Schedule CRON expression.
|
|
2859
|
-
* @param {boolean} params.active - Whether the schedule is active.
|
|
2860
|
-
* @param {object} params.data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
|
|
2861
|
-
* @throws {AppwriteException}
|
|
2862
|
-
* @returns {Promise<Models.Schedule>}
|
|
2863
|
-
*/
|
|
2864
|
-
createSchedule(params: { projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object }): Promise<Models.Schedule>;
|
|
2865
|
-
/**
|
|
2866
|
-
* Create a new schedule for a resource.
|
|
2867
|
-
*
|
|
2868
|
-
* @param {string} projectId - Project unique ID.
|
|
2869
|
-
* @param {ResourceType} resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
|
|
2870
|
-
* @param {string} resourceId - The resource ID to associate with this schedule.
|
|
2871
|
-
* @param {string} schedule - Schedule CRON expression.
|
|
2872
|
-
* @param {boolean} active - Whether the schedule is active.
|
|
2873
|
-
* @param {object} data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
|
|
2874
|
-
* @throws {AppwriteException}
|
|
2875
|
-
* @returns {Promise<Models.Schedule>}
|
|
2876
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2877
|
-
*/
|
|
2878
|
-
createSchedule(projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object): Promise<Models.Schedule>;
|
|
2879
|
-
createSchedule(
|
|
2880
|
-
paramsOrFirst: { projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object } | string,
|
|
2881
|
-
...rest: [(ResourceType)?, (string)?, (string)?, (boolean)?, (object)?]
|
|
2882
|
-
): Promise<Models.Schedule> {
|
|
2883
|
-
let params: { projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object };
|
|
2884
|
-
|
|
2885
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2886
|
-
params = (paramsOrFirst || {}) as { projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object };
|
|
2887
|
-
} else {
|
|
2888
|
-
params = {
|
|
2889
|
-
projectId: paramsOrFirst as string,
|
|
2890
|
-
resourceType: rest[0] as ResourceType,
|
|
2891
|
-
resourceId: rest[1] as string,
|
|
2892
|
-
schedule: rest[2] as string,
|
|
2893
|
-
active: rest[3] as boolean,
|
|
2894
|
-
data: rest[4] as object
|
|
2895
|
-
};
|
|
2896
|
-
}
|
|
2897
|
-
|
|
2898
|
-
const projectId = params.projectId;
|
|
2899
|
-
const resourceType = params.resourceType;
|
|
2900
|
-
const resourceId = params.resourceId;
|
|
2901
|
-
const schedule = params.schedule;
|
|
2902
|
-
const active = params.active;
|
|
2903
|
-
const data = params.data;
|
|
2904
|
-
|
|
2905
|
-
if (typeof projectId === 'undefined') {
|
|
2906
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2907
|
-
}
|
|
2908
|
-
if (typeof resourceType === 'undefined') {
|
|
2909
|
-
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
2910
|
-
}
|
|
2911
|
-
if (typeof resourceId === 'undefined') {
|
|
2912
|
-
throw new AppwriteException('Missing required parameter: "resourceId"');
|
|
2913
|
-
}
|
|
2914
|
-
if (typeof schedule === 'undefined') {
|
|
2915
|
-
throw new AppwriteException('Missing required parameter: "schedule"');
|
|
2916
|
-
}
|
|
2917
|
-
|
|
2918
|
-
const apiPath = '/projects/{projectId}/schedules'.replace('{projectId}', projectId);
|
|
2919
|
-
const payload: Payload = {};
|
|
2920
|
-
if (typeof resourceType !== 'undefined') {
|
|
2921
|
-
payload['resourceType'] = resourceType;
|
|
2922
|
-
}
|
|
2923
|
-
if (typeof resourceId !== 'undefined') {
|
|
2924
|
-
payload['resourceId'] = resourceId;
|
|
2925
|
-
}
|
|
2926
|
-
if (typeof schedule !== 'undefined') {
|
|
2927
|
-
payload['schedule'] = schedule;
|
|
2928
|
-
}
|
|
2929
|
-
if (typeof active !== 'undefined') {
|
|
2930
|
-
payload['active'] = active;
|
|
2931
|
-
}
|
|
2932
|
-
if (typeof data !== 'undefined') {
|
|
2933
|
-
payload['data'] = data;
|
|
2934
|
-
}
|
|
2935
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2936
|
-
|
|
2937
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2938
|
-
'content-type': 'application/json',
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
|
-
return this.client.call(
|
|
2942
|
-
'post',
|
|
2943
|
-
uri,
|
|
2944
|
-
apiHeaders,
|
|
2945
|
-
payload
|
|
2946
|
-
);
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
|
-
/**
|
|
2950
|
-
* Get a schedule by its unique ID.
|
|
2951
|
-
*
|
|
2952
|
-
* @param {string} params.projectId - Project unique ID.
|
|
2953
|
-
* @param {string} params.scheduleId - Schedule ID.
|
|
2954
|
-
* @throws {AppwriteException}
|
|
2955
|
-
* @returns {Promise<Models.Schedule>}
|
|
2956
|
-
*/
|
|
2957
|
-
getSchedule(params: { projectId: string, scheduleId: string }): Promise<Models.Schedule>;
|
|
2958
|
-
/**
|
|
2959
|
-
* Get a schedule by its unique ID.
|
|
2960
|
-
*
|
|
2961
|
-
* @param {string} projectId - Project unique ID.
|
|
2962
|
-
* @param {string} scheduleId - Schedule ID.
|
|
2963
|
-
* @throws {AppwriteException}
|
|
2964
|
-
* @returns {Promise<Models.Schedule>}
|
|
2965
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2966
|
-
*/
|
|
2967
|
-
getSchedule(projectId: string, scheduleId: string): Promise<Models.Schedule>;
|
|
2968
|
-
getSchedule(
|
|
2969
|
-
paramsOrFirst: { projectId: string, scheduleId: string } | string,
|
|
2970
|
-
...rest: [(string)?]
|
|
2971
|
-
): Promise<Models.Schedule> {
|
|
2972
|
-
let params: { projectId: string, scheduleId: string };
|
|
2973
|
-
|
|
2974
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2975
|
-
params = (paramsOrFirst || {}) as { projectId: string, scheduleId: string };
|
|
2976
|
-
} else {
|
|
2977
|
-
params = {
|
|
2978
|
-
projectId: paramsOrFirst as string,
|
|
2979
|
-
scheduleId: rest[0] as string
|
|
2980
|
-
};
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
|
-
const projectId = params.projectId;
|
|
2984
|
-
const scheduleId = params.scheduleId;
|
|
2985
|
-
|
|
2986
|
-
if (typeof projectId === 'undefined') {
|
|
2987
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2988
|
-
}
|
|
2989
|
-
if (typeof scheduleId === 'undefined') {
|
|
2990
|
-
throw new AppwriteException('Missing required parameter: "scheduleId"');
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
const apiPath = '/projects/{projectId}/schedules/{scheduleId}'.replace('{projectId}', projectId).replace('{scheduleId}', scheduleId);
|
|
2994
|
-
const payload: Payload = {};
|
|
2995
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2996
|
-
|
|
2997
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
return this.client.call(
|
|
3001
|
-
'get',
|
|
3002
|
-
uri,
|
|
3003
|
-
apiHeaders,
|
|
3004
|
-
payload
|
|
3005
|
-
);
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
/**
|
|
3009
|
-
* Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
|
|
3010
|
-
*
|
|
3011
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3012
|
-
* @param {ApiService} params.service - Service name.
|
|
3013
|
-
* @param {boolean} params.status - Service status.
|
|
3014
|
-
* @throws {AppwriteException}
|
|
3015
|
-
* @returns {Promise<Models.Project>}
|
|
3016
|
-
*/
|
|
3017
|
-
updateServiceStatus(params: { projectId: string, service: ApiService, status: boolean }): Promise<Models.Project>;
|
|
3018
|
-
/**
|
|
3019
|
-
* Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
|
|
3020
|
-
*
|
|
3021
|
-
* @param {string} projectId - Project unique ID.
|
|
3022
|
-
* @param {ApiService} service - Service name.
|
|
3023
|
-
* @param {boolean} status - Service status.
|
|
3024
|
-
* @throws {AppwriteException}
|
|
3025
|
-
* @returns {Promise<Models.Project>}
|
|
3026
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3027
|
-
*/
|
|
3028
|
-
updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project>;
|
|
3029
|
-
updateServiceStatus(
|
|
3030
|
-
paramsOrFirst: { projectId: string, service: ApiService, status: boolean } | string,
|
|
3031
|
-
...rest: [(ApiService)?, (boolean)?]
|
|
3032
|
-
): Promise<Models.Project> {
|
|
3033
|
-
let params: { projectId: string, service: ApiService, status: boolean };
|
|
3034
|
-
|
|
3035
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3036
|
-
params = (paramsOrFirst || {}) as { projectId: string, service: ApiService, status: boolean };
|
|
3037
|
-
} else {
|
|
3038
|
-
params = {
|
|
3039
|
-
projectId: paramsOrFirst as string,
|
|
3040
|
-
service: rest[0] as ApiService,
|
|
3041
|
-
status: rest[1] as boolean
|
|
3042
|
-
};
|
|
3043
|
-
}
|
|
3044
|
-
|
|
3045
|
-
const projectId = params.projectId;
|
|
3046
|
-
const service = params.service;
|
|
3047
|
-
const status = params.status;
|
|
3048
|
-
|
|
3049
|
-
if (typeof projectId === 'undefined') {
|
|
3050
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3051
|
-
}
|
|
3052
|
-
if (typeof service === 'undefined') {
|
|
3053
|
-
throw new AppwriteException('Missing required parameter: "service"');
|
|
3054
|
-
}
|
|
3055
|
-
if (typeof status === 'undefined') {
|
|
3056
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
|
-
const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
|
|
3060
|
-
const payload: Payload = {};
|
|
3061
|
-
if (typeof service !== 'undefined') {
|
|
3062
|
-
payload['service'] = service;
|
|
3063
|
-
}
|
|
3064
|
-
if (typeof status !== 'undefined') {
|
|
3065
|
-
payload['status'] = status;
|
|
3066
|
-
}
|
|
3067
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3068
|
-
|
|
3069
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3070
|
-
'content-type': 'application/json',
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
return this.client.call(
|
|
3074
|
-
'patch',
|
|
3075
|
-
uri,
|
|
3076
|
-
apiHeaders,
|
|
3077
|
-
payload
|
|
3078
|
-
);
|
|
3079
|
-
}
|
|
3080
|
-
|
|
3081
|
-
/**
|
|
3082
|
-
* Update the status of all services. Use this endpoint to enable or disable all optional services at once.
|
|
3083
|
-
*
|
|
3084
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3085
|
-
* @param {boolean} params.status - Service status.
|
|
3086
|
-
* @throws {AppwriteException}
|
|
3087
|
-
* @returns {Promise<Models.Project>}
|
|
3088
|
-
*/
|
|
3089
|
-
updateServiceStatusAll(params: { projectId: string, status: boolean }): Promise<Models.Project>;
|
|
3090
|
-
/**
|
|
3091
|
-
* Update the status of all services. Use this endpoint to enable or disable all optional services at once.
|
|
3092
|
-
*
|
|
3093
|
-
* @param {string} projectId - Project unique ID.
|
|
3094
|
-
* @param {boolean} status - Service status.
|
|
3095
|
-
* @throws {AppwriteException}
|
|
3096
|
-
* @returns {Promise<Models.Project>}
|
|
3097
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3098
|
-
*/
|
|
3099
|
-
updateServiceStatusAll(projectId: string, status: boolean): Promise<Models.Project>;
|
|
3100
|
-
updateServiceStatusAll(
|
|
3101
|
-
paramsOrFirst: { projectId: string, status: boolean } | string,
|
|
3102
|
-
...rest: [(boolean)?]
|
|
3103
|
-
): Promise<Models.Project> {
|
|
3104
|
-
let params: { projectId: string, status: boolean };
|
|
3105
|
-
|
|
3106
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3107
|
-
params = (paramsOrFirst || {}) as { projectId: string, status: boolean };
|
|
3108
|
-
} else {
|
|
3109
|
-
params = {
|
|
3110
|
-
projectId: paramsOrFirst as string,
|
|
3111
|
-
status: rest[0] as boolean
|
|
3112
|
-
};
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
|
-
const projectId = params.projectId;
|
|
3116
|
-
const status = params.status;
|
|
3117
|
-
|
|
3118
|
-
if (typeof projectId === 'undefined') {
|
|
3119
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3120
|
-
}
|
|
3121
|
-
if (typeof status === 'undefined') {
|
|
3122
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
3123
|
-
}
|
|
3124
|
-
|
|
3125
|
-
const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
|
|
3126
|
-
const payload: Payload = {};
|
|
3127
|
-
if (typeof status !== 'undefined') {
|
|
3128
|
-
payload['status'] = status;
|
|
3129
|
-
}
|
|
3130
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3131
|
-
|
|
3132
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3133
|
-
'content-type': 'application/json',
|
|
3134
|
-
}
|
|
3135
|
-
|
|
3136
|
-
return this.client.call(
|
|
3137
|
-
'patch',
|
|
3138
|
-
uri,
|
|
3139
|
-
apiHeaders,
|
|
3140
|
-
payload
|
|
3141
|
-
);
|
|
3142
|
-
}
|
|
3143
|
-
|
|
3144
|
-
/**
|
|
3145
|
-
* Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
|
|
3146
|
-
*
|
|
3147
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3148
|
-
* @param {boolean} params.enabled - Enable custom SMTP service
|
|
3149
|
-
* @param {string} params.senderName - Name of the email sender
|
|
3150
|
-
* @param {string} params.senderEmail - Email of the sender
|
|
3151
|
-
* @param {string} params.replyTo - Reply to email
|
|
3152
|
-
* @param {string} params.host - SMTP server host name
|
|
3153
|
-
* @param {number} params.port - SMTP server port
|
|
3154
|
-
* @param {string} params.username - SMTP server username
|
|
3155
|
-
* @param {string} params.password - SMTP server password
|
|
3156
|
-
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
3157
|
-
* @throws {AppwriteException}
|
|
3158
|
-
* @returns {Promise<Models.Project>}
|
|
3159
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateSMTP` instead.
|
|
3160
|
-
*/
|
|
3161
|
-
updateSmtp(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
|
|
3162
|
-
/**
|
|
3163
|
-
* Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
|
|
3164
|
-
*
|
|
3165
|
-
* @param {string} projectId - Project unique ID.
|
|
3166
|
-
* @param {boolean} enabled - Enable custom SMTP service
|
|
3167
|
-
* @param {string} senderName - Name of the email sender
|
|
3168
|
-
* @param {string} senderEmail - Email of the sender
|
|
3169
|
-
* @param {string} replyTo - Reply to email
|
|
3170
|
-
* @param {string} host - SMTP server host name
|
|
3171
|
-
* @param {number} port - SMTP server port
|
|
3172
|
-
* @param {string} username - SMTP server username
|
|
3173
|
-
* @param {string} password - SMTP server password
|
|
3174
|
-
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
3175
|
-
* @throws {AppwriteException}
|
|
3176
|
-
* @returns {Promise<Models.Project>}
|
|
3177
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3178
|
-
*/
|
|
3179
|
-
updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
|
|
3180
|
-
updateSmtp(
|
|
3181
|
-
paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3182
|
-
...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3183
|
-
): Promise<Models.Project> {
|
|
3184
|
-
let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3185
|
-
|
|
3186
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3187
|
-
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3188
|
-
} else {
|
|
3189
|
-
params = {
|
|
3190
|
-
projectId: paramsOrFirst as string,
|
|
3191
|
-
enabled: rest[0] as boolean,
|
|
3192
|
-
senderName: rest[1] as string,
|
|
3193
|
-
senderEmail: rest[2] as string,
|
|
3194
|
-
replyTo: rest[3] as string,
|
|
3195
|
-
host: rest[4] as string,
|
|
3196
|
-
port: rest[5] as number,
|
|
3197
|
-
username: rest[6] as string,
|
|
3198
|
-
password: rest[7] as string,
|
|
3199
|
-
secure: rest[8] as SMTPSecure
|
|
3200
|
-
};
|
|
3201
|
-
}
|
|
3202
|
-
|
|
3203
|
-
const projectId = params.projectId;
|
|
3204
|
-
const enabled = params.enabled;
|
|
3205
|
-
const senderName = params.senderName;
|
|
3206
|
-
const senderEmail = params.senderEmail;
|
|
3207
|
-
const replyTo = params.replyTo;
|
|
3208
|
-
const host = params.host;
|
|
3209
|
-
const port = params.port;
|
|
3210
|
-
const username = params.username;
|
|
3211
|
-
const password = params.password;
|
|
3212
|
-
const secure = params.secure;
|
|
3213
|
-
|
|
3214
|
-
if (typeof projectId === 'undefined') {
|
|
3215
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3216
|
-
}
|
|
3217
|
-
if (typeof enabled === 'undefined') {
|
|
3218
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
3219
|
-
}
|
|
3220
|
-
|
|
3221
|
-
const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
|
|
3222
|
-
const payload: Payload = {};
|
|
3223
|
-
if (typeof enabled !== 'undefined') {
|
|
3224
|
-
payload['enabled'] = enabled;
|
|
3225
|
-
}
|
|
3226
|
-
if (typeof senderName !== 'undefined') {
|
|
3227
|
-
payload['senderName'] = senderName;
|
|
3228
|
-
}
|
|
3229
|
-
if (typeof senderEmail !== 'undefined') {
|
|
3230
|
-
payload['senderEmail'] = senderEmail;
|
|
3231
|
-
}
|
|
3232
|
-
if (typeof replyTo !== 'undefined') {
|
|
3233
|
-
payload['replyTo'] = replyTo;
|
|
3234
|
-
}
|
|
3235
|
-
if (typeof host !== 'undefined') {
|
|
3236
|
-
payload['host'] = host;
|
|
3237
|
-
}
|
|
3238
|
-
if (typeof port !== 'undefined') {
|
|
3239
|
-
payload['port'] = port;
|
|
3240
|
-
}
|
|
3241
|
-
if (typeof username !== 'undefined') {
|
|
3242
|
-
payload['username'] = username;
|
|
3243
|
-
}
|
|
3244
|
-
if (typeof password !== 'undefined') {
|
|
3245
|
-
payload['password'] = password;
|
|
3246
|
-
}
|
|
3247
|
-
if (typeof secure !== 'undefined') {
|
|
3248
|
-
payload['secure'] = secure;
|
|
3249
|
-
}
|
|
3250
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3251
|
-
|
|
3252
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3253
|
-
'content-type': 'application/json',
|
|
3254
|
-
}
|
|
3255
|
-
|
|
3256
|
-
return this.client.call(
|
|
3257
|
-
'patch',
|
|
3258
|
-
uri,
|
|
3259
|
-
apiHeaders,
|
|
3260
|
-
payload
|
|
3261
|
-
);
|
|
3262
|
-
}
|
|
3263
|
-
|
|
3264
|
-
/**
|
|
3265
|
-
* Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
|
|
3266
|
-
*
|
|
3267
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3268
|
-
* @param {boolean} params.enabled - Enable custom SMTP service
|
|
3269
|
-
* @param {string} params.senderName - Name of the email sender
|
|
3270
|
-
* @param {string} params.senderEmail - Email of the sender
|
|
3271
|
-
* @param {string} params.replyTo - Reply to email
|
|
3272
|
-
* @param {string} params.host - SMTP server host name
|
|
3273
|
-
* @param {number} params.port - SMTP server port
|
|
3274
|
-
* @param {string} params.username - SMTP server username
|
|
3275
|
-
* @param {string} params.password - SMTP server password
|
|
3276
|
-
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
3277
|
-
* @throws {AppwriteException}
|
|
3278
|
-
* @returns {Promise<Models.Project>}
|
|
3279
|
-
*/
|
|
3280
|
-
updateSMTP(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
|
|
3281
|
-
/**
|
|
3282
|
-
* Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
|
|
3283
|
-
*
|
|
3284
|
-
* @param {string} projectId - Project unique ID.
|
|
3285
|
-
* @param {boolean} enabled - Enable custom SMTP service
|
|
3286
|
-
* @param {string} senderName - Name of the email sender
|
|
3287
|
-
* @param {string} senderEmail - Email of the sender
|
|
3288
|
-
* @param {string} replyTo - Reply to email
|
|
3289
|
-
* @param {string} host - SMTP server host name
|
|
3290
|
-
* @param {number} port - SMTP server port
|
|
3291
|
-
* @param {string} username - SMTP server username
|
|
3292
|
-
* @param {string} password - SMTP server password
|
|
3293
|
-
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
3294
|
-
* @throws {AppwriteException}
|
|
3295
|
-
* @returns {Promise<Models.Project>}
|
|
3296
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3297
|
-
*/
|
|
3298
|
-
updateSMTP(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
|
|
3299
|
-
updateSMTP(
|
|
3300
|
-
paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3301
|
-
...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3302
|
-
): Promise<Models.Project> {
|
|
3303
|
-
let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3304
|
-
|
|
3305
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3306
|
-
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3307
|
-
} else {
|
|
3308
|
-
params = {
|
|
3309
|
-
projectId: paramsOrFirst as string,
|
|
3310
|
-
enabled: rest[0] as boolean,
|
|
3311
|
-
senderName: rest[1] as string,
|
|
3312
|
-
senderEmail: rest[2] as string,
|
|
3313
|
-
replyTo: rest[3] as string,
|
|
3314
|
-
host: rest[4] as string,
|
|
3315
|
-
port: rest[5] as number,
|
|
3316
|
-
username: rest[6] as string,
|
|
3317
|
-
password: rest[7] as string,
|
|
3318
|
-
secure: rest[8] as SMTPSecure
|
|
3319
|
-
};
|
|
3320
|
-
}
|
|
3321
|
-
|
|
3322
|
-
const projectId = params.projectId;
|
|
3323
|
-
const enabled = params.enabled;
|
|
3324
|
-
const senderName = params.senderName;
|
|
3325
|
-
const senderEmail = params.senderEmail;
|
|
3326
|
-
const replyTo = params.replyTo;
|
|
3327
|
-
const host = params.host;
|
|
3328
|
-
const port = params.port;
|
|
3329
|
-
const username = params.username;
|
|
3330
|
-
const password = params.password;
|
|
3331
|
-
const secure = params.secure;
|
|
3332
|
-
|
|
3333
|
-
if (typeof projectId === 'undefined') {
|
|
3334
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3335
|
-
}
|
|
3336
|
-
if (typeof enabled === 'undefined') {
|
|
3337
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
3338
|
-
}
|
|
3339
|
-
|
|
3340
|
-
const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
|
|
3341
|
-
const payload: Payload = {};
|
|
3342
|
-
if (typeof enabled !== 'undefined') {
|
|
3343
|
-
payload['enabled'] = enabled;
|
|
3344
|
-
}
|
|
3345
|
-
if (typeof senderName !== 'undefined') {
|
|
3346
|
-
payload['senderName'] = senderName;
|
|
3347
|
-
}
|
|
3348
|
-
if (typeof senderEmail !== 'undefined') {
|
|
3349
|
-
payload['senderEmail'] = senderEmail;
|
|
3350
|
-
}
|
|
3351
|
-
if (typeof replyTo !== 'undefined') {
|
|
3352
|
-
payload['replyTo'] = replyTo;
|
|
3353
|
-
}
|
|
3354
|
-
if (typeof host !== 'undefined') {
|
|
3355
|
-
payload['host'] = host;
|
|
3356
|
-
}
|
|
3357
|
-
if (typeof port !== 'undefined') {
|
|
3358
|
-
payload['port'] = port;
|
|
3359
|
-
}
|
|
3360
|
-
if (typeof username !== 'undefined') {
|
|
3361
|
-
payload['username'] = username;
|
|
3362
|
-
}
|
|
3363
|
-
if (typeof password !== 'undefined') {
|
|
3364
|
-
payload['password'] = password;
|
|
3365
|
-
}
|
|
3366
|
-
if (typeof secure !== 'undefined') {
|
|
3367
|
-
payload['secure'] = secure;
|
|
3368
|
-
}
|
|
3369
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3370
|
-
|
|
3371
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3372
|
-
'content-type': 'application/json',
|
|
3373
|
-
}
|
|
3374
|
-
|
|
3375
|
-
return this.client.call(
|
|
3376
|
-
'patch',
|
|
3377
|
-
uri,
|
|
3378
|
-
apiHeaders,
|
|
3379
|
-
payload
|
|
3380
|
-
);
|
|
3381
|
-
}
|
|
3382
|
-
|
|
3383
|
-
/**
|
|
3384
|
-
* Send a test email to verify SMTP configuration.
|
|
3385
|
-
*
|
|
3386
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3387
|
-
* @param {string[]} params.emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
|
|
3388
|
-
* @param {string} params.senderName - Name of the email sender
|
|
3389
|
-
* @param {string} params.senderEmail - Email of the sender
|
|
3390
|
-
* @param {string} params.host - SMTP server host name
|
|
3391
|
-
* @param {string} params.replyTo - Reply to email
|
|
3392
|
-
* @param {number} params.port - SMTP server port
|
|
3393
|
-
* @param {string} params.username - SMTP server username
|
|
3394
|
-
* @param {string} params.password - SMTP server password
|
|
3395
|
-
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
3396
|
-
* @throws {AppwriteException}
|
|
3397
|
-
* @returns {Promise<{}>}
|
|
3398
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.createSMTPTest` instead.
|
|
3399
|
-
*/
|
|
3400
|
-
createSmtpTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
|
|
3401
|
-
/**
|
|
3402
|
-
* Send a test email to verify SMTP configuration.
|
|
3403
|
-
*
|
|
3404
|
-
* @param {string} projectId - Project unique ID.
|
|
3405
|
-
* @param {string[]} emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
|
|
3406
|
-
* @param {string} senderName - Name of the email sender
|
|
3407
|
-
* @param {string} senderEmail - Email of the sender
|
|
3408
|
-
* @param {string} host - SMTP server host name
|
|
3409
|
-
* @param {string} replyTo - Reply to email
|
|
3410
|
-
* @param {number} port - SMTP server port
|
|
3411
|
-
* @param {string} username - SMTP server username
|
|
3412
|
-
* @param {string} password - SMTP server password
|
|
3413
|
-
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
3414
|
-
* @throws {AppwriteException}
|
|
3415
|
-
* @returns {Promise<{}>}
|
|
3416
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3417
|
-
*/
|
|
3418
|
-
createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
3419
|
-
createSmtpTest(
|
|
3420
|
-
paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3421
|
-
...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3422
|
-
): Promise<{}> {
|
|
3423
|
-
let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3424
|
-
|
|
3425
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3426
|
-
params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3427
|
-
} else {
|
|
3428
|
-
params = {
|
|
3429
|
-
projectId: paramsOrFirst as string,
|
|
3430
|
-
emails: rest[0] as string[],
|
|
3431
|
-
senderName: rest[1] as string,
|
|
3432
|
-
senderEmail: rest[2] as string,
|
|
3433
|
-
host: rest[3] as string,
|
|
3434
|
-
replyTo: rest[4] as string,
|
|
3435
|
-
port: rest[5] as number,
|
|
3436
|
-
username: rest[6] as string,
|
|
3437
|
-
password: rest[7] as string,
|
|
3438
|
-
secure: rest[8] as SMTPSecure
|
|
3439
|
-
};
|
|
3440
|
-
}
|
|
3441
|
-
|
|
3442
|
-
const projectId = params.projectId;
|
|
3443
|
-
const emails = params.emails;
|
|
3444
|
-
const senderName = params.senderName;
|
|
3445
|
-
const senderEmail = params.senderEmail;
|
|
3446
|
-
const host = params.host;
|
|
3447
|
-
const replyTo = params.replyTo;
|
|
3448
|
-
const port = params.port;
|
|
3449
|
-
const username = params.username;
|
|
3450
|
-
const password = params.password;
|
|
3451
|
-
const secure = params.secure;
|
|
3452
|
-
|
|
3453
|
-
if (typeof projectId === 'undefined') {
|
|
3454
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3455
|
-
}
|
|
3456
|
-
if (typeof emails === 'undefined') {
|
|
3457
|
-
throw new AppwriteException('Missing required parameter: "emails"');
|
|
3458
|
-
}
|
|
3459
|
-
if (typeof senderName === 'undefined') {
|
|
3460
|
-
throw new AppwriteException('Missing required parameter: "senderName"');
|
|
3461
|
-
}
|
|
3462
|
-
if (typeof senderEmail === 'undefined') {
|
|
3463
|
-
throw new AppwriteException('Missing required parameter: "senderEmail"');
|
|
3464
|
-
}
|
|
3465
|
-
if (typeof host === 'undefined') {
|
|
3466
|
-
throw new AppwriteException('Missing required parameter: "host"');
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3469
|
-
const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
|
|
3470
|
-
const payload: Payload = {};
|
|
3471
|
-
if (typeof emails !== 'undefined') {
|
|
3472
|
-
payload['emails'] = emails;
|
|
3473
|
-
}
|
|
3474
|
-
if (typeof senderName !== 'undefined') {
|
|
3475
|
-
payload['senderName'] = senderName;
|
|
3476
|
-
}
|
|
3477
|
-
if (typeof senderEmail !== 'undefined') {
|
|
3478
|
-
payload['senderEmail'] = senderEmail;
|
|
3479
|
-
}
|
|
3480
|
-
if (typeof replyTo !== 'undefined') {
|
|
3481
|
-
payload['replyTo'] = replyTo;
|
|
3482
|
-
}
|
|
3483
|
-
if (typeof host !== 'undefined') {
|
|
3484
|
-
payload['host'] = host;
|
|
3485
|
-
}
|
|
3486
|
-
if (typeof port !== 'undefined') {
|
|
3487
|
-
payload['port'] = port;
|
|
3488
|
-
}
|
|
3489
|
-
if (typeof username !== 'undefined') {
|
|
3490
|
-
payload['username'] = username;
|
|
3491
|
-
}
|
|
3492
|
-
if (typeof password !== 'undefined') {
|
|
3493
|
-
payload['password'] = password;
|
|
3494
|
-
}
|
|
3495
|
-
if (typeof secure !== 'undefined') {
|
|
3496
|
-
payload['secure'] = secure;
|
|
3497
|
-
}
|
|
3498
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3499
|
-
|
|
3500
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3501
|
-
'content-type': 'application/json',
|
|
3502
|
-
}
|
|
3503
|
-
|
|
3504
|
-
return this.client.call(
|
|
3505
|
-
'post',
|
|
3506
|
-
uri,
|
|
3507
|
-
apiHeaders,
|
|
3508
|
-
payload
|
|
3509
|
-
);
|
|
3510
|
-
}
|
|
3511
|
-
|
|
3512
|
-
/**
|
|
3513
|
-
* Send a test email to verify SMTP configuration.
|
|
3514
|
-
*
|
|
3515
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3516
|
-
* @param {string[]} params.emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
|
|
3517
|
-
* @param {string} params.senderName - Name of the email sender
|
|
3518
|
-
* @param {string} params.senderEmail - Email of the sender
|
|
3519
|
-
* @param {string} params.host - SMTP server host name
|
|
3520
|
-
* @param {string} params.replyTo - Reply to email
|
|
3521
|
-
* @param {number} params.port - SMTP server port
|
|
3522
|
-
* @param {string} params.username - SMTP server username
|
|
3523
|
-
* @param {string} params.password - SMTP server password
|
|
3524
|
-
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
3525
|
-
* @throws {AppwriteException}
|
|
3526
|
-
* @returns {Promise<{}>}
|
|
3527
|
-
*/
|
|
3528
|
-
createSMTPTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
|
|
3529
|
-
/**
|
|
3530
|
-
* Send a test email to verify SMTP configuration.
|
|
3531
|
-
*
|
|
3532
|
-
* @param {string} projectId - Project unique ID.
|
|
3533
|
-
* @param {string[]} emails - Array of emails to send test email to. Maximum of 10 emails are allowed.
|
|
3534
|
-
* @param {string} senderName - Name of the email sender
|
|
3535
|
-
* @param {string} senderEmail - Email of the sender
|
|
3536
|
-
* @param {string} host - SMTP server host name
|
|
3537
|
-
* @param {string} replyTo - Reply to email
|
|
3538
|
-
* @param {number} port - SMTP server port
|
|
3539
|
-
* @param {string} username - SMTP server username
|
|
3540
|
-
* @param {string} password - SMTP server password
|
|
3541
|
-
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
3542
|
-
* @throws {AppwriteException}
|
|
3543
|
-
* @returns {Promise<{}>}
|
|
3544
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3545
|
-
*/
|
|
3546
|
-
createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
3547
|
-
createSMTPTest(
|
|
3548
|
-
paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3549
|
-
...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3550
|
-
): Promise<{}> {
|
|
3551
|
-
let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3552
|
-
|
|
3553
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3554
|
-
params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3555
|
-
} else {
|
|
3556
|
-
params = {
|
|
3557
|
-
projectId: paramsOrFirst as string,
|
|
3558
|
-
emails: rest[0] as string[],
|
|
3559
|
-
senderName: rest[1] as string,
|
|
3560
|
-
senderEmail: rest[2] as string,
|
|
3561
|
-
host: rest[3] as string,
|
|
3562
|
-
replyTo: rest[4] as string,
|
|
3563
|
-
port: rest[5] as number,
|
|
3564
|
-
username: rest[6] as string,
|
|
3565
|
-
password: rest[7] as string,
|
|
3566
|
-
secure: rest[8] as SMTPSecure
|
|
3567
|
-
};
|
|
3568
|
-
}
|
|
3569
|
-
|
|
3570
|
-
const projectId = params.projectId;
|
|
3571
|
-
const emails = params.emails;
|
|
3572
|
-
const senderName = params.senderName;
|
|
3573
|
-
const senderEmail = params.senderEmail;
|
|
3574
|
-
const host = params.host;
|
|
3575
|
-
const replyTo = params.replyTo;
|
|
3576
|
-
const port = params.port;
|
|
3577
|
-
const username = params.username;
|
|
3578
|
-
const password = params.password;
|
|
3579
|
-
const secure = params.secure;
|
|
3580
|
-
|
|
3581
|
-
if (typeof projectId === 'undefined') {
|
|
3582
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3583
|
-
}
|
|
3584
|
-
if (typeof emails === 'undefined') {
|
|
3585
|
-
throw new AppwriteException('Missing required parameter: "emails"');
|
|
3586
|
-
}
|
|
3587
|
-
if (typeof senderName === 'undefined') {
|
|
3588
|
-
throw new AppwriteException('Missing required parameter: "senderName"');
|
|
3589
|
-
}
|
|
3590
|
-
if (typeof senderEmail === 'undefined') {
|
|
3591
|
-
throw new AppwriteException('Missing required parameter: "senderEmail"');
|
|
3592
|
-
}
|
|
3593
|
-
if (typeof host === 'undefined') {
|
|
3594
|
-
throw new AppwriteException('Missing required parameter: "host"');
|
|
3595
|
-
}
|
|
3596
|
-
|
|
3597
|
-
const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
|
|
3598
|
-
const payload: Payload = {};
|
|
3599
|
-
if (typeof emails !== 'undefined') {
|
|
3600
|
-
payload['emails'] = emails;
|
|
3601
|
-
}
|
|
3602
|
-
if (typeof senderName !== 'undefined') {
|
|
3603
|
-
payload['senderName'] = senderName;
|
|
3604
|
-
}
|
|
3605
|
-
if (typeof senderEmail !== 'undefined') {
|
|
3606
|
-
payload['senderEmail'] = senderEmail;
|
|
3607
|
-
}
|
|
3608
|
-
if (typeof replyTo !== 'undefined') {
|
|
3609
|
-
payload['replyTo'] = replyTo;
|
|
3610
|
-
}
|
|
3611
|
-
if (typeof host !== 'undefined') {
|
|
3612
|
-
payload['host'] = host;
|
|
3613
|
-
}
|
|
3614
|
-
if (typeof port !== 'undefined') {
|
|
3615
|
-
payload['port'] = port;
|
|
3616
|
-
}
|
|
3617
|
-
if (typeof username !== 'undefined') {
|
|
3618
|
-
payload['username'] = username;
|
|
3619
|
-
}
|
|
3620
|
-
if (typeof password !== 'undefined') {
|
|
3621
|
-
payload['password'] = password;
|
|
3622
|
-
}
|
|
3623
|
-
if (typeof secure !== 'undefined') {
|
|
3624
|
-
payload['secure'] = secure;
|
|
3625
|
-
}
|
|
3626
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3627
|
-
|
|
3628
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3629
|
-
'content-type': 'application/json',
|
|
3630
|
-
}
|
|
3631
|
-
|
|
3632
|
-
return this.client.call(
|
|
3633
|
-
'post',
|
|
3634
|
-
uri,
|
|
3635
|
-
apiHeaders,
|
|
3636
|
-
payload
|
|
3637
|
-
);
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
/**
|
|
3641
|
-
* Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
3642
|
-
*
|
|
3643
|
-
*
|
|
3644
|
-
* @param {string} params.projectId - Project ID
|
|
3645
|
-
* @param {Status} params.status - New status for the project
|
|
3646
|
-
* @throws {AppwriteException}
|
|
3647
|
-
* @returns {Promise<{}>}
|
|
3648
|
-
*/
|
|
3649
|
-
updateStatus(params: { projectId: string, status: Status }): Promise<{}>;
|
|
3650
|
-
/**
|
|
3651
|
-
* Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
3652
|
-
*
|
|
3653
|
-
*
|
|
3654
|
-
* @param {string} projectId - Project ID
|
|
3655
|
-
* @param {Status} status - New status for the project
|
|
3656
|
-
* @throws {AppwriteException}
|
|
3657
|
-
* @returns {Promise<{}>}
|
|
3658
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3659
|
-
*/
|
|
3660
|
-
updateStatus(projectId: string, status: Status): Promise<{}>;
|
|
3661
|
-
updateStatus(
|
|
3662
|
-
paramsOrFirst: { projectId: string, status: Status } | string,
|
|
3663
|
-
...rest: [(Status)?]
|
|
3664
|
-
): Promise<{}> {
|
|
3665
|
-
let params: { projectId: string, status: Status };
|
|
3666
|
-
|
|
3667
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3668
|
-
params = (paramsOrFirst || {}) as { projectId: string, status: Status };
|
|
3669
|
-
} else {
|
|
3670
|
-
params = {
|
|
3671
|
-
projectId: paramsOrFirst as string,
|
|
3672
|
-
status: rest[0] as Status
|
|
3673
|
-
};
|
|
3674
|
-
}
|
|
3675
|
-
|
|
3676
|
-
const projectId = params.projectId;
|
|
3677
|
-
const status = params.status;
|
|
3678
|
-
|
|
3679
|
-
if (typeof projectId === 'undefined') {
|
|
3680
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3681
|
-
}
|
|
3682
|
-
if (typeof status === 'undefined') {
|
|
3683
|
-
throw new AppwriteException('Missing required parameter: "status"');
|
|
3684
|
-
}
|
|
3685
|
-
|
|
3686
|
-
const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
|
|
3687
|
-
const payload: Payload = {};
|
|
3688
|
-
if (typeof status !== 'undefined') {
|
|
3689
|
-
payload['status'] = status;
|
|
3690
|
-
}
|
|
3691
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3692
|
-
|
|
3693
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3694
|
-
'content-type': 'application/json',
|
|
3695
|
-
}
|
|
3696
|
-
|
|
3697
|
-
return this.client.call(
|
|
3698
|
-
'patch',
|
|
3699
|
-
uri,
|
|
3700
|
-
apiHeaders,
|
|
3701
|
-
payload
|
|
3702
|
-
);
|
|
3703
|
-
}
|
|
3704
|
-
|
|
3705
|
-
/**
|
|
3706
|
-
* Update the team ID of a project allowing for it to be transferred to another team.
|
|
3707
|
-
*
|
|
3708
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3709
|
-
* @param {string} params.teamId - Team ID of the team to transfer project to.
|
|
3710
|
-
* @throws {AppwriteException}
|
|
3711
|
-
* @returns {Promise<Models.Project>}
|
|
3712
|
-
*/
|
|
3713
|
-
updateTeam(params: { projectId: string, teamId: string }): Promise<Models.Project>;
|
|
3714
|
-
/**
|
|
3715
|
-
* Update the team ID of a project allowing for it to be transferred to another team.
|
|
3716
|
-
*
|
|
3717
|
-
* @param {string} projectId - Project unique ID.
|
|
3718
|
-
* @param {string} teamId - Team ID of the team to transfer project to.
|
|
3719
|
-
* @throws {AppwriteException}
|
|
3720
|
-
* @returns {Promise<Models.Project>}
|
|
3721
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3722
|
-
*/
|
|
3723
|
-
updateTeam(projectId: string, teamId: string): Promise<Models.Project>;
|
|
3724
|
-
updateTeam(
|
|
3725
|
-
paramsOrFirst: { projectId: string, teamId: string } | string,
|
|
3726
|
-
...rest: [(string)?]
|
|
3727
|
-
): Promise<Models.Project> {
|
|
3728
|
-
let params: { projectId: string, teamId: string };
|
|
3729
|
-
|
|
3730
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3731
|
-
params = (paramsOrFirst || {}) as { projectId: string, teamId: string };
|
|
3732
|
-
} else {
|
|
3733
|
-
params = {
|
|
3734
|
-
projectId: paramsOrFirst as string,
|
|
3735
|
-
teamId: rest[0] as string
|
|
3736
|
-
};
|
|
3737
|
-
}
|
|
3738
|
-
|
|
3739
|
-
const projectId = params.projectId;
|
|
3740
|
-
const teamId = params.teamId;
|
|
3741
|
-
|
|
3742
|
-
if (typeof projectId === 'undefined') {
|
|
3743
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3744
|
-
}
|
|
3745
|
-
if (typeof teamId === 'undefined') {
|
|
3746
|
-
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
3747
|
-
}
|
|
3748
|
-
|
|
3749
|
-
const apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
|
|
3750
|
-
const payload: Payload = {};
|
|
3751
|
-
if (typeof teamId !== 'undefined') {
|
|
3752
|
-
payload['teamId'] = teamId;
|
|
3753
|
-
}
|
|
3754
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3755
|
-
|
|
3756
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3757
|
-
'content-type': 'application/json',
|
|
3758
|
-
}
|
|
3759
|
-
|
|
3760
|
-
return this.client.call(
|
|
3761
|
-
'patch',
|
|
3762
|
-
uri,
|
|
3763
|
-
apiHeaders,
|
|
3764
|
-
payload
|
|
3765
|
-
);
|
|
3766
|
-
}
|
|
3767
|
-
|
|
3768
|
-
/**
|
|
3769
|
-
* Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
|
|
3770
|
-
*
|
|
3771
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3772
|
-
* @param {EmailTemplateType} params.type - Template type
|
|
3773
|
-
* @param {EmailTemplateLocale} params.locale - Template locale
|
|
3774
|
-
* @throws {AppwriteException}
|
|
3775
|
-
* @returns {Promise<Models.EmailTemplate>}
|
|
3776
|
-
*/
|
|
3777
|
-
getEmailTemplate(params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale }): Promise<Models.EmailTemplate>;
|
|
3778
|
-
/**
|
|
3779
|
-
* Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
|
|
3780
|
-
*
|
|
3781
|
-
* @param {string} projectId - Project unique ID.
|
|
3782
|
-
* @param {EmailTemplateType} type - Template type
|
|
3783
|
-
* @param {EmailTemplateLocale} locale - Template locale
|
|
3784
|
-
* @throws {AppwriteException}
|
|
3785
|
-
* @returns {Promise<Models.EmailTemplate>}
|
|
3786
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3787
|
-
*/
|
|
3788
|
-
getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
|
|
3789
|
-
getEmailTemplate(
|
|
3790
|
-
paramsOrFirst: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale } | string,
|
|
3791
|
-
...rest: [(EmailTemplateType)?, (EmailTemplateLocale)?]
|
|
3792
|
-
): Promise<Models.EmailTemplate> {
|
|
3793
|
-
let params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
|
|
3794
|
-
|
|
3795
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3796
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
|
|
3797
|
-
} else {
|
|
3798
|
-
params = {
|
|
3799
|
-
projectId: paramsOrFirst as string,
|
|
3800
|
-
type: rest[0] as EmailTemplateType,
|
|
3801
|
-
locale: rest[1] as EmailTemplateLocale
|
|
3802
|
-
};
|
|
3803
|
-
}
|
|
3804
|
-
|
|
3805
|
-
const projectId = params.projectId;
|
|
3806
|
-
const type = params.type;
|
|
3807
|
-
const locale = params.locale;
|
|
3808
|
-
|
|
3809
|
-
if (typeof projectId === 'undefined') {
|
|
3810
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3811
|
-
}
|
|
3812
|
-
if (typeof type === 'undefined') {
|
|
3813
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
3814
|
-
}
|
|
3815
|
-
if (typeof locale === 'undefined') {
|
|
3816
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
3817
|
-
}
|
|
3818
|
-
|
|
3819
|
-
const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
3820
|
-
const payload: Payload = {};
|
|
3821
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3822
|
-
|
|
3823
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3824
|
-
}
|
|
3825
|
-
|
|
3826
|
-
return this.client.call(
|
|
3827
|
-
'get',
|
|
3828
|
-
uri,
|
|
3829
|
-
apiHeaders,
|
|
3830
|
-
payload
|
|
3831
|
-
);
|
|
3832
|
-
}
|
|
3833
|
-
|
|
3834
|
-
/**
|
|
3835
|
-
* Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.
|
|
3836
|
-
*
|
|
3837
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3838
|
-
* @param {EmailTemplateType} params.type - Template type
|
|
3839
|
-
* @param {EmailTemplateLocale} params.locale - Template locale
|
|
3840
|
-
* @param {string} params.subject - Email Subject
|
|
3841
|
-
* @param {string} params.message - Template message
|
|
3842
|
-
* @param {string} params.senderName - Name of the email sender
|
|
3843
|
-
* @param {string} params.senderEmail - Email of the sender
|
|
3844
|
-
* @param {string} params.replyTo - Reply to email
|
|
3845
|
-
* @throws {AppwriteException}
|
|
3846
|
-
* @returns {Promise<Models.EmailTemplate>}
|
|
3847
|
-
*/
|
|
3848
|
-
updateEmailTemplate(params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string }): Promise<Models.EmailTemplate>;
|
|
3849
|
-
/**
|
|
3850
|
-
* Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.
|
|
3851
|
-
*
|
|
3852
|
-
* @param {string} projectId - Project unique ID.
|
|
3853
|
-
* @param {EmailTemplateType} type - Template type
|
|
3854
|
-
* @param {EmailTemplateLocale} locale - Template locale
|
|
3855
|
-
* @param {string} subject - Email Subject
|
|
3856
|
-
* @param {string} message - Template message
|
|
3857
|
-
* @param {string} senderName - Name of the email sender
|
|
3858
|
-
* @param {string} senderEmail - Email of the sender
|
|
3859
|
-
* @param {string} replyTo - Reply to email
|
|
3860
|
-
* @throws {AppwriteException}
|
|
3861
|
-
* @returns {Promise<Models.EmailTemplate>}
|
|
3862
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3863
|
-
*/
|
|
3864
|
-
updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.EmailTemplate>;
|
|
3865
|
-
updateEmailTemplate(
|
|
3866
|
-
paramsOrFirst: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string } | string,
|
|
3867
|
-
...rest: [(EmailTemplateType)?, (EmailTemplateLocale)?, (string)?, (string)?, (string)?, (string)?, (string)?]
|
|
3868
|
-
): Promise<Models.EmailTemplate> {
|
|
3869
|
-
let params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string };
|
|
3870
|
-
|
|
3871
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3872
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string };
|
|
3873
|
-
} else {
|
|
3874
|
-
params = {
|
|
3875
|
-
projectId: paramsOrFirst as string,
|
|
3876
|
-
type: rest[0] as EmailTemplateType,
|
|
3877
|
-
locale: rest[1] as EmailTemplateLocale,
|
|
3878
|
-
subject: rest[2] as string,
|
|
3879
|
-
message: rest[3] as string,
|
|
3880
|
-
senderName: rest[4] as string,
|
|
3881
|
-
senderEmail: rest[5] as string,
|
|
3882
|
-
replyTo: rest[6] as string
|
|
3883
|
-
};
|
|
3884
|
-
}
|
|
3885
|
-
|
|
3886
|
-
const projectId = params.projectId;
|
|
3887
|
-
const type = params.type;
|
|
3888
|
-
const locale = params.locale;
|
|
3889
|
-
const subject = params.subject;
|
|
3890
|
-
const message = params.message;
|
|
3891
|
-
const senderName = params.senderName;
|
|
3892
|
-
const senderEmail = params.senderEmail;
|
|
3893
|
-
const replyTo = params.replyTo;
|
|
3894
|
-
|
|
3895
|
-
if (typeof projectId === 'undefined') {
|
|
3896
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3897
|
-
}
|
|
3898
|
-
if (typeof type === 'undefined') {
|
|
3899
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
3900
|
-
}
|
|
3901
|
-
if (typeof locale === 'undefined') {
|
|
3902
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
3903
|
-
}
|
|
3904
|
-
if (typeof subject === 'undefined') {
|
|
3905
|
-
throw new AppwriteException('Missing required parameter: "subject"');
|
|
3906
|
-
}
|
|
3907
|
-
if (typeof message === 'undefined') {
|
|
3908
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
3909
|
-
}
|
|
3910
|
-
|
|
3911
|
-
const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
3912
|
-
const payload: Payload = {};
|
|
3913
|
-
if (typeof subject !== 'undefined') {
|
|
3914
|
-
payload['subject'] = subject;
|
|
3915
|
-
}
|
|
3916
|
-
if (typeof message !== 'undefined') {
|
|
3917
|
-
payload['message'] = message;
|
|
3918
|
-
}
|
|
3919
|
-
if (typeof senderName !== 'undefined') {
|
|
3920
|
-
payload['senderName'] = senderName;
|
|
3921
|
-
}
|
|
3922
|
-
if (typeof senderEmail !== 'undefined') {
|
|
3923
|
-
payload['senderEmail'] = senderEmail;
|
|
3924
|
-
}
|
|
3925
|
-
if (typeof replyTo !== 'undefined') {
|
|
3926
|
-
payload['replyTo'] = replyTo;
|
|
3927
|
-
}
|
|
3928
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3929
|
-
|
|
3930
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3931
|
-
'content-type': 'application/json',
|
|
3932
|
-
}
|
|
3933
|
-
|
|
3934
|
-
return this.client.call(
|
|
3935
|
-
'patch',
|
|
3936
|
-
uri,
|
|
3937
|
-
apiHeaders,
|
|
3938
|
-
payload
|
|
3939
|
-
);
|
|
3940
|
-
}
|
|
3941
|
-
|
|
3942
|
-
/**
|
|
3943
|
-
* Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state.
|
|
3944
|
-
*
|
|
3945
|
-
* @param {string} params.projectId - Project unique ID.
|
|
3946
|
-
* @param {EmailTemplateType} params.type - Template type
|
|
3947
|
-
* @param {EmailTemplateLocale} params.locale - Template locale
|
|
3948
|
-
* @throws {AppwriteException}
|
|
3949
|
-
* @returns {Promise<Models.EmailTemplate>}
|
|
3950
|
-
*/
|
|
3951
|
-
deleteEmailTemplate(params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale }): Promise<Models.EmailTemplate>;
|
|
3952
|
-
/**
|
|
3953
|
-
* Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state.
|
|
3954
|
-
*
|
|
3955
|
-
* @param {string} projectId - Project unique ID.
|
|
3956
|
-
* @param {EmailTemplateType} type - Template type
|
|
3957
|
-
* @param {EmailTemplateLocale} locale - Template locale
|
|
3958
|
-
* @throws {AppwriteException}
|
|
3959
|
-
* @returns {Promise<Models.EmailTemplate>}
|
|
3960
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3961
|
-
*/
|
|
3962
|
-
deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate>;
|
|
3963
|
-
deleteEmailTemplate(
|
|
3964
|
-
paramsOrFirst: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale } | string,
|
|
3965
|
-
...rest: [(EmailTemplateType)?, (EmailTemplateLocale)?]
|
|
3966
|
-
): Promise<Models.EmailTemplate> {
|
|
3967
|
-
let params: { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
|
|
3968
|
-
|
|
3969
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3970
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale };
|
|
3971
|
-
} else {
|
|
3972
|
-
params = {
|
|
3973
|
-
projectId: paramsOrFirst as string,
|
|
3974
|
-
type: rest[0] as EmailTemplateType,
|
|
3975
|
-
locale: rest[1] as EmailTemplateLocale
|
|
3976
|
-
};
|
|
3977
|
-
}
|
|
3978
|
-
|
|
3979
|
-
const projectId = params.projectId;
|
|
3980
|
-
const type = params.type;
|
|
3981
|
-
const locale = params.locale;
|
|
3982
|
-
|
|
3983
|
-
if (typeof projectId === 'undefined') {
|
|
3984
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
3985
|
-
}
|
|
3986
|
-
if (typeof type === 'undefined') {
|
|
3987
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
3988
|
-
}
|
|
3989
|
-
if (typeof locale === 'undefined') {
|
|
3990
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
3991
|
-
}
|
|
3992
|
-
|
|
3993
|
-
const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
3994
|
-
const payload: Payload = {};
|
|
3995
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3996
|
-
|
|
3997
|
-
const apiHeaders: { [header: string]: string } = {
|
|
3998
|
-
'content-type': 'application/json',
|
|
3999
|
-
}
|
|
4000
|
-
|
|
4001
|
-
return this.client.call(
|
|
4002
|
-
'delete',
|
|
4003
|
-
uri,
|
|
4004
|
-
apiHeaders,
|
|
4005
|
-
payload
|
|
4006
|
-
);
|
|
4007
|
-
}
|
|
4008
|
-
|
|
4009
|
-
/**
|
|
4010
|
-
* Get a custom SMS template for the specified locale and type returning it's contents.
|
|
4011
|
-
*
|
|
4012
|
-
* @param {string} params.projectId - Project unique ID.
|
|
4013
|
-
* @param {SmsTemplateType} params.type - Template type
|
|
4014
|
-
* @param {SmsTemplateLocale} params.locale - Template locale
|
|
4015
|
-
* @throws {AppwriteException}
|
|
4016
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4017
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.getSMSTemplate` instead.
|
|
4018
|
-
*/
|
|
4019
|
-
getSmsTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
|
|
4020
|
-
/**
|
|
4021
|
-
* Get a custom SMS template for the specified locale and type returning it's contents.
|
|
4022
|
-
*
|
|
4023
|
-
* @param {string} projectId - Project unique ID.
|
|
4024
|
-
* @param {SmsTemplateType} type - Template type
|
|
4025
|
-
* @param {SmsTemplateLocale} locale - Template locale
|
|
4026
|
-
* @throws {AppwriteException}
|
|
4027
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4028
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4029
|
-
*/
|
|
4030
|
-
getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
4031
|
-
getSmsTemplate(
|
|
4032
|
-
paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
|
|
4033
|
-
...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
|
|
4034
|
-
): Promise<Models.SmsTemplate> {
|
|
4035
|
-
let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4036
|
-
|
|
4037
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4038
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4039
|
-
} else {
|
|
4040
|
-
params = {
|
|
4041
|
-
projectId: paramsOrFirst as string,
|
|
4042
|
-
type: rest[0] as SmsTemplateType,
|
|
4043
|
-
locale: rest[1] as SmsTemplateLocale
|
|
4044
|
-
};
|
|
4045
|
-
}
|
|
4046
|
-
|
|
4047
|
-
const projectId = params.projectId;
|
|
4048
|
-
const type = params.type;
|
|
4049
|
-
const locale = params.locale;
|
|
4050
|
-
|
|
4051
|
-
if (typeof projectId === 'undefined') {
|
|
4052
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4053
|
-
}
|
|
4054
|
-
if (typeof type === 'undefined') {
|
|
4055
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
4056
|
-
}
|
|
4057
|
-
if (typeof locale === 'undefined') {
|
|
4058
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
4059
|
-
}
|
|
4060
|
-
|
|
4061
|
-
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
4062
|
-
const payload: Payload = {};
|
|
4063
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4064
|
-
|
|
4065
|
-
const apiHeaders: { [header: string]: string } = {
|
|
4066
|
-
}
|
|
4067
|
-
|
|
4068
|
-
return this.client.call(
|
|
4069
|
-
'get',
|
|
4070
|
-
uri,
|
|
4071
|
-
apiHeaders,
|
|
4072
|
-
payload
|
|
4073
|
-
);
|
|
4074
|
-
}
|
|
4075
|
-
|
|
4076
|
-
/**
|
|
4077
|
-
* Get a custom SMS template for the specified locale and type returning it's contents.
|
|
4078
|
-
*
|
|
4079
|
-
* @param {string} params.projectId - Project unique ID.
|
|
4080
|
-
* @param {SmsTemplateType} params.type - Template type
|
|
4081
|
-
* @param {SmsTemplateLocale} params.locale - Template locale
|
|
4082
|
-
* @throws {AppwriteException}
|
|
4083
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4084
|
-
*/
|
|
4085
|
-
getSMSTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
|
|
4086
|
-
/**
|
|
4087
|
-
* Get a custom SMS template for the specified locale and type returning it's contents.
|
|
4088
|
-
*
|
|
4089
|
-
* @param {string} projectId - Project unique ID.
|
|
4090
|
-
* @param {SmsTemplateType} type - Template type
|
|
4091
|
-
* @param {SmsTemplateLocale} locale - Template locale
|
|
4092
|
-
* @throws {AppwriteException}
|
|
4093
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4094
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4095
|
-
*/
|
|
4096
|
-
getSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
4097
|
-
getSMSTemplate(
|
|
4098
|
-
paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
|
|
4099
|
-
...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
|
|
4100
|
-
): Promise<Models.SmsTemplate> {
|
|
4101
|
-
let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4102
|
-
|
|
4103
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4104
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4105
|
-
} else {
|
|
4106
|
-
params = {
|
|
4107
|
-
projectId: paramsOrFirst as string,
|
|
4108
|
-
type: rest[0] as SmsTemplateType,
|
|
4109
|
-
locale: rest[1] as SmsTemplateLocale
|
|
4110
|
-
};
|
|
4111
|
-
}
|
|
4112
|
-
|
|
4113
|
-
const projectId = params.projectId;
|
|
4114
|
-
const type = params.type;
|
|
4115
|
-
const locale = params.locale;
|
|
4116
|
-
|
|
4117
|
-
if (typeof projectId === 'undefined') {
|
|
4118
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4119
|
-
}
|
|
4120
|
-
if (typeof type === 'undefined') {
|
|
4121
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
4122
|
-
}
|
|
4123
|
-
if (typeof locale === 'undefined') {
|
|
4124
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
4125
|
-
}
|
|
4126
|
-
|
|
4127
|
-
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
4128
|
-
const payload: Payload = {};
|
|
4129
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4130
|
-
|
|
4131
|
-
const apiHeaders: { [header: string]: string } = {
|
|
4132
|
-
}
|
|
4133
|
-
|
|
4134
|
-
return this.client.call(
|
|
4135
|
-
'get',
|
|
4136
|
-
uri,
|
|
4137
|
-
apiHeaders,
|
|
4138
|
-
payload
|
|
4139
|
-
);
|
|
4140
|
-
}
|
|
4141
|
-
|
|
4142
|
-
/**
|
|
4143
|
-
* Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
|
|
4144
|
-
*
|
|
4145
|
-
* @param {string} params.projectId - Project unique ID.
|
|
4146
|
-
* @param {SmsTemplateType} params.type - Template type
|
|
4147
|
-
* @param {SmsTemplateLocale} params.locale - Template locale
|
|
4148
|
-
* @param {string} params.message - Template message
|
|
4149
|
-
* @throws {AppwriteException}
|
|
4150
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4151
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateSMSTemplate` instead.
|
|
4152
|
-
*/
|
|
4153
|
-
updateSmsTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string }): Promise<Models.SmsTemplate>;
|
|
4154
|
-
/**
|
|
4155
|
-
* Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
|
|
4156
|
-
*
|
|
4157
|
-
* @param {string} projectId - Project unique ID.
|
|
4158
|
-
* @param {SmsTemplateType} type - Template type
|
|
4159
|
-
* @param {SmsTemplateLocale} locale - Template locale
|
|
4160
|
-
* @param {string} message - Template message
|
|
4161
|
-
* @throws {AppwriteException}
|
|
4162
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4163
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4164
|
-
*/
|
|
4165
|
-
updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate>;
|
|
4166
|
-
updateSmsTemplate(
|
|
4167
|
-
paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string } | string,
|
|
4168
|
-
...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?, (string)?]
|
|
4169
|
-
): Promise<Models.SmsTemplate> {
|
|
4170
|
-
let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
|
|
4171
|
-
|
|
4172
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4173
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
|
|
4174
|
-
} else {
|
|
4175
|
-
params = {
|
|
4176
|
-
projectId: paramsOrFirst as string,
|
|
4177
|
-
type: rest[0] as SmsTemplateType,
|
|
4178
|
-
locale: rest[1] as SmsTemplateLocale,
|
|
4179
|
-
message: rest[2] as string
|
|
4180
|
-
};
|
|
4181
|
-
}
|
|
4182
|
-
|
|
4183
|
-
const projectId = params.projectId;
|
|
4184
|
-
const type = params.type;
|
|
4185
|
-
const locale = params.locale;
|
|
4186
|
-
const message = params.message;
|
|
4187
|
-
|
|
4188
|
-
if (typeof projectId === 'undefined') {
|
|
4189
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4190
|
-
}
|
|
4191
|
-
if (typeof type === 'undefined') {
|
|
4192
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
4193
|
-
}
|
|
4194
|
-
if (typeof locale === 'undefined') {
|
|
4195
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
4196
|
-
}
|
|
4197
|
-
if (typeof message === 'undefined') {
|
|
4198
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
4199
|
-
}
|
|
4200
|
-
|
|
4201
|
-
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
4202
|
-
const payload: Payload = {};
|
|
4203
|
-
if (typeof message !== 'undefined') {
|
|
4204
|
-
payload['message'] = message;
|
|
4205
|
-
}
|
|
4206
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4207
|
-
|
|
4208
|
-
const apiHeaders: { [header: string]: string } = {
|
|
4209
|
-
'content-type': 'application/json',
|
|
4210
|
-
}
|
|
4211
|
-
|
|
4212
|
-
return this.client.call(
|
|
4213
|
-
'patch',
|
|
4214
|
-
uri,
|
|
4215
|
-
apiHeaders,
|
|
4216
|
-
payload
|
|
4217
|
-
);
|
|
4218
|
-
}
|
|
4219
|
-
|
|
4220
|
-
/**
|
|
4221
|
-
* Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
|
|
4222
|
-
*
|
|
4223
|
-
* @param {string} params.projectId - Project unique ID.
|
|
4224
|
-
* @param {SmsTemplateType} params.type - Template type
|
|
4225
|
-
* @param {SmsTemplateLocale} params.locale - Template locale
|
|
4226
|
-
* @param {string} params.message - Template message
|
|
4227
|
-
* @throws {AppwriteException}
|
|
4228
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4229
|
-
*/
|
|
4230
|
-
updateSMSTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string }): Promise<Models.SmsTemplate>;
|
|
4231
|
-
/**
|
|
4232
|
-
* Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
|
|
4233
|
-
*
|
|
4234
|
-
* @param {string} projectId - Project unique ID.
|
|
4235
|
-
* @param {SmsTemplateType} type - Template type
|
|
4236
|
-
* @param {SmsTemplateLocale} locale - Template locale
|
|
4237
|
-
* @param {string} message - Template message
|
|
4238
|
-
* @throws {AppwriteException}
|
|
4239
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4240
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4241
|
-
*/
|
|
4242
|
-
updateSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate>;
|
|
4243
|
-
updateSMSTemplate(
|
|
4244
|
-
paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string } | string,
|
|
4245
|
-
...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?, (string)?]
|
|
4246
|
-
): Promise<Models.SmsTemplate> {
|
|
4247
|
-
let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
|
|
4248
|
-
|
|
4249
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4250
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string };
|
|
4251
|
-
} else {
|
|
4252
|
-
params = {
|
|
4253
|
-
projectId: paramsOrFirst as string,
|
|
4254
|
-
type: rest[0] as SmsTemplateType,
|
|
4255
|
-
locale: rest[1] as SmsTemplateLocale,
|
|
4256
|
-
message: rest[2] as string
|
|
4257
|
-
};
|
|
4258
|
-
}
|
|
4259
|
-
|
|
4260
|
-
const projectId = params.projectId;
|
|
4261
|
-
const type = params.type;
|
|
4262
|
-
const locale = params.locale;
|
|
4263
|
-
const message = params.message;
|
|
4264
|
-
|
|
4265
|
-
if (typeof projectId === 'undefined') {
|
|
4266
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4267
|
-
}
|
|
4268
|
-
if (typeof type === 'undefined') {
|
|
4269
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
4270
|
-
}
|
|
4271
|
-
if (typeof locale === 'undefined') {
|
|
4272
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
4273
|
-
}
|
|
4274
|
-
if (typeof message === 'undefined') {
|
|
4275
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
4276
|
-
}
|
|
4277
|
-
|
|
4278
|
-
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
4279
|
-
const payload: Payload = {};
|
|
4280
|
-
if (typeof message !== 'undefined') {
|
|
4281
|
-
payload['message'] = message;
|
|
4282
|
-
}
|
|
4283
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4284
|
-
|
|
4285
|
-
const apiHeaders: { [header: string]: string } = {
|
|
4286
|
-
'content-type': 'application/json',
|
|
4287
|
-
}
|
|
4288
|
-
|
|
4289
|
-
return this.client.call(
|
|
4290
|
-
'patch',
|
|
4291
|
-
uri,
|
|
4292
|
-
apiHeaders,
|
|
4293
|
-
payload
|
|
4294
|
-
);
|
|
4295
|
-
}
|
|
4296
|
-
|
|
4297
|
-
/**
|
|
4298
|
-
* Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
|
|
4299
|
-
*
|
|
4300
|
-
* @param {string} params.projectId - Project unique ID.
|
|
4301
|
-
* @param {SmsTemplateType} params.type - Template type
|
|
4302
|
-
* @param {SmsTemplateLocale} params.locale - Template locale
|
|
4303
|
-
* @throws {AppwriteException}
|
|
4304
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4305
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.deleteSMSTemplate` instead.
|
|
4306
|
-
*/
|
|
4307
|
-
deleteSmsTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
|
|
4308
|
-
/**
|
|
4309
|
-
* Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
|
|
4310
|
-
*
|
|
4311
|
-
* @param {string} projectId - Project unique ID.
|
|
4312
|
-
* @param {SmsTemplateType} type - Template type
|
|
4313
|
-
* @param {SmsTemplateLocale} locale - Template locale
|
|
4314
|
-
* @throws {AppwriteException}
|
|
4315
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4316
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4317
|
-
*/
|
|
4318
|
-
deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
4319
|
-
deleteSmsTemplate(
|
|
4320
|
-
paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
|
|
4321
|
-
...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
|
|
4322
|
-
): Promise<Models.SmsTemplate> {
|
|
4323
|
-
let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4324
|
-
|
|
4325
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4326
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4327
|
-
} else {
|
|
4328
|
-
params = {
|
|
4329
|
-
projectId: paramsOrFirst as string,
|
|
4330
|
-
type: rest[0] as SmsTemplateType,
|
|
4331
|
-
locale: rest[1] as SmsTemplateLocale
|
|
4332
|
-
};
|
|
4333
|
-
}
|
|
4334
|
-
|
|
4335
|
-
const projectId = params.projectId;
|
|
4336
|
-
const type = params.type;
|
|
4337
|
-
const locale = params.locale;
|
|
4338
|
-
|
|
4339
|
-
if (typeof projectId === 'undefined') {
|
|
4340
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4341
|
-
}
|
|
4342
|
-
if (typeof type === 'undefined') {
|
|
4343
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
4344
|
-
}
|
|
4345
|
-
if (typeof locale === 'undefined') {
|
|
4346
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
4347
|
-
}
|
|
4348
|
-
|
|
4349
|
-
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
4350
|
-
const payload: Payload = {};
|
|
4351
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4352
|
-
|
|
4353
|
-
const apiHeaders: { [header: string]: string } = {
|
|
4354
|
-
'content-type': 'application/json',
|
|
4355
|
-
}
|
|
4356
|
-
|
|
4357
|
-
return this.client.call(
|
|
4358
|
-
'delete',
|
|
4359
|
-
uri,
|
|
4360
|
-
apiHeaders,
|
|
4361
|
-
payload
|
|
4362
|
-
);
|
|
4363
|
-
}
|
|
4364
|
-
|
|
4365
|
-
/**
|
|
4366
|
-
* Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
|
|
4367
|
-
*
|
|
4368
|
-
* @param {string} params.projectId - Project unique ID.
|
|
4369
|
-
* @param {SmsTemplateType} params.type - Template type
|
|
4370
|
-
* @param {SmsTemplateLocale} params.locale - Template locale
|
|
4371
|
-
* @throws {AppwriteException}
|
|
4372
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4373
|
-
*/
|
|
4374
|
-
deleteSMSTemplate(params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale }): Promise<Models.SmsTemplate>;
|
|
4375
|
-
/**
|
|
4376
|
-
* Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
|
|
4377
|
-
*
|
|
4378
|
-
* @param {string} projectId - Project unique ID.
|
|
4379
|
-
* @param {SmsTemplateType} type - Template type
|
|
4380
|
-
* @param {SmsTemplateLocale} locale - Template locale
|
|
4381
|
-
* @throws {AppwriteException}
|
|
4382
|
-
* @returns {Promise<Models.SmsTemplate>}
|
|
4383
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4384
|
-
*/
|
|
4385
|
-
deleteSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
|
|
4386
|
-
deleteSMSTemplate(
|
|
4387
|
-
paramsOrFirst: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale } | string,
|
|
4388
|
-
...rest: [(SmsTemplateType)?, (SmsTemplateLocale)?]
|
|
4389
|
-
): Promise<Models.SmsTemplate> {
|
|
4390
|
-
let params: { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4391
|
-
|
|
4392
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4393
|
-
params = (paramsOrFirst || {}) as { projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale };
|
|
4394
|
-
} else {
|
|
4395
|
-
params = {
|
|
4396
|
-
projectId: paramsOrFirst as string,
|
|
4397
|
-
type: rest[0] as SmsTemplateType,
|
|
4398
|
-
locale: rest[1] as SmsTemplateLocale
|
|
4399
|
-
};
|
|
4400
|
-
}
|
|
4401
|
-
|
|
4402
|
-
const projectId = params.projectId;
|
|
4403
|
-
const type = params.type;
|
|
4404
|
-
const locale = params.locale;
|
|
4405
|
-
|
|
4406
|
-
if (typeof projectId === 'undefined') {
|
|
4407
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4408
|
-
}
|
|
4409
|
-
if (typeof type === 'undefined') {
|
|
4410
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
4411
|
-
}
|
|
4412
|
-
if (typeof locale === 'undefined') {
|
|
4413
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
4414
|
-
}
|
|
4415
|
-
|
|
4416
|
-
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
4417
|
-
const payload: Payload = {};
|
|
4418
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4419
|
-
|
|
4420
|
-
const apiHeaders: { [header: string]: string } = {
|
|
4421
|
-
'content-type': 'application/json',
|
|
4422
|
-
}
|
|
4423
|
-
|
|
4424
|
-
return this.client.call(
|
|
4425
|
-
'delete',
|
|
4426
|
-
uri,
|
|
4427
|
-
apiHeaders,
|
|
4428
|
-
payload
|
|
4429
|
-
);
|
|
4430
|
-
}
|
|
4431
|
-
}
|