@appwrite.io/console 1.5.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/README.md +3 -3
- package/dist/cjs/sdk.js +11874 -11100
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +11872 -11101
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +11874 -11100
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-billing-address.md +1 -1
- package/docs/examples/account/create-email-password-session.md +1 -1
- package/docs/examples/account/create-email-token.md +1 -1
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
- package/docs/examples/account/create-mfa-authenticator.md +1 -1
- package/docs/examples/account/create-mfa-challenge.md +1 -1
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/create-o-auth2session.md +1 -1
- package/docs/examples/account/create-o-auth2token.md +1 -1
- package/docs/examples/account/create-payment-method.md +1 -1
- package/docs/examples/account/create-phone-token.md +1 -1
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-push-target.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-session.md +1 -1
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/delete-billing-address.md +1 -1
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-mfa-authenticator.md +1 -1
- package/docs/examples/account/delete-payment-method.md +1 -1
- package/docs/examples/account/delete-push-target.md +1 -1
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/delete.md +1 -1
- package/docs/examples/account/get-billing-address.md +1 -1
- package/docs/examples/account/get-coupon.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-payment-method.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-billing-addresses.md +1 -1
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-invoices.md +1 -1
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/list-payment-methods.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-billing-address.md +1 -1
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-m-f-a.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-mfa-authenticator.md +1 -1
- package/docs/examples/account/update-mfa-challenge.md +1 -1
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-payment-method-mandate-options.md +1 -1
- package/docs/examples/account/update-payment-method-provider.md +1 -1
- package/docs/examples/account/update-payment-method.md +1 -1
- package/docs/examples/account/update-phone-session.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-push-target.md +1 -1
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/assistant/chat.md +1 -1
- package/docs/examples/avatars/get-browser.md +2 -2
- package/docs/examples/avatars/get-credit-card.md +2 -2
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +2 -2
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/backups/create-archive.md +1 -1
- package/docs/examples/backups/create-policy.md +1 -1
- package/docs/examples/backups/create-restoration.md +1 -1
- package/docs/examples/backups/delete-archive.md +1 -1
- package/docs/examples/backups/delete-policy.md +1 -1
- package/docs/examples/backups/get-archive.md +1 -1
- package/docs/examples/backups/get-policy.md +1 -1
- package/docs/examples/backups/get-restoration.md +1 -1
- package/docs/examples/backups/list-archives.md +1 -1
- package/docs/examples/backups/list-policies.md +1 -1
- package/docs/examples/backups/list-restorations.md +1 -1
- package/docs/examples/backups/update-policy.md +1 -1
- package/docs/examples/console/create-program-membership.md +1 -1
- package/docs/examples/console/create-source.md +1 -1
- package/docs/examples/console/get-campaign.md +1 -1
- package/docs/examples/console/get-coupon.md +1 -1
- package/docs/examples/console/get-resource.md +14 -0
- package/docs/examples/console/plans.md +1 -1
- package/docs/examples/console/regions.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +4 -2
- package/docs/examples/databases/create-documents.md +15 -0
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +3 -2
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +1 -1
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-documents.md +15 -0
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-documents.md +16 -0
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/databases/upsert-documents.md +15 -0
- package/docs/examples/domains/create-preset-google-workspace.md +13 -0
- package/docs/examples/domains/create-preset-i-cloud.md +13 -0
- package/docs/examples/domains/create-preset-mailgun.md +13 -0
- package/docs/examples/domains/create-preset-outlook.md +13 -0
- package/docs/examples/domains/create-preset-proton-mail.md +13 -0
- package/docs/examples/domains/create-preset-zoho.md +13 -0
- package/docs/examples/domains/create-record-a-a-a-a.md +17 -0
- package/docs/examples/domains/create-record-a.md +17 -0
- package/docs/examples/domains/create-record-alias.md +17 -0
- package/docs/examples/domains/create-record-c-a-a.md +17 -0
- package/docs/examples/domains/create-record-c-n-a-m-e.md +17 -0
- package/docs/examples/domains/create-record-h-t-t-p-s.md +17 -0
- package/docs/examples/domains/create-record-m-x.md +18 -0
- package/docs/examples/domains/create-record-n-s.md +17 -0
- package/docs/examples/domains/create-record-s-r-v.md +20 -0
- package/docs/examples/domains/create-record-t-x-t.md +17 -0
- package/docs/examples/domains/create.md +14 -0
- package/docs/examples/domains/delete-record.md +14 -0
- package/docs/examples/domains/delete.md +13 -0
- package/docs/examples/domains/get-preset-google-workspace.md +13 -0
- package/docs/examples/domains/get-preset-i-cloud.md +13 -0
- package/docs/examples/domains/get-preset-mailgun.md +13 -0
- package/docs/examples/domains/get-preset-outlook.md +13 -0
- package/docs/examples/domains/get-preset-proton-mail.md +13 -0
- package/docs/examples/domains/get-preset-zoho.md +13 -0
- package/docs/examples/domains/get-record.md +14 -0
- package/docs/examples/domains/get-zone.md +13 -0
- package/docs/examples/domains/get.md +13 -0
- package/docs/examples/domains/list-records.md +14 -0
- package/docs/examples/domains/list.md +14 -0
- package/docs/examples/domains/update-nameservers.md +13 -0
- package/docs/examples/domains/update-record-a-a-a-a.md +18 -0
- package/docs/examples/domains/update-record-a.md +18 -0
- package/docs/examples/domains/update-record-alias.md +18 -0
- package/docs/examples/domains/update-record-c-a-a.md +18 -0
- package/docs/examples/domains/update-record-c-n-a-m-e.md +18 -0
- package/docs/examples/domains/update-record-h-t-t-p-s.md +18 -0
- package/docs/examples/domains/update-record-m-x.md +19 -0
- package/docs/examples/domains/update-record-n-s.md +18 -0
- package/docs/examples/domains/update-record-s-r-v.md +21 -0
- package/docs/examples/domains/update-record-t-x-t.md +18 -0
- package/docs/examples/domains/update-team.md +14 -0
- package/docs/examples/domains/update-zone.md +14 -0
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-duplicate-deployment.md +15 -0
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-template-deployment.md +18 -0
- package/docs/examples/functions/create-variable.md +3 -2
- package/docs/examples/functions/create-vcs-deployment.md +16 -0
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-execution.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/get-deployment-download.md +4 -3
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-template.md +1 -1
- package/docs/examples/functions/get-usage.md +2 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +2 -3
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-specifications.md +1 -1
- package/docs/examples/functions/list-templates.md +1 -1
- package/docs/examples/functions/list-usage.md +13 -0
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment-status.md +14 -0
- package/docs/examples/functions/update-function-deployment.md +14 -0
- package/docs/examples/functions/update-variable.md +3 -2
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-certificate.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-failed-jobs.md +1 -1
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-billing-aggregation.md +1 -1
- package/docs/examples/health/get-queue-builds.md +1 -1
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +1 -1
- package/docs/examples/health/get-queue-deletes.md +1 -1
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-mails.md +1 -1
- package/docs/examples/health/get-queue-messaging.md +1 -1
- package/docs/examples/health/get-queue-migrations.md +1 -1
- package/docs/examples/health/get-queue-priority-builds.md +1 -1
- package/docs/examples/health/get-queue-region-manager.md +13 -0
- package/docs/examples/health/get-queue-stats-resources.md +1 -1
- package/docs/examples/health/get-queue-usage.md +1 -1
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-storage.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +1 -1
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/messaging/create-apns-provider.md +1 -1
- package/docs/examples/messaging/create-email.md +1 -1
- package/docs/examples/messaging/create-fcm-provider.md +1 -1
- package/docs/examples/messaging/create-mailgun-provider.md +1 -1
- package/docs/examples/messaging/create-msg91provider.md +1 -1
- package/docs/examples/messaging/create-push.md +1 -1
- package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/create-sms.md +1 -1
- package/docs/examples/messaging/create-smtp-provider.md +1 -1
- package/docs/examples/messaging/create-subscriber.md +1 -1
- package/docs/examples/messaging/create-telesign-provider.md +1 -1
- package/docs/examples/messaging/create-textmagic-provider.md +1 -1
- package/docs/examples/messaging/create-topic.md +1 -1
- package/docs/examples/messaging/create-twilio-provider.md +1 -1
- package/docs/examples/messaging/create-vonage-provider.md +1 -1
- package/docs/examples/messaging/delete-provider.md +1 -1
- package/docs/examples/messaging/delete-subscriber.md +1 -1
- package/docs/examples/messaging/delete-topic.md +1 -1
- package/docs/examples/messaging/delete.md +1 -1
- package/docs/examples/messaging/get-message.md +1 -1
- package/docs/examples/messaging/get-provider.md +1 -1
- package/docs/examples/messaging/get-subscriber.md +1 -1
- package/docs/examples/messaging/get-topic.md +1 -1
- package/docs/examples/messaging/list-message-logs.md +1 -1
- package/docs/examples/messaging/list-messages.md +1 -1
- package/docs/examples/messaging/list-provider-logs.md +1 -1
- package/docs/examples/messaging/list-providers.md +1 -1
- package/docs/examples/messaging/list-subscriber-logs.md +1 -1
- package/docs/examples/messaging/list-subscribers.md +1 -1
- package/docs/examples/messaging/list-targets.md +1 -1
- package/docs/examples/messaging/list-topic-logs.md +1 -1
- package/docs/examples/messaging/list-topics.md +1 -1
- package/docs/examples/messaging/update-apns-provider.md +1 -1
- package/docs/examples/messaging/update-email.md +1 -1
- package/docs/examples/messaging/update-fcm-provider.md +1 -1
- package/docs/examples/messaging/update-mailgun-provider.md +1 -1
- package/docs/examples/messaging/update-msg91provider.md +1 -1
- package/docs/examples/messaging/update-push.md +1 -1
- package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
- package/docs/examples/messaging/update-sms.md +1 -1
- package/docs/examples/messaging/update-smtp-provider.md +1 -1
- package/docs/examples/messaging/update-telesign-provider.md +1 -1
- package/docs/examples/messaging/update-textmagic-provider.md +1 -1
- package/docs/examples/messaging/update-topic.md +1 -1
- package/docs/examples/messaging/update-twilio-provider.md +1 -1
- package/docs/examples/messaging/update-vonage-provider.md +1 -1
- package/docs/examples/migrations/create-appwrite-migration.md +1 -1
- package/docs/examples/migrations/create-csv-migration.md +15 -0
- package/docs/examples/migrations/create-firebase-migration.md +1 -1
- package/docs/examples/migrations/create-n-host-migration.md +1 -1
- package/docs/examples/migrations/create-supabase-migration.md +1 -1
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +1 -1
- package/docs/examples/migrations/get-firebase-report.md +1 -1
- package/docs/examples/migrations/get-n-host-report.md +1 -1
- package/docs/examples/migrations/get-supabase-report.md +1 -1
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/list.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/organizations/add-credit.md +1 -1
- package/docs/examples/organizations/create-invoice-payment.md +1 -1
- package/docs/examples/organizations/create.md +1 -1
- package/docs/examples/organizations/delete-backup-payment-method.md +1 -1
- package/docs/examples/organizations/delete-billing-address.md +1 -1
- package/docs/examples/organizations/delete-default-payment-method.md +1 -1
- package/docs/examples/organizations/delete.md +1 -1
- package/docs/examples/organizations/get-aggregation.md +1 -1
- package/docs/examples/organizations/get-billing-address.md +1 -1
- package/docs/examples/organizations/get-credit.md +1 -1
- package/docs/examples/organizations/get-invoice-download.md +1 -1
- package/docs/examples/organizations/get-invoice-view.md +1 -1
- package/docs/examples/organizations/get-invoice.md +1 -1
- package/docs/examples/organizations/get-payment-method.md +1 -1
- package/docs/examples/organizations/get-plan.md +1 -1
- package/docs/examples/organizations/get-scopes.md +1 -1
- package/docs/examples/organizations/list-aggregations.md +1 -1
- package/docs/examples/organizations/list-credits.md +1 -1
- package/docs/examples/organizations/list-invoices.md +1 -1
- package/docs/examples/organizations/list.md +1 -1
- package/docs/examples/organizations/set-backup-payment-method.md +1 -1
- package/docs/examples/organizations/set-billing-address.md +1 -1
- package/docs/examples/organizations/set-billing-email.md +1 -1
- package/docs/examples/organizations/set-billing-tax-id.md +1 -1
- package/docs/examples/organizations/set-default-payment-method.md +1 -1
- package/docs/examples/organizations/update-budget.md +1 -1
- package/docs/examples/organizations/update-plan.md +1 -1
- package/docs/examples/organizations/validate-invoice.md +14 -0
- package/docs/examples/project/create-variable.md +3 -2
- package/docs/examples/project/delete-variable.md +1 -1
- package/docs/examples/project/get-usage.md +1 -1
- package/docs/examples/project/get-variable.md +1 -1
- package/docs/examples/project/list-variables.md +1 -1
- package/docs/examples/project/update-variable.md +3 -2
- package/docs/examples/projects/create-dev-key.md +15 -0
- package/docs/examples/projects/create-j-w-t.md +1 -1
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +1 -1
- package/docs/examples/projects/create-smtp-test.md +1 -1
- package/docs/examples/projects/create-webhook.md +1 -1
- package/docs/examples/projects/create.md +2 -2
- package/docs/examples/projects/delete-dev-key.md +14 -0
- package/docs/examples/projects/delete-email-template.md +1 -1
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +1 -1
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-dev-key.md +14 -0
- package/docs/examples/projects/get-email-template.md +1 -1
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +1 -1
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-dev-keys.md +14 -0
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-api-status-all.md +1 -1
- package/docs/examples/projects/update-api-status.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-dev-key.md +16 -0
- package/docs/examples/projects/update-email-template.md +1 -1
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-memberships-privacy.md +1 -1
- package/docs/examples/projects/update-mock-numbers.md +1 -1
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/update-personal-data-check.md +1 -1
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/update-service-status-all.md +1 -1
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-session-alerts.md +1 -1
- package/docs/examples/projects/update-sms-template.md +1 -1
- package/docs/examples/projects/update-smtp.md +1 -1
- package/docs/examples/projects/update-team.md +1 -1
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +1 -1
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-a-p-i-rule.md +13 -0
- package/docs/examples/proxy/create-function-rule.md +15 -0
- package/docs/examples/proxy/create-redirect-rule.md +15 -0
- package/docs/examples/proxy/create-site-rule.md +15 -0
- package/docs/examples/proxy/delete-rule.md +1 -1
- package/docs/examples/proxy/get-rule.md +1 -1
- package/docs/examples/proxy/list-rules.md +1 -1
- package/docs/examples/proxy/update-rule-verification.md +1 -1
- package/docs/examples/sites/create-deployment.md +18 -0
- package/docs/examples/sites/create-duplicate-deployment.md +14 -0
- package/docs/examples/sites/create-template-deployment.md +18 -0
- package/docs/examples/sites/create-variable.md +16 -0
- package/docs/examples/sites/create-vcs-deployment.md +16 -0
- package/docs/examples/sites/create.md +30 -0
- package/docs/examples/sites/delete-deployment.md +14 -0
- package/docs/examples/sites/delete-log.md +14 -0
- package/docs/examples/sites/delete-variable.md +14 -0
- package/docs/examples/sites/delete.md +13 -0
- package/docs/examples/sites/get-deployment-download.md +15 -0
- package/docs/examples/sites/get-deployment.md +14 -0
- package/docs/examples/sites/get-log.md +14 -0
- package/docs/examples/sites/get-template.md +13 -0
- package/docs/examples/sites/get-usage.md +14 -0
- package/docs/examples/sites/get-variable.md +14 -0
- package/docs/examples/sites/get.md +13 -0
- package/docs/examples/sites/list-deployments.md +15 -0
- package/docs/examples/sites/list-frameworks.md +11 -0
- package/docs/examples/sites/list-logs.md +14 -0
- package/docs/examples/sites/list-specifications.md +11 -0
- package/docs/examples/sites/list-templates.md +16 -0
- package/docs/examples/sites/list-usage.md +13 -0
- package/docs/examples/sites/list-variables.md +13 -0
- package/docs/examples/sites/list.md +14 -0
- package/docs/examples/sites/update-deployment-status.md +14 -0
- package/docs/examples/sites/update-site-deployment.md +14 -0
- package/docs/examples/sites/update-variable.md +17 -0
- package/docs/examples/sites/update.md +30 -0
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +3 -2
- package/docs/examples/storage/get-file-preview.md +4 -3
- package/docs/examples/storage/get-file-view.md +3 -2
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/update-membership.md +1 -1
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/tokens/create-file-token.md +15 -0
- package/docs/examples/tokens/delete.md +13 -0
- package/docs/examples/tokens/get.md +13 -0
- package/docs/examples/tokens/list.md +15 -0
- package/docs/examples/tokens/update.md +14 -0
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-j-w-t.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create-session.md +1 -1
- package/docs/examples/users/create-target.md +1 -1
- package/docs/examples/users/create-token.md +1 -1
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +1 -1
- package/docs/examples/users/delete-mfa-authenticator.md +1 -1
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete-target.md +1 -1
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-target.md +1 -1
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +1 -1
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +4 -2
- package/docs/examples/users/list-mfa-factors.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list-targets.md +1 -1
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +1 -1
- package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/users/update-mfa.md +1 -1
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/users/update-target.md +1 -1
- package/docs/examples/vcs/create-repository-detection.md +3 -2
- package/docs/examples/vcs/create-repository.md +1 -1
- package/docs/examples/vcs/delete-installation.md +1 -1
- package/docs/examples/vcs/get-installation.md +1 -1
- package/docs/examples/vcs/get-repository-contents.md +1 -1
- package/docs/examples/vcs/get-repository.md +1 -1
- package/docs/examples/vcs/list-installations.md +1 -1
- package/docs/examples/vcs/list-repositories.md +3 -2
- package/docs/examples/vcs/list-repository-branches.md +1 -1
- package/docs/examples/vcs/update-external-deployments.md +1 -1
- package/package.json +1 -1
- package/src/client.ts +32 -5
- package/src/enums/adapter.ts +4 -0
- package/src/enums/api-service.ts +1 -0
- package/src/enums/build-runtime.ts +62 -0
- package/src/enums/console-resource-type.ts +3 -0
- package/src/enums/deployment-download-type.ts +4 -0
- package/src/enums/framework.ts +16 -0
- package/src/enums/image-format.ts +0 -1
- package/src/enums/name.ts +0 -1
- package/src/enums/o-auth-provider.ts +1 -0
- package/src/enums/region.ts +2 -1
- package/src/enums/runtime.ts +4 -3
- package/src/enums/site-usage-range.ts +5 -0
- package/src/enums/status-code.ts +6 -0
- package/src/enums/v-c-s-deployment-type.ts +5 -0
- package/src/enums/v-c-s-detection-type.ts +4 -0
- package/src/index.ts +13 -2
- package/src/models.ts +1171 -188
- package/src/services/account.ts +126 -446
- package/src/services/assistant.ts +2 -7
- package/src/services/avatars.ts +7 -28
- package/src/services/backups.ts +24 -90
- package/src/services/console.ts +48 -52
- package/src/services/databases.ts +241 -350
- package/src/services/domains.ts +1821 -0
- package/src/services/functions.ts +216 -248
- package/src/services/graphql.ts +4 -14
- package/src/services/health.ts +56 -206
- package/src/services/locale.ts +16 -64
- package/src/services/messaging.ts +92 -335
- package/src/services/migrations.ts +66 -89
- package/src/services/organizations.ts +84 -241
- package/src/services/project.ts +20 -45
- package/src/services/projects.ts +262 -330
- package/src/services/proxy.ts +129 -44
- package/src/services/sites.ts +1104 -0
- package/src/services/storage.ts +42 -105
- package/src/services/teams.ts +28 -104
- package/src/services/tokens.ts +160 -0
- package/src/services/users.ts +94 -313
- package/src/services/vcs.ts +70 -108
- package/types/enums/adapter.d.ts +4 -0
- package/types/enums/api-service.d.ts +1 -0
- package/types/enums/build-runtime.d.ts +62 -0
- package/types/enums/console-resource-type.d.ts +3 -0
- package/types/enums/deployment-download-type.d.ts +4 -0
- package/types/enums/framework.d.ts +16 -0
- package/types/enums/image-format.d.ts +0 -1
- package/types/enums/name.d.ts +0 -1
- package/types/enums/o-auth-provider.d.ts +1 -0
- package/types/enums/region.d.ts +3 -2
- package/types/enums/runtime.d.ts +5 -4
- package/types/enums/site-usage-range.d.ts +5 -0
- package/types/enums/status-code.d.ts +6 -0
- package/types/enums/v-c-s-deployment-type.d.ts +5 -0
- package/types/enums/v-c-s-detection-type.d.ts +4 -0
- package/types/index.d.ts +13 -2
- package/types/models.d.ts +1171 -188
- package/types/services/account.d.ts +4 -128
- package/types/services/assistant.d.ts +0 -2
- package/types/services/avatars.d.ts +0 -14
- package/types/services/backups.d.ts +0 -24
- package/types/services/console.d.ts +9 -13
- package/types/services/databases.d.ts +43 -97
- package/types/services/domains.d.ts +524 -0
- package/types/services/functions.d.ts +58 -84
- package/types/services/graphql.d.ts +0 -4
- package/types/services/health.d.ts +6 -56
- package/types/services/locale.d.ts +0 -16
- package/types/services/messaging.d.ts +0 -92
- package/types/services/migrations.d.ts +9 -23
- package/types/services/organizations.d.ts +11 -68
- package/types/services/project.d.ts +4 -14
- package/types/services/projects.d.ts +47 -91
- package/types/services/proxy.d.ts +31 -13
- package/types/services/sites.d.ts +319 -0
- package/types/services/storage.d.ts +6 -33
- package/types/services/teams.d.ts +0 -28
- package/types/services/tokens.d.ts +51 -0
- package/types/services/users.d.ts +3 -87
- package/types/services/vcs.d.ts +14 -31
|
@@ -11,8 +11,6 @@ export class Organizations {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* List Orgnizations
|
|
15
|
-
*
|
|
16
14
|
* 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
15
|
*
|
|
18
16
|
* @param {string[]} queries
|
|
@@ -20,7 +18,7 @@ export class Organizations {
|
|
|
20
18
|
* @throws {AppwriteException}
|
|
21
19
|
* @returns {Promise<Models.OrganizationList<Preferences>>}
|
|
22
20
|
*/
|
|
23
|
-
|
|
21
|
+
list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.OrganizationList<Preferences>> {
|
|
24
22
|
const apiPath = '/organizations';
|
|
25
23
|
const payload: Payload = {};
|
|
26
24
|
if (typeof queries !== 'undefined') {
|
|
@@ -32,13 +30,9 @@ export class Organizations {
|
|
|
32
30
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
33
31
|
|
|
34
32
|
const apiHeaders: { [header: string]: string } = {
|
|
35
|
-
'content-type': 'application/json',
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return await this.client.call(
|
|
35
|
+
return this.client.call(
|
|
42
36
|
'get',
|
|
43
37
|
uri,
|
|
44
38
|
apiHeaders,
|
|
@@ -46,8 +40,6 @@ export class Organizations {
|
|
|
46
40
|
);
|
|
47
41
|
}
|
|
48
42
|
/**
|
|
49
|
-
* Create Organization
|
|
50
|
-
*
|
|
51
43
|
* Create a new organization.
|
|
52
44
|
|
|
53
45
|
*
|
|
@@ -63,7 +55,7 @@ export class Organizations {
|
|
|
63
55
|
* @throws {AppwriteException}
|
|
64
56
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
65
57
|
*/
|
|
66
|
-
|
|
58
|
+
create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>> {
|
|
67
59
|
if (typeof organizationId === 'undefined') {
|
|
68
60
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
69
61
|
}
|
|
@@ -108,10 +100,7 @@ export class Organizations {
|
|
|
108
100
|
'content-type': 'application/json',
|
|
109
101
|
}
|
|
110
102
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return await this.client.call(
|
|
103
|
+
return this.client.call(
|
|
115
104
|
'post',
|
|
116
105
|
uri,
|
|
117
106
|
apiHeaders,
|
|
@@ -119,15 +108,13 @@ export class Organizations {
|
|
|
119
108
|
);
|
|
120
109
|
}
|
|
121
110
|
/**
|
|
122
|
-
* Delete team
|
|
123
|
-
*
|
|
124
111
|
* Delete an organization.
|
|
125
112
|
*
|
|
126
113
|
* @param {string} organizationId
|
|
127
114
|
* @throws {AppwriteException}
|
|
128
115
|
* @returns {Promise<{}>}
|
|
129
116
|
*/
|
|
130
|
-
|
|
117
|
+
delete(organizationId: string): Promise<{}> {
|
|
131
118
|
if (typeof organizationId === 'undefined') {
|
|
132
119
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
133
120
|
}
|
|
@@ -139,10 +126,7 @@ export class Organizations {
|
|
|
139
126
|
'content-type': 'application/json',
|
|
140
127
|
}
|
|
141
128
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return await this.client.call(
|
|
129
|
+
return this.client.call(
|
|
146
130
|
'delete',
|
|
147
131
|
uri,
|
|
148
132
|
apiHeaders,
|
|
@@ -150,8 +134,6 @@ export class Organizations {
|
|
|
150
134
|
);
|
|
151
135
|
}
|
|
152
136
|
/**
|
|
153
|
-
* List aggregations
|
|
154
|
-
*
|
|
155
137
|
* Get a list of all aggregations for an organization.
|
|
156
138
|
*
|
|
157
139
|
* @param {string} organizationId
|
|
@@ -159,7 +141,7 @@ export class Organizations {
|
|
|
159
141
|
* @throws {AppwriteException}
|
|
160
142
|
* @returns {Promise<Models.AggregationTeamList>}
|
|
161
143
|
*/
|
|
162
|
-
|
|
144
|
+
listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList> {
|
|
163
145
|
if (typeof organizationId === 'undefined') {
|
|
164
146
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
165
147
|
}
|
|
@@ -171,13 +153,9 @@ export class Organizations {
|
|
|
171
153
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
172
154
|
|
|
173
155
|
const apiHeaders: { [header: string]: string } = {
|
|
174
|
-
'content-type': 'application/json',
|
|
175
156
|
}
|
|
176
157
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
return await this.client.call(
|
|
158
|
+
return this.client.call(
|
|
181
159
|
'get',
|
|
182
160
|
uri,
|
|
183
161
|
apiHeaders,
|
|
@@ -185,16 +163,14 @@ export class Organizations {
|
|
|
185
163
|
);
|
|
186
164
|
}
|
|
187
165
|
/**
|
|
188
|
-
* Get invoice
|
|
189
|
-
*
|
|
190
166
|
* Get a specific aggregation using it's aggregation ID.
|
|
191
167
|
*
|
|
192
168
|
* @param {string} organizationId
|
|
193
169
|
* @param {string} aggregationId
|
|
194
170
|
* @throws {AppwriteException}
|
|
195
|
-
* @returns {Promise<Models.
|
|
171
|
+
* @returns {Promise<Models.AggregationTeam>}
|
|
196
172
|
*/
|
|
197
|
-
|
|
173
|
+
getAggregation(organizationId: string, aggregationId: string): Promise<Models.AggregationTeam> {
|
|
198
174
|
if (typeof organizationId === 'undefined') {
|
|
199
175
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
200
176
|
}
|
|
@@ -206,13 +182,9 @@ export class Organizations {
|
|
|
206
182
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
207
183
|
|
|
208
184
|
const apiHeaders: { [header: string]: string } = {
|
|
209
|
-
'content-type': 'application/json',
|
|
210
185
|
}
|
|
211
186
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
return await this.client.call(
|
|
187
|
+
return this.client.call(
|
|
216
188
|
'get',
|
|
217
189
|
uri,
|
|
218
190
|
apiHeaders,
|
|
@@ -220,8 +192,6 @@ export class Organizations {
|
|
|
220
192
|
);
|
|
221
193
|
}
|
|
222
194
|
/**
|
|
223
|
-
* Set team's billing address
|
|
224
|
-
*
|
|
225
195
|
* Set a billing address for an organization.
|
|
226
196
|
*
|
|
227
197
|
* @param {string} organizationId
|
|
@@ -229,7 +199,7 @@ export class Organizations {
|
|
|
229
199
|
* @throws {AppwriteException}
|
|
230
200
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
231
201
|
*/
|
|
232
|
-
|
|
202
|
+
setBillingAddress<Preferences extends Models.Preferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>> {
|
|
233
203
|
if (typeof organizationId === 'undefined') {
|
|
234
204
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
235
205
|
}
|
|
@@ -247,10 +217,7 @@ export class Organizations {
|
|
|
247
217
|
'content-type': 'application/json',
|
|
248
218
|
}
|
|
249
219
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return await this.client.call(
|
|
220
|
+
return this.client.call(
|
|
254
221
|
'patch',
|
|
255
222
|
uri,
|
|
256
223
|
apiHeaders,
|
|
@@ -258,15 +225,13 @@ export class Organizations {
|
|
|
258
225
|
);
|
|
259
226
|
}
|
|
260
227
|
/**
|
|
261
|
-
* Delete team's billing address
|
|
262
|
-
*
|
|
263
228
|
* Delete a team's billing address.
|
|
264
229
|
*
|
|
265
230
|
* @param {string} organizationId
|
|
266
231
|
* @throws {AppwriteException}
|
|
267
232
|
* @returns {Promise<{}>}
|
|
268
233
|
*/
|
|
269
|
-
|
|
234
|
+
deleteBillingAddress(organizationId: string): Promise<{}> {
|
|
270
235
|
if (typeof organizationId === 'undefined') {
|
|
271
236
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
272
237
|
}
|
|
@@ -278,10 +243,7 @@ export class Organizations {
|
|
|
278
243
|
'content-type': 'application/json',
|
|
279
244
|
}
|
|
280
245
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
return await this.client.call(
|
|
246
|
+
return this.client.call(
|
|
285
247
|
'delete',
|
|
286
248
|
uri,
|
|
287
249
|
apiHeaders,
|
|
@@ -289,8 +251,6 @@ export class Organizations {
|
|
|
289
251
|
);
|
|
290
252
|
}
|
|
291
253
|
/**
|
|
292
|
-
* Get billing address
|
|
293
|
-
*
|
|
294
254
|
* Get a billing address using it's ID.
|
|
295
255
|
*
|
|
296
256
|
* @param {string} organizationId
|
|
@@ -298,7 +258,7 @@ export class Organizations {
|
|
|
298
258
|
* @throws {AppwriteException}
|
|
299
259
|
* @returns {Promise<Models.BillingAddress>}
|
|
300
260
|
*/
|
|
301
|
-
|
|
261
|
+
getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress> {
|
|
302
262
|
if (typeof organizationId === 'undefined') {
|
|
303
263
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
304
264
|
}
|
|
@@ -310,13 +270,9 @@ export class Organizations {
|
|
|
310
270
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
311
271
|
|
|
312
272
|
const apiHeaders: { [header: string]: string } = {
|
|
313
|
-
'content-type': 'application/json',
|
|
314
273
|
}
|
|
315
274
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
return await this.client.call(
|
|
275
|
+
return this.client.call(
|
|
320
276
|
'get',
|
|
321
277
|
uri,
|
|
322
278
|
apiHeaders,
|
|
@@ -324,8 +280,6 @@ export class Organizations {
|
|
|
324
280
|
);
|
|
325
281
|
}
|
|
326
282
|
/**
|
|
327
|
-
* Set team's billing email
|
|
328
|
-
*
|
|
329
283
|
* Set the current billing email for the organization.
|
|
330
284
|
*
|
|
331
285
|
* @param {string} organizationId
|
|
@@ -333,7 +287,7 @@ export class Organizations {
|
|
|
333
287
|
* @throws {AppwriteException}
|
|
334
288
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
335
289
|
*/
|
|
336
|
-
|
|
290
|
+
setBillingEmail<Preferences extends Models.Preferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>> {
|
|
337
291
|
if (typeof organizationId === 'undefined') {
|
|
338
292
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
339
293
|
}
|
|
@@ -351,10 +305,7 @@ export class Organizations {
|
|
|
351
305
|
'content-type': 'application/json',
|
|
352
306
|
}
|
|
353
307
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
return await this.client.call(
|
|
308
|
+
return this.client.call(
|
|
358
309
|
'patch',
|
|
359
310
|
uri,
|
|
360
311
|
apiHeaders,
|
|
@@ -362,8 +313,6 @@ export class Organizations {
|
|
|
362
313
|
);
|
|
363
314
|
}
|
|
364
315
|
/**
|
|
365
|
-
* Update organization budget
|
|
366
|
-
*
|
|
367
316
|
* Update the budget limit for an organization.
|
|
368
317
|
*
|
|
369
318
|
* @param {string} organizationId
|
|
@@ -372,7 +321,7 @@ export class Organizations {
|
|
|
372
321
|
* @throws {AppwriteException}
|
|
373
322
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
374
323
|
*/
|
|
375
|
-
|
|
324
|
+
updateBudget<Preferences extends Models.Preferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>> {
|
|
376
325
|
if (typeof organizationId === 'undefined') {
|
|
377
326
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
378
327
|
}
|
|
@@ -393,10 +342,7 @@ export class Organizations {
|
|
|
393
342
|
'content-type': 'application/json',
|
|
394
343
|
}
|
|
395
344
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
return await this.client.call(
|
|
345
|
+
return this.client.call(
|
|
400
346
|
'patch',
|
|
401
347
|
uri,
|
|
402
348
|
apiHeaders,
|
|
@@ -404,8 +350,6 @@ export class Organizations {
|
|
|
404
350
|
);
|
|
405
351
|
}
|
|
406
352
|
/**
|
|
407
|
-
* List credits
|
|
408
|
-
*
|
|
409
353
|
* List all credits for an organization.
|
|
410
354
|
|
|
411
355
|
*
|
|
@@ -414,7 +358,7 @@ export class Organizations {
|
|
|
414
358
|
* @throws {AppwriteException}
|
|
415
359
|
* @returns {Promise<Models.CreditList>}
|
|
416
360
|
*/
|
|
417
|
-
|
|
361
|
+
listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList> {
|
|
418
362
|
if (typeof organizationId === 'undefined') {
|
|
419
363
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
420
364
|
}
|
|
@@ -426,13 +370,9 @@ export class Organizations {
|
|
|
426
370
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
427
371
|
|
|
428
372
|
const apiHeaders: { [header: string]: string } = {
|
|
429
|
-
'content-type': 'application/json',
|
|
430
373
|
}
|
|
431
374
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
return await this.client.call(
|
|
375
|
+
return this.client.call(
|
|
436
376
|
'get',
|
|
437
377
|
uri,
|
|
438
378
|
apiHeaders,
|
|
@@ -440,8 +380,6 @@ export class Organizations {
|
|
|
440
380
|
);
|
|
441
381
|
}
|
|
442
382
|
/**
|
|
443
|
-
* Add credits from coupon
|
|
444
|
-
*
|
|
445
383
|
* Add credit to an organization using a coupon.
|
|
446
384
|
*
|
|
447
385
|
* @param {string} organizationId
|
|
@@ -449,7 +387,7 @@ export class Organizations {
|
|
|
449
387
|
* @throws {AppwriteException}
|
|
450
388
|
* @returns {Promise<Models.Credit>}
|
|
451
389
|
*/
|
|
452
|
-
|
|
390
|
+
addCredit(organizationId: string, couponId: string): Promise<Models.Credit> {
|
|
453
391
|
if (typeof organizationId === 'undefined') {
|
|
454
392
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
455
393
|
}
|
|
@@ -467,10 +405,7 @@ export class Organizations {
|
|
|
467
405
|
'content-type': 'application/json',
|
|
468
406
|
}
|
|
469
407
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
return await this.client.call(
|
|
408
|
+
return this.client.call(
|
|
474
409
|
'post',
|
|
475
410
|
uri,
|
|
476
411
|
apiHeaders,
|
|
@@ -478,8 +413,6 @@ export class Organizations {
|
|
|
478
413
|
);
|
|
479
414
|
}
|
|
480
415
|
/**
|
|
481
|
-
* Get credit details
|
|
482
|
-
*
|
|
483
416
|
* Get credit details.
|
|
484
417
|
*
|
|
485
418
|
* @param {string} organizationId
|
|
@@ -487,7 +420,7 @@ export class Organizations {
|
|
|
487
420
|
* @throws {AppwriteException}
|
|
488
421
|
* @returns {Promise<Models.Credit>}
|
|
489
422
|
*/
|
|
490
|
-
|
|
423
|
+
getCredit(organizationId: string, creditId: string): Promise<Models.Credit> {
|
|
491
424
|
if (typeof organizationId === 'undefined') {
|
|
492
425
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
493
426
|
}
|
|
@@ -499,13 +432,9 @@ export class Organizations {
|
|
|
499
432
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
500
433
|
|
|
501
434
|
const apiHeaders: { [header: string]: string } = {
|
|
502
|
-
'content-type': 'application/json',
|
|
503
435
|
}
|
|
504
436
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
return await this.client.call(
|
|
437
|
+
return this.client.call(
|
|
509
438
|
'get',
|
|
510
439
|
uri,
|
|
511
440
|
apiHeaders,
|
|
@@ -513,8 +442,6 @@ export class Organizations {
|
|
|
513
442
|
);
|
|
514
443
|
}
|
|
515
444
|
/**
|
|
516
|
-
* List invoices
|
|
517
|
-
*
|
|
518
445
|
* List all invoices for an organization.
|
|
519
446
|
*
|
|
520
447
|
* @param {string} organizationId
|
|
@@ -522,7 +449,7 @@ export class Organizations {
|
|
|
522
449
|
* @throws {AppwriteException}
|
|
523
450
|
* @returns {Promise<Models.InvoiceList>}
|
|
524
451
|
*/
|
|
525
|
-
|
|
452
|
+
listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList> {
|
|
526
453
|
if (typeof organizationId === 'undefined') {
|
|
527
454
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
528
455
|
}
|
|
@@ -534,13 +461,9 @@ export class Organizations {
|
|
|
534
461
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
535
462
|
|
|
536
463
|
const apiHeaders: { [header: string]: string } = {
|
|
537
|
-
'content-type': 'application/json',
|
|
538
464
|
}
|
|
539
465
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
return await this.client.call(
|
|
466
|
+
return this.client.call(
|
|
544
467
|
'get',
|
|
545
468
|
uri,
|
|
546
469
|
apiHeaders,
|
|
@@ -548,8 +471,6 @@ export class Organizations {
|
|
|
548
471
|
);
|
|
549
472
|
}
|
|
550
473
|
/**
|
|
551
|
-
* Get invoice
|
|
552
|
-
*
|
|
553
474
|
* Get an invoice by its unique ID.
|
|
554
475
|
*
|
|
555
476
|
* @param {string} organizationId
|
|
@@ -557,7 +478,7 @@ export class Organizations {
|
|
|
557
478
|
* @throws {AppwriteException}
|
|
558
479
|
* @returns {Promise<Models.Invoice>}
|
|
559
480
|
*/
|
|
560
|
-
|
|
481
|
+
getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice> {
|
|
561
482
|
if (typeof organizationId === 'undefined') {
|
|
562
483
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
563
484
|
}
|
|
@@ -569,13 +490,9 @@ export class Organizations {
|
|
|
569
490
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
570
491
|
|
|
571
492
|
const apiHeaders: { [header: string]: string } = {
|
|
572
|
-
'content-type': 'application/json',
|
|
573
493
|
}
|
|
574
494
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
return await this.client.call(
|
|
495
|
+
return this.client.call(
|
|
579
496
|
'get',
|
|
580
497
|
uri,
|
|
581
498
|
apiHeaders,
|
|
@@ -583,8 +500,6 @@ export class Organizations {
|
|
|
583
500
|
);
|
|
584
501
|
}
|
|
585
502
|
/**
|
|
586
|
-
* Download invoice in PDF
|
|
587
|
-
*
|
|
588
503
|
* Download invoice in PDF
|
|
589
504
|
*
|
|
590
505
|
* @param {string} organizationId
|
|
@@ -592,7 +507,7 @@ export class Organizations {
|
|
|
592
507
|
* @throws {AppwriteException}
|
|
593
508
|
* @returns {Promise<Models.PaymentMethod>}
|
|
594
509
|
*/
|
|
595
|
-
|
|
510
|
+
getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod> {
|
|
596
511
|
if (typeof organizationId === 'undefined') {
|
|
597
512
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
598
513
|
}
|
|
@@ -604,13 +519,9 @@ export class Organizations {
|
|
|
604
519
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
605
520
|
|
|
606
521
|
const apiHeaders: { [header: string]: string } = {
|
|
607
|
-
'content-type': 'application/json',
|
|
608
522
|
}
|
|
609
523
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
return await this.client.call(
|
|
524
|
+
return this.client.call(
|
|
614
525
|
'get',
|
|
615
526
|
uri,
|
|
616
527
|
apiHeaders,
|
|
@@ -618,8 +529,6 @@ export class Organizations {
|
|
|
618
529
|
);
|
|
619
530
|
}
|
|
620
531
|
/**
|
|
621
|
-
* Initiate payment for failed invoice to pay live from console
|
|
622
|
-
*
|
|
623
532
|
* Initiate payment for failed invoice to pay live from console
|
|
624
533
|
*
|
|
625
534
|
* @param {string} organizationId
|
|
@@ -628,7 +537,7 @@ export class Organizations {
|
|
|
628
537
|
* @throws {AppwriteException}
|
|
629
538
|
* @returns {Promise<Models.Invoice>}
|
|
630
539
|
*/
|
|
631
|
-
|
|
540
|
+
createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice> {
|
|
632
541
|
if (typeof organizationId === 'undefined') {
|
|
633
542
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
634
543
|
}
|
|
@@ -649,10 +558,7 @@ export class Organizations {
|
|
|
649
558
|
'content-type': 'application/json',
|
|
650
559
|
}
|
|
651
560
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
return await this.client.call(
|
|
561
|
+
return this.client.call(
|
|
656
562
|
'post',
|
|
657
563
|
uri,
|
|
658
564
|
apiHeaders,
|
|
@@ -660,8 +566,36 @@ export class Organizations {
|
|
|
660
566
|
);
|
|
661
567
|
}
|
|
662
568
|
/**
|
|
663
|
-
*
|
|
569
|
+
* Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
|
|
664
570
|
*
|
|
571
|
+
* @param {string} organizationId
|
|
572
|
+
* @param {string} invoiceId
|
|
573
|
+
* @throws {AppwriteException}
|
|
574
|
+
* @returns {Promise<Models.Invoice>}
|
|
575
|
+
*/
|
|
576
|
+
validateInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice> {
|
|
577
|
+
if (typeof organizationId === 'undefined') {
|
|
578
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
579
|
+
}
|
|
580
|
+
if (typeof invoiceId === 'undefined') {
|
|
581
|
+
throw new AppwriteException('Missing required parameter: "invoiceId"');
|
|
582
|
+
}
|
|
583
|
+
const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/status'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
|
|
584
|
+
const payload: Payload = {};
|
|
585
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
586
|
+
|
|
587
|
+
const apiHeaders: { [header: string]: string } = {
|
|
588
|
+
'content-type': 'application/json',
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
return this.client.call(
|
|
592
|
+
'patch',
|
|
593
|
+
uri,
|
|
594
|
+
apiHeaders,
|
|
595
|
+
payload
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
665
599
|
* View invoice in PDF
|
|
666
600
|
*
|
|
667
601
|
* @param {string} organizationId
|
|
@@ -669,7 +603,7 @@ export class Organizations {
|
|
|
669
603
|
* @throws {AppwriteException}
|
|
670
604
|
* @returns {Promise<Models.PaymentMethod>}
|
|
671
605
|
*/
|
|
672
|
-
|
|
606
|
+
getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod> {
|
|
673
607
|
if (typeof organizationId === 'undefined') {
|
|
674
608
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
675
609
|
}
|
|
@@ -681,13 +615,9 @@ export class Organizations {
|
|
|
681
615
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
682
616
|
|
|
683
617
|
const apiHeaders: { [header: string]: string } = {
|
|
684
|
-
'content-type': 'application/json',
|
|
685
618
|
}
|
|
686
619
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
return await this.client.call(
|
|
620
|
+
return this.client.call(
|
|
691
621
|
'get',
|
|
692
622
|
uri,
|
|
693
623
|
apiHeaders,
|
|
@@ -695,8 +625,6 @@ export class Organizations {
|
|
|
695
625
|
);
|
|
696
626
|
}
|
|
697
627
|
/**
|
|
698
|
-
* Set team's payment method
|
|
699
|
-
*
|
|
700
628
|
* Set a organization's default payment method.
|
|
701
629
|
*
|
|
702
630
|
* @param {string} organizationId
|
|
@@ -704,7 +632,7 @@ export class Organizations {
|
|
|
704
632
|
* @throws {AppwriteException}
|
|
705
633
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
706
634
|
*/
|
|
707
|
-
|
|
635
|
+
setDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>> {
|
|
708
636
|
if (typeof organizationId === 'undefined') {
|
|
709
637
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
710
638
|
}
|
|
@@ -722,10 +650,7 @@ export class Organizations {
|
|
|
722
650
|
'content-type': 'application/json',
|
|
723
651
|
}
|
|
724
652
|
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
return await this.client.call(
|
|
653
|
+
return this.client.call(
|
|
729
654
|
'patch',
|
|
730
655
|
uri,
|
|
731
656
|
apiHeaders,
|
|
@@ -733,15 +658,13 @@ export class Organizations {
|
|
|
733
658
|
);
|
|
734
659
|
}
|
|
735
660
|
/**
|
|
736
|
-
* Delete team's default payment method
|
|
737
|
-
*
|
|
738
661
|
* Delete the default payment method for an organization.
|
|
739
662
|
*
|
|
740
663
|
* @param {string} organizationId
|
|
741
664
|
* @throws {AppwriteException}
|
|
742
665
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
743
666
|
*/
|
|
744
|
-
|
|
667
|
+
deleteDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>> {
|
|
745
668
|
if (typeof organizationId === 'undefined') {
|
|
746
669
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
747
670
|
}
|
|
@@ -753,10 +676,7 @@ export class Organizations {
|
|
|
753
676
|
'content-type': 'application/json',
|
|
754
677
|
}
|
|
755
678
|
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
return await this.client.call(
|
|
679
|
+
return this.client.call(
|
|
760
680
|
'delete',
|
|
761
681
|
uri,
|
|
762
682
|
apiHeaders,
|
|
@@ -764,8 +684,6 @@ export class Organizations {
|
|
|
764
684
|
);
|
|
765
685
|
}
|
|
766
686
|
/**
|
|
767
|
-
* Set team's backup payment method
|
|
768
|
-
*
|
|
769
687
|
* Set an organization's backup payment method.
|
|
770
688
|
|
|
771
689
|
*
|
|
@@ -774,7 +692,7 @@ export class Organizations {
|
|
|
774
692
|
* @throws {AppwriteException}
|
|
775
693
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
776
694
|
*/
|
|
777
|
-
|
|
695
|
+
setBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>> {
|
|
778
696
|
if (typeof organizationId === 'undefined') {
|
|
779
697
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
780
698
|
}
|
|
@@ -792,10 +710,7 @@ export class Organizations {
|
|
|
792
710
|
'content-type': 'application/json',
|
|
793
711
|
}
|
|
794
712
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
return await this.client.call(
|
|
713
|
+
return this.client.call(
|
|
799
714
|
'patch',
|
|
800
715
|
uri,
|
|
801
716
|
apiHeaders,
|
|
@@ -803,15 +718,13 @@ export class Organizations {
|
|
|
803
718
|
);
|
|
804
719
|
}
|
|
805
720
|
/**
|
|
806
|
-
* Delete team's backup payment method
|
|
807
|
-
*
|
|
808
721
|
* Delete a backup payment method for an organization.
|
|
809
722
|
*
|
|
810
723
|
* @param {string} organizationId
|
|
811
724
|
* @throws {AppwriteException}
|
|
812
725
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
813
726
|
*/
|
|
814
|
-
|
|
727
|
+
deleteBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>> {
|
|
815
728
|
if (typeof organizationId === 'undefined') {
|
|
816
729
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
817
730
|
}
|
|
@@ -823,10 +736,7 @@ export class Organizations {
|
|
|
823
736
|
'content-type': 'application/json',
|
|
824
737
|
}
|
|
825
738
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
return await this.client.call(
|
|
739
|
+
return this.client.call(
|
|
830
740
|
'delete',
|
|
831
741
|
uri,
|
|
832
742
|
apiHeaders,
|
|
@@ -834,8 +744,6 @@ export class Organizations {
|
|
|
834
744
|
);
|
|
835
745
|
}
|
|
836
746
|
/**
|
|
837
|
-
* Get payment method
|
|
838
|
-
*
|
|
839
747
|
* Get an organization's payment method using it's payment method ID.
|
|
840
748
|
*
|
|
841
749
|
* @param {string} organizationId
|
|
@@ -843,7 +751,7 @@ export class Organizations {
|
|
|
843
751
|
* @throws {AppwriteException}
|
|
844
752
|
* @returns {Promise<Models.PaymentMethod>}
|
|
845
753
|
*/
|
|
846
|
-
|
|
754
|
+
getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod> {
|
|
847
755
|
if (typeof organizationId === 'undefined') {
|
|
848
756
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
849
757
|
}
|
|
@@ -855,13 +763,9 @@ export class Organizations {
|
|
|
855
763
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
856
764
|
|
|
857
765
|
const apiHeaders: { [header: string]: string } = {
|
|
858
|
-
'content-type': 'application/json',
|
|
859
766
|
}
|
|
860
767
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
return await this.client.call(
|
|
768
|
+
return this.client.call(
|
|
865
769
|
'get',
|
|
866
770
|
uri,
|
|
867
771
|
apiHeaders,
|
|
@@ -869,15 +773,13 @@ export class Organizations {
|
|
|
869
773
|
);
|
|
870
774
|
}
|
|
871
775
|
/**
|
|
872
|
-
* Get organization billing plan details
|
|
873
|
-
*
|
|
874
776
|
* Get the details of the current billing plan for an organization.
|
|
875
777
|
*
|
|
876
778
|
* @param {string} organizationId
|
|
877
779
|
* @throws {AppwriteException}
|
|
878
780
|
* @returns {Promise<Models.BillingPlan>}
|
|
879
781
|
*/
|
|
880
|
-
|
|
782
|
+
getPlan(organizationId: string): Promise<Models.BillingPlan> {
|
|
881
783
|
if (typeof organizationId === 'undefined') {
|
|
882
784
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
883
785
|
}
|
|
@@ -886,13 +788,9 @@ export class Organizations {
|
|
|
886
788
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
887
789
|
|
|
888
790
|
const apiHeaders: { [header: string]: string } = {
|
|
889
|
-
'content-type': 'application/json',
|
|
890
791
|
}
|
|
891
792
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
return await this.client.call(
|
|
793
|
+
return this.client.call(
|
|
896
794
|
'get',
|
|
897
795
|
uri,
|
|
898
796
|
apiHeaders,
|
|
@@ -900,8 +798,6 @@ export class Organizations {
|
|
|
900
798
|
);
|
|
901
799
|
}
|
|
902
800
|
/**
|
|
903
|
-
* Update organization billing plan
|
|
904
|
-
*
|
|
905
801
|
* Update the billing plan for an organization.
|
|
906
802
|
*
|
|
907
803
|
* @param {string} organizationId
|
|
@@ -915,7 +811,7 @@ export class Organizations {
|
|
|
915
811
|
* @throws {AppwriteException}
|
|
916
812
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
917
813
|
*/
|
|
918
|
-
|
|
814
|
+
updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>> {
|
|
919
815
|
if (typeof organizationId === 'undefined') {
|
|
920
816
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
921
817
|
}
|
|
@@ -951,10 +847,7 @@ export class Organizations {
|
|
|
951
847
|
'content-type': 'application/json',
|
|
952
848
|
}
|
|
953
849
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
return await this.client.call(
|
|
850
|
+
return this.client.call(
|
|
958
851
|
'patch',
|
|
959
852
|
uri,
|
|
960
853
|
apiHeaders,
|
|
@@ -962,15 +855,13 @@ export class Organizations {
|
|
|
962
855
|
);
|
|
963
856
|
}
|
|
964
857
|
/**
|
|
965
|
-
* Get Scopes
|
|
966
|
-
*
|
|
967
858
|
* Get Scopes
|
|
968
859
|
*
|
|
969
860
|
* @param {string} organizationId
|
|
970
861
|
* @throws {AppwriteException}
|
|
971
862
|
* @returns {Promise<Models.Roles>}
|
|
972
863
|
*/
|
|
973
|
-
|
|
864
|
+
getScopes(organizationId: string): Promise<Models.Roles> {
|
|
974
865
|
if (typeof organizationId === 'undefined') {
|
|
975
866
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
976
867
|
}
|
|
@@ -979,13 +870,9 @@ export class Organizations {
|
|
|
979
870
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
980
871
|
|
|
981
872
|
const apiHeaders: { [header: string]: string } = {
|
|
982
|
-
'content-type': 'application/json',
|
|
983
873
|
}
|
|
984
874
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
return await this.client.call(
|
|
875
|
+
return this.client.call(
|
|
989
876
|
'get',
|
|
990
877
|
uri,
|
|
991
878
|
apiHeaders,
|
|
@@ -993,8 +880,6 @@ export class Organizations {
|
|
|
993
880
|
);
|
|
994
881
|
}
|
|
995
882
|
/**
|
|
996
|
-
* Set team's tax Id
|
|
997
|
-
*
|
|
998
883
|
* Set an organization's billing tax ID.
|
|
999
884
|
*
|
|
1000
885
|
* @param {string} organizationId
|
|
@@ -1002,7 +887,7 @@ export class Organizations {
|
|
|
1002
887
|
* @throws {AppwriteException}
|
|
1003
888
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
1004
889
|
*/
|
|
1005
|
-
|
|
890
|
+
setBillingTaxId<Preferences extends Models.Preferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>> {
|
|
1006
891
|
if (typeof organizationId === 'undefined') {
|
|
1007
892
|
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1008
893
|
}
|
|
@@ -1020,53 +905,11 @@ export class Organizations {
|
|
|
1020
905
|
'content-type': 'application/json',
|
|
1021
906
|
}
|
|
1022
907
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
return await this.client.call(
|
|
908
|
+
return this.client.call(
|
|
1027
909
|
'patch',
|
|
1028
910
|
uri,
|
|
1029
911
|
apiHeaders,
|
|
1030
912
|
payload
|
|
1031
913
|
);
|
|
1032
914
|
}
|
|
1033
|
-
/**
|
|
1034
|
-
* Get team's usage data
|
|
1035
|
-
*
|
|
1036
|
-
* Get the usage data for an organization.
|
|
1037
|
-
*
|
|
1038
|
-
* @param {string} organizationId
|
|
1039
|
-
* @param {string} startDate
|
|
1040
|
-
* @param {string} endDate
|
|
1041
|
-
* @throws {AppwriteException}
|
|
1042
|
-
* @returns {Promise<Models.UsageOrganization>}
|
|
1043
|
-
*/
|
|
1044
|
-
async getUsage(organizationId: string, startDate?: string, endDate?: string): Promise<Models.UsageOrganization> {
|
|
1045
|
-
if (typeof organizationId === 'undefined') {
|
|
1046
|
-
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
1047
|
-
}
|
|
1048
|
-
const apiPath = '/organizations/{organizationId}/usage'.replace('{organizationId}', organizationId);
|
|
1049
|
-
const payload: Payload = {};
|
|
1050
|
-
if (typeof startDate !== 'undefined') {
|
|
1051
|
-
payload['startDate'] = startDate;
|
|
1052
|
-
}
|
|
1053
|
-
if (typeof endDate !== 'undefined') {
|
|
1054
|
-
payload['endDate'] = endDate;
|
|
1055
|
-
}
|
|
1056
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1057
|
-
|
|
1058
|
-
const apiHeaders: { [header: string]: string } = {
|
|
1059
|
-
'content-type': 'application/json',
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
payload['project'] = this.client.config.project;
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
return await this.client.call(
|
|
1066
|
-
'get',
|
|
1067
|
-
uri,
|
|
1068
|
-
apiHeaders,
|
|
1069
|
-
payload
|
|
1070
|
-
);
|
|
1071
|
-
}
|
|
1072
915
|
}
|