@appwrite.io/console 2.1.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +2201 -692
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2202 -693
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2201 -692
- package/docs/examples/account/create-anonymous-session.md +2 -0
- package/docs/examples/account/create-billing-address.md +2 -0
- package/docs/examples/account/create-email-password-session.md +2 -0
- package/docs/examples/account/create-email-token.md +2 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +2 -0
- package/docs/examples/account/create-key.md +17 -0
- package/docs/examples/account/create-magic-url-token.md +2 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/create-o-auth-2-session.md +2 -0
- package/docs/examples/account/create-o-auth-2-token.md +2 -0
- package/docs/examples/account/create-payment-method.md +2 -0
- package/docs/examples/account/create-phone-token.md +2 -0
- package/docs/examples/account/create-phone-verification.md +2 -0
- package/docs/examples/account/create-push-target.md +2 -0
- package/docs/examples/account/create-recovery.md +2 -0
- package/docs/examples/account/create-session.md +2 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +2 -0
- package/docs/examples/account/delete-billing-address.md +2 -0
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/delete-key.md +15 -0
- package/docs/examples/account/delete-mfa-authenticator.md +2 -0
- package/docs/examples/account/delete-payment-method.md +2 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +2 -0
- package/docs/examples/account/delete-sessions.md +2 -0
- package/docs/examples/account/delete.md +2 -0
- package/docs/examples/account/get-billing-address.md +2 -0
- package/docs/examples/account/get-coupon.md +2 -0
- package/docs/examples/account/get-key.md +15 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/get-payment-method.md +2 -0
- package/docs/examples/account/get-prefs.md +2 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +2 -0
- package/docs/examples/account/list-billing-addresses.md +2 -0
- package/docs/examples/account/list-identities.md +2 -0
- package/docs/examples/account/list-invoices.md +2 -0
- package/docs/examples/account/list-keys.md +15 -0
- package/docs/examples/account/list-logs.md +2 -0
- package/docs/examples/account/list-mfa-factors.md +2 -0
- package/docs/examples/account/list-payment-methods.md +2 -0
- package/docs/examples/account/list-sessions.md +2 -0
- package/docs/examples/account/update-billing-address.md +2 -0
- package/docs/examples/account/update-email-verification.md +2 -0
- package/docs/examples/account/update-email.md +2 -0
- package/docs/examples/account/update-key.md +18 -0
- package/docs/examples/account/update-magic-url-session.md +2 -0
- package/docs/examples/account/update-mfa-authenticator.md +2 -0
- package/docs/examples/account/update-mfa-challenge.md +2 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -0
- package/docs/examples/account/update-password.md +2 -0
- package/docs/examples/account/update-payment-method-mandate-options.md +2 -0
- package/docs/examples/account/update-payment-method-provider.md +2 -0
- package/docs/examples/account/update-payment-method.md +2 -0
- package/docs/examples/account/update-phone-session.md +2 -0
- package/docs/examples/account/update-phone-verification.md +2 -0
- package/docs/examples/account/update-phone.md +2 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +2 -0
- package/docs/examples/account/update-recovery.md +2 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +2 -0
- package/docs/examples/account/update-verification.md +2 -0
- package/docs/examples/assistant/chat.md +2 -0
- package/docs/examples/avatars/get-browser.md +2 -0
- package/docs/examples/avatars/get-credit-card.md +2 -0
- package/docs/examples/avatars/get-favicon.md +2 -0
- package/docs/examples/avatars/get-flag.md +2 -0
- package/docs/examples/avatars/get-image.md +2 -0
- package/docs/examples/avatars/get-initials.md +2 -0
- package/docs/examples/avatars/get-qr.md +2 -0
- package/docs/examples/avatars/get-screenshot.md +7 -5
- package/docs/examples/backups/create-archive.md +4 -2
- package/docs/examples/backups/create-policy.md +4 -2
- package/docs/examples/backups/create-restoration.md +4 -2
- package/docs/examples/backups/delete-archive.md +2 -0
- package/docs/examples/backups/delete-policy.md +2 -0
- package/docs/examples/backups/get-archive.md +2 -0
- package/docs/examples/backups/get-policy.md +2 -0
- package/docs/examples/backups/get-restoration.md +2 -0
- package/docs/examples/backups/list-archives.md +2 -0
- package/docs/examples/backups/list-policies.md +2 -0
- package/docs/examples/backups/list-restorations.md +2 -0
- package/docs/examples/backups/update-policy.md +2 -0
- package/docs/examples/console/create-program-membership.md +2 -0
- package/docs/examples/console/create-source.md +2 -0
- package/docs/examples/console/get-campaign.md +2 -0
- package/docs/examples/console/get-coupon.md +2 -0
- package/docs/examples/console/get-plan.md +2 -0
- package/docs/examples/console/get-plans.md +2 -0
- package/docs/examples/console/get-program.md +2 -0
- package/docs/examples/console/get-resource.md +2 -0
- package/docs/examples/console/{get-regions.md → list-regions.md} +3 -3
- package/docs/examples/console/suggest-columns.md +2 -0
- package/docs/examples/console/suggest-indexes.md +2 -0
- package/docs/examples/console/variables.md +2 -0
- package/docs/examples/databases/create-boolean-attribute.md +2 -0
- package/docs/examples/databases/create-collection.md +2 -0
- package/docs/examples/databases/create-datetime-attribute.md +2 -0
- package/docs/examples/databases/create-document.md +2 -0
- package/docs/examples/databases/create-documents.md +2 -0
- package/docs/examples/databases/create-email-attribute.md +2 -0
- package/docs/examples/databases/create-enum-attribute.md +2 -0
- package/docs/examples/databases/create-float-attribute.md +2 -0
- package/docs/examples/databases/create-index.md +4 -2
- package/docs/examples/databases/create-integer-attribute.md +2 -0
- package/docs/examples/databases/create-ip-attribute.md +2 -0
- package/docs/examples/databases/create-line-attribute.md +2 -0
- package/docs/examples/databases/create-longtext-attribute.md +20 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +20 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +2 -0
- package/docs/examples/databases/create-polygon-attribute.md +2 -0
- package/docs/examples/databases/create-relationship-attribute.md +2 -0
- package/docs/examples/databases/create-string-attribute.md +2 -0
- package/docs/examples/databases/create-text-attribute.md +20 -0
- package/docs/examples/databases/create-transaction.md +2 -0
- package/docs/examples/databases/create-url-attribute.md +2 -0
- package/docs/examples/databases/create-varchar-attribute.md +21 -0
- package/docs/examples/databases/create.md +2 -0
- package/docs/examples/databases/decrement-document-attribute.md +2 -0
- package/docs/examples/databases/delete-attribute.md +2 -0
- package/docs/examples/databases/delete-collection.md +2 -0
- package/docs/examples/databases/delete-document.md +2 -0
- package/docs/examples/databases/delete-documents.md +2 -0
- package/docs/examples/databases/delete-index.md +2 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +2 -0
- package/docs/examples/databases/get-collection-usage.md +2 -0
- package/docs/examples/databases/get-collection.md +2 -0
- package/docs/examples/databases/get-document.md +2 -0
- package/docs/examples/databases/get-index.md +2 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +2 -0
- package/docs/examples/databases/list-attributes.md +2 -0
- package/docs/examples/databases/list-collection-logs.md +2 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +2 -0
- package/docs/examples/databases/list-documents.md +2 -0
- package/docs/examples/databases/list-indexes.md +2 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +2 -0
- package/docs/examples/databases/list-usage.md +2 -0
- package/docs/examples/databases/list.md +2 -0
- package/docs/examples/databases/update-boolean-attribute.md +2 -0
- package/docs/examples/databases/update-collection.md +3 -1
- package/docs/examples/databases/update-datetime-attribute.md +2 -0
- package/docs/examples/databases/update-document.md +2 -0
- package/docs/examples/databases/update-documents.md +2 -0
- package/docs/examples/databases/update-email-attribute.md +2 -0
- package/docs/examples/databases/update-enum-attribute.md +2 -0
- package/docs/examples/databases/update-float-attribute.md +2 -0
- package/docs/examples/databases/update-integer-attribute.md +2 -0
- package/docs/examples/databases/update-ip-attribute.md +2 -0
- package/docs/examples/databases/update-line-attribute.md +2 -0
- package/docs/examples/databases/update-longtext-attribute.md +20 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +20 -0
- package/docs/examples/databases/update-point-attribute.md +2 -0
- package/docs/examples/databases/update-polygon-attribute.md +2 -0
- package/docs/examples/databases/update-relationship-attribute.md +2 -0
- package/docs/examples/databases/update-string-attribute.md +2 -0
- package/docs/examples/databases/update-text-attribute.md +20 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +2 -0
- package/docs/examples/databases/update-varchar-attribute.md +21 -0
- package/docs/examples/databases/update.md +3 -1
- package/docs/examples/databases/upsert-document.md +2 -0
- package/docs/examples/databases/upsert-documents.md +2 -0
- package/docs/examples/domains/create-preset-google-workspace.md +2 -0
- package/docs/examples/domains/create-preset-i-cloud.md +2 -0
- package/docs/examples/domains/create-preset-mailgun.md +2 -0
- package/docs/examples/domains/create-preset-outlook.md +2 -0
- package/docs/examples/domains/create-preset-proton-mail.md +2 -0
- package/docs/examples/domains/create-preset-zoho.md +2 -0
- package/docs/examples/domains/create-record-a.md +2 -0
- package/docs/examples/domains/create-record-aaaa.md +2 -0
- package/docs/examples/domains/create-record-alias.md +2 -0
- package/docs/examples/domains/create-record-caa.md +2 -0
- package/docs/examples/domains/create-record-cname.md +2 -0
- package/docs/examples/domains/create-record-https.md +2 -0
- package/docs/examples/domains/create-record-mx.md +2 -0
- package/docs/examples/domains/create-record-ns.md +2 -0
- package/docs/examples/domains/create-record-srv.md +2 -0
- package/docs/examples/domains/create-record-txt.md +2 -0
- package/docs/examples/domains/create.md +2 -0
- package/docs/examples/domains/delete-record.md +2 -0
- package/docs/examples/domains/delete.md +2 -0
- package/docs/examples/domains/get-preset-google-workspace.md +2 -0
- package/docs/examples/domains/get-preset-i-cloud.md +2 -0
- package/docs/examples/domains/get-preset-mailgun.md +2 -0
- package/docs/examples/domains/get-preset-outlook.md +2 -0
- package/docs/examples/domains/get-preset-proton-mail.md +2 -0
- package/docs/examples/domains/get-preset-zoho.md +2 -0
- package/docs/examples/domains/get-price.md +17 -0
- package/docs/examples/domains/get-record.md +2 -0
- package/docs/examples/domains/get-zone.md +2 -0
- package/docs/examples/domains/get.md +2 -0
- package/docs/examples/domains/list-records.md +2 -0
- package/docs/examples/domains/list-suggestions.md +2 -0
- package/docs/examples/domains/list.md +2 -0
- package/docs/examples/domains/update-nameservers.md +2 -0
- package/docs/examples/domains/update-record-a.md +2 -0
- package/docs/examples/domains/update-record-aaaa.md +2 -0
- package/docs/examples/domains/update-record-alias.md +2 -0
- package/docs/examples/domains/update-record-caa.md +2 -0
- package/docs/examples/domains/update-record-cname.md +2 -0
- package/docs/examples/domains/update-record-https.md +2 -0
- package/docs/examples/domains/update-record-mx.md +2 -0
- package/docs/examples/domains/update-record-ns.md +2 -0
- package/docs/examples/domains/update-record-srv.md +2 -0
- package/docs/examples/domains/update-record-txt.md +2 -0
- package/docs/examples/domains/update-team.md +2 -0
- package/docs/examples/domains/update-zone.md +2 -0
- package/docs/examples/functions/create-deployment.md +2 -0
- package/docs/examples/functions/create-duplicate-deployment.md +2 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +2 -0
- package/docs/examples/functions/create-variable.md +2 -0
- package/docs/examples/functions/create-vcs-deployment.md +2 -0
- package/docs/examples/functions/create.md +4 -2
- package/docs/examples/functions/delete-deployment.md +2 -0
- package/docs/examples/functions/delete-execution.md +2 -0
- package/docs/examples/functions/delete-variable.md +2 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +2 -0
- package/docs/examples/functions/get-deployment.md +2 -0
- package/docs/examples/functions/get-execution.md +2 -0
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/get-usage.md +2 -0
- package/docs/examples/functions/get-variable.md +2 -0
- package/docs/examples/functions/get.md +2 -0
- package/docs/examples/functions/list-deployments.md +2 -0
- package/docs/examples/functions/list-executions.md +2 -0
- package/docs/examples/functions/list-runtimes.md +2 -0
- package/docs/examples/functions/list-specifications.md +2 -0
- package/docs/examples/functions/list-templates.md +5 -3
- package/docs/examples/functions/list-usage.md +2 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +2 -0
- package/docs/examples/functions/update-deployment-status.md +2 -0
- package/docs/examples/functions/update-function-deployment.md +2 -0
- package/docs/examples/functions/update-variable.md +2 -0
- package/docs/examples/functions/update.md +4 -2
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +2 -0
- package/docs/examples/health/get-cache.md +2 -0
- package/docs/examples/health/get-certificate.md +2 -0
- package/docs/examples/health/get-db.md +2 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +2 -0
- package/docs/examples/health/get-queue-audits.md +2 -0
- package/docs/examples/health/get-queue-billing-project-aggregation.md +2 -0
- package/docs/examples/health/get-queue-billing-team-aggregation.md +2 -0
- package/docs/examples/health/get-queue-builds.md +2 -0
- package/docs/examples/health/get-queue-certificates.md +2 -0
- package/docs/examples/health/get-queue-databases.md +2 -0
- package/docs/examples/health/get-queue-deletes.md +2 -0
- package/docs/examples/health/get-queue-functions.md +2 -0
- package/docs/examples/health/get-queue-logs.md +2 -0
- package/docs/examples/health/get-queue-mails.md +2 -0
- package/docs/examples/health/get-queue-messaging.md +2 -0
- package/docs/examples/health/get-queue-migrations.md +2 -0
- package/docs/examples/health/get-queue-priority-builds.md +2 -0
- package/docs/examples/health/get-queue-region-manager.md +2 -0
- package/docs/examples/health/get-queue-stats-resources.md +2 -0
- package/docs/examples/health/get-queue-threats.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-queue-webhooks.md +2 -0
- package/docs/examples/health/get-storage-local.md +2 -0
- package/docs/examples/health/get-storage.md +2 -0
- package/docs/examples/health/get-time.md +2 -0
- package/docs/examples/health/get.md +2 -0
- package/docs/examples/locale/get.md +2 -0
- package/docs/examples/locale/list-codes.md +2 -0
- package/docs/examples/locale/list-continents.md +2 -0
- package/docs/examples/locale/list-countries-eu.md +2 -0
- package/docs/examples/locale/list-countries-phones.md +2 -0
- package/docs/examples/locale/list-countries.md +2 -0
- package/docs/examples/locale/list-currencies.md +2 -0
- package/docs/examples/locale/list-languages.md +2 -0
- package/docs/examples/messaging/create-apns-provider.md +2 -0
- package/docs/examples/messaging/create-email.md +2 -0
- package/docs/examples/messaging/create-fcm-provider.md +2 -0
- package/docs/examples/messaging/create-mailgun-provider.md +2 -0
- package/docs/examples/messaging/create-msg-91-provider.md +2 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +2 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/create-sms.md +2 -0
- package/docs/examples/messaging/create-smtp-provider.md +2 -0
- package/docs/examples/messaging/create-subscriber.md +2 -0
- package/docs/examples/messaging/create-telesign-provider.md +2 -0
- package/docs/examples/messaging/create-textmagic-provider.md +2 -0
- package/docs/examples/messaging/create-topic.md +2 -0
- package/docs/examples/messaging/create-twilio-provider.md +2 -0
- package/docs/examples/messaging/create-vonage-provider.md +2 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +2 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +2 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +2 -0
- package/docs/examples/messaging/list-messages.md +2 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +2 -0
- package/docs/examples/messaging/list-subscriber-logs.md +2 -0
- package/docs/examples/messaging/list-subscribers.md +2 -0
- package/docs/examples/messaging/list-targets.md +2 -0
- package/docs/examples/messaging/list-topic-logs.md +2 -0
- package/docs/examples/messaging/list-topics.md +2 -0
- package/docs/examples/messaging/update-apns-provider.md +2 -0
- package/docs/examples/messaging/update-email.md +2 -0
- package/docs/examples/messaging/update-fcm-provider.md +2 -0
- package/docs/examples/messaging/update-mailgun-provider.md +2 -0
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/update-sms.md +2 -0
- package/docs/examples/messaging/update-smtp-provider.md +2 -0
- package/docs/examples/messaging/update-telesign-provider.md +2 -0
- package/docs/examples/messaging/update-textmagic-provider.md +2 -0
- package/docs/examples/messaging/update-topic.md +2 -0
- package/docs/examples/messaging/update-twilio-provider.md +2 -0
- package/docs/examples/messaging/update-vonage-provider.md +2 -0
- package/docs/examples/migrations/create-appwrite-migration.md +4 -2
- package/docs/examples/migrations/create-csv-export.md +2 -0
- package/docs/examples/migrations/create-csv-import.md +2 -0
- package/docs/examples/migrations/create-firebase-migration.md +4 -2
- package/docs/examples/migrations/create-n-host-migration.md +4 -2
- package/docs/examples/migrations/create-supabase-migration.md +4 -2
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +4 -2
- package/docs/examples/migrations/get-firebase-report.md +4 -2
- package/docs/examples/migrations/get-n-host-report.md +4 -2
- package/docs/examples/migrations/get-supabase-report.md +4 -2
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +2 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/organizations/add-credit.md +2 -0
- package/docs/examples/organizations/cancel-downgrade.md +2 -0
- package/docs/examples/organizations/create-downgrade-feedback.md +2 -0
- package/docs/examples/organizations/create-invoice-payment.md +2 -0
- package/docs/examples/organizations/create-key.md +18 -0
- package/docs/examples/organizations/create.md +4 -2
- package/docs/examples/organizations/delete-backup-payment-method.md +2 -0
- package/docs/examples/organizations/delete-billing-address.md +2 -0
- package/docs/examples/organizations/delete-default-payment-method.md +2 -0
- package/docs/examples/organizations/delete-key.md +16 -0
- package/docs/examples/organizations/delete.md +2 -0
- package/docs/examples/organizations/estimation-create-organization.md +4 -2
- package/docs/examples/organizations/estimation-delete-organization.md +2 -0
- package/docs/examples/organizations/estimation-update-plan.md +4 -2
- package/docs/examples/organizations/get-aggregation.md +2 -0
- package/docs/examples/organizations/get-available-credits.md +2 -0
- package/docs/examples/organizations/get-billing-address.md +2 -0
- package/docs/examples/organizations/get-credit.md +2 -0
- package/docs/examples/organizations/get-invoice-download.md +2 -0
- package/docs/examples/organizations/get-invoice-view.md +2 -0
- package/docs/examples/organizations/get-invoice.md +2 -0
- package/docs/examples/organizations/{update-projects.md → get-key.md} +4 -2
- package/docs/examples/organizations/get-payment-method.md +2 -0
- package/docs/examples/organizations/get-plan.md +2 -0
- package/docs/examples/organizations/get-scopes.md +2 -0
- package/docs/examples/organizations/get-usage.md +2 -0
- package/docs/examples/organizations/list-aggregations.md +2 -0
- package/docs/examples/organizations/list-credits.md +2 -0
- package/docs/examples/organizations/list-invoices.md +2 -0
- package/docs/examples/organizations/list-keys.md +16 -0
- package/docs/examples/organizations/list-regions.md +15 -0
- package/docs/examples/organizations/list.md +2 -0
- package/docs/examples/organizations/set-backup-payment-method.md +2 -0
- package/docs/examples/organizations/set-billing-address.md +2 -0
- package/docs/examples/organizations/set-billing-email.md +2 -0
- package/docs/examples/organizations/set-billing-tax-id.md +2 -0
- package/docs/examples/organizations/set-default-payment-method.md +2 -0
- package/docs/examples/organizations/update-budget.md +2 -0
- package/docs/examples/organizations/update-key.md +19 -0
- package/docs/examples/organizations/update-plan.md +4 -2
- package/docs/examples/organizations/validate-invoice.md +2 -0
- package/docs/examples/organizations/validate-payment.md +2 -0
- package/docs/examples/project/create-variable.md +2 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +2 -0
- package/docs/examples/project/update-variable.md +2 -0
- package/docs/examples/projects/create-dev-key.md +2 -0
- package/docs/examples/projects/create-jwt.md +4 -2
- package/docs/examples/projects/create-key.md +5 -2
- package/docs/examples/projects/create-platform.md +2 -0
- package/docs/examples/projects/create-smtp-test.md +2 -0
- package/docs/examples/projects/create-webhook.md +2 -0
- package/docs/examples/projects/create.md +2 -0
- package/docs/examples/projects/delete-dev-key.md +2 -0
- package/docs/examples/projects/delete-email-template.md +2 -0
- package/docs/examples/projects/delete-key.md +2 -0
- package/docs/examples/projects/delete-platform.md +2 -0
- package/docs/examples/projects/delete-sms-template.md +2 -0
- package/docs/examples/projects/delete-webhook.md +2 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +2 -0
- package/docs/examples/projects/get-email-template.md +2 -0
- package/docs/examples/projects/get-key.md +2 -0
- package/docs/examples/projects/get-platform.md +2 -0
- package/docs/examples/projects/get-sms-template.md +2 -0
- package/docs/examples/projects/get-webhook.md +2 -0
- package/docs/examples/projects/get.md +2 -0
- package/docs/examples/projects/list-dev-keys.md +2 -0
- package/docs/examples/projects/list-keys.md +3 -0
- package/docs/examples/projects/list-platforms.md +2 -0
- package/docs/examples/projects/list-webhooks.md +2 -0
- package/docs/examples/projects/list.md +2 -0
- package/docs/examples/projects/update-api-status-all.md +2 -0
- package/docs/examples/projects/update-api-status.md +2 -0
- package/docs/examples/projects/update-auth-duration.md +2 -0
- package/docs/examples/projects/update-auth-limit.md +2 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +2 -0
- package/docs/examples/projects/update-auth-password-history.md +2 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +2 -0
- package/docs/examples/projects/update-auth-status.md +2 -0
- package/docs/examples/projects/update-dev-key.md +2 -0
- package/docs/examples/projects/update-email-template.md +2 -0
- package/docs/examples/projects/update-key.md +4 -2
- package/docs/examples/projects/update-labels.md +2 -0
- package/docs/examples/projects/update-memberships-privacy.md +2 -0
- package/docs/examples/projects/update-mock-numbers.md +2 -0
- package/docs/examples/projects/update-o-auth-2.md +2 -0
- package/docs/examples/projects/update-personal-data-check.md +2 -0
- package/docs/examples/projects/update-platform.md +2 -0
- package/docs/examples/projects/update-service-status-all.md +2 -0
- package/docs/examples/projects/update-service-status.md +2 -0
- package/docs/examples/projects/update-session-alerts.md +2 -0
- package/docs/examples/projects/update-session-invalidation.md +2 -0
- package/docs/examples/projects/update-sms-template.md +2 -0
- package/docs/examples/projects/update-smtp.md +2 -0
- package/docs/examples/projects/update-team.md +2 -0
- package/docs/examples/projects/update-webhook-signature.md +2 -0
- package/docs/examples/projects/update-webhook.md +2 -0
- package/docs/examples/projects/update.md +2 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +2 -0
- package/docs/examples/proxy/create-redirect-rule.md +2 -0
- package/docs/examples/proxy/create-site-rule.md +2 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +2 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +2 -0
- package/docs/examples/sites/create-duplicate-deployment.md +2 -0
- package/docs/examples/sites/create-template-deployment.md +2 -0
- package/docs/examples/sites/create-variable.md +2 -0
- package/docs/examples/sites/create-vcs-deployment.md +2 -0
- package/docs/examples/sites/create.md +2 -0
- package/docs/examples/sites/delete-deployment.md +2 -0
- package/docs/examples/sites/delete-log.md +2 -0
- package/docs/examples/sites/delete-variable.md +2 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +2 -0
- package/docs/examples/sites/get-deployment.md +2 -0
- package/docs/examples/sites/get-log.md +2 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +2 -0
- package/docs/examples/sites/get-variable.md +2 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +2 -0
- package/docs/examples/sites/list-frameworks.md +2 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +2 -0
- package/docs/examples/sites/list-templates.md +5 -3
- package/docs/examples/sites/list-usage.md +2 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +2 -0
- package/docs/examples/sites/update-deployment-status.md +2 -0
- package/docs/examples/sites/update-site-deployment.md +2 -0
- package/docs/examples/sites/update-variable.md +2 -0
- package/docs/examples/sites/update.md +2 -0
- package/docs/examples/storage/create-bucket.md +2 -0
- package/docs/examples/storage/create-file.md +2 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +2 -0
- package/docs/examples/storage/get-bucket-usage.md +2 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +2 -0
- package/docs/examples/storage/get-file-preview.md +2 -0
- package/docs/examples/storage/get-file-view.md +2 -0
- package/docs/examples/storage/get-file.md +2 -0
- package/docs/examples/storage/get-usage.md +2 -0
- package/docs/examples/storage/list-buckets.md +2 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +2 -0
- package/docs/examples/storage/update-file.md +2 -0
- package/docs/examples/tablesdb/create-boolean-column.md +2 -0
- package/docs/examples/tablesdb/create-datetime-column.md +2 -0
- package/docs/examples/tablesdb/create-email-column.md +2 -0
- package/docs/examples/tablesdb/create-enum-column.md +2 -0
- package/docs/examples/tablesdb/create-float-column.md +2 -0
- package/docs/examples/tablesdb/create-index.md +4 -2
- package/docs/examples/tablesdb/create-integer-column.md +2 -0
- package/docs/examples/tablesdb/create-ip-column.md +2 -0
- package/docs/examples/tablesdb/create-line-column.md +2 -0
- package/docs/examples/tablesdb/create-longtext-column.md +20 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +20 -0
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +2 -0
- package/docs/examples/tablesdb/create-polygon-column.md +2 -0
- package/docs/examples/tablesdb/create-relationship-column.md +2 -0
- package/docs/examples/tablesdb/create-row.md +2 -0
- package/docs/examples/tablesdb/create-rows.md +2 -0
- package/docs/examples/tablesdb/create-string-column.md +2 -0
- package/docs/examples/tablesdb/create-table.md +2 -0
- package/docs/examples/tablesdb/create-text-column.md +20 -0
- package/docs/examples/tablesdb/create-transaction.md +2 -0
- package/docs/examples/tablesdb/create-url-column.md +2 -0
- package/docs/examples/tablesdb/create-varchar-column.md +21 -0
- package/docs/examples/tablesdb/create.md +2 -0
- package/docs/examples/tablesdb/decrement-row-column.md +2 -0
- package/docs/examples/tablesdb/delete-column.md +2 -0
- package/docs/examples/tablesdb/delete-index.md +2 -0
- package/docs/examples/tablesdb/delete-row.md +2 -0
- package/docs/examples/tablesdb/delete-rows.md +2 -0
- package/docs/examples/tablesdb/delete-table.md +2 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +2 -0
- package/docs/examples/tablesdb/get-index.md +2 -0
- package/docs/examples/tablesdb/get-row.md +2 -0
- package/docs/examples/tablesdb/get-table-usage.md +2 -0
- package/docs/examples/tablesdb/get-table.md +2 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +2 -0
- package/docs/examples/tablesdb/list-columns.md +2 -0
- package/docs/examples/tablesdb/list-indexes.md +2 -0
- package/docs/examples/tablesdb/list-row-logs.md +2 -0
- package/docs/examples/tablesdb/list-rows.md +2 -0
- package/docs/examples/tablesdb/list-table-logs.md +2 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +2 -0
- package/docs/examples/tablesdb/list-usage.md +2 -0
- package/docs/examples/tablesdb/list.md +2 -0
- package/docs/examples/tablesdb/update-boolean-column.md +2 -0
- package/docs/examples/tablesdb/update-datetime-column.md +2 -0
- package/docs/examples/tablesdb/update-email-column.md +2 -0
- package/docs/examples/tablesdb/update-enum-column.md +2 -0
- package/docs/examples/tablesdb/update-float-column.md +2 -0
- package/docs/examples/tablesdb/update-integer-column.md +2 -0
- package/docs/examples/tablesdb/update-ip-column.md +2 -0
- package/docs/examples/tablesdb/update-line-column.md +2 -0
- package/docs/examples/tablesdb/update-longtext-column.md +20 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +20 -0
- package/docs/examples/tablesdb/update-point-column.md +2 -0
- package/docs/examples/tablesdb/update-polygon-column.md +2 -0
- package/docs/examples/tablesdb/update-relationship-column.md +2 -0
- package/docs/examples/tablesdb/update-row.md +2 -0
- package/docs/examples/tablesdb/update-rows.md +2 -0
- package/docs/examples/tablesdb/update-string-column.md +2 -0
- package/docs/examples/tablesdb/update-table.md +3 -1
- package/docs/examples/tablesdb/update-text-column.md +20 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +2 -0
- package/docs/examples/tablesdb/update-varchar-column.md +21 -0
- package/docs/examples/tablesdb/update.md +3 -1
- package/docs/examples/tablesdb/upsert-row.md +2 -0
- package/docs/examples/tablesdb/upsert-rows.md +2 -0
- package/docs/examples/teams/create-membership.md +2 -0
- package/docs/examples/teams/create.md +2 -0
- package/docs/examples/teams/delete-membership.md +2 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +2 -0
- package/docs/examples/teams/get-prefs.md +2 -0
- package/docs/examples/teams/get.md +2 -0
- package/docs/examples/teams/list-logs.md +2 -0
- package/docs/examples/teams/list-memberships.md +2 -0
- package/docs/examples/teams/list.md +2 -0
- package/docs/examples/teams/update-membership-status.md +2 -0
- package/docs/examples/teams/update-membership.md +2 -0
- package/docs/examples/teams/update-name.md +2 -0
- package/docs/examples/teams/update-prefs.md +2 -0
- package/docs/examples/tokens/create-file-token.md +2 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +2 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +2 -0
- package/docs/examples/users/create-bcrypt-user.md +2 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +2 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +2 -0
- package/docs/examples/users/create-scrypt-modified-user.md +2 -0
- package/docs/examples/users/create-scrypt-user.md +2 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +2 -0
- package/docs/examples/users/create-target.md +2 -0
- package/docs/examples/users/create-token.md +2 -0
- package/docs/examples/users/create.md +2 -0
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/delete-mfa-authenticator.md +2 -0
- package/docs/examples/users/delete-session.md +2 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +2 -0
- package/docs/examples/users/delete.md +2 -0
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +2 -0
- package/docs/examples/users/get-target.md +2 -0
- package/docs/examples/users/get-usage.md +2 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +2 -0
- package/docs/examples/users/list-logs.md +2 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list-targets.md +2 -0
- package/docs/examples/users/list.md +2 -0
- package/docs/examples/users/update-email-verification.md +2 -0
- package/docs/examples/users/update-email.md +2 -0
- package/docs/examples/users/update-labels.md +2 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +2 -0
- package/docs/examples/users/update-name.md +2 -0
- package/docs/examples/users/update-password.md +2 -0
- package/docs/examples/users/update-phone-verification.md +2 -0
- package/docs/examples/users/update-phone.md +2 -0
- package/docs/examples/users/update-prefs.md +2 -0
- package/docs/examples/users/update-status.md +2 -0
- package/docs/examples/users/update-target.md +2 -0
- package/docs/examples/vcs/create-repository-detection.md +2 -0
- package/docs/examples/vcs/create-repository.md +2 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository-contents.md +2 -0
- package/docs/examples/vcs/get-repository.md +2 -0
- package/docs/examples/vcs/list-installations.md +2 -0
- package/docs/examples/vcs/list-repositories.md +2 -0
- package/docs/examples/vcs/list-repository-branches.md +2 -0
- package/docs/examples/vcs/update-external-deployments.md +2 -0
- package/package.json +1 -1
- package/src/channel.ts +38 -22
- package/src/client.ts +110 -49
- package/src/enums/backup-services.ts +5 -0
- package/src/enums/browser-permission.ts +22 -0
- package/src/enums/build-runtime.ts +5 -0
- package/src/enums/deployment-status.ts +1 -0
- package/src/enums/frameworks.ts +17 -0
- package/src/enums/order-by.ts +4 -0
- package/src/enums/registration-type.ts +6 -0
- package/src/enums/resources.ts +13 -0
- package/src/enums/runtime.ts +5 -0
- package/src/enums/runtimes.ts +71 -0
- package/src/enums/scopes.ts +66 -0
- package/src/enums/use-cases.ts +11 -0
- package/src/index.ts +9 -2
- package/src/models.ts +394 -4
- package/src/services/account.ts +375 -67
- package/src/services/assistant.ts +1 -1
- package/src/services/avatars.ts +20 -19
- package/src/services/backups.ts +37 -36
- package/src/services/console.ts +12 -43
- package/src/services/databases.ts +1061 -281
- package/src/services/domains.ts +114 -44
- package/src/services/functions.ts +61 -58
- package/src/services/graphql.ts +4 -4
- package/src/services/health.ts +23 -21
- package/src/services/messaging.ts +56 -56
- package/src/services/migrations.ts +79 -78
- package/src/services/organizations.ts +430 -94
- package/src/services/project.ts +5 -5
- package/src/services/projects.ts +106 -155
- package/src/services/proxy.ts +8 -8
- package/src/services/realtime.ts +135 -58
- package/src/services/sites.ts +43 -41
- package/src/services/storage.ts +17 -17
- package/src/services/tables-db.ts +1051 -269
- package/src/services/teams.ts +14 -14
- package/src/services/tokens.ts +5 -5
- package/src/services/users.ts +50 -50
- package/src/services/vcs.ts +10 -10
- package/types/channel.d.ts +9 -7
- package/types/client.d.ts +7 -2
- package/types/enums/backup-services.d.ts +5 -0
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/build-runtime.d.ts +6 -1
- package/types/enums/deployment-status.d.ts +1 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/registration-type.d.ts +6 -0
- package/types/enums/resources.d.ts +13 -0
- package/types/enums/runtime.d.ts +6 -1
- package/types/enums/runtimes.d.ts +71 -0
- package/types/enums/scopes.d.ts +66 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/index.d.ts +9 -2
- package/types/models.d.ts +385 -4
- package/types/services/account.d.ts +111 -0
- package/types/services/avatars.d.ts +5 -4
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +1 -13
- package/types/services/databases.d.ts +303 -8
- package/types/services/domains.d.ts +26 -0
- package/types/services/functions.d.ts +18 -15
- package/types/services/health.d.ts +2 -0
- package/types/services/migrations.d.ts +33 -32
- package/types/services/organizations.d.ts +151 -29
- package/types/services/projects.d.ts +20 -36
- package/types/services/realtime.d.ts +13 -6
- package/types/services/sites.d.ts +9 -7
- package/types/services/tables-db.d.ts +305 -8
- package/docs/examples/projects/update-status.md +0 -14
- package/src/enums/billing-plan.ts +0 -17
- package/src/enums/status.ts +0 -4
- package/types/enums/billing-plan.d.ts +0 -17
- package/types/enums/status.d.ts +0 -4
|
@@ -2,8 +2,8 @@ import { Service } from '../service';
|
|
|
2
2
|
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
4
|
|
|
5
|
-
import { BillingPlan } from '../enums/billing-plan';
|
|
6
5
|
import { Platform } from '../enums/platform';
|
|
6
|
+
import { Scopes } from '../enums/scopes';
|
|
7
7
|
|
|
8
8
|
export class Organizations {
|
|
9
9
|
client: Client;
|
|
@@ -20,7 +20,7 @@ export class Organizations {
|
|
|
20
20
|
* @throws {AppwriteException}
|
|
21
21
|
* @returns {Promise<Models.OrganizationList<Preferences>>}
|
|
22
22
|
*/
|
|
23
|
-
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string
|
|
23
|
+
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string }): Promise<Models.OrganizationList<Preferences>>;
|
|
24
24
|
/**
|
|
25
25
|
* Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
|
|
26
26
|
*
|
|
@@ -77,7 +77,7 @@ export class Organizations {
|
|
|
77
77
|
*
|
|
78
78
|
* @param {string} params.organizationId - Organization 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.
|
|
79
79
|
* @param {string} params.name - Organization name. Max length: 128 chars.
|
|
80
|
-
* @param {
|
|
80
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
81
81
|
* @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
82
82
|
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
83
83
|
* @param {string[]} params.invites - Additional member invites
|
|
@@ -88,14 +88,14 @@ export class Organizations {
|
|
|
88
88
|
* @throws {AppwriteException}
|
|
89
89
|
* @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
|
|
90
90
|
*/
|
|
91
|
-
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, name: string, billingPlan:
|
|
91
|
+
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform }): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
|
|
92
92
|
/**
|
|
93
93
|
* Create a new organization.
|
|
94
94
|
*
|
|
95
95
|
*
|
|
96
96
|
* @param {string} organizationId - Organization 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.
|
|
97
97
|
* @param {string} name - Organization name. Max length: 128 chars.
|
|
98
|
-
* @param {
|
|
98
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
99
99
|
* @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
100
100
|
* @param {string} billingAddressId - Unique ID of billing address
|
|
101
101
|
* @param {string[]} invites - Additional member invites
|
|
@@ -107,20 +107,20 @@ export class Organizations {
|
|
|
107
107
|
* @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
|
|
108
108
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
109
109
|
*/
|
|
110
|
-
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan:
|
|
110
|
+
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
|
|
111
111
|
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
112
|
-
paramsOrFirst: { organizationId: string, name: string, billingPlan:
|
|
113
|
-
...rest: [(string)?, (
|
|
112
|
+
paramsOrFirst: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform } | string,
|
|
113
|
+
...rest: [(string)?, (string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number)?, (Platform)?]
|
|
114
114
|
): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication> {
|
|
115
|
-
let params: { organizationId: string, name: string, billingPlan:
|
|
115
|
+
let params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform };
|
|
116
116
|
|
|
117
117
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
118
|
-
params = (paramsOrFirst || {}) as { organizationId: string, name: string, billingPlan:
|
|
118
|
+
params = (paramsOrFirst || {}) as { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform };
|
|
119
119
|
} else {
|
|
120
120
|
params = {
|
|
121
121
|
organizationId: paramsOrFirst as string,
|
|
122
122
|
name: rest[0] as string,
|
|
123
|
-
billingPlan: rest[1] as
|
|
123
|
+
billingPlan: rest[1] as string,
|
|
124
124
|
paymentMethodId: rest[2] as string,
|
|
125
125
|
billingAddressId: rest[3] as string,
|
|
126
126
|
invites: rest[4] as string[],
|
|
@@ -201,7 +201,7 @@ export class Organizations {
|
|
|
201
201
|
/**
|
|
202
202
|
* Get estimation for creating an organization.
|
|
203
203
|
*
|
|
204
|
-
* @param {
|
|
204
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
205
205
|
* @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
206
206
|
* @param {string[]} params.invites - Additional member invites
|
|
207
207
|
* @param {string} params.couponId - Coupon id
|
|
@@ -209,11 +209,11 @@ export class Organizations {
|
|
|
209
209
|
* @throws {AppwriteException}
|
|
210
210
|
* @returns {Promise<Models.Estimation>}
|
|
211
211
|
*/
|
|
212
|
-
estimationCreateOrganization(params: { billingPlan:
|
|
212
|
+
estimationCreateOrganization(params: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform }): Promise<Models.Estimation>;
|
|
213
213
|
/**
|
|
214
214
|
* Get estimation for creating an organization.
|
|
215
215
|
*
|
|
216
|
-
* @param {
|
|
216
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
217
217
|
* @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
218
218
|
* @param {string[]} invites - Additional member invites
|
|
219
219
|
* @param {string} couponId - Coupon id
|
|
@@ -222,18 +222,18 @@ export class Organizations {
|
|
|
222
222
|
* @returns {Promise<Models.Estimation>}
|
|
223
223
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
224
224
|
*/
|
|
225
|
-
estimationCreateOrganization(billingPlan:
|
|
225
|
+
estimationCreateOrganization(billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
|
|
226
226
|
estimationCreateOrganization(
|
|
227
|
-
paramsOrFirst: { billingPlan:
|
|
227
|
+
paramsOrFirst: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform } | string,
|
|
228
228
|
...rest: [(string)?, (string[])?, (string)?, (Platform)?]
|
|
229
229
|
): Promise<Models.Estimation> {
|
|
230
|
-
let params: { billingPlan:
|
|
230
|
+
let params: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform };
|
|
231
231
|
|
|
232
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)
|
|
233
|
-
params = (paramsOrFirst || {}) as { billingPlan:
|
|
232
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
233
|
+
params = (paramsOrFirst || {}) as { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform };
|
|
234
234
|
} else {
|
|
235
235
|
params = {
|
|
236
|
-
billingPlan: paramsOrFirst as
|
|
236
|
+
billingPlan: paramsOrFirst as string,
|
|
237
237
|
paymentMethodId: rest[0] as string,
|
|
238
238
|
invites: rest[1] as string[],
|
|
239
239
|
couponId: rest[2] as string,
|
|
@@ -289,7 +289,7 @@ export class Organizations {
|
|
|
289
289
|
* @throws {AppwriteException}
|
|
290
290
|
* @returns {Promise<{}>}
|
|
291
291
|
*/
|
|
292
|
-
delete(params: { organizationId: string
|
|
292
|
+
delete(params: { organizationId: string }): Promise<{}>;
|
|
293
293
|
/**
|
|
294
294
|
* Delete an organization.
|
|
295
295
|
*
|
|
@@ -342,7 +342,7 @@ export class Organizations {
|
|
|
342
342
|
* @throws {AppwriteException}
|
|
343
343
|
* @returns {Promise<Models.AggregationTeamList>}
|
|
344
344
|
*/
|
|
345
|
-
listAggregations(params: { organizationId: string, queries?: string[]
|
|
345
|
+
listAggregations(params: { organizationId: string, queries?: string[] }): Promise<Models.AggregationTeamList>;
|
|
346
346
|
/**
|
|
347
347
|
* Get a list of all aggregations for an organization.
|
|
348
348
|
*
|
|
@@ -403,7 +403,7 @@ export class Organizations {
|
|
|
403
403
|
* @throws {AppwriteException}
|
|
404
404
|
* @returns {Promise<Models.AggregationTeam>}
|
|
405
405
|
*/
|
|
406
|
-
getAggregation(params: { organizationId: string, aggregationId: string, limit?: number, offset?: number
|
|
406
|
+
getAggregation(params: { organizationId: string, aggregationId: string, limit?: number, offset?: number }): Promise<Models.AggregationTeam>;
|
|
407
407
|
/**
|
|
408
408
|
* Get a specific aggregation using it's aggregation ID.
|
|
409
409
|
*
|
|
@@ -474,7 +474,7 @@ export class Organizations {
|
|
|
474
474
|
* @throws {AppwriteException}
|
|
475
475
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
476
476
|
*/
|
|
477
|
-
setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingAddressId: string
|
|
477
|
+
setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingAddressId: string }): Promise<Models.Organization<Preferences>>;
|
|
478
478
|
/**
|
|
479
479
|
* Set a billing address for an organization.
|
|
480
480
|
*
|
|
@@ -536,7 +536,7 @@ export class Organizations {
|
|
|
536
536
|
* @throws {AppwriteException}
|
|
537
537
|
* @returns {Promise<{}>}
|
|
538
538
|
*/
|
|
539
|
-
deleteBillingAddress(params: { organizationId: string
|
|
539
|
+
deleteBillingAddress(params: { organizationId: string }): Promise<{}>;
|
|
540
540
|
/**
|
|
541
541
|
* Delete a team's billing address.
|
|
542
542
|
*
|
|
@@ -589,7 +589,7 @@ export class Organizations {
|
|
|
589
589
|
* @throws {AppwriteException}
|
|
590
590
|
* @returns {Promise<Models.BillingAddress>}
|
|
591
591
|
*/
|
|
592
|
-
getBillingAddress(params: { organizationId: string, billingAddressId: string
|
|
592
|
+
getBillingAddress(params: { organizationId: string, billingAddressId: string }): Promise<Models.BillingAddress>;
|
|
593
593
|
/**
|
|
594
594
|
* Get a billing address using it's ID.
|
|
595
595
|
*
|
|
@@ -648,7 +648,7 @@ export class Organizations {
|
|
|
648
648
|
* @throws {AppwriteException}
|
|
649
649
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
650
650
|
*/
|
|
651
|
-
setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingEmail: string
|
|
651
|
+
setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingEmail: string }): Promise<Models.Organization<Preferences>>;
|
|
652
652
|
/**
|
|
653
653
|
* Set the current billing email for the organization.
|
|
654
654
|
*
|
|
@@ -712,7 +712,7 @@ export class Organizations {
|
|
|
712
712
|
* @throws {AppwriteException}
|
|
713
713
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
714
714
|
*/
|
|
715
|
-
updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, budget?: number, alerts?: number[]
|
|
715
|
+
updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, budget?: number, alerts?: number[] }): Promise<Models.Organization<Preferences>>;
|
|
716
716
|
/**
|
|
717
717
|
* Update the budget limit for an organization.
|
|
718
718
|
*
|
|
@@ -782,7 +782,7 @@ export class Organizations {
|
|
|
782
782
|
* @throws {AppwriteException}
|
|
783
783
|
* @returns {Promise<Models.CreditList>}
|
|
784
784
|
*/
|
|
785
|
-
listCredits(params: { organizationId: string, queries?: string[]
|
|
785
|
+
listCredits(params: { organizationId: string, queries?: string[] }): Promise<Models.CreditList>;
|
|
786
786
|
/**
|
|
787
787
|
* List all credits for an organization.
|
|
788
788
|
*
|
|
@@ -842,7 +842,7 @@ export class Organizations {
|
|
|
842
842
|
* @throws {AppwriteException}
|
|
843
843
|
* @returns {Promise<Models.Credit>}
|
|
844
844
|
*/
|
|
845
|
-
addCredit(params: { organizationId: string, couponId: string
|
|
845
|
+
addCredit(params: { organizationId: string, couponId: string }): Promise<Models.Credit>;
|
|
846
846
|
/**
|
|
847
847
|
* Add credit to an organization using a coupon.
|
|
848
848
|
*
|
|
@@ -904,7 +904,7 @@ export class Organizations {
|
|
|
904
904
|
* @throws {AppwriteException}
|
|
905
905
|
* @returns {Promise<Models.CreditAvailable>}
|
|
906
906
|
*/
|
|
907
|
-
getAvailableCredits(params: { organizationId: string
|
|
907
|
+
getAvailableCredits(params: { organizationId: string }): Promise<Models.CreditAvailable>;
|
|
908
908
|
/**
|
|
909
909
|
* Get total available valid credits for an organization.
|
|
910
910
|
*
|
|
@@ -956,7 +956,7 @@ export class Organizations {
|
|
|
956
956
|
* @throws {AppwriteException}
|
|
957
957
|
* @returns {Promise<Models.Credit>}
|
|
958
958
|
*/
|
|
959
|
-
getCredit(params: { organizationId: string, creditId: string
|
|
959
|
+
getCredit(params: { organizationId: string, creditId: string }): Promise<Models.Credit>;
|
|
960
960
|
/**
|
|
961
961
|
* Get credit details.
|
|
962
962
|
*
|
|
@@ -1014,7 +1014,7 @@ export class Organizations {
|
|
|
1014
1014
|
* @throws {AppwriteException}
|
|
1015
1015
|
* @returns {Promise<Models.EstimationDeleteOrganization>}
|
|
1016
1016
|
*/
|
|
1017
|
-
estimationDeleteOrganization(params: { organizationId: string
|
|
1017
|
+
estimationDeleteOrganization(params: { organizationId: string }): Promise<Models.EstimationDeleteOrganization>;
|
|
1018
1018
|
/**
|
|
1019
1019
|
* Get estimation for deleting an organization.
|
|
1020
1020
|
*
|
|
@@ -1063,37 +1063,37 @@ export class Organizations {
|
|
|
1063
1063
|
* Get estimation for updating the organization plan.
|
|
1064
1064
|
*
|
|
1065
1065
|
* @param {string} params.organizationId - Organization ID
|
|
1066
|
-
* @param {
|
|
1066
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
1067
1067
|
* @param {string[]} params.invites - Additional member invites
|
|
1068
1068
|
* @param {string} params.couponId - Coupon id
|
|
1069
1069
|
* @throws {AppwriteException}
|
|
1070
1070
|
* @returns {Promise<Models.EstimationUpdatePlan>}
|
|
1071
1071
|
*/
|
|
1072
|
-
estimationUpdatePlan(params: { organizationId: string, billingPlan:
|
|
1072
|
+
estimationUpdatePlan(params: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string }): Promise<Models.EstimationUpdatePlan>;
|
|
1073
1073
|
/**
|
|
1074
1074
|
* Get estimation for updating the organization plan.
|
|
1075
1075
|
*
|
|
1076
1076
|
* @param {string} organizationId - Organization ID
|
|
1077
|
-
* @param {
|
|
1077
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
1078
1078
|
* @param {string[]} invites - Additional member invites
|
|
1079
1079
|
* @param {string} couponId - Coupon id
|
|
1080
1080
|
* @throws {AppwriteException}
|
|
1081
1081
|
* @returns {Promise<Models.EstimationUpdatePlan>}
|
|
1082
1082
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1083
1083
|
*/
|
|
1084
|
-
estimationUpdatePlan(organizationId: string, billingPlan:
|
|
1084
|
+
estimationUpdatePlan(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
|
|
1085
1085
|
estimationUpdatePlan(
|
|
1086
|
-
paramsOrFirst: { organizationId: string, billingPlan:
|
|
1087
|
-
...rest: [(
|
|
1086
|
+
paramsOrFirst: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string } | string,
|
|
1087
|
+
...rest: [(string)?, (string[])?, (string)?]
|
|
1088
1088
|
): Promise<Models.EstimationUpdatePlan> {
|
|
1089
|
-
let params: { organizationId: string, billingPlan:
|
|
1089
|
+
let params: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string };
|
|
1090
1090
|
|
|
1091
1091
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1092
|
-
params = (paramsOrFirst || {}) as { organizationId: string, billingPlan:
|
|
1092
|
+
params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, invites?: string[], couponId?: string };
|
|
1093
1093
|
} else {
|
|
1094
1094
|
params = {
|
|
1095
1095
|
organizationId: paramsOrFirst as string,
|
|
1096
|
-
billingPlan: rest[0] as
|
|
1096
|
+
billingPlan: rest[0] as string,
|
|
1097
1097
|
invites: rest[1] as string[],
|
|
1098
1098
|
couponId: rest[2] as string
|
|
1099
1099
|
};
|
|
@@ -1148,7 +1148,7 @@ export class Organizations {
|
|
|
1148
1148
|
* @throws {AppwriteException}
|
|
1149
1149
|
* @returns {Promise<Models.DowngradeFeedback>}
|
|
1150
1150
|
*/
|
|
1151
|
-
createDowngradeFeedback(params: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string
|
|
1151
|
+
createDowngradeFeedback(params: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string }): Promise<Models.DowngradeFeedback>;
|
|
1152
1152
|
/**
|
|
1153
1153
|
* Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
|
|
1154
1154
|
*
|
|
@@ -1239,7 +1239,7 @@ export class Organizations {
|
|
|
1239
1239
|
* @throws {AppwriteException}
|
|
1240
1240
|
* @returns {Promise<Models.InvoiceList>}
|
|
1241
1241
|
*/
|
|
1242
|
-
listInvoices(params: { organizationId: string, queries?: string[]
|
|
1242
|
+
listInvoices(params: { organizationId: string, queries?: string[] }): Promise<Models.InvoiceList>;
|
|
1243
1243
|
/**
|
|
1244
1244
|
* List all invoices for an organization.
|
|
1245
1245
|
*
|
|
@@ -1298,7 +1298,7 @@ export class Organizations {
|
|
|
1298
1298
|
* @throws {AppwriteException}
|
|
1299
1299
|
* @returns {Promise<Models.Invoice>}
|
|
1300
1300
|
*/
|
|
1301
|
-
getInvoice(params: { organizationId: string, invoiceId: string
|
|
1301
|
+
getInvoice(params: { organizationId: string, invoiceId: string }): Promise<Models.Invoice>;
|
|
1302
1302
|
/**
|
|
1303
1303
|
* Get an invoice by its unique ID.
|
|
1304
1304
|
*
|
|
@@ -1357,7 +1357,7 @@ export class Organizations {
|
|
|
1357
1357
|
* @throws {AppwriteException}
|
|
1358
1358
|
* @returns {Promise<Models.PaymentMethod>}
|
|
1359
1359
|
*/
|
|
1360
|
-
getInvoiceDownload(params: { organizationId: string, invoiceId: string
|
|
1360
|
+
getInvoiceDownload(params: { organizationId: string, invoiceId: string }): Promise<Models.PaymentMethod>;
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Download invoice in PDF
|
|
1363
1363
|
*
|
|
@@ -1417,7 +1417,7 @@ export class Organizations {
|
|
|
1417
1417
|
* @throws {AppwriteException}
|
|
1418
1418
|
* @returns {Promise<Models.Invoice>}
|
|
1419
1419
|
*/
|
|
1420
|
-
createInvoicePayment(params: { organizationId: string, invoiceId: string, paymentMethodId: string
|
|
1420
|
+
createInvoicePayment(params: { organizationId: string, invoiceId: string, paymentMethodId: string }): Promise<Models.Invoice>;
|
|
1421
1421
|
/**
|
|
1422
1422
|
* Initiate payment for failed invoice to pay live from console
|
|
1423
1423
|
*
|
|
@@ -1486,7 +1486,7 @@ export class Organizations {
|
|
|
1486
1486
|
* @throws {AppwriteException}
|
|
1487
1487
|
* @returns {Promise<Models.Invoice>}
|
|
1488
1488
|
*/
|
|
1489
|
-
validateInvoice(params: { organizationId: string, invoiceId: string
|
|
1489
|
+
validateInvoice(params: { organizationId: string, invoiceId: string }): Promise<Models.Invoice>;
|
|
1490
1490
|
/**
|
|
1491
1491
|
* Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
|
|
1492
1492
|
*
|
|
@@ -1546,7 +1546,7 @@ export class Organizations {
|
|
|
1546
1546
|
* @throws {AppwriteException}
|
|
1547
1547
|
* @returns {Promise<Models.PaymentMethod>}
|
|
1548
1548
|
*/
|
|
1549
|
-
getInvoiceView(params: { organizationId: string, invoiceId: string
|
|
1549
|
+
getInvoiceView(params: { organizationId: string, invoiceId: string }): Promise<Models.PaymentMethod>;
|
|
1550
1550
|
/**
|
|
1551
1551
|
* View invoice in PDF
|
|
1552
1552
|
*
|
|
@@ -1597,6 +1597,351 @@ export class Organizations {
|
|
|
1597
1597
|
);
|
|
1598
1598
|
}
|
|
1599
1599
|
|
|
1600
|
+
/**
|
|
1601
|
+
* Get a list of all API keys from the current organization.
|
|
1602
|
+
*
|
|
1603
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
1604
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1605
|
+
* @throws {AppwriteException}
|
|
1606
|
+
* @returns {Promise<Models.KeyList>}
|
|
1607
|
+
*/
|
|
1608
|
+
listKeys(params: { organizationId: string, total?: boolean }): Promise<Models.KeyList>;
|
|
1609
|
+
/**
|
|
1610
|
+
* Get a list of all API keys from the current organization.
|
|
1611
|
+
*
|
|
1612
|
+
* @param {string} organizationId - Organization Unique ID
|
|
1613
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1614
|
+
* @throws {AppwriteException}
|
|
1615
|
+
* @returns {Promise<Models.KeyList>}
|
|
1616
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1617
|
+
*/
|
|
1618
|
+
listKeys(organizationId: string, total?: boolean): Promise<Models.KeyList>;
|
|
1619
|
+
listKeys(
|
|
1620
|
+
paramsOrFirst: { organizationId: string, total?: boolean } | string,
|
|
1621
|
+
...rest: [(boolean)?]
|
|
1622
|
+
): Promise<Models.KeyList> {
|
|
1623
|
+
let params: { organizationId: string, total?: boolean };
|
|
1624
|
+
|
|
1625
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1626
|
+
params = (paramsOrFirst || {}) as { organizationId: string, total?: boolean };
|
|
1627
|
+
} else {
|
|
1628
|
+
params = {
|
|
1629
|
+
organizationId: paramsOrFirst as string,
|
|
1630
|
+
total: rest[0] as boolean
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
const organizationId = params.organizationId;
|
|
1635
|
+
const total = params.total;
|
|
1636
|
+
|
|
1637
|
+
if (typeof organizationId === 'undefined') {
|
|
1638
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
|
|
1642
|
+
const payload: Payload = {};
|
|
1643
|
+
if (typeof total !== 'undefined') {
|
|
1644
|
+
payload['total'] = total;
|
|
1645
|
+
}
|
|
1646
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1647
|
+
|
|
1648
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
return this.client.call(
|
|
1652
|
+
'get',
|
|
1653
|
+
uri,
|
|
1654
|
+
apiHeaders,
|
|
1655
|
+
payload
|
|
1656
|
+
);
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Create a new organization API key.
|
|
1661
|
+
*
|
|
1662
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
1663
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
1664
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
1665
|
+
* @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.
|
|
1666
|
+
* @throws {AppwriteException}
|
|
1667
|
+
* @returns {Promise<Models.Key>}
|
|
1668
|
+
*/
|
|
1669
|
+
createKey(params: { organizationId: string, name: string, scopes: Scopes[], expire?: string }): Promise<Models.Key>;
|
|
1670
|
+
/**
|
|
1671
|
+
* Create a new organization API key.
|
|
1672
|
+
*
|
|
1673
|
+
* @param {string} organizationId - Organization Unique ID
|
|
1674
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
1675
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
1676
|
+
* @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.
|
|
1677
|
+
* @throws {AppwriteException}
|
|
1678
|
+
* @returns {Promise<Models.Key>}
|
|
1679
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1680
|
+
*/
|
|
1681
|
+
createKey(organizationId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
1682
|
+
createKey(
|
|
1683
|
+
paramsOrFirst: { organizationId: string, name: string, scopes: Scopes[], expire?: string } | string,
|
|
1684
|
+
...rest: [(string)?, (Scopes[])?, (string)?]
|
|
1685
|
+
): Promise<Models.Key> {
|
|
1686
|
+
let params: { organizationId: string, name: string, scopes: Scopes[], expire?: string };
|
|
1687
|
+
|
|
1688
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1689
|
+
params = (paramsOrFirst || {}) as { organizationId: string, name: string, scopes: Scopes[], expire?: string };
|
|
1690
|
+
} else {
|
|
1691
|
+
params = {
|
|
1692
|
+
organizationId: paramsOrFirst as string,
|
|
1693
|
+
name: rest[0] as string,
|
|
1694
|
+
scopes: rest[1] as Scopes[],
|
|
1695
|
+
expire: rest[2] as string
|
|
1696
|
+
};
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
const organizationId = params.organizationId;
|
|
1700
|
+
const name = params.name;
|
|
1701
|
+
const scopes = params.scopes;
|
|
1702
|
+
const expire = params.expire;
|
|
1703
|
+
|
|
1704
|
+
if (typeof organizationId === 'undefined') {
|
|
1705
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1706
|
+
}
|
|
1707
|
+
if (typeof name === 'undefined') {
|
|
1708
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
1709
|
+
}
|
|
1710
|
+
if (typeof scopes === 'undefined') {
|
|
1711
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
const apiPath = '/organizations/{organizationId}/keys'.replace('{organizationId}', organizationId);
|
|
1715
|
+
const payload: Payload = {};
|
|
1716
|
+
if (typeof name !== 'undefined') {
|
|
1717
|
+
payload['name'] = name;
|
|
1718
|
+
}
|
|
1719
|
+
if (typeof scopes !== 'undefined') {
|
|
1720
|
+
payload['scopes'] = scopes;
|
|
1721
|
+
}
|
|
1722
|
+
if (typeof expire !== 'undefined') {
|
|
1723
|
+
payload['expire'] = expire;
|
|
1724
|
+
}
|
|
1725
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1726
|
+
|
|
1727
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1728
|
+
'content-type': 'application/json',
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
return this.client.call(
|
|
1732
|
+
'post',
|
|
1733
|
+
uri,
|
|
1734
|
+
apiHeaders,
|
|
1735
|
+
payload
|
|
1736
|
+
);
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
|
|
1741
|
+
*
|
|
1742
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
1743
|
+
* @param {string} params.keyId - Key unique ID.
|
|
1744
|
+
* @throws {AppwriteException}
|
|
1745
|
+
* @returns {Promise<Models.Key>}
|
|
1746
|
+
*/
|
|
1747
|
+
getKey(params: { organizationId: string, keyId: string }): Promise<Models.Key>;
|
|
1748
|
+
/**
|
|
1749
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
|
|
1750
|
+
*
|
|
1751
|
+
* @param {string} organizationId - Organization Unique ID
|
|
1752
|
+
* @param {string} keyId - Key unique ID.
|
|
1753
|
+
* @throws {AppwriteException}
|
|
1754
|
+
* @returns {Promise<Models.Key>}
|
|
1755
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1756
|
+
*/
|
|
1757
|
+
getKey(organizationId: string, keyId: string): Promise<Models.Key>;
|
|
1758
|
+
getKey(
|
|
1759
|
+
paramsOrFirst: { organizationId: string, keyId: string } | string,
|
|
1760
|
+
...rest: [(string)?]
|
|
1761
|
+
): Promise<Models.Key> {
|
|
1762
|
+
let params: { organizationId: string, keyId: string };
|
|
1763
|
+
|
|
1764
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1765
|
+
params = (paramsOrFirst || {}) as { organizationId: string, keyId: string };
|
|
1766
|
+
} else {
|
|
1767
|
+
params = {
|
|
1768
|
+
organizationId: paramsOrFirst as string,
|
|
1769
|
+
keyId: rest[0] as string
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
const organizationId = params.organizationId;
|
|
1774
|
+
const keyId = params.keyId;
|
|
1775
|
+
|
|
1776
|
+
if (typeof organizationId === 'undefined') {
|
|
1777
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1778
|
+
}
|
|
1779
|
+
if (typeof keyId === 'undefined') {
|
|
1780
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
1784
|
+
const payload: Payload = {};
|
|
1785
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1786
|
+
|
|
1787
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
return this.client.call(
|
|
1791
|
+
'get',
|
|
1792
|
+
uri,
|
|
1793
|
+
apiHeaders,
|
|
1794
|
+
payload
|
|
1795
|
+
);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
1800
|
+
*
|
|
1801
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
1802
|
+
* @param {string} params.keyId - Key unique ID.
|
|
1803
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
1804
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
1805
|
+
* @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.
|
|
1806
|
+
* @throws {AppwriteException}
|
|
1807
|
+
* @returns {Promise<Models.Key>}
|
|
1808
|
+
*/
|
|
1809
|
+
updateKey(params: { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string }): Promise<Models.Key>;
|
|
1810
|
+
/**
|
|
1811
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
1812
|
+
*
|
|
1813
|
+
* @param {string} organizationId - Organization Unique ID
|
|
1814
|
+
* @param {string} keyId - Key unique ID.
|
|
1815
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
1816
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
1817
|
+
* @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.
|
|
1818
|
+
* @throws {AppwriteException}
|
|
1819
|
+
* @returns {Promise<Models.Key>}
|
|
1820
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1821
|
+
*/
|
|
1822
|
+
updateKey(organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
1823
|
+
updateKey(
|
|
1824
|
+
paramsOrFirst: { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string } | string,
|
|
1825
|
+
...rest: [(string)?, (string)?, (Scopes[])?, (string)?]
|
|
1826
|
+
): Promise<Models.Key> {
|
|
1827
|
+
let params: { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string };
|
|
1828
|
+
|
|
1829
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1830
|
+
params = (paramsOrFirst || {}) as { organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string };
|
|
1831
|
+
} else {
|
|
1832
|
+
params = {
|
|
1833
|
+
organizationId: paramsOrFirst as string,
|
|
1834
|
+
keyId: rest[0] as string,
|
|
1835
|
+
name: rest[1] as string,
|
|
1836
|
+
scopes: rest[2] as Scopes[],
|
|
1837
|
+
expire: rest[3] as string
|
|
1838
|
+
};
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
const organizationId = params.organizationId;
|
|
1842
|
+
const keyId = params.keyId;
|
|
1843
|
+
const name = params.name;
|
|
1844
|
+
const scopes = params.scopes;
|
|
1845
|
+
const expire = params.expire;
|
|
1846
|
+
|
|
1847
|
+
if (typeof organizationId === 'undefined') {
|
|
1848
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1849
|
+
}
|
|
1850
|
+
if (typeof keyId === 'undefined') {
|
|
1851
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1852
|
+
}
|
|
1853
|
+
if (typeof name === 'undefined') {
|
|
1854
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
1855
|
+
}
|
|
1856
|
+
if (typeof scopes === 'undefined') {
|
|
1857
|
+
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
1861
|
+
const payload: Payload = {};
|
|
1862
|
+
if (typeof name !== 'undefined') {
|
|
1863
|
+
payload['name'] = name;
|
|
1864
|
+
}
|
|
1865
|
+
if (typeof scopes !== 'undefined') {
|
|
1866
|
+
payload['scopes'] = scopes;
|
|
1867
|
+
}
|
|
1868
|
+
if (typeof expire !== 'undefined') {
|
|
1869
|
+
payload['expire'] = expire;
|
|
1870
|
+
}
|
|
1871
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1872
|
+
|
|
1873
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1874
|
+
'content-type': 'application/json',
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
return this.client.call(
|
|
1878
|
+
'put',
|
|
1879
|
+
uri,
|
|
1880
|
+
apiHeaders,
|
|
1881
|
+
payload
|
|
1882
|
+
);
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
1887
|
+
*
|
|
1888
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
1889
|
+
* @param {string} params.keyId - Key unique ID.
|
|
1890
|
+
* @throws {AppwriteException}
|
|
1891
|
+
* @returns {Promise<{}>}
|
|
1892
|
+
*/
|
|
1893
|
+
deleteKey(params: { organizationId: string, keyId: string }): Promise<{}>;
|
|
1894
|
+
/**
|
|
1895
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
1896
|
+
*
|
|
1897
|
+
* @param {string} organizationId - Organization Unique ID
|
|
1898
|
+
* @param {string} keyId - Key unique ID.
|
|
1899
|
+
* @throws {AppwriteException}
|
|
1900
|
+
* @returns {Promise<{}>}
|
|
1901
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1902
|
+
*/
|
|
1903
|
+
deleteKey(organizationId: string, keyId: string): Promise<{}>;
|
|
1904
|
+
deleteKey(
|
|
1905
|
+
paramsOrFirst: { organizationId: string, keyId: string } | string,
|
|
1906
|
+
...rest: [(string)?]
|
|
1907
|
+
): Promise<{}> {
|
|
1908
|
+
let params: { organizationId: string, keyId: string };
|
|
1909
|
+
|
|
1910
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1911
|
+
params = (paramsOrFirst || {}) as { organizationId: string, keyId: string };
|
|
1912
|
+
} else {
|
|
1913
|
+
params = {
|
|
1914
|
+
organizationId: paramsOrFirst as string,
|
|
1915
|
+
keyId: rest[0] as string
|
|
1916
|
+
};
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
const organizationId = params.organizationId;
|
|
1920
|
+
const keyId = params.keyId;
|
|
1921
|
+
|
|
1922
|
+
if (typeof organizationId === 'undefined') {
|
|
1923
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1924
|
+
}
|
|
1925
|
+
if (typeof keyId === 'undefined') {
|
|
1926
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
const apiPath = '/organizations/{organizationId}/keys/{keyId}'.replace('{organizationId}', organizationId).replace('{keyId}', keyId);
|
|
1930
|
+
const payload: Payload = {};
|
|
1931
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1932
|
+
|
|
1933
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1934
|
+
'content-type': 'application/json',
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
return this.client.call(
|
|
1938
|
+
'delete',
|
|
1939
|
+
uri,
|
|
1940
|
+
apiHeaders,
|
|
1941
|
+
payload
|
|
1942
|
+
);
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1600
1945
|
/**
|
|
1601
1946
|
* Set a organization's default payment method.
|
|
1602
1947
|
*
|
|
@@ -1605,7 +1950,7 @@ export class Organizations {
|
|
|
1605
1950
|
* @throws {AppwriteException}
|
|
1606
1951
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1607
1952
|
*/
|
|
1608
|
-
setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string
|
|
1953
|
+
setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string }): Promise<Models.Organization<Preferences>>;
|
|
1609
1954
|
/**
|
|
1610
1955
|
* Set a organization's default payment method.
|
|
1611
1956
|
*
|
|
@@ -1667,7 +2012,7 @@ export class Organizations {
|
|
|
1667
2012
|
* @throws {AppwriteException}
|
|
1668
2013
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1669
2014
|
*/
|
|
1670
|
-
deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string
|
|
2015
|
+
deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
|
|
1671
2016
|
/**
|
|
1672
2017
|
* Delete the default payment method for an organization.
|
|
1673
2018
|
*
|
|
@@ -1721,7 +2066,7 @@ export class Organizations {
|
|
|
1721
2066
|
* @throws {AppwriteException}
|
|
1722
2067
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1723
2068
|
*/
|
|
1724
|
-
setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string
|
|
2069
|
+
setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string }): Promise<Models.Organization<Preferences>>;
|
|
1725
2070
|
/**
|
|
1726
2071
|
* Set an organization's backup payment method.
|
|
1727
2072
|
*
|
|
@@ -1784,7 +2129,7 @@ export class Organizations {
|
|
|
1784
2129
|
* @throws {AppwriteException}
|
|
1785
2130
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1786
2131
|
*/
|
|
1787
|
-
deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string
|
|
2132
|
+
deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
|
|
1788
2133
|
/**
|
|
1789
2134
|
* Delete a backup payment method for an organization.
|
|
1790
2135
|
*
|
|
@@ -1837,7 +2182,7 @@ export class Organizations {
|
|
|
1837
2182
|
* @throws {AppwriteException}
|
|
1838
2183
|
* @returns {Promise<Models.PaymentMethod>}
|
|
1839
2184
|
*/
|
|
1840
|
-
getPaymentMethod(params: { organizationId: string, paymentMethodId: string
|
|
2185
|
+
getPaymentMethod(params: { organizationId: string, paymentMethodId: string }): Promise<Models.PaymentMethod>;
|
|
1841
2186
|
/**
|
|
1842
2187
|
* Get an organization's payment method using it's payment method ID.
|
|
1843
2188
|
*
|
|
@@ -1895,7 +2240,7 @@ export class Organizations {
|
|
|
1895
2240
|
* @throws {AppwriteException}
|
|
1896
2241
|
* @returns {Promise<Models.BillingPlan>}
|
|
1897
2242
|
*/
|
|
1898
|
-
getPlan(params: { organizationId: string
|
|
2243
|
+
getPlan(params: { organizationId: string }): Promise<Models.BillingPlan>;
|
|
1899
2244
|
/**
|
|
1900
2245
|
* Get the details of the current billing plan for an organization.
|
|
1901
2246
|
*
|
|
@@ -1943,7 +2288,7 @@ export class Organizations {
|
|
|
1943
2288
|
* Update the billing plan for an organization.
|
|
1944
2289
|
*
|
|
1945
2290
|
* @param {string} params.organizationId - Organization Unique ID
|
|
1946
|
-
* @param {
|
|
2291
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
1947
2292
|
* @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
1948
2293
|
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
1949
2294
|
* @param {string[]} params.invites - Additional member invites
|
|
@@ -1953,12 +2298,12 @@ export class Organizations {
|
|
|
1953
2298
|
* @throws {AppwriteException}
|
|
1954
2299
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1955
2300
|
*/
|
|
1956
|
-
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingPlan:
|
|
2301
|
+
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number }): Promise<Models.Organization<Preferences>>;
|
|
1957
2302
|
/**
|
|
1958
2303
|
* Update the billing plan for an organization.
|
|
1959
2304
|
*
|
|
1960
2305
|
* @param {string} organizationId - Organization Unique ID
|
|
1961
|
-
* @param {
|
|
2306
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
1962
2307
|
* @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
1963
2308
|
* @param {string} billingAddressId - Unique ID of billing address
|
|
1964
2309
|
* @param {string[]} invites - Additional member invites
|
|
@@ -1969,19 +2314,19 @@ export class Organizations {
|
|
|
1969
2314
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1970
2315
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1971
2316
|
*/
|
|
1972
|
-
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan:
|
|
2317
|
+
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
|
|
1973
2318
|
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
1974
|
-
paramsOrFirst: { organizationId: string, billingPlan:
|
|
1975
|
-
...rest: [(
|
|
2319
|
+
paramsOrFirst: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number } | string,
|
|
2320
|
+
...rest: [(string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number)?]
|
|
1976
2321
|
): Promise<Models.Organization<Preferences>> {
|
|
1977
|
-
let params: { organizationId: string, billingPlan:
|
|
2322
|
+
let params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
|
|
1978
2323
|
|
|
1979
2324
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1980
|
-
params = (paramsOrFirst || {}) as { organizationId: string, billingPlan:
|
|
2325
|
+
params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
|
|
1981
2326
|
} else {
|
|
1982
2327
|
params = {
|
|
1983
2328
|
organizationId: paramsOrFirst as string,
|
|
1984
|
-
billingPlan: rest[0] as
|
|
2329
|
+
billingPlan: rest[0] as string,
|
|
1985
2330
|
paymentMethodId: rest[1] as string,
|
|
1986
2331
|
billingAddressId: rest[2] as string,
|
|
1987
2332
|
invites: rest[3] as string[],
|
|
@@ -2051,7 +2396,7 @@ export class Organizations {
|
|
|
2051
2396
|
* @throws {AppwriteException}
|
|
2052
2397
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2053
2398
|
*/
|
|
2054
|
-
cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string
|
|
2399
|
+
cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
|
|
2055
2400
|
/**
|
|
2056
2401
|
* Cancel the downgrade initiated for an organization.
|
|
2057
2402
|
*
|
|
@@ -2097,59 +2442,50 @@ export class Organizations {
|
|
|
2097
2442
|
}
|
|
2098
2443
|
|
|
2099
2444
|
/**
|
|
2100
|
-
*
|
|
2445
|
+
* Get all available regions for an organization.
|
|
2101
2446
|
*
|
|
2102
|
-
* @param {string} params.organizationId -
|
|
2103
|
-
* @param {string[]} params.projects - List of project IDs to be selected for the organization
|
|
2447
|
+
* @param {string} params.organizationId - Team ID.
|
|
2104
2448
|
* @throws {AppwriteException}
|
|
2105
|
-
* @returns {Promise<Models.
|
|
2449
|
+
* @returns {Promise<Models.ConsoleRegionList>}
|
|
2106
2450
|
*/
|
|
2107
|
-
|
|
2451
|
+
listRegions(params: { organizationId: string }): Promise<Models.ConsoleRegionList>;
|
|
2108
2452
|
/**
|
|
2109
|
-
*
|
|
2453
|
+
* Get all available regions for an organization.
|
|
2110
2454
|
*
|
|
2111
|
-
* @param {string} organizationId -
|
|
2112
|
-
* @param {string[]} projects - List of project IDs to be selected for the organization
|
|
2455
|
+
* @param {string} organizationId - Team ID.
|
|
2113
2456
|
* @throws {AppwriteException}
|
|
2114
|
-
* @returns {Promise<Models.
|
|
2457
|
+
* @returns {Promise<Models.ConsoleRegionList>}
|
|
2115
2458
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2116
2459
|
*/
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
paramsOrFirst: { organizationId: string
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
let params: { organizationId: string, projects?: string[] };
|
|
2460
|
+
listRegions(organizationId: string): Promise<Models.ConsoleRegionList>;
|
|
2461
|
+
listRegions(
|
|
2462
|
+
paramsOrFirst: { organizationId: string } | string
|
|
2463
|
+
): Promise<Models.ConsoleRegionList> {
|
|
2464
|
+
let params: { organizationId: string };
|
|
2123
2465
|
|
|
2124
2466
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2125
|
-
params = (paramsOrFirst || {}) as { organizationId: string
|
|
2467
|
+
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
2126
2468
|
} else {
|
|
2127
2469
|
params = {
|
|
2128
|
-
organizationId: paramsOrFirst as string
|
|
2129
|
-
projects: rest[0] as string[]
|
|
2470
|
+
organizationId: paramsOrFirst as string
|
|
2130
2471
|
};
|
|
2131
2472
|
}
|
|
2132
2473
|
|
|
2133
2474
|
const organizationId = params.organizationId;
|
|
2134
|
-
const projects = params.projects;
|
|
2135
2475
|
|
|
2136
2476
|
if (typeof organizationId === 'undefined') {
|
|
2137
2477
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2138
2478
|
}
|
|
2139
2479
|
|
|
2140
|
-
const apiPath = '/organizations/{organizationId}/
|
|
2480
|
+
const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
|
|
2141
2481
|
const payload: Payload = {};
|
|
2142
|
-
if (typeof projects !== 'undefined') {
|
|
2143
|
-
payload['projects'] = projects;
|
|
2144
|
-
}
|
|
2145
2482
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2146
2483
|
|
|
2147
2484
|
const apiHeaders: { [header: string]: string } = {
|
|
2148
|
-
'content-type': 'application/json',
|
|
2149
2485
|
}
|
|
2150
2486
|
|
|
2151
2487
|
return this.client.call(
|
|
2152
|
-
'
|
|
2488
|
+
'get',
|
|
2153
2489
|
uri,
|
|
2154
2490
|
apiHeaders,
|
|
2155
2491
|
payload
|
|
@@ -2163,7 +2499,7 @@ export class Organizations {
|
|
|
2163
2499
|
* @throws {AppwriteException}
|
|
2164
2500
|
* @returns {Promise<Models.Roles>}
|
|
2165
2501
|
*/
|
|
2166
|
-
getScopes(params: { organizationId: string
|
|
2502
|
+
getScopes(params: { organizationId: string }): Promise<Models.Roles>;
|
|
2167
2503
|
/**
|
|
2168
2504
|
* Get Scopes
|
|
2169
2505
|
*
|
|
@@ -2215,7 +2551,7 @@ export class Organizations {
|
|
|
2215
2551
|
* @throws {AppwriteException}
|
|
2216
2552
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2217
2553
|
*/
|
|
2218
|
-
setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, taxId: string
|
|
2554
|
+
setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, taxId: string }): Promise<Models.Organization<Preferences>>;
|
|
2219
2555
|
/**
|
|
2220
2556
|
* Set an organization's billing tax ID.
|
|
2221
2557
|
*
|
|
@@ -2279,7 +2615,7 @@ export class Organizations {
|
|
|
2279
2615
|
* @throws {AppwriteException}
|
|
2280
2616
|
* @returns {Promise<Models.UsageOrganization>}
|
|
2281
2617
|
*/
|
|
2282
|
-
getUsage(params: { organizationId: string, startDate?: string, endDate?: string
|
|
2618
|
+
getUsage(params: { organizationId: string, startDate?: string, endDate?: string }): Promise<Models.UsageOrganization>;
|
|
2283
2619
|
/**
|
|
2284
2620
|
* Get the usage data for an organization.
|
|
2285
2621
|
*
|
|
@@ -2344,7 +2680,7 @@ export class Organizations {
|
|
|
2344
2680
|
* @throws {AppwriteException}
|
|
2345
2681
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2346
2682
|
*/
|
|
2347
|
-
validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, invites?: string[]
|
|
2683
|
+
validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, invites?: string[] }): Promise<Models.Organization<Preferences>>;
|
|
2348
2684
|
/**
|
|
2349
2685
|
* Validate payment for team after creation or upgrade.
|
|
2350
2686
|
*
|