@appwrite.io/console 8.0.0 → 8.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/sdk.js +12 -1
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +12 -1
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +12 -1
- package/package.json +5 -1
- package/types/client.d.ts +9 -0
- package/types/models.d.ts +119 -0
- package/types/services/vcs.d.ts +8 -8
- package/.github/workflows/autoclose.yml +0 -11
- package/.github/workflows/publish.yml +0 -43
- package/CHANGELOG.md +0 -161
- package/docs/examples/account/create-anonymous-session.md +0 -13
- package/docs/examples/account/create-billing-address.md +0 -20
- package/docs/examples/account/create-email-password-session.md +0 -16
- package/docs/examples/account/create-email-token.md +0 -17
- package/docs/examples/account/create-email-verification.md +0 -15
- package/docs/examples/account/create-jwt.md +0 -15
- package/docs/examples/account/create-key.md +0 -17
- package/docs/examples/account/create-magic-url-token.md +0 -18
- package/docs/examples/account/create-mfa-authenticator.md +0 -15
- package/docs/examples/account/create-mfa-challenge.md +0 -15
- package/docs/examples/account/create-mfa-recovery-codes.md +0 -13
- package/docs/examples/account/create-o-auth-2-session.md +0 -17
- package/docs/examples/account/create-o-auth-2-token.md +0 -17
- package/docs/examples/account/create-payment-method.md +0 -13
- package/docs/examples/account/create-phone-token.md +0 -16
- package/docs/examples/account/create-phone-verification.md +0 -13
- package/docs/examples/account/create-push-target.md +0 -17
- package/docs/examples/account/create-recovery.md +0 -16
- package/docs/examples/account/create-session.md +0 -16
- package/docs/examples/account/create-verification.md +0 -15
- package/docs/examples/account/create.md +0 -18
- package/docs/examples/account/delete-billing-address.md +0 -15
- package/docs/examples/account/delete-identity.md +0 -15
- package/docs/examples/account/delete-key.md +0 -15
- package/docs/examples/account/delete-mfa-authenticator.md +0 -15
- package/docs/examples/account/delete-payment-method.md +0 -15
- package/docs/examples/account/delete-push-target.md +0 -15
- package/docs/examples/account/delete-session.md +0 -15
- package/docs/examples/account/delete-sessions.md +0 -13
- package/docs/examples/account/delete.md +0 -13
- package/docs/examples/account/get-billing-address.md +0 -15
- package/docs/examples/account/get-coupon.md +0 -15
- package/docs/examples/account/get-key.md +0 -15
- package/docs/examples/account/get-mfa-recovery-codes.md +0 -13
- package/docs/examples/account/get-payment-method.md +0 -15
- package/docs/examples/account/get-prefs.md +0 -13
- package/docs/examples/account/get-session.md +0 -15
- package/docs/examples/account/get.md +0 -13
- package/docs/examples/account/list-billing-addresses.md +0 -15
- package/docs/examples/account/list-identities.md +0 -16
- package/docs/examples/account/list-invoices.md +0 -15
- package/docs/examples/account/list-keys.md +0 -15
- package/docs/examples/account/list-logs.md +0 -16
- package/docs/examples/account/list-mfa-factors.md +0 -13
- package/docs/examples/account/list-payment-methods.md +0 -15
- package/docs/examples/account/list-sessions.md +0 -13
- package/docs/examples/account/update-billing-address.md +0 -21
- package/docs/examples/account/update-email-verification.md +0 -16
- package/docs/examples/account/update-email.md +0 -16
- package/docs/examples/account/update-key.md +0 -18
- package/docs/examples/account/update-magic-url-session.md +0 -16
- package/docs/examples/account/update-mfa-authenticator.md +0 -16
- package/docs/examples/account/update-mfa-challenge.md +0 -16
- package/docs/examples/account/update-mfa-recovery-codes.md +0 -13
- package/docs/examples/account/update-mfa.md +0 -15
- package/docs/examples/account/update-name.md +0 -15
- package/docs/examples/account/update-password.md +0 -16
- package/docs/examples/account/update-payment-method-mandate-options.md +0 -15
- package/docs/examples/account/update-payment-method-provider.md +0 -18
- package/docs/examples/account/update-payment-method.md +0 -18
- package/docs/examples/account/update-phone-session.md +0 -16
- package/docs/examples/account/update-phone-verification.md +0 -16
- package/docs/examples/account/update-phone.md +0 -16
- package/docs/examples/account/update-prefs.md +0 -19
- package/docs/examples/account/update-push-target.md +0 -16
- package/docs/examples/account/update-recovery.md +0 -17
- package/docs/examples/account/update-session.md +0 -15
- package/docs/examples/account/update-status.md +0 -13
- package/docs/examples/account/update-verification.md +0 -16
- package/docs/examples/activities/get-event.md +0 -15
- package/docs/examples/activities/list-events.md +0 -15
- package/docs/examples/assistant/chat.md +0 -15
- package/docs/examples/avatars/get-browser.md +0 -18
- package/docs/examples/avatars/get-credit-card.md +0 -18
- package/docs/examples/avatars/get-favicon.md +0 -15
- package/docs/examples/avatars/get-flag.md +0 -18
- package/docs/examples/avatars/get-image.md +0 -17
- package/docs/examples/avatars/get-initials.md +0 -18
- package/docs/examples/avatars/get-qr.md +0 -18
- package/docs/examples/avatars/get-screenshot.md +0 -37
- package/docs/examples/backups/create-archive.md +0 -16
- package/docs/examples/backups/create-policy.md +0 -21
- package/docs/examples/backups/create-restoration.md +0 -18
- package/docs/examples/backups/delete-archive.md +0 -15
- package/docs/examples/backups/delete-policy.md +0 -15
- package/docs/examples/backups/get-archive.md +0 -15
- package/docs/examples/backups/get-policy.md +0 -15
- package/docs/examples/backups/get-restoration.md +0 -15
- package/docs/examples/backups/list-archives.md +0 -15
- package/docs/examples/backups/list-policies.md +0 -15
- package/docs/examples/backups/list-restorations.md +0 -15
- package/docs/examples/backups/update-policy.md +0 -19
- package/docs/examples/console/create-program-membership.md +0 -15
- package/docs/examples/console/create-source.md +0 -19
- package/docs/examples/console/get-campaign.md +0 -15
- package/docs/examples/console/get-coupon.md +0 -15
- package/docs/examples/console/get-plan.md +0 -15
- package/docs/examples/console/get-plans.md +0 -15
- package/docs/examples/console/get-program.md +0 -15
- package/docs/examples/console/get-resource.md +0 -16
- package/docs/examples/console/list-regions.md +0 -13
- package/docs/examples/console/suggest-columns.md +0 -19
- package/docs/examples/console/suggest-indexes.md +0 -18
- package/docs/examples/console/variables.md +0 -13
- package/docs/examples/databases/create-boolean-attribute.md +0 -20
- package/docs/examples/databases/create-collection.md +0 -22
- package/docs/examples/databases/create-datetime-attribute.md +0 -20
- package/docs/examples/databases/create-document.md +0 -26
- package/docs/examples/databases/create-documents.md +0 -18
- package/docs/examples/databases/create-email-attribute.md +0 -20
- package/docs/examples/databases/create-enum-attribute.md +0 -21
- package/docs/examples/databases/create-float-attribute.md +0 -22
- package/docs/examples/databases/create-index.md +0 -21
- package/docs/examples/databases/create-integer-attribute.md +0 -22
- package/docs/examples/databases/create-ip-attribute.md +0 -20
- package/docs/examples/databases/create-line-attribute.md +0 -19
- package/docs/examples/databases/create-longtext-attribute.md +0 -21
- package/docs/examples/databases/create-mediumtext-attribute.md +0 -21
- package/docs/examples/databases/create-operations.md +0 -26
- package/docs/examples/databases/create-point-attribute.md +0 -19
- package/docs/examples/databases/create-polygon-attribute.md +0 -19
- package/docs/examples/databases/create-relationship-attribute.md +0 -22
- package/docs/examples/databases/create-string-attribute.md +0 -22
- package/docs/examples/databases/create-text-attribute.md +0 -21
- package/docs/examples/databases/create-transaction.md +0 -15
- package/docs/examples/databases/create-url-attribute.md +0 -20
- package/docs/examples/databases/create-varchar-attribute.md +0 -22
- package/docs/examples/databases/create.md +0 -17
- package/docs/examples/databases/decrement-document-attribute.md +0 -21
- package/docs/examples/databases/delete-attribute.md +0 -17
- package/docs/examples/databases/delete-collection.md +0 -16
- package/docs/examples/databases/delete-document.md +0 -18
- package/docs/examples/databases/delete-documents.md +0 -18
- package/docs/examples/databases/delete-index.md +0 -17
- package/docs/examples/databases/delete-transaction.md +0 -15
- package/docs/examples/databases/delete.md +0 -15
- package/docs/examples/databases/get-attribute.md +0 -17
- package/docs/examples/databases/get-collection-usage.md +0 -17
- package/docs/examples/databases/get-collection.md +0 -16
- package/docs/examples/databases/get-document.md +0 -19
- package/docs/examples/databases/get-index.md +0 -17
- package/docs/examples/databases/get-transaction.md +0 -15
- package/docs/examples/databases/get-usage.md +0 -16
- package/docs/examples/databases/get.md +0 -15
- package/docs/examples/databases/increment-document-attribute.md +0 -21
- package/docs/examples/databases/list-attributes.md +0 -18
- package/docs/examples/databases/list-collection-logs.md +0 -17
- package/docs/examples/databases/list-collections.md +0 -18
- package/docs/examples/databases/list-document-logs.md +0 -18
- package/docs/examples/databases/list-documents.md +0 -20
- package/docs/examples/databases/list-indexes.md +0 -18
- package/docs/examples/databases/list-logs.md +0 -16
- package/docs/examples/databases/list-transactions.md +0 -15
- package/docs/examples/databases/list-usage.md +0 -15
- package/docs/examples/databases/list.md +0 -17
- package/docs/examples/databases/update-boolean-attribute.md +0 -20
- package/docs/examples/databases/update-collection.md +0 -20
- package/docs/examples/databases/update-datetime-attribute.md +0 -20
- package/docs/examples/databases/update-document.md +0 -26
- package/docs/examples/databases/update-documents.md +0 -25
- package/docs/examples/databases/update-email-attribute.md +0 -20
- package/docs/examples/databases/update-enum-attribute.md +0 -21
- package/docs/examples/databases/update-float-attribute.md +0 -22
- package/docs/examples/databases/update-integer-attribute.md +0 -22
- package/docs/examples/databases/update-ip-attribute.md +0 -20
- package/docs/examples/databases/update-line-attribute.md +0 -20
- package/docs/examples/databases/update-longtext-attribute.md +0 -20
- package/docs/examples/databases/update-mediumtext-attribute.md +0 -20
- package/docs/examples/databases/update-point-attribute.md +0 -20
- package/docs/examples/databases/update-polygon-attribute.md +0 -20
- package/docs/examples/databases/update-relationship-attribute.md +0 -19
- package/docs/examples/databases/update-string-attribute.md +0 -21
- package/docs/examples/databases/update-text-attribute.md +0 -20
- package/docs/examples/databases/update-transaction.md +0 -17
- package/docs/examples/databases/update-url-attribute.md +0 -20
- package/docs/examples/databases/update-varchar-attribute.md +0 -21
- package/docs/examples/databases/update.md +0 -17
- package/docs/examples/databases/upsert-document.md +0 -26
- package/docs/examples/databases/upsert-documents.md +0 -18
- package/docs/examples/domains/create-preset-google-workspace.md +0 -15
- package/docs/examples/domains/create-preset-i-cloud.md +0 -15
- package/docs/examples/domains/create-preset-mailgun.md +0 -15
- package/docs/examples/domains/create-preset-outlook.md +0 -15
- package/docs/examples/domains/create-preset-proton-mail.md +0 -15
- package/docs/examples/domains/create-preset-zoho.md +0 -15
- package/docs/examples/domains/create-purchase.md +0 -26
- package/docs/examples/domains/create-record-a.md +0 -19
- package/docs/examples/domains/create-record-aaaa.md +0 -19
- package/docs/examples/domains/create-record-alias.md +0 -19
- package/docs/examples/domains/create-record-caa.md +0 -19
- package/docs/examples/domains/create-record-cname.md +0 -19
- package/docs/examples/domains/create-record-https.md +0 -19
- package/docs/examples/domains/create-record-mx.md +0 -20
- package/docs/examples/domains/create-record-ns.md +0 -19
- package/docs/examples/domains/create-record-srv.md +0 -22
- package/docs/examples/domains/create-record-txt.md +0 -19
- package/docs/examples/domains/create-transfer-in.md +0 -19
- package/docs/examples/domains/create-transfer-out.md +0 -16
- package/docs/examples/domains/create.md +0 -16
- package/docs/examples/domains/delete-record.md +0 -16
- package/docs/examples/domains/delete.md +0 -15
- package/docs/examples/domains/get-preset-google-workspace.md +0 -15
- package/docs/examples/domains/get-preset-i-cloud.md +0 -15
- package/docs/examples/domains/get-preset-mailgun.md +0 -15
- package/docs/examples/domains/get-preset-outlook.md +0 -15
- package/docs/examples/domains/get-preset-proton-mail.md +0 -15
- package/docs/examples/domains/get-preset-zoho.md +0 -15
- package/docs/examples/domains/get-price.md +0 -17
- package/docs/examples/domains/get-record.md +0 -16
- package/docs/examples/domains/get-transfer-status.md +0 -15
- package/docs/examples/domains/get-zone.md +0 -15
- package/docs/examples/domains/get.md +0 -15
- package/docs/examples/domains/list-records.md +0 -16
- package/docs/examples/domains/list-suggestions.md +0 -20
- package/docs/examples/domains/list.md +0 -16
- package/docs/examples/domains/update-auto-renewal.md +0 -16
- package/docs/examples/domains/update-nameservers.md +0 -15
- package/docs/examples/domains/update-purchase.md +0 -16
- package/docs/examples/domains/update-record-a.md +0 -20
- package/docs/examples/domains/update-record-aaaa.md +0 -20
- package/docs/examples/domains/update-record-alias.md +0 -20
- package/docs/examples/domains/update-record-caa.md +0 -20
- package/docs/examples/domains/update-record-cname.md +0 -20
- package/docs/examples/domains/update-record-https.md +0 -20
- package/docs/examples/domains/update-record-mx.md +0 -21
- package/docs/examples/domains/update-record-ns.md +0 -20
- package/docs/examples/domains/update-record-srv.md +0 -23
- package/docs/examples/domains/update-record-txt.md +0 -20
- package/docs/examples/domains/update-team.md +0 -16
- package/docs/examples/domains/update-transfer-in.md +0 -16
- package/docs/examples/domains/update-zone.md +0 -16
- package/docs/examples/functions/create-deployment.md +0 -19
- package/docs/examples/functions/create-duplicate-deployment.md +0 -17
- package/docs/examples/functions/create-execution.md +0 -21
- package/docs/examples/functions/create-template-deployment.md +0 -21
- package/docs/examples/functions/create-variable.md +0 -18
- package/docs/examples/functions/create-vcs-deployment.md +0 -18
- package/docs/examples/functions/create.md +0 -34
- package/docs/examples/functions/delete-deployment.md +0 -16
- package/docs/examples/functions/delete-execution.md +0 -16
- package/docs/examples/functions/delete-variable.md +0 -16
- package/docs/examples/functions/delete.md +0 -15
- package/docs/examples/functions/get-deployment-download.md +0 -17
- package/docs/examples/functions/get-deployment.md +0 -16
- package/docs/examples/functions/get-execution.md +0 -16
- package/docs/examples/functions/get-template.md +0 -15
- package/docs/examples/functions/get-usage.md +0 -16
- package/docs/examples/functions/get-variable.md +0 -16
- package/docs/examples/functions/get.md +0 -15
- package/docs/examples/functions/list-deployments.md +0 -18
- package/docs/examples/functions/list-executions.md +0 -17
- package/docs/examples/functions/list-runtimes.md +0 -13
- package/docs/examples/functions/list-specifications.md +0 -13
- package/docs/examples/functions/list-templates.md +0 -19
- package/docs/examples/functions/list-usage.md +0 -15
- package/docs/examples/functions/list-variables.md +0 -15
- package/docs/examples/functions/list.md +0 -17
- package/docs/examples/functions/update-deployment-status.md +0 -16
- package/docs/examples/functions/update-function-deployment.md +0 -16
- package/docs/examples/functions/update-variable.md +0 -19
- package/docs/examples/functions/update.md +0 -34
- package/docs/examples/graphql/mutation.md +0 -15
- package/docs/examples/graphql/query.md +0 -15
- package/docs/examples/health/get-antivirus.md +0 -13
- package/docs/examples/health/get-cache.md +0 -13
- package/docs/examples/health/get-certificate.md +0 -15
- package/docs/examples/health/get-console-pausing.md +0 -16
- package/docs/examples/health/get-db.md +0 -13
- package/docs/examples/health/get-failed-jobs.md +0 -16
- package/docs/examples/health/get-pub-sub.md +0 -13
- package/docs/examples/health/get-queue-audits.md +0 -15
- package/docs/examples/health/get-queue-billing-project-aggregation.md +0 -15
- package/docs/examples/health/get-queue-billing-team-aggregation.md +0 -15
- package/docs/examples/health/get-queue-builds.md +0 -15
- package/docs/examples/health/get-queue-certificates.md +0 -15
- package/docs/examples/health/get-queue-databases.md +0 -16
- package/docs/examples/health/get-queue-deletes.md +0 -15
- package/docs/examples/health/get-queue-functions.md +0 -15
- package/docs/examples/health/get-queue-logs.md +0 -15
- package/docs/examples/health/get-queue-mails.md +0 -15
- package/docs/examples/health/get-queue-messaging.md +0 -15
- package/docs/examples/health/get-queue-migrations.md +0 -15
- package/docs/examples/health/get-queue-priority-builds.md +0 -15
- package/docs/examples/health/get-queue-region-manager.md +0 -15
- package/docs/examples/health/get-queue-stats-resources.md +0 -15
- package/docs/examples/health/get-queue-threats.md +0 -15
- package/docs/examples/health/get-queue-usage.md +0 -15
- package/docs/examples/health/get-queue-webhooks.md +0 -15
- package/docs/examples/health/get-storage-local.md +0 -13
- package/docs/examples/health/get-storage.md +0 -13
- package/docs/examples/health/get-time.md +0 -13
- package/docs/examples/health/get.md +0 -13
- package/docs/examples/locale/get.md +0 -13
- package/docs/examples/locale/list-codes.md +0 -13
- package/docs/examples/locale/list-continents.md +0 -13
- package/docs/examples/locale/list-countries-eu.md +0 -13
- package/docs/examples/locale/list-countries-phones.md +0 -13
- package/docs/examples/locale/list-countries.md +0 -13
- package/docs/examples/locale/list-currencies.md +0 -13
- package/docs/examples/locale/list-languages.md +0 -13
- package/docs/examples/messaging/create-apns-provider.md +0 -22
- package/docs/examples/messaging/create-email.md +0 -26
- package/docs/examples/messaging/create-fcm-provider.md +0 -18
- package/docs/examples/messaging/create-mailgun-provider.md +0 -24
- package/docs/examples/messaging/create-msg-91-provider.md +0 -20
- package/docs/examples/messaging/create-push.md +0 -33
- package/docs/examples/messaging/create-resend-provider.md +0 -22
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -22
- package/docs/examples/messaging/create-sms.md +0 -21
- package/docs/examples/messaging/create-smtp-provider.md +0 -28
- package/docs/examples/messaging/create-subscriber.md +0 -17
- package/docs/examples/messaging/create-telesign-provider.md +0 -20
- package/docs/examples/messaging/create-textmagic-provider.md +0 -20
- package/docs/examples/messaging/create-topic.md +0 -17
- package/docs/examples/messaging/create-twilio-provider.md +0 -20
- package/docs/examples/messaging/create-vonage-provider.md +0 -20
- package/docs/examples/messaging/delete-provider.md +0 -15
- package/docs/examples/messaging/delete-subscriber.md +0 -16
- package/docs/examples/messaging/delete-topic.md +0 -15
- package/docs/examples/messaging/delete.md +0 -15
- package/docs/examples/messaging/get-message.md +0 -15
- package/docs/examples/messaging/get-provider.md +0 -15
- package/docs/examples/messaging/get-subscriber.md +0 -16
- package/docs/examples/messaging/get-topic.md +0 -15
- package/docs/examples/messaging/list-message-logs.md +0 -17
- package/docs/examples/messaging/list-messages.md +0 -17
- package/docs/examples/messaging/list-provider-logs.md +0 -17
- package/docs/examples/messaging/list-providers.md +0 -17
- package/docs/examples/messaging/list-subscriber-logs.md +0 -17
- package/docs/examples/messaging/list-subscribers.md +0 -18
- package/docs/examples/messaging/list-targets.md +0 -17
- package/docs/examples/messaging/list-topic-logs.md +0 -17
- package/docs/examples/messaging/list-topics.md +0 -17
- package/docs/examples/messaging/update-apns-provider.md +0 -22
- package/docs/examples/messaging/update-email.md +0 -26
- package/docs/examples/messaging/update-fcm-provider.md +0 -18
- package/docs/examples/messaging/update-mailgun-provider.md +0 -24
- package/docs/examples/messaging/update-msg-91-provider.md +0 -20
- package/docs/examples/messaging/update-push.md +0 -33
- package/docs/examples/messaging/update-resend-provider.md +0 -22
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -22
- package/docs/examples/messaging/update-sms.md +0 -21
- package/docs/examples/messaging/update-smtp-provider.md +0 -28
- package/docs/examples/messaging/update-telesign-provider.md +0 -20
- package/docs/examples/messaging/update-textmagic-provider.md +0 -20
- package/docs/examples/messaging/update-topic.md +0 -17
- package/docs/examples/messaging/update-twilio-provider.md +0 -20
- package/docs/examples/messaging/update-vonage-provider.md +0 -20
- package/docs/examples/migrations/create-appwrite-migration.md +0 -18
- package/docs/examples/migrations/create-csv-export.md +0 -23
- package/docs/examples/migrations/create-csv-import.md +0 -18
- package/docs/examples/migrations/create-firebase-migration.md +0 -16
- package/docs/examples/migrations/create-n-host-migration.md +0 -22
- package/docs/examples/migrations/create-supabase-migration.md +0 -21
- package/docs/examples/migrations/delete.md +0 -15
- package/docs/examples/migrations/get-appwrite-report.md +0 -18
- package/docs/examples/migrations/get-firebase-report.md +0 -16
- package/docs/examples/migrations/get-n-host-report.md +0 -22
- package/docs/examples/migrations/get-supabase-report.md +0 -21
- package/docs/examples/migrations/get.md +0 -15
- package/docs/examples/migrations/list.md +0 -17
- package/docs/examples/migrations/retry.md +0 -15
- package/docs/examples/organizations/add-credit.md +0 -16
- package/docs/examples/organizations/cancel-downgrade.md +0 -15
- package/docs/examples/organizations/create-downgrade-feedback.md +0 -19
- package/docs/examples/organizations/create-invoice-payment.md +0 -17
- package/docs/examples/organizations/create-key.md +0 -18
- package/docs/examples/organizations/create.md +0 -24
- package/docs/examples/organizations/delete-backup-payment-method.md +0 -15
- package/docs/examples/organizations/delete-billing-address.md +0 -15
- package/docs/examples/organizations/delete-default-payment-method.md +0 -15
- package/docs/examples/organizations/delete-key.md +0 -16
- package/docs/examples/organizations/delete.md +0 -15
- package/docs/examples/organizations/estimation-create-organization.md +0 -19
- package/docs/examples/organizations/estimation-delete-organization.md +0 -15
- package/docs/examples/organizations/estimation-update-plan.md +0 -18
- package/docs/examples/organizations/get-aggregation.md +0 -18
- package/docs/examples/organizations/get-available-credits.md +0 -15
- package/docs/examples/organizations/get-billing-address.md +0 -16
- package/docs/examples/organizations/get-credit.md +0 -16
- package/docs/examples/organizations/get-invoice-download.md +0 -16
- package/docs/examples/organizations/get-invoice-view.md +0 -16
- package/docs/examples/organizations/get-invoice.md +0 -16
- package/docs/examples/organizations/get-key.md +0 -16
- package/docs/examples/organizations/get-payment-method.md +0 -16
- package/docs/examples/organizations/get-plan.md +0 -15
- package/docs/examples/organizations/get-scopes.md +0 -16
- package/docs/examples/organizations/get-usage.md +0 -17
- package/docs/examples/organizations/list-aggregations.md +0 -16
- package/docs/examples/organizations/list-credits.md +0 -16
- package/docs/examples/organizations/list-invoices.md +0 -16
- package/docs/examples/organizations/list-keys.md +0 -16
- package/docs/examples/organizations/list-regions.md +0 -15
- package/docs/examples/organizations/list.md +0 -16
- package/docs/examples/organizations/set-backup-payment-method.md +0 -16
- package/docs/examples/organizations/set-billing-address.md +0 -16
- package/docs/examples/organizations/set-billing-email.md +0 -16
- package/docs/examples/organizations/set-billing-tax-id.md +0 -16
- package/docs/examples/organizations/set-default-payment-method.md +0 -16
- package/docs/examples/organizations/update-budget.md +0 -17
- package/docs/examples/organizations/update-key.md +0 -19
- package/docs/examples/organizations/update-plan.md +0 -22
- package/docs/examples/organizations/validate-invoice.md +0 -16
- package/docs/examples/organizations/validate-payment.md +0 -16
- package/docs/examples/project/create-variable.md +0 -18
- package/docs/examples/project/delete-variable.md +0 -15
- package/docs/examples/project/get-usage.md +0 -17
- package/docs/examples/project/get-variable.md +0 -15
- package/docs/examples/project/list-variables.md +0 -16
- package/docs/examples/project/update-variable.md +0 -18
- package/docs/examples/projects/create-dev-key.md +0 -17
- package/docs/examples/projects/create-jwt.md +0 -17
- package/docs/examples/projects/create-key.md +0 -19
- package/docs/examples/projects/create-platform.md +0 -20
- package/docs/examples/projects/create-schedule.md +0 -20
- package/docs/examples/projects/create-smtp-test.md +0 -24
- package/docs/examples/projects/create.md +0 -27
- package/docs/examples/projects/delete-dev-key.md +0 -16
- package/docs/examples/projects/delete-email-template.md +0 -17
- package/docs/examples/projects/delete-key.md +0 -16
- package/docs/examples/projects/delete-platform.md +0 -16
- package/docs/examples/projects/delete-sms-template.md +0 -17
- package/docs/examples/projects/delete.md +0 -15
- package/docs/examples/projects/get-dev-key.md +0 -16
- package/docs/examples/projects/get-email-template.md +0 -17
- package/docs/examples/projects/get-key.md +0 -16
- package/docs/examples/projects/get-platform.md +0 -16
- package/docs/examples/projects/get-schedule.md +0 -16
- package/docs/examples/projects/get-sms-template.md +0 -17
- package/docs/examples/projects/get.md +0 -15
- package/docs/examples/projects/list-dev-keys.md +0 -16
- package/docs/examples/projects/list-keys.md +0 -17
- package/docs/examples/projects/list-platforms.md +0 -16
- package/docs/examples/projects/list-schedules.md +0 -17
- package/docs/examples/projects/list.md +0 -17
- package/docs/examples/projects/update-api-status-all.md +0 -16
- package/docs/examples/projects/update-api-status.md +0 -17
- package/docs/examples/projects/update-auth-duration.md +0 -16
- package/docs/examples/projects/update-auth-limit.md +0 -16
- package/docs/examples/projects/update-auth-password-dictionary.md +0 -16
- package/docs/examples/projects/update-auth-password-history.md +0 -16
- package/docs/examples/projects/update-auth-sessions-limit.md +0 -16
- package/docs/examples/projects/update-auth-status.md +0 -17
- package/docs/examples/projects/update-console-access.md +0 -15
- package/docs/examples/projects/update-dev-key.md +0 -18
- package/docs/examples/projects/update-email-template.md +0 -22
- package/docs/examples/projects/update-key.md +0 -19
- package/docs/examples/projects/update-labels.md +0 -16
- package/docs/examples/projects/update-memberships-privacy.md +0 -18
- package/docs/examples/projects/update-mock-numbers.md +0 -16
- package/docs/examples/projects/update-o-auth-2.md +0 -19
- package/docs/examples/projects/update-personal-data-check.md +0 -16
- package/docs/examples/projects/update-platform.md +0 -20
- package/docs/examples/projects/update-service-status-all.md +0 -16
- package/docs/examples/projects/update-service-status.md +0 -17
- package/docs/examples/projects/update-session-alerts.md +0 -16
- package/docs/examples/projects/update-session-invalidation.md +0 -16
- package/docs/examples/projects/update-sms-template.md +0 -18
- package/docs/examples/projects/update-smtp.md +0 -24
- package/docs/examples/projects/update-status.md +0 -16
- package/docs/examples/projects/update-team.md +0 -16
- package/docs/examples/projects/update.md +0 -25
- package/docs/examples/proxy/create-api-rule.md +0 -15
- package/docs/examples/proxy/create-function-rule.md +0 -17
- package/docs/examples/proxy/create-redirect-rule.md +0 -19
- package/docs/examples/proxy/create-site-rule.md +0 -17
- package/docs/examples/proxy/delete-rule.md +0 -15
- package/docs/examples/proxy/get-rule.md +0 -15
- package/docs/examples/proxy/list-rules.md +0 -17
- package/docs/examples/proxy/update-rule-verification.md +0 -15
- package/docs/examples/sites/create-deployment.md +0 -20
- package/docs/examples/sites/create-duplicate-deployment.md +0 -16
- package/docs/examples/sites/create-template-deployment.md +0 -21
- package/docs/examples/sites/create-variable.md +0 -18
- package/docs/examples/sites/create-vcs-deployment.md +0 -18
- package/docs/examples/sites/create.md +0 -35
- package/docs/examples/sites/delete-deployment.md +0 -16
- package/docs/examples/sites/delete-log.md +0 -16
- package/docs/examples/sites/delete-variable.md +0 -16
- package/docs/examples/sites/delete.md +0 -15
- package/docs/examples/sites/get-deployment-download.md +0 -17
- package/docs/examples/sites/get-deployment.md +0 -16
- package/docs/examples/sites/get-log.md +0 -16
- package/docs/examples/sites/get-template.md +0 -15
- package/docs/examples/sites/get-usage.md +0 -16
- package/docs/examples/sites/get-variable.md +0 -16
- package/docs/examples/sites/get.md +0 -15
- package/docs/examples/sites/list-deployments.md +0 -18
- package/docs/examples/sites/list-frameworks.md +0 -13
- package/docs/examples/sites/list-logs.md +0 -17
- package/docs/examples/sites/list-specifications.md +0 -13
- package/docs/examples/sites/list-templates.md +0 -18
- package/docs/examples/sites/list-usage.md +0 -15
- package/docs/examples/sites/list-variables.md +0 -15
- package/docs/examples/sites/list.md +0 -17
- package/docs/examples/sites/update-deployment-status.md +0 -16
- package/docs/examples/sites/update-site-deployment.md +0 -16
- package/docs/examples/sites/update-variable.md +0 -19
- package/docs/examples/sites/update.md +0 -35
- package/docs/examples/storage/create-bucket.md +0 -25
- package/docs/examples/storage/create-file.md +0 -18
- package/docs/examples/storage/delete-bucket.md +0 -15
- package/docs/examples/storage/delete-file.md +0 -16
- package/docs/examples/storage/get-bucket-usage.md +0 -16
- package/docs/examples/storage/get-bucket.md +0 -15
- package/docs/examples/storage/get-file-download.md +0 -17
- package/docs/examples/storage/get-file-preview.md +0 -28
- package/docs/examples/storage/get-file-view.md +0 -17
- package/docs/examples/storage/get-file.md +0 -16
- package/docs/examples/storage/get-usage.md +0 -15
- package/docs/examples/storage/list-buckets.md +0 -17
- package/docs/examples/storage/list-files.md +0 -18
- package/docs/examples/storage/update-bucket.md +0 -25
- package/docs/examples/storage/update-file.md +0 -18
- package/docs/examples/tablesdb/create-boolean-column.md +0 -20
- package/docs/examples/tablesdb/create-datetime-column.md +0 -20
- package/docs/examples/tablesdb/create-email-column.md +0 -20
- package/docs/examples/tablesdb/create-enum-column.md +0 -21
- package/docs/examples/tablesdb/create-float-column.md +0 -22
- package/docs/examples/tablesdb/create-index.md +0 -21
- package/docs/examples/tablesdb/create-integer-column.md +0 -22
- package/docs/examples/tablesdb/create-ip-column.md +0 -20
- package/docs/examples/tablesdb/create-line-column.md +0 -19
- package/docs/examples/tablesdb/create-longtext-column.md +0 -21
- package/docs/examples/tablesdb/create-mediumtext-column.md +0 -21
- package/docs/examples/tablesdb/create-operations.md +0 -26
- package/docs/examples/tablesdb/create-point-column.md +0 -19
- package/docs/examples/tablesdb/create-polygon-column.md +0 -19
- package/docs/examples/tablesdb/create-relationship-column.md +0 -22
- package/docs/examples/tablesdb/create-row.md +0 -26
- package/docs/examples/tablesdb/create-rows.md +0 -18
- package/docs/examples/tablesdb/create-string-column.md +0 -22
- package/docs/examples/tablesdb/create-table.md +0 -22
- package/docs/examples/tablesdb/create-text-column.md +0 -21
- package/docs/examples/tablesdb/create-transaction.md +0 -15
- package/docs/examples/tablesdb/create-url-column.md +0 -20
- package/docs/examples/tablesdb/create-varchar-column.md +0 -22
- package/docs/examples/tablesdb/create.md +0 -17
- package/docs/examples/tablesdb/decrement-row-column.md +0 -21
- package/docs/examples/tablesdb/delete-column.md +0 -17
- package/docs/examples/tablesdb/delete-index.md +0 -17
- package/docs/examples/tablesdb/delete-row.md +0 -18
- package/docs/examples/tablesdb/delete-rows.md +0 -18
- package/docs/examples/tablesdb/delete-table.md +0 -16
- package/docs/examples/tablesdb/delete-transaction.md +0 -15
- package/docs/examples/tablesdb/delete.md +0 -15
- package/docs/examples/tablesdb/get-column.md +0 -17
- package/docs/examples/tablesdb/get-index.md +0 -17
- package/docs/examples/tablesdb/get-row.md +0 -19
- package/docs/examples/tablesdb/get-table-usage.md +0 -17
- package/docs/examples/tablesdb/get-table.md +0 -16
- package/docs/examples/tablesdb/get-transaction.md +0 -15
- package/docs/examples/tablesdb/get-usage.md +0 -16
- package/docs/examples/tablesdb/get.md +0 -15
- package/docs/examples/tablesdb/increment-row-column.md +0 -21
- package/docs/examples/tablesdb/list-columns.md +0 -18
- package/docs/examples/tablesdb/list-indexes.md +0 -18
- package/docs/examples/tablesdb/list-row-logs.md +0 -18
- package/docs/examples/tablesdb/list-rows.md +0 -20
- package/docs/examples/tablesdb/list-table-logs.md +0 -17
- package/docs/examples/tablesdb/list-tables.md +0 -18
- package/docs/examples/tablesdb/list-transactions.md +0 -15
- package/docs/examples/tablesdb/list-usage.md +0 -15
- package/docs/examples/tablesdb/list.md +0 -17
- package/docs/examples/tablesdb/update-boolean-column.md +0 -20
- package/docs/examples/tablesdb/update-datetime-column.md +0 -20
- package/docs/examples/tablesdb/update-email-column.md +0 -20
- package/docs/examples/tablesdb/update-enum-column.md +0 -21
- package/docs/examples/tablesdb/update-float-column.md +0 -22
- package/docs/examples/tablesdb/update-integer-column.md +0 -22
- package/docs/examples/tablesdb/update-ip-column.md +0 -20
- package/docs/examples/tablesdb/update-line-column.md +0 -20
- package/docs/examples/tablesdb/update-longtext-column.md +0 -20
- package/docs/examples/tablesdb/update-mediumtext-column.md +0 -20
- package/docs/examples/tablesdb/update-point-column.md +0 -20
- package/docs/examples/tablesdb/update-polygon-column.md +0 -20
- package/docs/examples/tablesdb/update-relationship-column.md +0 -19
- package/docs/examples/tablesdb/update-row.md +0 -26
- package/docs/examples/tablesdb/update-rows.md +0 -25
- package/docs/examples/tablesdb/update-string-column.md +0 -21
- package/docs/examples/tablesdb/update-table.md +0 -20
- package/docs/examples/tablesdb/update-text-column.md +0 -20
- package/docs/examples/tablesdb/update-transaction.md +0 -17
- package/docs/examples/tablesdb/update-url-column.md +0 -20
- package/docs/examples/tablesdb/update-varchar-column.md +0 -21
- package/docs/examples/tablesdb/update.md +0 -17
- package/docs/examples/tablesdb/upsert-row.md +0 -26
- package/docs/examples/tablesdb/upsert-rows.md +0 -18
- package/docs/examples/teams/create-membership.md +0 -21
- package/docs/examples/teams/create.md +0 -17
- package/docs/examples/teams/delete-membership.md +0 -16
- package/docs/examples/teams/delete.md +0 -15
- package/docs/examples/teams/get-membership.md +0 -16
- package/docs/examples/teams/get-prefs.md +0 -15
- package/docs/examples/teams/get.md +0 -15
- package/docs/examples/teams/list-logs.md +0 -17
- package/docs/examples/teams/list-memberships.md +0 -18
- package/docs/examples/teams/list.md +0 -17
- package/docs/examples/teams/update-membership-status.md +0 -18
- package/docs/examples/teams/update-membership.md +0 -17
- package/docs/examples/teams/update-name.md +0 -16
- package/docs/examples/teams/update-prefs.md +0 -16
- package/docs/examples/tokens/create-file-token.md +0 -17
- package/docs/examples/tokens/delete.md +0 -15
- package/docs/examples/tokens/get.md +0 -15
- package/docs/examples/tokens/list.md +0 -18
- package/docs/examples/tokens/update.md +0 -16
- package/docs/examples/users/create-argon-2-user.md +0 -18
- package/docs/examples/users/create-bcrypt-user.md +0 -18
- package/docs/examples/users/create-jwt.md +0 -17
- package/docs/examples/users/create-md-5-user.md +0 -18
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -15
- package/docs/examples/users/create-ph-pass-user.md +0 -18
- package/docs/examples/users/create-scrypt-modified-user.md +0 -21
- package/docs/examples/users/create-scrypt-user.md +0 -23
- package/docs/examples/users/create-session.md +0 -15
- package/docs/examples/users/create-sha-user.md +0 -19
- package/docs/examples/users/create-target.md +0 -20
- package/docs/examples/users/create-token.md +0 -17
- package/docs/examples/users/create.md +0 -19
- package/docs/examples/users/delete-identity.md +0 -15
- package/docs/examples/users/delete-mfa-authenticator.md +0 -16
- package/docs/examples/users/delete-session.md +0 -16
- package/docs/examples/users/delete-sessions.md +0 -15
- package/docs/examples/users/delete-target.md +0 -16
- package/docs/examples/users/delete.md +0 -15
- package/docs/examples/users/get-mfa-recovery-codes.md +0 -15
- package/docs/examples/users/get-prefs.md +0 -15
- package/docs/examples/users/get-target.md +0 -16
- package/docs/examples/users/get-usage.md +0 -15
- package/docs/examples/users/get.md +0 -15
- package/docs/examples/users/list-identities.md +0 -17
- package/docs/examples/users/list-logs.md +0 -17
- package/docs/examples/users/list-memberships.md +0 -18
- package/docs/examples/users/list-mfa-factors.md +0 -15
- package/docs/examples/users/list-sessions.md +0 -16
- package/docs/examples/users/list-targets.md +0 -17
- package/docs/examples/users/list.md +0 -17
- package/docs/examples/users/update-email-verification.md +0 -16
- package/docs/examples/users/update-email.md +0 -16
- package/docs/examples/users/update-impersonator.md +0 -16
- package/docs/examples/users/update-labels.md +0 -16
- package/docs/examples/users/update-mfa-recovery-codes.md +0 -15
- package/docs/examples/users/update-mfa.md +0 -16
- package/docs/examples/users/update-name.md +0 -16
- package/docs/examples/users/update-password.md +0 -16
- package/docs/examples/users/update-phone-verification.md +0 -16
- package/docs/examples/users/update-phone.md +0 -16
- package/docs/examples/users/update-prefs.md +0 -16
- package/docs/examples/users/update-status.md +0 -16
- package/docs/examples/users/update-target.md +0 -19
- package/docs/examples/vcs/create-repository-detection.md +0 -18
- package/docs/examples/vcs/create-repository.md +0 -17
- package/docs/examples/vcs/delete-installation.md +0 -15
- package/docs/examples/vcs/get-installation.md +0 -15
- package/docs/examples/vcs/get-repository-contents.md +0 -18
- package/docs/examples/vcs/get-repository.md +0 -16
- package/docs/examples/vcs/list-installations.md +0 -17
- package/docs/examples/vcs/list-repositories.md +0 -18
- package/docs/examples/vcs/list-repository-branches.md +0 -16
- package/docs/examples/vcs/update-external-deployments.md +0 -17
- package/docs/examples/webhooks/create.md +0 -22
- package/docs/examples/webhooks/delete.md +0 -15
- package/docs/examples/webhooks/get.md +0 -15
- package/docs/examples/webhooks/list.md +0 -16
- package/docs/examples/webhooks/update-signature.md +0 -15
- package/docs/examples/webhooks/update.md +0 -22
- package/rollup.config.js +0 -44
- package/src/channel.ts +0 -158
- package/src/client.ts +0 -1073
- package/src/enums/adapter.ts +0 -4
- package/src/enums/api-service.ts +0 -15
- package/src/enums/api.ts +0 -5
- package/src/enums/appwrite-migration-resource.ts +0 -27
- package/src/enums/attribute-status.ts +0 -7
- package/src/enums/auth-method.ts +0 -9
- package/src/enums/authentication-factor.ts +0 -6
- package/src/enums/authenticator-type.ts +0 -3
- package/src/enums/backup-services.ts +0 -8
- package/src/enums/billing-plan-group.ts +0 -5
- package/src/enums/browser-permission.ts +0 -22
- package/src/enums/browser.ts +0 -16
- package/src/enums/build-runtime.ts +0 -88
- package/src/enums/column-status.ts +0 -7
- package/src/enums/compression.ts +0 -5
- package/src/enums/console-resource-type.ts +0 -3
- package/src/enums/credit-card.ts +0 -19
- package/src/enums/database-type.ts +0 -6
- package/src/enums/databases-index-type.ts +0 -6
- package/src/enums/deployment-download-type.ts +0 -4
- package/src/enums/deployment-status.ts +0 -8
- package/src/enums/domain-purchase-status.ts +0 -6
- package/src/enums/domain-transfer-status-enum.ts +0 -10
- package/src/enums/email-template-locale.ts +0 -133
- package/src/enums/email-template-type.ts +0 -9
- package/src/enums/execution-method.ts +0 -9
- package/src/enums/execution-status.ts +0 -7
- package/src/enums/execution-trigger.ts +0 -5
- package/src/enums/filter-type.ts +0 -4
- package/src/enums/firebase-migration-resource.ts +0 -12
- package/src/enums/flag.ts +0 -197
- package/src/enums/framework.ts +0 -17
- package/src/enums/frameworks.ts +0 -17
- package/src/enums/health-antivirus-status.ts +0 -5
- package/src/enums/health-check-status.ts +0 -4
- package/src/enums/image-format.ts +0 -9
- package/src/enums/image-gravity.ts +0 -11
- package/src/enums/index-status.ts +0 -7
- package/src/enums/message-priority.ts +0 -4
- package/src/enums/message-status.ts +0 -7
- package/src/enums/messaging-provider-type.ts +0 -5
- package/src/enums/n-host-migration-resource.ts +0 -13
- package/src/enums/name.ts +0 -15
- package/src/enums/o-auth-provider.ts +0 -41
- package/src/enums/order-by.ts +0 -4
- package/src/enums/password-hash.ts +0 -13
- package/src/enums/platform-type.ts +0 -17
- package/src/enums/platform.ts +0 -4
- package/src/enums/project-usage-range.ts +0 -4
- package/src/enums/proxy-resource-type.ts +0 -4
- package/src/enums/proxy-rule-deployment-resource-type.ts +0 -4
- package/src/enums/proxy-rule-status.ts +0 -6
- package/src/enums/region.ts +0 -8
- package/src/enums/registration-type.ts +0 -6
- package/src/enums/relation-mutate.ts +0 -5
- package/src/enums/relationship-type.ts +0 -6
- package/src/enums/resource-type.ts +0 -6
- package/src/enums/runtime.ts +0 -88
- package/src/enums/runtimes.ts +0 -88
- package/src/enums/scopes.ts +0 -81
- package/src/enums/sms-template-locale.ts +0 -133
- package/src/enums/sms-template-type.ts +0 -6
- package/src/enums/smtp-encryption.ts +0 -5
- package/src/enums/smtp-secure.ts +0 -4
- package/src/enums/status-code.ts +0 -6
- package/src/enums/status.ts +0 -3
- package/src/enums/supabase-migration-resource.ts +0 -13
- package/src/enums/tables-db-index-type.ts +0 -6
- package/src/enums/template-reference-type.ts +0 -5
- package/src/enums/theme.ts +0 -4
- package/src/enums/timezone.ts +0 -421
- package/src/enums/usage-range.ts +0 -5
- package/src/enums/use-cases.ts +0 -16
- package/src/enums/vcs-detection-type.ts +0 -4
- package/src/enums/vcs-reference-type.ts +0 -5
- package/src/id.ts +0 -47
- package/src/index.ts +0 -118
- package/src/models.ts +0 -9367
- package/src/operator.ts +0 -308
- package/src/permission.ts +0 -57
- package/src/query.ts +0 -576
- package/src/role.ts +0 -100
- package/src/service.ts +0 -30
- package/src/services/account.ts +0 -4293
- package/src/services/activities.ts +0 -116
- package/src/services/assistant.ts +0 -67
- package/src/services/avatars.ts +0 -754
- package/src/services/backups.ts +0 -754
- package/src/services/console.ts +0 -678
- package/src/services/databases.ts +0 -6376
- package/src/services/domains.ts +0 -4064
- package/src/services/functions.ts +0 -2224
- package/src/services/graphql.ts +0 -124
- package/src/services/health.ts +0 -1296
- package/src/services/locale.ts +0 -198
- package/src/services/messaging.ts +0 -5194
- package/src/services/migrations.ts +0 -1207
- package/src/services/organizations.ts +0 -2742
- package/src/services/project.ts +0 -404
- package/src/services/projects.ts +0 -4431
- package/src/services/proxy.ts +0 -532
- package/src/services/realtime.ts +0 -537
- package/src/services/sites.ts +0 -2131
- package/src/services/storage.ts +0 -1196
- package/src/services/tables-db.ts +0 -6256
- package/src/services/teams.ts +0 -959
- package/src/services/tokens.ts +0 -315
- package/src/services/users.ts +0 -3324
- package/src/services/vcs.ts +0 -676
- package/src/services/webhooks.ts +0 -451
- package/tsconfig.json +0 -24
|
@@ -1,2742 +0,0 @@
|
|
|
1
|
-
import { Service } from '../service';
|
|
2
|
-
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
|
-
import type { Models } from '../models';
|
|
4
|
-
|
|
5
|
-
import { Platform } from '../enums/platform';
|
|
6
|
-
import { Scopes } from '../enums/scopes';
|
|
7
|
-
|
|
8
|
-
export class Organizations {
|
|
9
|
-
client: Client;
|
|
10
|
-
|
|
11
|
-
constructor(client: Client) {
|
|
12
|
-
this.client = client;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
|
|
17
|
-
*
|
|
18
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform
|
|
19
|
-
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
20
|
-
* @throws {AppwriteException}
|
|
21
|
-
* @returns {Promise<Models.OrganizationList<Preferences>>}
|
|
22
|
-
*/
|
|
23
|
-
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string }): Promise<Models.OrganizationList<Preferences>>;
|
|
24
|
-
/**
|
|
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
|
-
*
|
|
27
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform
|
|
28
|
-
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
29
|
-
* @throws {AppwriteException}
|
|
30
|
-
* @returns {Promise<Models.OrganizationList<Preferences>>}
|
|
31
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
32
|
-
*/
|
|
33
|
-
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.OrganizationList<Preferences>>;
|
|
34
|
-
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
35
|
-
paramsOrFirst?: { queries?: string[], search?: string } | string[],
|
|
36
|
-
...rest: [(string)?]
|
|
37
|
-
): Promise<Models.OrganizationList<Preferences>> {
|
|
38
|
-
let params: { queries?: string[], search?: string };
|
|
39
|
-
|
|
40
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
41
|
-
params = (paramsOrFirst || {}) as { queries?: string[], search?: string };
|
|
42
|
-
} else {
|
|
43
|
-
params = {
|
|
44
|
-
queries: paramsOrFirst as string[],
|
|
45
|
-
search: rest[0] as string
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const queries = params.queries;
|
|
50
|
-
const search = params.search;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const apiPath = '/organizations';
|
|
54
|
-
const payload: Payload = {};
|
|
55
|
-
if (typeof queries !== 'undefined') {
|
|
56
|
-
payload['queries'] = queries;
|
|
57
|
-
}
|
|
58
|
-
if (typeof search !== 'undefined') {
|
|
59
|
-
payload['search'] = search;
|
|
60
|
-
}
|
|
61
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
62
|
-
|
|
63
|
-
const apiHeaders: { [header: string]: string } = {
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return this.client.call(
|
|
67
|
-
'get',
|
|
68
|
-
uri,
|
|
69
|
-
apiHeaders,
|
|
70
|
-
payload
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Create a new organization.
|
|
76
|
-
*
|
|
77
|
-
*
|
|
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
|
-
* @param {string} params.name - Organization name. Max length: 128 chars.
|
|
80
|
-
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
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
|
-
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
83
|
-
* @param {string[]} params.invites - Additional member invites
|
|
84
|
-
* @param {string} params.couponId - Coupon id
|
|
85
|
-
* @param {string} params.taxId - Tax Id associated to billing.
|
|
86
|
-
* @param {number} params.budget - Budget limit for additional usage set for the organization
|
|
87
|
-
* @param {Platform} params.platform - Platform type
|
|
88
|
-
* @throws {AppwriteException}
|
|
89
|
-
* @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
|
|
90
|
-
*/
|
|
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
|
-
/**
|
|
93
|
-
* Create a new organization.
|
|
94
|
-
*
|
|
95
|
-
*
|
|
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
|
-
* @param {string} name - Organization name. Max length: 128 chars.
|
|
98
|
-
* @param {string} billingPlan - Organization billing plan chosen
|
|
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
|
-
* @param {string} billingAddressId - Unique ID of billing address
|
|
101
|
-
* @param {string[]} invites - Additional member invites
|
|
102
|
-
* @param {string} couponId - Coupon id
|
|
103
|
-
* @param {string} taxId - Tax Id associated to billing.
|
|
104
|
-
* @param {number} budget - Budget limit for additional usage set for the organization
|
|
105
|
-
* @param {Platform} platform - Platform type
|
|
106
|
-
* @throws {AppwriteException}
|
|
107
|
-
* @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
|
|
108
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
109
|
-
*/
|
|
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
|
-
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
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
|
-
): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication> {
|
|
115
|
-
let params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform };
|
|
116
|
-
|
|
117
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
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
|
-
} else {
|
|
120
|
-
params = {
|
|
121
|
-
organizationId: paramsOrFirst as string,
|
|
122
|
-
name: rest[0] as string,
|
|
123
|
-
billingPlan: rest[1] as string,
|
|
124
|
-
paymentMethodId: rest[2] as string,
|
|
125
|
-
billingAddressId: rest[3] as string,
|
|
126
|
-
invites: rest[4] as string[],
|
|
127
|
-
couponId: rest[5] as string,
|
|
128
|
-
taxId: rest[6] as string,
|
|
129
|
-
budget: rest[7] as number,
|
|
130
|
-
platform: rest[8] as Platform
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const organizationId = params.organizationId;
|
|
135
|
-
const name = params.name;
|
|
136
|
-
const billingPlan = params.billingPlan;
|
|
137
|
-
const paymentMethodId = params.paymentMethodId;
|
|
138
|
-
const billingAddressId = params.billingAddressId;
|
|
139
|
-
const invites = params.invites;
|
|
140
|
-
const couponId = params.couponId;
|
|
141
|
-
const taxId = params.taxId;
|
|
142
|
-
const budget = params.budget;
|
|
143
|
-
const platform = params.platform;
|
|
144
|
-
|
|
145
|
-
if (typeof organizationId === 'undefined') {
|
|
146
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
147
|
-
}
|
|
148
|
-
if (typeof name === 'undefined') {
|
|
149
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
150
|
-
}
|
|
151
|
-
if (typeof billingPlan === 'undefined') {
|
|
152
|
-
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const apiPath = '/organizations';
|
|
156
|
-
const payload: Payload = {};
|
|
157
|
-
if (typeof organizationId !== 'undefined') {
|
|
158
|
-
payload['organizationId'] = organizationId;
|
|
159
|
-
}
|
|
160
|
-
if (typeof name !== 'undefined') {
|
|
161
|
-
payload['name'] = name;
|
|
162
|
-
}
|
|
163
|
-
if (typeof billingPlan !== 'undefined') {
|
|
164
|
-
payload['billingPlan'] = billingPlan;
|
|
165
|
-
}
|
|
166
|
-
if (typeof paymentMethodId !== 'undefined') {
|
|
167
|
-
payload['paymentMethodId'] = paymentMethodId;
|
|
168
|
-
}
|
|
169
|
-
if (typeof billingAddressId !== 'undefined') {
|
|
170
|
-
payload['billingAddressId'] = billingAddressId;
|
|
171
|
-
}
|
|
172
|
-
if (typeof invites !== 'undefined') {
|
|
173
|
-
payload['invites'] = invites;
|
|
174
|
-
}
|
|
175
|
-
if (typeof couponId !== 'undefined') {
|
|
176
|
-
payload['couponId'] = couponId;
|
|
177
|
-
}
|
|
178
|
-
if (typeof taxId !== 'undefined') {
|
|
179
|
-
payload['taxId'] = taxId;
|
|
180
|
-
}
|
|
181
|
-
if (typeof budget !== 'undefined') {
|
|
182
|
-
payload['budget'] = budget;
|
|
183
|
-
}
|
|
184
|
-
if (typeof platform !== 'undefined') {
|
|
185
|
-
payload['platform'] = platform;
|
|
186
|
-
}
|
|
187
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
188
|
-
|
|
189
|
-
const apiHeaders: { [header: string]: string } = {
|
|
190
|
-
'content-type': 'application/json',
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return this.client.call(
|
|
194
|
-
'post',
|
|
195
|
-
uri,
|
|
196
|
-
apiHeaders,
|
|
197
|
-
payload
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Get estimation for creating an organization.
|
|
203
|
-
*
|
|
204
|
-
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
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
|
-
* @param {string[]} params.invites - Additional member invites
|
|
207
|
-
* @param {string} params.couponId - Coupon id
|
|
208
|
-
* @param {Platform} params.platform - Platform type
|
|
209
|
-
* @throws {AppwriteException}
|
|
210
|
-
* @returns {Promise<Models.Estimation>}
|
|
211
|
-
*/
|
|
212
|
-
estimationCreateOrganization(params: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform }): Promise<Models.Estimation>;
|
|
213
|
-
/**
|
|
214
|
-
* Get estimation for creating an organization.
|
|
215
|
-
*
|
|
216
|
-
* @param {string} billingPlan - Organization billing plan chosen
|
|
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
|
-
* @param {string[]} invites - Additional member invites
|
|
219
|
-
* @param {string} couponId - Coupon id
|
|
220
|
-
* @param {Platform} platform - Platform type
|
|
221
|
-
* @throws {AppwriteException}
|
|
222
|
-
* @returns {Promise<Models.Estimation>}
|
|
223
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
224
|
-
*/
|
|
225
|
-
estimationCreateOrganization(billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
|
|
226
|
-
estimationCreateOrganization(
|
|
227
|
-
paramsOrFirst: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform } | string,
|
|
228
|
-
...rest: [(string)?, (string[])?, (string)?, (Platform)?]
|
|
229
|
-
): Promise<Models.Estimation> {
|
|
230
|
-
let params: { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform };
|
|
231
|
-
|
|
232
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
233
|
-
params = (paramsOrFirst || {}) as { billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform };
|
|
234
|
-
} else {
|
|
235
|
-
params = {
|
|
236
|
-
billingPlan: paramsOrFirst as string,
|
|
237
|
-
paymentMethodId: rest[0] as string,
|
|
238
|
-
invites: rest[1] as string[],
|
|
239
|
-
couponId: rest[2] as string,
|
|
240
|
-
platform: rest[3] as Platform
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
const billingPlan = params.billingPlan;
|
|
245
|
-
const paymentMethodId = params.paymentMethodId;
|
|
246
|
-
const invites = params.invites;
|
|
247
|
-
const couponId = params.couponId;
|
|
248
|
-
const platform = params.platform;
|
|
249
|
-
|
|
250
|
-
if (typeof billingPlan === 'undefined') {
|
|
251
|
-
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
const apiPath = '/organizations/estimations/create-organization';
|
|
255
|
-
const payload: Payload = {};
|
|
256
|
-
if (typeof billingPlan !== 'undefined') {
|
|
257
|
-
payload['billingPlan'] = billingPlan;
|
|
258
|
-
}
|
|
259
|
-
if (typeof paymentMethodId !== 'undefined') {
|
|
260
|
-
payload['paymentMethodId'] = paymentMethodId;
|
|
261
|
-
}
|
|
262
|
-
if (typeof invites !== 'undefined') {
|
|
263
|
-
payload['invites'] = invites;
|
|
264
|
-
}
|
|
265
|
-
if (typeof couponId !== 'undefined') {
|
|
266
|
-
payload['couponId'] = couponId;
|
|
267
|
-
}
|
|
268
|
-
if (typeof platform !== 'undefined') {
|
|
269
|
-
payload['platform'] = platform;
|
|
270
|
-
}
|
|
271
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
272
|
-
|
|
273
|
-
const apiHeaders: { [header: string]: string } = {
|
|
274
|
-
'content-type': 'application/json',
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
return this.client.call(
|
|
278
|
-
'patch',
|
|
279
|
-
uri,
|
|
280
|
-
apiHeaders,
|
|
281
|
-
payload
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Delete an organization.
|
|
287
|
-
*
|
|
288
|
-
* @param {string} params.organizationId - Team ID.
|
|
289
|
-
* @throws {AppwriteException}
|
|
290
|
-
* @returns {Promise<{}>}
|
|
291
|
-
*/
|
|
292
|
-
delete(params: { organizationId: string }): Promise<{}>;
|
|
293
|
-
/**
|
|
294
|
-
* Delete an organization.
|
|
295
|
-
*
|
|
296
|
-
* @param {string} organizationId - Team ID.
|
|
297
|
-
* @throws {AppwriteException}
|
|
298
|
-
* @returns {Promise<{}>}
|
|
299
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
300
|
-
*/
|
|
301
|
-
delete(organizationId: string): Promise<{}>;
|
|
302
|
-
delete(
|
|
303
|
-
paramsOrFirst: { organizationId: string } | string
|
|
304
|
-
): Promise<{}> {
|
|
305
|
-
let params: { organizationId: string };
|
|
306
|
-
|
|
307
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
308
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
309
|
-
} else {
|
|
310
|
-
params = {
|
|
311
|
-
organizationId: paramsOrFirst as string
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
const organizationId = params.organizationId;
|
|
316
|
-
|
|
317
|
-
if (typeof organizationId === 'undefined') {
|
|
318
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
const apiPath = '/organizations/{organizationId}'.replace('{organizationId}', organizationId);
|
|
322
|
-
const payload: Payload = {};
|
|
323
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
324
|
-
|
|
325
|
-
const apiHeaders: { [header: string]: string } = {
|
|
326
|
-
'content-type': 'application/json',
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return this.client.call(
|
|
330
|
-
'delete',
|
|
331
|
-
uri,
|
|
332
|
-
apiHeaders,
|
|
333
|
-
payload
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Get a list of all aggregations for an organization.
|
|
339
|
-
*
|
|
340
|
-
* @param {string} params.organizationId - Organization ID
|
|
341
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to
|
|
342
|
-
* @throws {AppwriteException}
|
|
343
|
-
* @returns {Promise<Models.AggregationTeamList>}
|
|
344
|
-
*/
|
|
345
|
-
listAggregations(params: { organizationId: string, queries?: string[] }): Promise<Models.AggregationTeamList>;
|
|
346
|
-
/**
|
|
347
|
-
* Get a list of all aggregations for an organization.
|
|
348
|
-
*
|
|
349
|
-
* @param {string} organizationId - Organization ID
|
|
350
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to
|
|
351
|
-
* @throws {AppwriteException}
|
|
352
|
-
* @returns {Promise<Models.AggregationTeamList>}
|
|
353
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
354
|
-
*/
|
|
355
|
-
listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList>;
|
|
356
|
-
listAggregations(
|
|
357
|
-
paramsOrFirst: { organizationId: string, queries?: string[] } | string,
|
|
358
|
-
...rest: [(string[])?]
|
|
359
|
-
): Promise<Models.AggregationTeamList> {
|
|
360
|
-
let params: { organizationId: string, queries?: string[] };
|
|
361
|
-
|
|
362
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
363
|
-
params = (paramsOrFirst || {}) as { organizationId: string, queries?: string[] };
|
|
364
|
-
} else {
|
|
365
|
-
params = {
|
|
366
|
-
organizationId: paramsOrFirst as string,
|
|
367
|
-
queries: rest[0] as string[]
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
const organizationId = params.organizationId;
|
|
372
|
-
const queries = params.queries;
|
|
373
|
-
|
|
374
|
-
if (typeof organizationId === 'undefined') {
|
|
375
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
const apiPath = '/organizations/{organizationId}/aggregations'.replace('{organizationId}', organizationId);
|
|
379
|
-
const payload: Payload = {};
|
|
380
|
-
if (typeof queries !== 'undefined') {
|
|
381
|
-
payload['queries'] = queries;
|
|
382
|
-
}
|
|
383
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
384
|
-
|
|
385
|
-
const apiHeaders: { [header: string]: string } = {
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
return this.client.call(
|
|
389
|
-
'get',
|
|
390
|
-
uri,
|
|
391
|
-
apiHeaders,
|
|
392
|
-
payload
|
|
393
|
-
);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Get a specific aggregation using it's aggregation ID.
|
|
398
|
-
*
|
|
399
|
-
* @param {string} params.organizationId - Organization ID
|
|
400
|
-
* @param {string} params.aggregationId - Invoice unique ID
|
|
401
|
-
* @param {number} params.limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
|
|
402
|
-
* @param {number} params.offset - Offset value. The default value is 0. Use this param to manage pagination.
|
|
403
|
-
* @throws {AppwriteException}
|
|
404
|
-
* @returns {Promise<Models.AggregationTeam>}
|
|
405
|
-
*/
|
|
406
|
-
getAggregation(params: { organizationId: string, aggregationId: string, limit?: number, offset?: number }): Promise<Models.AggregationTeam>;
|
|
407
|
-
/**
|
|
408
|
-
* Get a specific aggregation using it's aggregation ID.
|
|
409
|
-
*
|
|
410
|
-
* @param {string} organizationId - Organization ID
|
|
411
|
-
* @param {string} aggregationId - Invoice unique ID
|
|
412
|
-
* @param {number} limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
|
|
413
|
-
* @param {number} offset - Offset value. The default value is 0. Use this param to manage pagination.
|
|
414
|
-
* @throws {AppwriteException}
|
|
415
|
-
* @returns {Promise<Models.AggregationTeam>}
|
|
416
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
417
|
-
*/
|
|
418
|
-
getAggregation(organizationId: string, aggregationId: string, limit?: number, offset?: number): Promise<Models.AggregationTeam>;
|
|
419
|
-
getAggregation(
|
|
420
|
-
paramsOrFirst: { organizationId: string, aggregationId: string, limit?: number, offset?: number } | string,
|
|
421
|
-
...rest: [(string)?, (number)?, (number)?]
|
|
422
|
-
): Promise<Models.AggregationTeam> {
|
|
423
|
-
let params: { organizationId: string, aggregationId: string, limit?: number, offset?: number };
|
|
424
|
-
|
|
425
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
426
|
-
params = (paramsOrFirst || {}) as { organizationId: string, aggregationId: string, limit?: number, offset?: number };
|
|
427
|
-
} else {
|
|
428
|
-
params = {
|
|
429
|
-
organizationId: paramsOrFirst as string,
|
|
430
|
-
aggregationId: rest[0] as string,
|
|
431
|
-
limit: rest[1] as number,
|
|
432
|
-
offset: rest[2] as number
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
const organizationId = params.organizationId;
|
|
437
|
-
const aggregationId = params.aggregationId;
|
|
438
|
-
const limit = params.limit;
|
|
439
|
-
const offset = params.offset;
|
|
440
|
-
|
|
441
|
-
if (typeof organizationId === 'undefined') {
|
|
442
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
443
|
-
}
|
|
444
|
-
if (typeof aggregationId === 'undefined') {
|
|
445
|
-
throw new AppwriteException('Missing required parameter: "aggregationId"');
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
const apiPath = '/organizations/{organizationId}/aggregations/{aggregationId}'.replace('{organizationId}', organizationId).replace('{aggregationId}', aggregationId);
|
|
449
|
-
const payload: Payload = {};
|
|
450
|
-
if (typeof limit !== 'undefined') {
|
|
451
|
-
payload['limit'] = limit;
|
|
452
|
-
}
|
|
453
|
-
if (typeof offset !== 'undefined') {
|
|
454
|
-
payload['offset'] = offset;
|
|
455
|
-
}
|
|
456
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
457
|
-
|
|
458
|
-
const apiHeaders: { [header: string]: string } = {
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
return this.client.call(
|
|
462
|
-
'get',
|
|
463
|
-
uri,
|
|
464
|
-
apiHeaders,
|
|
465
|
-
payload
|
|
466
|
-
);
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Set a billing address for an organization.
|
|
471
|
-
*
|
|
472
|
-
* @param {string} params.organizationId - Organization ID
|
|
473
|
-
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
474
|
-
* @throws {AppwriteException}
|
|
475
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
476
|
-
*/
|
|
477
|
-
setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingAddressId: string }): Promise<Models.Organization<Preferences>>;
|
|
478
|
-
/**
|
|
479
|
-
* Set a billing address for an organization.
|
|
480
|
-
*
|
|
481
|
-
* @param {string} organizationId - Organization ID
|
|
482
|
-
* @param {string} billingAddressId - Unique ID of billing address
|
|
483
|
-
* @throws {AppwriteException}
|
|
484
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
485
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
486
|
-
*/
|
|
487
|
-
setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>>;
|
|
488
|
-
setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
489
|
-
paramsOrFirst: { organizationId: string, billingAddressId: string } | string,
|
|
490
|
-
...rest: [(string)?]
|
|
491
|
-
): Promise<Models.Organization<Preferences>> {
|
|
492
|
-
let params: { organizationId: string, billingAddressId: string };
|
|
493
|
-
|
|
494
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
495
|
-
params = (paramsOrFirst || {}) as { organizationId: string, billingAddressId: string };
|
|
496
|
-
} else {
|
|
497
|
-
params = {
|
|
498
|
-
organizationId: paramsOrFirst as string,
|
|
499
|
-
billingAddressId: rest[0] as string
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
const organizationId = params.organizationId;
|
|
504
|
-
const billingAddressId = params.billingAddressId;
|
|
505
|
-
|
|
506
|
-
if (typeof organizationId === 'undefined') {
|
|
507
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
508
|
-
}
|
|
509
|
-
if (typeof billingAddressId === 'undefined') {
|
|
510
|
-
throw new AppwriteException('Missing required parameter: "billingAddressId"');
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
const apiPath = '/organizations/{organizationId}/billing-address'.replace('{organizationId}', organizationId);
|
|
514
|
-
const payload: Payload = {};
|
|
515
|
-
if (typeof billingAddressId !== 'undefined') {
|
|
516
|
-
payload['billingAddressId'] = billingAddressId;
|
|
517
|
-
}
|
|
518
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
519
|
-
|
|
520
|
-
const apiHeaders: { [header: string]: string } = {
|
|
521
|
-
'content-type': 'application/json',
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
return this.client.call(
|
|
525
|
-
'patch',
|
|
526
|
-
uri,
|
|
527
|
-
apiHeaders,
|
|
528
|
-
payload
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/**
|
|
533
|
-
* Delete a team's billing address.
|
|
534
|
-
*
|
|
535
|
-
* @param {string} params.organizationId - Organization ID
|
|
536
|
-
* @throws {AppwriteException}
|
|
537
|
-
* @returns {Promise<{}>}
|
|
538
|
-
*/
|
|
539
|
-
deleteBillingAddress(params: { organizationId: string }): Promise<{}>;
|
|
540
|
-
/**
|
|
541
|
-
* Delete a team's billing address.
|
|
542
|
-
*
|
|
543
|
-
* @param {string} organizationId - Organization ID
|
|
544
|
-
* @throws {AppwriteException}
|
|
545
|
-
* @returns {Promise<{}>}
|
|
546
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
547
|
-
*/
|
|
548
|
-
deleteBillingAddress(organizationId: string): Promise<{}>;
|
|
549
|
-
deleteBillingAddress(
|
|
550
|
-
paramsOrFirst: { organizationId: string } | string
|
|
551
|
-
): Promise<{}> {
|
|
552
|
-
let params: { organizationId: string };
|
|
553
|
-
|
|
554
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
555
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
556
|
-
} else {
|
|
557
|
-
params = {
|
|
558
|
-
organizationId: paramsOrFirst as string
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
const organizationId = params.organizationId;
|
|
563
|
-
|
|
564
|
-
if (typeof organizationId === 'undefined') {
|
|
565
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
const apiPath = '/organizations/{organizationId}/billing-address'.replace('{organizationId}', organizationId);
|
|
569
|
-
const payload: Payload = {};
|
|
570
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
571
|
-
|
|
572
|
-
const apiHeaders: { [header: string]: string } = {
|
|
573
|
-
'content-type': 'application/json',
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
return this.client.call(
|
|
577
|
-
'delete',
|
|
578
|
-
uri,
|
|
579
|
-
apiHeaders,
|
|
580
|
-
payload
|
|
581
|
-
);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Get a billing address using it's ID.
|
|
586
|
-
*
|
|
587
|
-
* @param {string} params.organizationId - Organization ID
|
|
588
|
-
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
589
|
-
* @throws {AppwriteException}
|
|
590
|
-
* @returns {Promise<Models.BillingAddress>}
|
|
591
|
-
*/
|
|
592
|
-
getBillingAddress(params: { organizationId: string, billingAddressId: string }): Promise<Models.BillingAddress>;
|
|
593
|
-
/**
|
|
594
|
-
* Get a billing address using it's ID.
|
|
595
|
-
*
|
|
596
|
-
* @param {string} organizationId - Organization ID
|
|
597
|
-
* @param {string} billingAddressId - Unique ID of billing address
|
|
598
|
-
* @throws {AppwriteException}
|
|
599
|
-
* @returns {Promise<Models.BillingAddress>}
|
|
600
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
601
|
-
*/
|
|
602
|
-
getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress>;
|
|
603
|
-
getBillingAddress(
|
|
604
|
-
paramsOrFirst: { organizationId: string, billingAddressId: string } | string,
|
|
605
|
-
...rest: [(string)?]
|
|
606
|
-
): Promise<Models.BillingAddress> {
|
|
607
|
-
let params: { organizationId: string, billingAddressId: string };
|
|
608
|
-
|
|
609
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
610
|
-
params = (paramsOrFirst || {}) as { organizationId: string, billingAddressId: string };
|
|
611
|
-
} else {
|
|
612
|
-
params = {
|
|
613
|
-
organizationId: paramsOrFirst as string,
|
|
614
|
-
billingAddressId: rest[0] as string
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
const organizationId = params.organizationId;
|
|
619
|
-
const billingAddressId = params.billingAddressId;
|
|
620
|
-
|
|
621
|
-
if (typeof organizationId === 'undefined') {
|
|
622
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
623
|
-
}
|
|
624
|
-
if (typeof billingAddressId === 'undefined') {
|
|
625
|
-
throw new AppwriteException('Missing required parameter: "billingAddressId"');
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
const apiPath = '/organizations/{organizationId}/billing-addresses/{billingAddressId}'.replace('{organizationId}', organizationId).replace('{billingAddressId}', billingAddressId);
|
|
629
|
-
const payload: Payload = {};
|
|
630
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
631
|
-
|
|
632
|
-
const apiHeaders: { [header: string]: string } = {
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
return this.client.call(
|
|
636
|
-
'get',
|
|
637
|
-
uri,
|
|
638
|
-
apiHeaders,
|
|
639
|
-
payload
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* Set the current billing email for the organization.
|
|
645
|
-
*
|
|
646
|
-
* @param {string} params.organizationId - Organization ID
|
|
647
|
-
* @param {string} params.billingEmail - Billing email for the organization.
|
|
648
|
-
* @throws {AppwriteException}
|
|
649
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
650
|
-
*/
|
|
651
|
-
setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingEmail: string }): Promise<Models.Organization<Preferences>>;
|
|
652
|
-
/**
|
|
653
|
-
* Set the current billing email for the organization.
|
|
654
|
-
*
|
|
655
|
-
* @param {string} organizationId - Organization ID
|
|
656
|
-
* @param {string} billingEmail - Billing email for the organization.
|
|
657
|
-
* @throws {AppwriteException}
|
|
658
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
659
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
660
|
-
*/
|
|
661
|
-
setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>>;
|
|
662
|
-
setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
663
|
-
paramsOrFirst: { organizationId: string, billingEmail: string } | string,
|
|
664
|
-
...rest: [(string)?]
|
|
665
|
-
): Promise<Models.Organization<Preferences>> {
|
|
666
|
-
let params: { organizationId: string, billingEmail: string };
|
|
667
|
-
|
|
668
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
669
|
-
params = (paramsOrFirst || {}) as { organizationId: string, billingEmail: string };
|
|
670
|
-
} else {
|
|
671
|
-
params = {
|
|
672
|
-
organizationId: paramsOrFirst as string,
|
|
673
|
-
billingEmail: rest[0] as string
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
const organizationId = params.organizationId;
|
|
678
|
-
const billingEmail = params.billingEmail;
|
|
679
|
-
|
|
680
|
-
if (typeof organizationId === 'undefined') {
|
|
681
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
682
|
-
}
|
|
683
|
-
if (typeof billingEmail === 'undefined') {
|
|
684
|
-
throw new AppwriteException('Missing required parameter: "billingEmail"');
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
const apiPath = '/organizations/{organizationId}/billing-email'.replace('{organizationId}', organizationId);
|
|
688
|
-
const payload: Payload = {};
|
|
689
|
-
if (typeof billingEmail !== 'undefined') {
|
|
690
|
-
payload['billingEmail'] = billingEmail;
|
|
691
|
-
}
|
|
692
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
693
|
-
|
|
694
|
-
const apiHeaders: { [header: string]: string } = {
|
|
695
|
-
'content-type': 'application/json',
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
return this.client.call(
|
|
699
|
-
'patch',
|
|
700
|
-
uri,
|
|
701
|
-
apiHeaders,
|
|
702
|
-
payload
|
|
703
|
-
);
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Update the budget limit for an organization.
|
|
708
|
-
*
|
|
709
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
710
|
-
* @param {number} params.budget - Budget limit for additional usage set for the organization
|
|
711
|
-
* @param {number[]} params.alerts - Budget alert limit percentage
|
|
712
|
-
* @throws {AppwriteException}
|
|
713
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
714
|
-
*/
|
|
715
|
-
updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, budget?: number, alerts?: number[] }): Promise<Models.Organization<Preferences>>;
|
|
716
|
-
/**
|
|
717
|
-
* Update the budget limit for an organization.
|
|
718
|
-
*
|
|
719
|
-
* @param {string} organizationId - Organization Unique ID
|
|
720
|
-
* @param {number} budget - Budget limit for additional usage set for the organization
|
|
721
|
-
* @param {number[]} alerts - Budget alert limit percentage
|
|
722
|
-
* @throws {AppwriteException}
|
|
723
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
724
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
725
|
-
*/
|
|
726
|
-
updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
|
|
727
|
-
updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
728
|
-
paramsOrFirst: { organizationId: string, budget?: number, alerts?: number[] } | string,
|
|
729
|
-
...rest: [(number)?, (number[])?]
|
|
730
|
-
): Promise<Models.Organization<Preferences>> {
|
|
731
|
-
let params: { organizationId: string, budget?: number, alerts?: number[] };
|
|
732
|
-
|
|
733
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
734
|
-
params = (paramsOrFirst || {}) as { organizationId: string, budget?: number, alerts?: number[] };
|
|
735
|
-
} else {
|
|
736
|
-
params = {
|
|
737
|
-
organizationId: paramsOrFirst as string,
|
|
738
|
-
budget: rest[0] as number,
|
|
739
|
-
alerts: rest[1] as number[]
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
const organizationId = params.organizationId;
|
|
744
|
-
const budget = params.budget;
|
|
745
|
-
const alerts = params.alerts;
|
|
746
|
-
|
|
747
|
-
if (typeof organizationId === 'undefined') {
|
|
748
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
749
|
-
}
|
|
750
|
-
if (typeof budget === 'undefined') {
|
|
751
|
-
throw new AppwriteException('Missing required parameter: "budget"');
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
const apiPath = '/organizations/{organizationId}/budget'.replace('{organizationId}', organizationId);
|
|
755
|
-
const payload: Payload = {};
|
|
756
|
-
if (typeof budget !== 'undefined') {
|
|
757
|
-
payload['budget'] = budget;
|
|
758
|
-
}
|
|
759
|
-
if (typeof alerts !== 'undefined') {
|
|
760
|
-
payload['alerts'] = alerts;
|
|
761
|
-
}
|
|
762
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
763
|
-
|
|
764
|
-
const apiHeaders: { [header: string]: string } = {
|
|
765
|
-
'content-type': 'application/json',
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
return this.client.call(
|
|
769
|
-
'patch',
|
|
770
|
-
uri,
|
|
771
|
-
apiHeaders,
|
|
772
|
-
payload
|
|
773
|
-
);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* List all credits for an organization.
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
* @param {string} params.organizationId - Organization ID
|
|
781
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status
|
|
782
|
-
* @throws {AppwriteException}
|
|
783
|
-
* @returns {Promise<Models.CreditList>}
|
|
784
|
-
*/
|
|
785
|
-
listCredits(params: { organizationId: string, queries?: string[] }): Promise<Models.CreditList>;
|
|
786
|
-
/**
|
|
787
|
-
* List all credits for an organization.
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
* @param {string} organizationId - Organization ID
|
|
791
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status
|
|
792
|
-
* @throws {AppwriteException}
|
|
793
|
-
* @returns {Promise<Models.CreditList>}
|
|
794
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
795
|
-
*/
|
|
796
|
-
listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList>;
|
|
797
|
-
listCredits(
|
|
798
|
-
paramsOrFirst: { organizationId: string, queries?: string[] } | string,
|
|
799
|
-
...rest: [(string[])?]
|
|
800
|
-
): Promise<Models.CreditList> {
|
|
801
|
-
let params: { organizationId: string, queries?: string[] };
|
|
802
|
-
|
|
803
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
804
|
-
params = (paramsOrFirst || {}) as { organizationId: string, queries?: string[] };
|
|
805
|
-
} else {
|
|
806
|
-
params = {
|
|
807
|
-
organizationId: paramsOrFirst as string,
|
|
808
|
-
queries: rest[0] as string[]
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
const organizationId = params.organizationId;
|
|
813
|
-
const queries = params.queries;
|
|
814
|
-
|
|
815
|
-
if (typeof organizationId === 'undefined') {
|
|
816
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
const apiPath = '/organizations/{organizationId}/credits'.replace('{organizationId}', organizationId);
|
|
820
|
-
const payload: Payload = {};
|
|
821
|
-
if (typeof queries !== 'undefined') {
|
|
822
|
-
payload['queries'] = queries;
|
|
823
|
-
}
|
|
824
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
825
|
-
|
|
826
|
-
const apiHeaders: { [header: string]: string } = {
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
return this.client.call(
|
|
830
|
-
'get',
|
|
831
|
-
uri,
|
|
832
|
-
apiHeaders,
|
|
833
|
-
payload
|
|
834
|
-
);
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* Add credit to an organization using a coupon.
|
|
839
|
-
*
|
|
840
|
-
* @param {string} params.organizationId - Organization ID
|
|
841
|
-
* @param {string} params.couponId - ID of the coupon
|
|
842
|
-
* @throws {AppwriteException}
|
|
843
|
-
* @returns {Promise<Models.Credit>}
|
|
844
|
-
*/
|
|
845
|
-
addCredit(params: { organizationId: string, couponId: string }): Promise<Models.Credit>;
|
|
846
|
-
/**
|
|
847
|
-
* Add credit to an organization using a coupon.
|
|
848
|
-
*
|
|
849
|
-
* @param {string} organizationId - Organization ID
|
|
850
|
-
* @param {string} couponId - ID of the coupon
|
|
851
|
-
* @throws {AppwriteException}
|
|
852
|
-
* @returns {Promise<Models.Credit>}
|
|
853
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
854
|
-
*/
|
|
855
|
-
addCredit(organizationId: string, couponId: string): Promise<Models.Credit>;
|
|
856
|
-
addCredit(
|
|
857
|
-
paramsOrFirst: { organizationId: string, couponId: string } | string,
|
|
858
|
-
...rest: [(string)?]
|
|
859
|
-
): Promise<Models.Credit> {
|
|
860
|
-
let params: { organizationId: string, couponId: string };
|
|
861
|
-
|
|
862
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
863
|
-
params = (paramsOrFirst || {}) as { organizationId: string, couponId: string };
|
|
864
|
-
} else {
|
|
865
|
-
params = {
|
|
866
|
-
organizationId: paramsOrFirst as string,
|
|
867
|
-
couponId: rest[0] as string
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
const organizationId = params.organizationId;
|
|
872
|
-
const couponId = params.couponId;
|
|
873
|
-
|
|
874
|
-
if (typeof organizationId === 'undefined') {
|
|
875
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
876
|
-
}
|
|
877
|
-
if (typeof couponId === 'undefined') {
|
|
878
|
-
throw new AppwriteException('Missing required parameter: "couponId"');
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
const apiPath = '/organizations/{organizationId}/credits'.replace('{organizationId}', organizationId);
|
|
882
|
-
const payload: Payload = {};
|
|
883
|
-
if (typeof couponId !== 'undefined') {
|
|
884
|
-
payload['couponId'] = couponId;
|
|
885
|
-
}
|
|
886
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
887
|
-
|
|
888
|
-
const apiHeaders: { [header: string]: string } = {
|
|
889
|
-
'content-type': 'application/json',
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
return this.client.call(
|
|
893
|
-
'post',
|
|
894
|
-
uri,
|
|
895
|
-
apiHeaders,
|
|
896
|
-
payload
|
|
897
|
-
);
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* Get total available valid credits for an organization.
|
|
902
|
-
*
|
|
903
|
-
* @param {string} params.organizationId - Organization ID
|
|
904
|
-
* @throws {AppwriteException}
|
|
905
|
-
* @returns {Promise<Models.CreditAvailable>}
|
|
906
|
-
*/
|
|
907
|
-
getAvailableCredits(params: { organizationId: string }): Promise<Models.CreditAvailable>;
|
|
908
|
-
/**
|
|
909
|
-
* Get total available valid credits for an organization.
|
|
910
|
-
*
|
|
911
|
-
* @param {string} organizationId - Organization ID
|
|
912
|
-
* @throws {AppwriteException}
|
|
913
|
-
* @returns {Promise<Models.CreditAvailable>}
|
|
914
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
915
|
-
*/
|
|
916
|
-
getAvailableCredits(organizationId: string): Promise<Models.CreditAvailable>;
|
|
917
|
-
getAvailableCredits(
|
|
918
|
-
paramsOrFirst: { organizationId: string } | string
|
|
919
|
-
): Promise<Models.CreditAvailable> {
|
|
920
|
-
let params: { organizationId: string };
|
|
921
|
-
|
|
922
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
923
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
924
|
-
} else {
|
|
925
|
-
params = {
|
|
926
|
-
organizationId: paramsOrFirst as string
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
const organizationId = params.organizationId;
|
|
931
|
-
|
|
932
|
-
if (typeof organizationId === 'undefined') {
|
|
933
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
const apiPath = '/organizations/{organizationId}/credits/available'.replace('{organizationId}', organizationId);
|
|
937
|
-
const payload: Payload = {};
|
|
938
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
939
|
-
|
|
940
|
-
const apiHeaders: { [header: string]: string } = {
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
return this.client.call(
|
|
944
|
-
'get',
|
|
945
|
-
uri,
|
|
946
|
-
apiHeaders,
|
|
947
|
-
payload
|
|
948
|
-
);
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* Get credit details.
|
|
953
|
-
*
|
|
954
|
-
* @param {string} params.organizationId - Organization ID
|
|
955
|
-
* @param {string} params.creditId - Credit Unique ID
|
|
956
|
-
* @throws {AppwriteException}
|
|
957
|
-
* @returns {Promise<Models.Credit>}
|
|
958
|
-
*/
|
|
959
|
-
getCredit(params: { organizationId: string, creditId: string }): Promise<Models.Credit>;
|
|
960
|
-
/**
|
|
961
|
-
* Get credit details.
|
|
962
|
-
*
|
|
963
|
-
* @param {string} organizationId - Organization ID
|
|
964
|
-
* @param {string} creditId - Credit Unique ID
|
|
965
|
-
* @throws {AppwriteException}
|
|
966
|
-
* @returns {Promise<Models.Credit>}
|
|
967
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
968
|
-
*/
|
|
969
|
-
getCredit(organizationId: string, creditId: string): Promise<Models.Credit>;
|
|
970
|
-
getCredit(
|
|
971
|
-
paramsOrFirst: { organizationId: string, creditId: string } | string,
|
|
972
|
-
...rest: [(string)?]
|
|
973
|
-
): Promise<Models.Credit> {
|
|
974
|
-
let params: { organizationId: string, creditId: string };
|
|
975
|
-
|
|
976
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
977
|
-
params = (paramsOrFirst || {}) as { organizationId: string, creditId: string };
|
|
978
|
-
} else {
|
|
979
|
-
params = {
|
|
980
|
-
organizationId: paramsOrFirst as string,
|
|
981
|
-
creditId: rest[0] as string
|
|
982
|
-
};
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
const organizationId = params.organizationId;
|
|
986
|
-
const creditId = params.creditId;
|
|
987
|
-
|
|
988
|
-
if (typeof organizationId === 'undefined') {
|
|
989
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
990
|
-
}
|
|
991
|
-
if (typeof creditId === 'undefined') {
|
|
992
|
-
throw new AppwriteException('Missing required parameter: "creditId"');
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
const apiPath = '/organizations/{organizationId}/credits/{creditId}'.replace('{organizationId}', organizationId).replace('{creditId}', creditId);
|
|
996
|
-
const payload: Payload = {};
|
|
997
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
998
|
-
|
|
999
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
return this.client.call(
|
|
1003
|
-
'get',
|
|
1004
|
-
uri,
|
|
1005
|
-
apiHeaders,
|
|
1006
|
-
payload
|
|
1007
|
-
);
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* Get estimation for deleting an organization.
|
|
1012
|
-
*
|
|
1013
|
-
* @param {string} params.organizationId - Team ID.
|
|
1014
|
-
* @throws {AppwriteException}
|
|
1015
|
-
* @returns {Promise<Models.EstimationDeleteOrganization>}
|
|
1016
|
-
*/
|
|
1017
|
-
estimationDeleteOrganization(params: { organizationId: string }): Promise<Models.EstimationDeleteOrganization>;
|
|
1018
|
-
/**
|
|
1019
|
-
* Get estimation for deleting an organization.
|
|
1020
|
-
*
|
|
1021
|
-
* @param {string} organizationId - Team ID.
|
|
1022
|
-
* @throws {AppwriteException}
|
|
1023
|
-
* @returns {Promise<Models.EstimationDeleteOrganization>}
|
|
1024
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1025
|
-
*/
|
|
1026
|
-
estimationDeleteOrganization(organizationId: string): Promise<Models.EstimationDeleteOrganization>;
|
|
1027
|
-
estimationDeleteOrganization(
|
|
1028
|
-
paramsOrFirst: { organizationId: string } | string
|
|
1029
|
-
): Promise<Models.EstimationDeleteOrganization> {
|
|
1030
|
-
let params: { organizationId: string };
|
|
1031
|
-
|
|
1032
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1033
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
1034
|
-
} else {
|
|
1035
|
-
params = {
|
|
1036
|
-
organizationId: paramsOrFirst as string
|
|
1037
|
-
};
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
const organizationId = params.organizationId;
|
|
1041
|
-
|
|
1042
|
-
if (typeof organizationId === 'undefined') {
|
|
1043
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
const apiPath = '/organizations/{organizationId}/estimations/delete-organization'.replace('{organizationId}', organizationId);
|
|
1047
|
-
const payload: Payload = {};
|
|
1048
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1049
|
-
|
|
1050
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1051
|
-
'content-type': 'application/json',
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
return this.client.call(
|
|
1055
|
-
'patch',
|
|
1056
|
-
uri,
|
|
1057
|
-
apiHeaders,
|
|
1058
|
-
payload
|
|
1059
|
-
);
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* Get estimation for updating the organization plan.
|
|
1064
|
-
*
|
|
1065
|
-
* @param {string} params.organizationId - Organization ID
|
|
1066
|
-
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
1067
|
-
* @param {string[]} params.invites - Additional member invites
|
|
1068
|
-
* @param {string} params.couponId - Coupon id
|
|
1069
|
-
* @throws {AppwriteException}
|
|
1070
|
-
* @returns {Promise<Models.EstimationUpdatePlan>}
|
|
1071
|
-
*/
|
|
1072
|
-
estimationUpdatePlan(params: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string }): Promise<Models.EstimationUpdatePlan>;
|
|
1073
|
-
/**
|
|
1074
|
-
* Get estimation for updating the organization plan.
|
|
1075
|
-
*
|
|
1076
|
-
* @param {string} organizationId - Organization ID
|
|
1077
|
-
* @param {string} billingPlan - Organization billing plan chosen
|
|
1078
|
-
* @param {string[]} invites - Additional member invites
|
|
1079
|
-
* @param {string} couponId - Coupon id
|
|
1080
|
-
* @throws {AppwriteException}
|
|
1081
|
-
* @returns {Promise<Models.EstimationUpdatePlan>}
|
|
1082
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1083
|
-
*/
|
|
1084
|
-
estimationUpdatePlan(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
|
|
1085
|
-
estimationUpdatePlan(
|
|
1086
|
-
paramsOrFirst: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string } | string,
|
|
1087
|
-
...rest: [(string)?, (string[])?, (string)?]
|
|
1088
|
-
): Promise<Models.EstimationUpdatePlan> {
|
|
1089
|
-
let params: { organizationId: string, billingPlan: string, invites?: string[], couponId?: string };
|
|
1090
|
-
|
|
1091
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1092
|
-
params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, invites?: string[], couponId?: string };
|
|
1093
|
-
} else {
|
|
1094
|
-
params = {
|
|
1095
|
-
organizationId: paramsOrFirst as string,
|
|
1096
|
-
billingPlan: rest[0] as string,
|
|
1097
|
-
invites: rest[1] as string[],
|
|
1098
|
-
couponId: rest[2] as string
|
|
1099
|
-
};
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
const organizationId = params.organizationId;
|
|
1103
|
-
const billingPlan = params.billingPlan;
|
|
1104
|
-
const invites = params.invites;
|
|
1105
|
-
const couponId = params.couponId;
|
|
1106
|
-
|
|
1107
|
-
if (typeof organizationId === 'undefined') {
|
|
1108
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1109
|
-
}
|
|
1110
|
-
if (typeof billingPlan === 'undefined') {
|
|
1111
|
-
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
const apiPath = '/organizations/{organizationId}/estimations/update-plan'.replace('{organizationId}', organizationId);
|
|
1115
|
-
const payload: Payload = {};
|
|
1116
|
-
if (typeof billingPlan !== 'undefined') {
|
|
1117
|
-
payload['billingPlan'] = billingPlan;
|
|
1118
|
-
}
|
|
1119
|
-
if (typeof invites !== 'undefined') {
|
|
1120
|
-
payload['invites'] = invites;
|
|
1121
|
-
}
|
|
1122
|
-
if (typeof couponId !== 'undefined') {
|
|
1123
|
-
payload['couponId'] = couponId;
|
|
1124
|
-
}
|
|
1125
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1126
|
-
|
|
1127
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1128
|
-
'content-type': 'application/json',
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
return this.client.call(
|
|
1132
|
-
'patch',
|
|
1133
|
-
uri,
|
|
1134
|
-
apiHeaders,
|
|
1135
|
-
payload
|
|
1136
|
-
);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
* Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
|
|
1141
|
-
*
|
|
1142
|
-
*
|
|
1143
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
1144
|
-
* @param {string} params.reason - Feedback reason
|
|
1145
|
-
* @param {string} params.message - Feedback message
|
|
1146
|
-
* @param {string} params.fromPlanId - Plan downgrading from
|
|
1147
|
-
* @param {string} params.toPlanId - Plan downgrading to
|
|
1148
|
-
* @throws {AppwriteException}
|
|
1149
|
-
* @returns {Promise<Models.DowngradeFeedback>}
|
|
1150
|
-
*/
|
|
1151
|
-
createDowngradeFeedback(params: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string }): Promise<Models.DowngradeFeedback>;
|
|
1152
|
-
/**
|
|
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
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
* @param {string} organizationId - Organization Unique ID
|
|
1157
|
-
* @param {string} reason - Feedback reason
|
|
1158
|
-
* @param {string} message - Feedback message
|
|
1159
|
-
* @param {string} fromPlanId - Plan downgrading from
|
|
1160
|
-
* @param {string} toPlanId - Plan downgrading to
|
|
1161
|
-
* @throws {AppwriteException}
|
|
1162
|
-
* @returns {Promise<Models.DowngradeFeedback>}
|
|
1163
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1164
|
-
*/
|
|
1165
|
-
createDowngradeFeedback(organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string): Promise<Models.DowngradeFeedback>;
|
|
1166
|
-
createDowngradeFeedback(
|
|
1167
|
-
paramsOrFirst: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string } | string,
|
|
1168
|
-
...rest: [(string)?, (string)?, (string)?, (string)?]
|
|
1169
|
-
): Promise<Models.DowngradeFeedback> {
|
|
1170
|
-
let params: { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string };
|
|
1171
|
-
|
|
1172
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1173
|
-
params = (paramsOrFirst || {}) as { organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string };
|
|
1174
|
-
} else {
|
|
1175
|
-
params = {
|
|
1176
|
-
organizationId: paramsOrFirst as string,
|
|
1177
|
-
reason: rest[0] as string,
|
|
1178
|
-
message: rest[1] as string,
|
|
1179
|
-
fromPlanId: rest[2] as string,
|
|
1180
|
-
toPlanId: rest[3] as string
|
|
1181
|
-
};
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
const organizationId = params.organizationId;
|
|
1185
|
-
const reason = params.reason;
|
|
1186
|
-
const message = params.message;
|
|
1187
|
-
const fromPlanId = params.fromPlanId;
|
|
1188
|
-
const toPlanId = params.toPlanId;
|
|
1189
|
-
|
|
1190
|
-
if (typeof organizationId === 'undefined') {
|
|
1191
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1192
|
-
}
|
|
1193
|
-
if (typeof reason === 'undefined') {
|
|
1194
|
-
throw new AppwriteException('Missing required parameter: "reason"');
|
|
1195
|
-
}
|
|
1196
|
-
if (typeof message === 'undefined') {
|
|
1197
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
1198
|
-
}
|
|
1199
|
-
if (typeof fromPlanId === 'undefined') {
|
|
1200
|
-
throw new AppwriteException('Missing required parameter: "fromPlanId"');
|
|
1201
|
-
}
|
|
1202
|
-
if (typeof toPlanId === 'undefined') {
|
|
1203
|
-
throw new AppwriteException('Missing required parameter: "toPlanId"');
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
const apiPath = '/organizations/{organizationId}/feedbacks/downgrade'.replace('{organizationId}', organizationId);
|
|
1207
|
-
const payload: Payload = {};
|
|
1208
|
-
if (typeof reason !== 'undefined') {
|
|
1209
|
-
payload['reason'] = reason;
|
|
1210
|
-
}
|
|
1211
|
-
if (typeof message !== 'undefined') {
|
|
1212
|
-
payload['message'] = message;
|
|
1213
|
-
}
|
|
1214
|
-
if (typeof fromPlanId !== 'undefined') {
|
|
1215
|
-
payload['fromPlanId'] = fromPlanId;
|
|
1216
|
-
}
|
|
1217
|
-
if (typeof toPlanId !== 'undefined') {
|
|
1218
|
-
payload['toPlanId'] = toPlanId;
|
|
1219
|
-
}
|
|
1220
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1221
|
-
|
|
1222
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1223
|
-
'content-type': 'application/json',
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
return this.client.call(
|
|
1227
|
-
'post',
|
|
1228
|
-
uri,
|
|
1229
|
-
apiHeaders,
|
|
1230
|
-
payload
|
|
1231
|
-
);
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
/**
|
|
1235
|
-
* List all invoices for an organization.
|
|
1236
|
-
*
|
|
1237
|
-
* @param {string} params.organizationId - Organization ID
|
|
1238
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
1239
|
-
* @throws {AppwriteException}
|
|
1240
|
-
* @returns {Promise<Models.InvoiceList>}
|
|
1241
|
-
*/
|
|
1242
|
-
listInvoices(params: { organizationId: string, queries?: string[] }): Promise<Models.InvoiceList>;
|
|
1243
|
-
/**
|
|
1244
|
-
* List all invoices for an organization.
|
|
1245
|
-
*
|
|
1246
|
-
* @param {string} organizationId - Organization ID
|
|
1247
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
1248
|
-
* @throws {AppwriteException}
|
|
1249
|
-
* @returns {Promise<Models.InvoiceList>}
|
|
1250
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1251
|
-
*/
|
|
1252
|
-
listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList>;
|
|
1253
|
-
listInvoices(
|
|
1254
|
-
paramsOrFirst: { organizationId: string, queries?: string[] } | string,
|
|
1255
|
-
...rest: [(string[])?]
|
|
1256
|
-
): Promise<Models.InvoiceList> {
|
|
1257
|
-
let params: { organizationId: string, queries?: string[] };
|
|
1258
|
-
|
|
1259
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1260
|
-
params = (paramsOrFirst || {}) as { organizationId: string, queries?: string[] };
|
|
1261
|
-
} else {
|
|
1262
|
-
params = {
|
|
1263
|
-
organizationId: paramsOrFirst as string,
|
|
1264
|
-
queries: rest[0] as string[]
|
|
1265
|
-
};
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
const organizationId = params.organizationId;
|
|
1269
|
-
const queries = params.queries;
|
|
1270
|
-
|
|
1271
|
-
if (typeof organizationId === 'undefined') {
|
|
1272
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
const apiPath = '/organizations/{organizationId}/invoices'.replace('{organizationId}', organizationId);
|
|
1276
|
-
const payload: Payload = {};
|
|
1277
|
-
if (typeof queries !== 'undefined') {
|
|
1278
|
-
payload['queries'] = queries;
|
|
1279
|
-
}
|
|
1280
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1281
|
-
|
|
1282
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
return this.client.call(
|
|
1286
|
-
'get',
|
|
1287
|
-
uri,
|
|
1288
|
-
apiHeaders,
|
|
1289
|
-
payload
|
|
1290
|
-
);
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
* Get an invoice by its unique ID.
|
|
1295
|
-
*
|
|
1296
|
-
* @param {string} params.organizationId - Organization ID
|
|
1297
|
-
* @param {string} params.invoiceId - Invoice unique ID
|
|
1298
|
-
* @throws {AppwriteException}
|
|
1299
|
-
* @returns {Promise<Models.Invoice>}
|
|
1300
|
-
*/
|
|
1301
|
-
getInvoice(params: { organizationId: string, invoiceId: string }): Promise<Models.Invoice>;
|
|
1302
|
-
/**
|
|
1303
|
-
* Get an invoice by its unique ID.
|
|
1304
|
-
*
|
|
1305
|
-
* @param {string} organizationId - Organization ID
|
|
1306
|
-
* @param {string} invoiceId - Invoice unique ID
|
|
1307
|
-
* @throws {AppwriteException}
|
|
1308
|
-
* @returns {Promise<Models.Invoice>}
|
|
1309
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1310
|
-
*/
|
|
1311
|
-
getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
|
|
1312
|
-
getInvoice(
|
|
1313
|
-
paramsOrFirst: { organizationId: string, invoiceId: string } | string,
|
|
1314
|
-
...rest: [(string)?]
|
|
1315
|
-
): Promise<Models.Invoice> {
|
|
1316
|
-
let params: { organizationId: string, invoiceId: string };
|
|
1317
|
-
|
|
1318
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1319
|
-
params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
|
|
1320
|
-
} else {
|
|
1321
|
-
params = {
|
|
1322
|
-
organizationId: paramsOrFirst as string,
|
|
1323
|
-
invoiceId: rest[0] as string
|
|
1324
|
-
};
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
const organizationId = params.organizationId;
|
|
1328
|
-
const invoiceId = params.invoiceId;
|
|
1329
|
-
|
|
1330
|
-
if (typeof organizationId === 'undefined') {
|
|
1331
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1332
|
-
}
|
|
1333
|
-
if (typeof invoiceId === 'undefined') {
|
|
1334
|
-
throw new AppwriteException('Missing required parameter: "invoiceId"');
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
|
|
1338
|
-
const payload: Payload = {};
|
|
1339
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1340
|
-
|
|
1341
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
return this.client.call(
|
|
1345
|
-
'get',
|
|
1346
|
-
uri,
|
|
1347
|
-
apiHeaders,
|
|
1348
|
-
payload
|
|
1349
|
-
);
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
/**
|
|
1353
|
-
* Download invoice in PDF
|
|
1354
|
-
*
|
|
1355
|
-
* @param {string} params.organizationId - Organization ID
|
|
1356
|
-
* @param {string} params.invoiceId - Invoice unique ID
|
|
1357
|
-
* @throws {AppwriteException}
|
|
1358
|
-
* @returns {Promise<Models.PaymentMethod>}
|
|
1359
|
-
*/
|
|
1360
|
-
getInvoiceDownload(params: { organizationId: string, invoiceId: string }): Promise<Models.PaymentMethod>;
|
|
1361
|
-
/**
|
|
1362
|
-
* Download invoice in PDF
|
|
1363
|
-
*
|
|
1364
|
-
* @param {string} organizationId - Organization ID
|
|
1365
|
-
* @param {string} invoiceId - Invoice unique ID
|
|
1366
|
-
* @throws {AppwriteException}
|
|
1367
|
-
* @returns {Promise<Models.PaymentMethod>}
|
|
1368
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1369
|
-
*/
|
|
1370
|
-
getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
|
|
1371
|
-
getInvoiceDownload(
|
|
1372
|
-
paramsOrFirst: { organizationId: string, invoiceId: string } | string,
|
|
1373
|
-
...rest: [(string)?]
|
|
1374
|
-
): Promise<Models.PaymentMethod> {
|
|
1375
|
-
let params: { organizationId: string, invoiceId: string };
|
|
1376
|
-
|
|
1377
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1378
|
-
params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
|
|
1379
|
-
} else {
|
|
1380
|
-
params = {
|
|
1381
|
-
organizationId: paramsOrFirst as string,
|
|
1382
|
-
invoiceId: rest[0] as string
|
|
1383
|
-
};
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
const organizationId = params.organizationId;
|
|
1387
|
-
const invoiceId = params.invoiceId;
|
|
1388
|
-
|
|
1389
|
-
if (typeof organizationId === 'undefined') {
|
|
1390
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1391
|
-
}
|
|
1392
|
-
if (typeof invoiceId === 'undefined') {
|
|
1393
|
-
throw new AppwriteException('Missing required parameter: "invoiceId"');
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/download'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
|
|
1397
|
-
const payload: Payload = {};
|
|
1398
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1399
|
-
|
|
1400
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
return this.client.call(
|
|
1404
|
-
'get',
|
|
1405
|
-
uri,
|
|
1406
|
-
apiHeaders,
|
|
1407
|
-
payload
|
|
1408
|
-
);
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
/**
|
|
1412
|
-
* Initiate payment for failed invoice to pay live from console
|
|
1413
|
-
*
|
|
1414
|
-
* @param {string} params.organizationId - Organization ID
|
|
1415
|
-
* @param {string} params.invoiceId - Invoice unique ID
|
|
1416
|
-
* @param {string} params.paymentMethodId - Payment method ID
|
|
1417
|
-
* @throws {AppwriteException}
|
|
1418
|
-
* @returns {Promise<Models.Invoice>}
|
|
1419
|
-
*/
|
|
1420
|
-
createInvoicePayment(params: { organizationId: string, invoiceId: string, paymentMethodId: string }): Promise<Models.Invoice>;
|
|
1421
|
-
/**
|
|
1422
|
-
* Initiate payment for failed invoice to pay live from console
|
|
1423
|
-
*
|
|
1424
|
-
* @param {string} organizationId - Organization ID
|
|
1425
|
-
* @param {string} invoiceId - Invoice unique ID
|
|
1426
|
-
* @param {string} paymentMethodId - Payment method ID
|
|
1427
|
-
* @throws {AppwriteException}
|
|
1428
|
-
* @returns {Promise<Models.Invoice>}
|
|
1429
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1430
|
-
*/
|
|
1431
|
-
createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice>;
|
|
1432
|
-
createInvoicePayment(
|
|
1433
|
-
paramsOrFirst: { organizationId: string, invoiceId: string, paymentMethodId: string } | string,
|
|
1434
|
-
...rest: [(string)?, (string)?]
|
|
1435
|
-
): Promise<Models.Invoice> {
|
|
1436
|
-
let params: { organizationId: string, invoiceId: string, paymentMethodId: string };
|
|
1437
|
-
|
|
1438
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1439
|
-
params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string, paymentMethodId: string };
|
|
1440
|
-
} else {
|
|
1441
|
-
params = {
|
|
1442
|
-
organizationId: paramsOrFirst as string,
|
|
1443
|
-
invoiceId: rest[0] as string,
|
|
1444
|
-
paymentMethodId: rest[1] as string
|
|
1445
|
-
};
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
const organizationId = params.organizationId;
|
|
1449
|
-
const invoiceId = params.invoiceId;
|
|
1450
|
-
const paymentMethodId = params.paymentMethodId;
|
|
1451
|
-
|
|
1452
|
-
if (typeof organizationId === 'undefined') {
|
|
1453
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1454
|
-
}
|
|
1455
|
-
if (typeof invoiceId === 'undefined') {
|
|
1456
|
-
throw new AppwriteException('Missing required parameter: "invoiceId"');
|
|
1457
|
-
}
|
|
1458
|
-
if (typeof paymentMethodId === 'undefined') {
|
|
1459
|
-
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/payments'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
|
|
1463
|
-
const payload: Payload = {};
|
|
1464
|
-
if (typeof paymentMethodId !== 'undefined') {
|
|
1465
|
-
payload['paymentMethodId'] = paymentMethodId;
|
|
1466
|
-
}
|
|
1467
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1468
|
-
|
|
1469
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1470
|
-
'content-type': 'application/json',
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
return this.client.call(
|
|
1474
|
-
'post',
|
|
1475
|
-
uri,
|
|
1476
|
-
apiHeaders,
|
|
1477
|
-
payload
|
|
1478
|
-
);
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
/**
|
|
1482
|
-
* Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
|
|
1483
|
-
*
|
|
1484
|
-
* @param {string} params.organizationId - Organization ID
|
|
1485
|
-
* @param {string} params.invoiceId - Invoice unique ID
|
|
1486
|
-
* @throws {AppwriteException}
|
|
1487
|
-
* @returns {Promise<Models.Invoice>}
|
|
1488
|
-
*/
|
|
1489
|
-
validateInvoice(params: { organizationId: string, invoiceId: string }): Promise<Models.Invoice>;
|
|
1490
|
-
/**
|
|
1491
|
-
* Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
|
|
1492
|
-
*
|
|
1493
|
-
* @param {string} organizationId - Organization ID
|
|
1494
|
-
* @param {string} invoiceId - Invoice unique ID
|
|
1495
|
-
* @throws {AppwriteException}
|
|
1496
|
-
* @returns {Promise<Models.Invoice>}
|
|
1497
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1498
|
-
*/
|
|
1499
|
-
validateInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
|
|
1500
|
-
validateInvoice(
|
|
1501
|
-
paramsOrFirst: { organizationId: string, invoiceId: string } | string,
|
|
1502
|
-
...rest: [(string)?]
|
|
1503
|
-
): Promise<Models.Invoice> {
|
|
1504
|
-
let params: { organizationId: string, invoiceId: string };
|
|
1505
|
-
|
|
1506
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1507
|
-
params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
|
|
1508
|
-
} else {
|
|
1509
|
-
params = {
|
|
1510
|
-
organizationId: paramsOrFirst as string,
|
|
1511
|
-
invoiceId: rest[0] as string
|
|
1512
|
-
};
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
const organizationId = params.organizationId;
|
|
1516
|
-
const invoiceId = params.invoiceId;
|
|
1517
|
-
|
|
1518
|
-
if (typeof organizationId === 'undefined') {
|
|
1519
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1520
|
-
}
|
|
1521
|
-
if (typeof invoiceId === 'undefined') {
|
|
1522
|
-
throw new AppwriteException('Missing required parameter: "invoiceId"');
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/status'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
|
|
1526
|
-
const payload: Payload = {};
|
|
1527
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1528
|
-
|
|
1529
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1530
|
-
'content-type': 'application/json',
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
return this.client.call(
|
|
1534
|
-
'patch',
|
|
1535
|
-
uri,
|
|
1536
|
-
apiHeaders,
|
|
1537
|
-
payload
|
|
1538
|
-
);
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
/**
|
|
1542
|
-
* View invoice in PDF
|
|
1543
|
-
*
|
|
1544
|
-
* @param {string} params.organizationId - Organization ID
|
|
1545
|
-
* @param {string} params.invoiceId - Invoice unique ID
|
|
1546
|
-
* @throws {AppwriteException}
|
|
1547
|
-
* @returns {Promise<Models.PaymentMethod>}
|
|
1548
|
-
*/
|
|
1549
|
-
getInvoiceView(params: { organizationId: string, invoiceId: string }): Promise<Models.PaymentMethod>;
|
|
1550
|
-
/**
|
|
1551
|
-
* View invoice in PDF
|
|
1552
|
-
*
|
|
1553
|
-
* @param {string} organizationId - Organization ID
|
|
1554
|
-
* @param {string} invoiceId - Invoice unique ID
|
|
1555
|
-
* @throws {AppwriteException}
|
|
1556
|
-
* @returns {Promise<Models.PaymentMethod>}
|
|
1557
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1558
|
-
*/
|
|
1559
|
-
getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
|
|
1560
|
-
getInvoiceView(
|
|
1561
|
-
paramsOrFirst: { organizationId: string, invoiceId: string } | string,
|
|
1562
|
-
...rest: [(string)?]
|
|
1563
|
-
): Promise<Models.PaymentMethod> {
|
|
1564
|
-
let params: { organizationId: string, invoiceId: string };
|
|
1565
|
-
|
|
1566
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1567
|
-
params = (paramsOrFirst || {}) as { organizationId: string, invoiceId: string };
|
|
1568
|
-
} else {
|
|
1569
|
-
params = {
|
|
1570
|
-
organizationId: paramsOrFirst as string,
|
|
1571
|
-
invoiceId: rest[0] as string
|
|
1572
|
-
};
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
const organizationId = params.organizationId;
|
|
1576
|
-
const invoiceId = params.invoiceId;
|
|
1577
|
-
|
|
1578
|
-
if (typeof organizationId === 'undefined') {
|
|
1579
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1580
|
-
}
|
|
1581
|
-
if (typeof invoiceId === 'undefined') {
|
|
1582
|
-
throw new AppwriteException('Missing required parameter: "invoiceId"');
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/view'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
|
|
1586
|
-
const payload: Payload = {};
|
|
1587
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1588
|
-
|
|
1589
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
return this.client.call(
|
|
1593
|
-
'get',
|
|
1594
|
-
uri,
|
|
1595
|
-
apiHeaders,
|
|
1596
|
-
payload
|
|
1597
|
-
);
|
|
1598
|
-
}
|
|
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
|
-
|
|
1945
|
-
/**
|
|
1946
|
-
* Set a organization's default payment method.
|
|
1947
|
-
*
|
|
1948
|
-
* @param {string} params.organizationId - Organization ID
|
|
1949
|
-
* @param {string} params.paymentMethodId - Unique ID of payment method
|
|
1950
|
-
* @throws {AppwriteException}
|
|
1951
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1952
|
-
*/
|
|
1953
|
-
setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string }): Promise<Models.Organization<Preferences>>;
|
|
1954
|
-
/**
|
|
1955
|
-
* Set a organization's default payment method.
|
|
1956
|
-
*
|
|
1957
|
-
* @param {string} organizationId - Organization ID
|
|
1958
|
-
* @param {string} paymentMethodId - Unique ID of payment method
|
|
1959
|
-
* @throws {AppwriteException}
|
|
1960
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1961
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1962
|
-
*/
|
|
1963
|
-
setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
|
|
1964
|
-
setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
1965
|
-
paramsOrFirst: { organizationId: string, paymentMethodId: string } | string,
|
|
1966
|
-
...rest: [(string)?]
|
|
1967
|
-
): Promise<Models.Organization<Preferences>> {
|
|
1968
|
-
let params: { organizationId: string, paymentMethodId: string };
|
|
1969
|
-
|
|
1970
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1971
|
-
params = (paramsOrFirst || {}) as { organizationId: string, paymentMethodId: string };
|
|
1972
|
-
} else {
|
|
1973
|
-
params = {
|
|
1974
|
-
organizationId: paramsOrFirst as string,
|
|
1975
|
-
paymentMethodId: rest[0] as string
|
|
1976
|
-
};
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
const organizationId = params.organizationId;
|
|
1980
|
-
const paymentMethodId = params.paymentMethodId;
|
|
1981
|
-
|
|
1982
|
-
if (typeof organizationId === 'undefined') {
|
|
1983
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1984
|
-
}
|
|
1985
|
-
if (typeof paymentMethodId === 'undefined') {
|
|
1986
|
-
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
|
|
1990
|
-
const payload: Payload = {};
|
|
1991
|
-
if (typeof paymentMethodId !== 'undefined') {
|
|
1992
|
-
payload['paymentMethodId'] = paymentMethodId;
|
|
1993
|
-
}
|
|
1994
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1995
|
-
|
|
1996
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1997
|
-
'content-type': 'application/json',
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
return this.client.call(
|
|
2001
|
-
'patch',
|
|
2002
|
-
uri,
|
|
2003
|
-
apiHeaders,
|
|
2004
|
-
payload
|
|
2005
|
-
);
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
/**
|
|
2009
|
-
* Delete the default payment method for an organization.
|
|
2010
|
-
*
|
|
2011
|
-
* @param {string} params.organizationId - Organization ID
|
|
2012
|
-
* @throws {AppwriteException}
|
|
2013
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2014
|
-
*/
|
|
2015
|
-
deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
|
|
2016
|
-
/**
|
|
2017
|
-
* Delete the default payment method for an organization.
|
|
2018
|
-
*
|
|
2019
|
-
* @param {string} organizationId - Organization ID
|
|
2020
|
-
* @throws {AppwriteException}
|
|
2021
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2022
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2023
|
-
*/
|
|
2024
|
-
deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
|
|
2025
|
-
deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
2026
|
-
paramsOrFirst: { organizationId: string } | string
|
|
2027
|
-
): Promise<Models.Organization<Preferences>> {
|
|
2028
|
-
let params: { organizationId: string };
|
|
2029
|
-
|
|
2030
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2031
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
2032
|
-
} else {
|
|
2033
|
-
params = {
|
|
2034
|
-
organizationId: paramsOrFirst as string
|
|
2035
|
-
};
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
const organizationId = params.organizationId;
|
|
2039
|
-
|
|
2040
|
-
if (typeof organizationId === 'undefined') {
|
|
2041
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
const apiPath = '/organizations/{organizationId}/payment-method'.replace('{organizationId}', organizationId);
|
|
2045
|
-
const payload: Payload = {};
|
|
2046
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2047
|
-
|
|
2048
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2049
|
-
'content-type': 'application/json',
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
return this.client.call(
|
|
2053
|
-
'delete',
|
|
2054
|
-
uri,
|
|
2055
|
-
apiHeaders,
|
|
2056
|
-
payload
|
|
2057
|
-
);
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
/**
|
|
2061
|
-
* Set an organization's backup payment method.
|
|
2062
|
-
*
|
|
2063
|
-
*
|
|
2064
|
-
* @param {string} params.organizationId - Organization ID
|
|
2065
|
-
* @param {string} params.paymentMethodId - Unique ID of payment method
|
|
2066
|
-
* @throws {AppwriteException}
|
|
2067
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2068
|
-
*/
|
|
2069
|
-
setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, paymentMethodId: string }): Promise<Models.Organization<Preferences>>;
|
|
2070
|
-
/**
|
|
2071
|
-
* Set an organization's backup payment method.
|
|
2072
|
-
*
|
|
2073
|
-
*
|
|
2074
|
-
* @param {string} organizationId - Organization ID
|
|
2075
|
-
* @param {string} paymentMethodId - Unique ID of payment method
|
|
2076
|
-
* @throws {AppwriteException}
|
|
2077
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2078
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2079
|
-
*/
|
|
2080
|
-
setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
|
|
2081
|
-
setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
2082
|
-
paramsOrFirst: { organizationId: string, paymentMethodId: string } | string,
|
|
2083
|
-
...rest: [(string)?]
|
|
2084
|
-
): Promise<Models.Organization<Preferences>> {
|
|
2085
|
-
let params: { organizationId: string, paymentMethodId: string };
|
|
2086
|
-
|
|
2087
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2088
|
-
params = (paramsOrFirst || {}) as { organizationId: string, paymentMethodId: string };
|
|
2089
|
-
} else {
|
|
2090
|
-
params = {
|
|
2091
|
-
organizationId: paramsOrFirst as string,
|
|
2092
|
-
paymentMethodId: rest[0] as string
|
|
2093
|
-
};
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
const organizationId = params.organizationId;
|
|
2097
|
-
const paymentMethodId = params.paymentMethodId;
|
|
2098
|
-
|
|
2099
|
-
if (typeof organizationId === 'undefined') {
|
|
2100
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2101
|
-
}
|
|
2102
|
-
if (typeof paymentMethodId === 'undefined') {
|
|
2103
|
-
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
const apiPath = '/organizations/{organizationId}/payment-method/backup'.replace('{organizationId}', organizationId);
|
|
2107
|
-
const payload: Payload = {};
|
|
2108
|
-
if (typeof paymentMethodId !== 'undefined') {
|
|
2109
|
-
payload['paymentMethodId'] = paymentMethodId;
|
|
2110
|
-
}
|
|
2111
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2112
|
-
|
|
2113
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2114
|
-
'content-type': 'application/json',
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
return this.client.call(
|
|
2118
|
-
'patch',
|
|
2119
|
-
uri,
|
|
2120
|
-
apiHeaders,
|
|
2121
|
-
payload
|
|
2122
|
-
);
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
/**
|
|
2126
|
-
* Delete a backup payment method for an organization.
|
|
2127
|
-
*
|
|
2128
|
-
* @param {string} params.organizationId - Organization ID
|
|
2129
|
-
* @throws {AppwriteException}
|
|
2130
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2131
|
-
*/
|
|
2132
|
-
deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
|
|
2133
|
-
/**
|
|
2134
|
-
* Delete a backup payment method for an organization.
|
|
2135
|
-
*
|
|
2136
|
-
* @param {string} organizationId - Organization ID
|
|
2137
|
-
* @throws {AppwriteException}
|
|
2138
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2139
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2140
|
-
*/
|
|
2141
|
-
deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
|
|
2142
|
-
deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
2143
|
-
paramsOrFirst: { organizationId: string } | string
|
|
2144
|
-
): Promise<Models.Organization<Preferences>> {
|
|
2145
|
-
let params: { organizationId: string };
|
|
2146
|
-
|
|
2147
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2148
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
2149
|
-
} else {
|
|
2150
|
-
params = {
|
|
2151
|
-
organizationId: paramsOrFirst as string
|
|
2152
|
-
};
|
|
2153
|
-
}
|
|
2154
|
-
|
|
2155
|
-
const organizationId = params.organizationId;
|
|
2156
|
-
|
|
2157
|
-
if (typeof organizationId === 'undefined') {
|
|
2158
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
const apiPath = '/organizations/{organizationId}/payment-method/backup'.replace('{organizationId}', organizationId);
|
|
2162
|
-
const payload: Payload = {};
|
|
2163
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2164
|
-
|
|
2165
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2166
|
-
'content-type': 'application/json',
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
return this.client.call(
|
|
2170
|
-
'delete',
|
|
2171
|
-
uri,
|
|
2172
|
-
apiHeaders,
|
|
2173
|
-
payload
|
|
2174
|
-
);
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
/**
|
|
2178
|
-
* Get an organization's payment method using it's payment method ID.
|
|
2179
|
-
*
|
|
2180
|
-
* @param {string} params.organizationId - Organization ID
|
|
2181
|
-
* @param {string} params.paymentMethodId - Unique ID of payment method
|
|
2182
|
-
* @throws {AppwriteException}
|
|
2183
|
-
* @returns {Promise<Models.PaymentMethod>}
|
|
2184
|
-
*/
|
|
2185
|
-
getPaymentMethod(params: { organizationId: string, paymentMethodId: string }): Promise<Models.PaymentMethod>;
|
|
2186
|
-
/**
|
|
2187
|
-
* Get an organization's payment method using it's payment method ID.
|
|
2188
|
-
*
|
|
2189
|
-
* @param {string} organizationId - Organization ID
|
|
2190
|
-
* @param {string} paymentMethodId - Unique ID of payment method
|
|
2191
|
-
* @throws {AppwriteException}
|
|
2192
|
-
* @returns {Promise<Models.PaymentMethod>}
|
|
2193
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2194
|
-
*/
|
|
2195
|
-
getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod>;
|
|
2196
|
-
getPaymentMethod(
|
|
2197
|
-
paramsOrFirst: { organizationId: string, paymentMethodId: string } | string,
|
|
2198
|
-
...rest: [(string)?]
|
|
2199
|
-
): Promise<Models.PaymentMethod> {
|
|
2200
|
-
let params: { organizationId: string, paymentMethodId: string };
|
|
2201
|
-
|
|
2202
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2203
|
-
params = (paramsOrFirst || {}) as { organizationId: string, paymentMethodId: string };
|
|
2204
|
-
} else {
|
|
2205
|
-
params = {
|
|
2206
|
-
organizationId: paramsOrFirst as string,
|
|
2207
|
-
paymentMethodId: rest[0] as string
|
|
2208
|
-
};
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
|
-
const organizationId = params.organizationId;
|
|
2212
|
-
const paymentMethodId = params.paymentMethodId;
|
|
2213
|
-
|
|
2214
|
-
if (typeof organizationId === 'undefined') {
|
|
2215
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2216
|
-
}
|
|
2217
|
-
if (typeof paymentMethodId === 'undefined') {
|
|
2218
|
-
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
const apiPath = '/organizations/{organizationId}/payment-methods/{paymentMethodId}'.replace('{organizationId}', organizationId).replace('{paymentMethodId}', paymentMethodId);
|
|
2222
|
-
const payload: Payload = {};
|
|
2223
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2224
|
-
|
|
2225
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
return this.client.call(
|
|
2229
|
-
'get',
|
|
2230
|
-
uri,
|
|
2231
|
-
apiHeaders,
|
|
2232
|
-
payload
|
|
2233
|
-
);
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
/**
|
|
2237
|
-
* Get the details of the current billing plan for an organization.
|
|
2238
|
-
*
|
|
2239
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
2240
|
-
* @throws {AppwriteException}
|
|
2241
|
-
* @returns {Promise<Models.BillingPlan>}
|
|
2242
|
-
*/
|
|
2243
|
-
getPlan(params: { organizationId: string }): Promise<Models.BillingPlan>;
|
|
2244
|
-
/**
|
|
2245
|
-
* Get the details of the current billing plan for an organization.
|
|
2246
|
-
*
|
|
2247
|
-
* @param {string} organizationId - Organization Unique ID
|
|
2248
|
-
* @throws {AppwriteException}
|
|
2249
|
-
* @returns {Promise<Models.BillingPlan>}
|
|
2250
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2251
|
-
*/
|
|
2252
|
-
getPlan(organizationId: string): Promise<Models.BillingPlan>;
|
|
2253
|
-
getPlan(
|
|
2254
|
-
paramsOrFirst: { organizationId: string } | string
|
|
2255
|
-
): Promise<Models.BillingPlan> {
|
|
2256
|
-
let params: { organizationId: string };
|
|
2257
|
-
|
|
2258
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2259
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
2260
|
-
} else {
|
|
2261
|
-
params = {
|
|
2262
|
-
organizationId: paramsOrFirst as string
|
|
2263
|
-
};
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
const organizationId = params.organizationId;
|
|
2267
|
-
|
|
2268
|
-
if (typeof organizationId === 'undefined') {
|
|
2269
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
const apiPath = '/organizations/{organizationId}/plan'.replace('{organizationId}', organizationId);
|
|
2273
|
-
const payload: Payload = {};
|
|
2274
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2275
|
-
|
|
2276
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
return this.client.call(
|
|
2280
|
-
'get',
|
|
2281
|
-
uri,
|
|
2282
|
-
apiHeaders,
|
|
2283
|
-
payload
|
|
2284
|
-
);
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
/**
|
|
2288
|
-
* Update the billing plan for an organization.
|
|
2289
|
-
*
|
|
2290
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
2291
|
-
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
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.
|
|
2293
|
-
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
2294
|
-
* @param {string[]} params.invites - Additional member invites
|
|
2295
|
-
* @param {string} params.couponId - Coupon id
|
|
2296
|
-
* @param {string} params.taxId - Tax Id associated to billing.
|
|
2297
|
-
* @param {number} params.budget - Budget limit for additional usage set for the organization
|
|
2298
|
-
* @throws {AppwriteException}
|
|
2299
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2300
|
-
*/
|
|
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>>;
|
|
2302
|
-
/**
|
|
2303
|
-
* Update the billing plan for an organization.
|
|
2304
|
-
*
|
|
2305
|
-
* @param {string} organizationId - Organization Unique ID
|
|
2306
|
-
* @param {string} billingPlan - Organization billing plan chosen
|
|
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.
|
|
2308
|
-
* @param {string} billingAddressId - Unique ID of billing address
|
|
2309
|
-
* @param {string[]} invites - Additional member invites
|
|
2310
|
-
* @param {string} couponId - Coupon id
|
|
2311
|
-
* @param {string} taxId - Tax Id associated to billing.
|
|
2312
|
-
* @param {number} budget - Budget limit for additional usage set for the organization
|
|
2313
|
-
* @throws {AppwriteException}
|
|
2314
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2315
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2316
|
-
*/
|
|
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>>;
|
|
2318
|
-
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
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)?]
|
|
2321
|
-
): Promise<Models.Organization<Preferences>> {
|
|
2322
|
-
let params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
|
|
2323
|
-
|
|
2324
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2325
|
-
params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
|
|
2326
|
-
} else {
|
|
2327
|
-
params = {
|
|
2328
|
-
organizationId: paramsOrFirst as string,
|
|
2329
|
-
billingPlan: rest[0] as string,
|
|
2330
|
-
paymentMethodId: rest[1] as string,
|
|
2331
|
-
billingAddressId: rest[2] as string,
|
|
2332
|
-
invites: rest[3] as string[],
|
|
2333
|
-
couponId: rest[4] as string,
|
|
2334
|
-
taxId: rest[5] as string,
|
|
2335
|
-
budget: rest[6] as number
|
|
2336
|
-
};
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
|
-
const organizationId = params.organizationId;
|
|
2340
|
-
const billingPlan = params.billingPlan;
|
|
2341
|
-
const paymentMethodId = params.paymentMethodId;
|
|
2342
|
-
const billingAddressId = params.billingAddressId;
|
|
2343
|
-
const invites = params.invites;
|
|
2344
|
-
const couponId = params.couponId;
|
|
2345
|
-
const taxId = params.taxId;
|
|
2346
|
-
const budget = params.budget;
|
|
2347
|
-
|
|
2348
|
-
if (typeof organizationId === 'undefined') {
|
|
2349
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2350
|
-
}
|
|
2351
|
-
if (typeof billingPlan === 'undefined') {
|
|
2352
|
-
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
2353
|
-
}
|
|
2354
|
-
|
|
2355
|
-
const apiPath = '/organizations/{organizationId}/plan'.replace('{organizationId}', organizationId);
|
|
2356
|
-
const payload: Payload = {};
|
|
2357
|
-
if (typeof billingPlan !== 'undefined') {
|
|
2358
|
-
payload['billingPlan'] = billingPlan;
|
|
2359
|
-
}
|
|
2360
|
-
if (typeof paymentMethodId !== 'undefined') {
|
|
2361
|
-
payload['paymentMethodId'] = paymentMethodId;
|
|
2362
|
-
}
|
|
2363
|
-
if (typeof billingAddressId !== 'undefined') {
|
|
2364
|
-
payload['billingAddressId'] = billingAddressId;
|
|
2365
|
-
}
|
|
2366
|
-
if (typeof invites !== 'undefined') {
|
|
2367
|
-
payload['invites'] = invites;
|
|
2368
|
-
}
|
|
2369
|
-
if (typeof couponId !== 'undefined') {
|
|
2370
|
-
payload['couponId'] = couponId;
|
|
2371
|
-
}
|
|
2372
|
-
if (typeof taxId !== 'undefined') {
|
|
2373
|
-
payload['taxId'] = taxId;
|
|
2374
|
-
}
|
|
2375
|
-
if (typeof budget !== 'undefined') {
|
|
2376
|
-
payload['budget'] = budget;
|
|
2377
|
-
}
|
|
2378
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2379
|
-
|
|
2380
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2381
|
-
'content-type': 'application/json',
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
return this.client.call(
|
|
2385
|
-
'patch',
|
|
2386
|
-
uri,
|
|
2387
|
-
apiHeaders,
|
|
2388
|
-
payload
|
|
2389
|
-
);
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
/**
|
|
2393
|
-
* Cancel the downgrade initiated for an organization.
|
|
2394
|
-
*
|
|
2395
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
2396
|
-
* @throws {AppwriteException}
|
|
2397
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2398
|
-
*/
|
|
2399
|
-
cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string }): Promise<Models.Organization<Preferences>>;
|
|
2400
|
-
/**
|
|
2401
|
-
* Cancel the downgrade initiated for an organization.
|
|
2402
|
-
*
|
|
2403
|
-
* @param {string} organizationId - Organization Unique ID
|
|
2404
|
-
* @throws {AppwriteException}
|
|
2405
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2406
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2407
|
-
*/
|
|
2408
|
-
cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
|
|
2409
|
-
cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
2410
|
-
paramsOrFirst: { organizationId: string } | string
|
|
2411
|
-
): Promise<Models.Organization<Preferences>> {
|
|
2412
|
-
let params: { organizationId: string };
|
|
2413
|
-
|
|
2414
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2415
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
2416
|
-
} else {
|
|
2417
|
-
params = {
|
|
2418
|
-
organizationId: paramsOrFirst as string
|
|
2419
|
-
};
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
|
-
const organizationId = params.organizationId;
|
|
2423
|
-
|
|
2424
|
-
if (typeof organizationId === 'undefined') {
|
|
2425
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
const apiPath = '/organizations/{organizationId}/plan/cancel'.replace('{organizationId}', organizationId);
|
|
2429
|
-
const payload: Payload = {};
|
|
2430
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2431
|
-
|
|
2432
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2433
|
-
'content-type': 'application/json',
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
return this.client.call(
|
|
2437
|
-
'patch',
|
|
2438
|
-
uri,
|
|
2439
|
-
apiHeaders,
|
|
2440
|
-
payload
|
|
2441
|
-
);
|
|
2442
|
-
}
|
|
2443
|
-
|
|
2444
|
-
/**
|
|
2445
|
-
* Get all available regions for an organization.
|
|
2446
|
-
*
|
|
2447
|
-
* @param {string} params.organizationId - Team ID.
|
|
2448
|
-
* @throws {AppwriteException}
|
|
2449
|
-
* @returns {Promise<Models.ConsoleRegionList>}
|
|
2450
|
-
*/
|
|
2451
|
-
listRegions(params: { organizationId: string }): Promise<Models.ConsoleRegionList>;
|
|
2452
|
-
/**
|
|
2453
|
-
* Get all available regions for an organization.
|
|
2454
|
-
*
|
|
2455
|
-
* @param {string} organizationId - Team ID.
|
|
2456
|
-
* @throws {AppwriteException}
|
|
2457
|
-
* @returns {Promise<Models.ConsoleRegionList>}
|
|
2458
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2459
|
-
*/
|
|
2460
|
-
listRegions(organizationId: string): Promise<Models.ConsoleRegionList>;
|
|
2461
|
-
listRegions(
|
|
2462
|
-
paramsOrFirst: { organizationId: string } | string
|
|
2463
|
-
): Promise<Models.ConsoleRegionList> {
|
|
2464
|
-
let params: { organizationId: string };
|
|
2465
|
-
|
|
2466
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2467
|
-
params = (paramsOrFirst || {}) as { organizationId: string };
|
|
2468
|
-
} else {
|
|
2469
|
-
params = {
|
|
2470
|
-
organizationId: paramsOrFirst as string
|
|
2471
|
-
};
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
const organizationId = params.organizationId;
|
|
2475
|
-
|
|
2476
|
-
if (typeof organizationId === 'undefined') {
|
|
2477
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2478
|
-
}
|
|
2479
|
-
|
|
2480
|
-
const apiPath = '/organizations/{organizationId}/regions'.replace('{organizationId}', organizationId);
|
|
2481
|
-
const payload: Payload = {};
|
|
2482
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2483
|
-
|
|
2484
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
|
-
return this.client.call(
|
|
2488
|
-
'get',
|
|
2489
|
-
uri,
|
|
2490
|
-
apiHeaders,
|
|
2491
|
-
payload
|
|
2492
|
-
);
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
/**
|
|
2496
|
-
* Get Scopes
|
|
2497
|
-
*
|
|
2498
|
-
* @param {string} params.organizationId - Organization id
|
|
2499
|
-
* @param {string} params.projectId - Project id
|
|
2500
|
-
* @throws {AppwriteException}
|
|
2501
|
-
* @returns {Promise<Models.Roles>}
|
|
2502
|
-
*/
|
|
2503
|
-
getScopes(params: { organizationId: string, projectId?: string }): Promise<Models.Roles>;
|
|
2504
|
-
/**
|
|
2505
|
-
* Get Scopes
|
|
2506
|
-
*
|
|
2507
|
-
* @param {string} organizationId - Organization id
|
|
2508
|
-
* @param {string} projectId - Project id
|
|
2509
|
-
* @throws {AppwriteException}
|
|
2510
|
-
* @returns {Promise<Models.Roles>}
|
|
2511
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2512
|
-
*/
|
|
2513
|
-
getScopes(organizationId: string, projectId?: string): Promise<Models.Roles>;
|
|
2514
|
-
getScopes(
|
|
2515
|
-
paramsOrFirst: { organizationId: string, projectId?: string } | string,
|
|
2516
|
-
...rest: [(string)?]
|
|
2517
|
-
): Promise<Models.Roles> {
|
|
2518
|
-
let params: { organizationId: string, projectId?: string };
|
|
2519
|
-
|
|
2520
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2521
|
-
params = (paramsOrFirst || {}) as { organizationId: string, projectId?: string };
|
|
2522
|
-
} else {
|
|
2523
|
-
params = {
|
|
2524
|
-
organizationId: paramsOrFirst as string,
|
|
2525
|
-
projectId: rest[0] as string
|
|
2526
|
-
};
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
const organizationId = params.organizationId;
|
|
2530
|
-
const projectId = params.projectId;
|
|
2531
|
-
|
|
2532
|
-
if (typeof organizationId === 'undefined') {
|
|
2533
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
const apiPath = '/organizations/{organizationId}/roles'.replace('{organizationId}', organizationId);
|
|
2537
|
-
const payload: Payload = {};
|
|
2538
|
-
if (typeof projectId !== 'undefined') {
|
|
2539
|
-
payload['projectId'] = projectId;
|
|
2540
|
-
}
|
|
2541
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2542
|
-
|
|
2543
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2544
|
-
}
|
|
2545
|
-
|
|
2546
|
-
return this.client.call(
|
|
2547
|
-
'get',
|
|
2548
|
-
uri,
|
|
2549
|
-
apiHeaders,
|
|
2550
|
-
payload
|
|
2551
|
-
);
|
|
2552
|
-
}
|
|
2553
|
-
|
|
2554
|
-
/**
|
|
2555
|
-
* Set an organization's billing tax ID.
|
|
2556
|
-
*
|
|
2557
|
-
* @param {string} params.organizationId - Organization ID
|
|
2558
|
-
* @param {string} params.taxId - Tax Id associated to billing.
|
|
2559
|
-
* @throws {AppwriteException}
|
|
2560
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2561
|
-
*/
|
|
2562
|
-
setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, taxId: string }): Promise<Models.Organization<Preferences>>;
|
|
2563
|
-
/**
|
|
2564
|
-
* Set an organization's billing tax ID.
|
|
2565
|
-
*
|
|
2566
|
-
* @param {string} organizationId - Organization ID
|
|
2567
|
-
* @param {string} taxId - Tax Id associated to billing.
|
|
2568
|
-
* @throws {AppwriteException}
|
|
2569
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2570
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2571
|
-
*/
|
|
2572
|
-
setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>>;
|
|
2573
|
-
setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
2574
|
-
paramsOrFirst: { organizationId: string, taxId: string } | string,
|
|
2575
|
-
...rest: [(string)?]
|
|
2576
|
-
): Promise<Models.Organization<Preferences>> {
|
|
2577
|
-
let params: { organizationId: string, taxId: string };
|
|
2578
|
-
|
|
2579
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2580
|
-
params = (paramsOrFirst || {}) as { organizationId: string, taxId: string };
|
|
2581
|
-
} else {
|
|
2582
|
-
params = {
|
|
2583
|
-
organizationId: paramsOrFirst as string,
|
|
2584
|
-
taxId: rest[0] as string
|
|
2585
|
-
};
|
|
2586
|
-
}
|
|
2587
|
-
|
|
2588
|
-
const organizationId = params.organizationId;
|
|
2589
|
-
const taxId = params.taxId;
|
|
2590
|
-
|
|
2591
|
-
if (typeof organizationId === 'undefined') {
|
|
2592
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2593
|
-
}
|
|
2594
|
-
if (typeof taxId === 'undefined') {
|
|
2595
|
-
throw new AppwriteException('Missing required parameter: "taxId"');
|
|
2596
|
-
}
|
|
2597
|
-
|
|
2598
|
-
const apiPath = '/organizations/{organizationId}/taxId'.replace('{organizationId}', organizationId);
|
|
2599
|
-
const payload: Payload = {};
|
|
2600
|
-
if (typeof taxId !== 'undefined') {
|
|
2601
|
-
payload['taxId'] = taxId;
|
|
2602
|
-
}
|
|
2603
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2604
|
-
|
|
2605
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2606
|
-
'content-type': 'application/json',
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
return this.client.call(
|
|
2610
|
-
'patch',
|
|
2611
|
-
uri,
|
|
2612
|
-
apiHeaders,
|
|
2613
|
-
payload
|
|
2614
|
-
);
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
|
-
/**
|
|
2618
|
-
* Get the usage data for an organization.
|
|
2619
|
-
*
|
|
2620
|
-
* @param {string} params.organizationId - Organization ID
|
|
2621
|
-
* @param {string} params.startDate - Starting date for the usage
|
|
2622
|
-
* @param {string} params.endDate - End date for the usage
|
|
2623
|
-
* @throws {AppwriteException}
|
|
2624
|
-
* @returns {Promise<Models.UsageOrganization>}
|
|
2625
|
-
*/
|
|
2626
|
-
getUsage(params: { organizationId: string, startDate?: string, endDate?: string }): Promise<Models.UsageOrganization>;
|
|
2627
|
-
/**
|
|
2628
|
-
* Get the usage data for an organization.
|
|
2629
|
-
*
|
|
2630
|
-
* @param {string} organizationId - Organization ID
|
|
2631
|
-
* @param {string} startDate - Starting date for the usage
|
|
2632
|
-
* @param {string} endDate - End date for the usage
|
|
2633
|
-
* @throws {AppwriteException}
|
|
2634
|
-
* @returns {Promise<Models.UsageOrganization>}
|
|
2635
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2636
|
-
*/
|
|
2637
|
-
getUsage(organizationId: string, startDate?: string, endDate?: string): Promise<Models.UsageOrganization>;
|
|
2638
|
-
getUsage(
|
|
2639
|
-
paramsOrFirst: { organizationId: string, startDate?: string, endDate?: string } | string,
|
|
2640
|
-
...rest: [(string)?, (string)?]
|
|
2641
|
-
): Promise<Models.UsageOrganization> {
|
|
2642
|
-
let params: { organizationId: string, startDate?: string, endDate?: string };
|
|
2643
|
-
|
|
2644
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2645
|
-
params = (paramsOrFirst || {}) as { organizationId: string, startDate?: string, endDate?: string };
|
|
2646
|
-
} else {
|
|
2647
|
-
params = {
|
|
2648
|
-
organizationId: paramsOrFirst as string,
|
|
2649
|
-
startDate: rest[0] as string,
|
|
2650
|
-
endDate: rest[1] as string
|
|
2651
|
-
};
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
const organizationId = params.organizationId;
|
|
2655
|
-
const startDate = params.startDate;
|
|
2656
|
-
const endDate = params.endDate;
|
|
2657
|
-
|
|
2658
|
-
if (typeof organizationId === 'undefined') {
|
|
2659
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
const apiPath = '/organizations/{organizationId}/usage'.replace('{organizationId}', organizationId);
|
|
2663
|
-
const payload: Payload = {};
|
|
2664
|
-
if (typeof startDate !== 'undefined') {
|
|
2665
|
-
payload['startDate'] = startDate;
|
|
2666
|
-
}
|
|
2667
|
-
if (typeof endDate !== 'undefined') {
|
|
2668
|
-
payload['endDate'] = endDate;
|
|
2669
|
-
}
|
|
2670
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2671
|
-
|
|
2672
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2673
|
-
}
|
|
2674
|
-
|
|
2675
|
-
return this.client.call(
|
|
2676
|
-
'get',
|
|
2677
|
-
uri,
|
|
2678
|
-
apiHeaders,
|
|
2679
|
-
payload
|
|
2680
|
-
);
|
|
2681
|
-
}
|
|
2682
|
-
|
|
2683
|
-
/**
|
|
2684
|
-
* Validate payment for team after creation or upgrade.
|
|
2685
|
-
*
|
|
2686
|
-
* @param {string} params.organizationId - Organization ID
|
|
2687
|
-
* @param {string[]} params.invites - Additional member invites
|
|
2688
|
-
* @throws {AppwriteException}
|
|
2689
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2690
|
-
*/
|
|
2691
|
-
validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, invites?: string[] }): Promise<Models.Organization<Preferences>>;
|
|
2692
|
-
/**
|
|
2693
|
-
* Validate payment for team after creation or upgrade.
|
|
2694
|
-
*
|
|
2695
|
-
* @param {string} organizationId - Organization ID
|
|
2696
|
-
* @param {string[]} invites - Additional member invites
|
|
2697
|
-
* @throws {AppwriteException}
|
|
2698
|
-
* @returns {Promise<Models.Organization<Preferences>>}
|
|
2699
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2700
|
-
*/
|
|
2701
|
-
validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, invites?: string[]): Promise<Models.Organization<Preferences>>;
|
|
2702
|
-
validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(
|
|
2703
|
-
paramsOrFirst: { organizationId: string, invites?: string[] } | string,
|
|
2704
|
-
...rest: [(string[])?]
|
|
2705
|
-
): Promise<Models.Organization<Preferences>> {
|
|
2706
|
-
let params: { organizationId: string, invites?: string[] };
|
|
2707
|
-
|
|
2708
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2709
|
-
params = (paramsOrFirst || {}) as { organizationId: string, invites?: string[] };
|
|
2710
|
-
} else {
|
|
2711
|
-
params = {
|
|
2712
|
-
organizationId: paramsOrFirst as string,
|
|
2713
|
-
invites: rest[0] as string[]
|
|
2714
|
-
};
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
const organizationId = params.organizationId;
|
|
2718
|
-
const invites = params.invites;
|
|
2719
|
-
|
|
2720
|
-
if (typeof organizationId === 'undefined') {
|
|
2721
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
const apiPath = '/organizations/{organizationId}/validate'.replace('{organizationId}', organizationId);
|
|
2725
|
-
const payload: Payload = {};
|
|
2726
|
-
if (typeof invites !== 'undefined') {
|
|
2727
|
-
payload['invites'] = invites;
|
|
2728
|
-
}
|
|
2729
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2730
|
-
|
|
2731
|
-
const apiHeaders: { [header: string]: string } = {
|
|
2732
|
-
'content-type': 'application/json',
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
return this.client.call(
|
|
2736
|
-
'patch',
|
|
2737
|
-
uri,
|
|
2738
|
-
apiHeaders,
|
|
2739
|
-
payload
|
|
2740
|
-
);
|
|
2741
|
-
}
|
|
2742
|
-
}
|