import { Client } from '../client'; import type { Models } from '../models'; import { Platform } from '../enums/platform'; import { Addon } from '../enums/addon'; import { Scopes } from '../enums/scopes'; export declare class Organizations { client: Client; constructor(client: Client); /** * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. * * @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 * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. * @throws {AppwriteException} * @returns {Promise>} */ list(params?: { queries?: string[]; search?: string; }): Promise>; /** * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. * * @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 * @param {string} search - Search term to filter your list results. Max length: 256 chars. * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ list(queries?: string[], search?: string): Promise>; /** * Create a new organization. * * * @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. * @param {string} params.name - Organization name. Max length: 128 chars. * @param {string} params.billingPlan - Organization billing plan chosen * @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. * @param {string} params.billingAddressId - Unique ID of billing address * @param {string[]} params.invites - Additional member invites * @param {string} params.couponId - Coupon id * @param {string} params.taxId - Tax Id associated to billing. * @param {number} params.budget - Budget limit for additional usage set for the organization * @param {Platform} params.platform - Platform type * @throws {AppwriteException} * @returns {Promise | Models.PaymentAuthentication>} */ create(params: { organizationId: string; name: string; billingPlan: string; paymentMethodId?: string; billingAddressId?: string; invites?: string[]; couponId?: string; taxId?: string; budget?: number; platform?: Platform; }): Promise | Models.PaymentAuthentication>; /** * Create a new organization. * * * @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. * @param {string} name - Organization name. Max length: 128 chars. * @param {string} billingPlan - Organization billing plan chosen * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set. * @param {string} billingAddressId - Unique ID of billing address * @param {string[]} invites - Additional member invites * @param {string} couponId - Coupon id * @param {string} taxId - Tax Id associated to billing. * @param {number} budget - Budget limit for additional usage set for the organization * @param {Platform} platform - Platform type * @throws {AppwriteException} * @returns {Promise | Models.PaymentAuthentication>} * @deprecated Use the object parameter style method for a better developer experience. */ create(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise | Models.PaymentAuthentication>; /** * Get estimation for creating an organization. * * @param {string} params.billingPlan - Organization billing plan chosen * @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. * @param {string[]} params.invites - Additional member invites * @param {string} params.couponId - Coupon id * @param {Platform} params.platform - Platform type * @throws {AppwriteException} * @returns {Promise} */ estimationCreateOrganization(params: { billingPlan: string; paymentMethodId?: string; invites?: string[]; couponId?: string; platform?: Platform; }): Promise; /** * Get estimation for creating an organization. * * @param {string} billingPlan - Organization billing plan chosen * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set. * @param {string[]} invites - Additional member invites * @param {string} couponId - Coupon id * @param {Platform} platform - Platform type * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ estimationCreateOrganization(billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise; /** * Delete an organization. * * @param {string} params.organizationId - Team ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ delete(params: { organizationId: string; }): Promise<{}>; /** * Delete an organization. * * @param {string} organizationId - Team ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ delete(organizationId: string): Promise<{}>; /** * List all billing addons for an organization. * * * @param {string} params.organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise} */ listAddons(params: { organizationId: string; }): Promise; /** * List all billing addons for an organization. * * * @param {string} organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ listAddons(organizationId: string): Promise; /** * Create the BAA billing addon for an organization. * * * @param {string} params.organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise} */ createBaaAddon(params: { organizationId: string; }): Promise; /** * Create the BAA billing addon for an organization. * * * @param {string} organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createBaaAddon(organizationId: string): Promise; /** * Get the details of a billing addon for an organization. * * * @param {string} params.organizationId - Organization ID * @param {string} params.addonId - Addon ID * @throws {AppwriteException} * @returns {Promise} */ getAddon(params: { organizationId: string; addonId: string; }): Promise; /** * Get the details of a billing addon for an organization. * * * @param {string} organizationId - Organization ID * @param {string} addonId - Addon ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getAddon(organizationId: string, addonId: string): Promise; /** * Delete a billing addon for an organization. * * * @param {string} params.organizationId - Organization ID * @param {string} params.addonId - Addon ID * @throws {AppwriteException} * @returns {Promise<{}>} */ deleteAddon(params: { organizationId: string; addonId: string; }): Promise<{}>; /** * Delete a billing addon for an organization. * * * @param {string} organizationId - Organization ID * @param {string} addonId - Addon ID * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteAddon(organizationId: string, addonId: string): Promise<{}>; /** * Confirm payment for a billing addon for an organization. * * * @param {string} params.organizationId - Organization ID * @param {string} params.addonId - Addon ID * @throws {AppwriteException} * @returns {Promise} */ confirmAddonPayment(params: { organizationId: string; addonId: string; }): Promise; /** * Confirm payment for a billing addon for an organization. * * * @param {string} organizationId - Organization ID * @param {string} addonId - Addon ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ confirmAddonPayment(organizationId: string, addonId: string): Promise; /** * Get the price details for a billing addon for an organization. * * * @param {string} params.organizationId - Organization ID * @param {Addon} params.addon - Addon key identifier (e.g. baa). * @throws {AppwriteException} * @returns {Promise} */ getAddonPrice(params: { organizationId: string; addon: Addon; }): Promise; /** * Get the price details for a billing addon for an organization. * * * @param {string} organizationId - Organization ID * @param {Addon} addon - Addon key identifier (e.g. baa). * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getAddonPrice(organizationId: string, addon: Addon): Promise; /** * Get a list of all aggregations for an organization. * * @param {string} params.organizationId - Organization ID * @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 * @throws {AppwriteException} * @returns {Promise} */ listAggregations(params: { organizationId: string; queries?: string[]; }): Promise; /** * Get a list of all aggregations for an organization. * * @param {string} organizationId - Organization ID * @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 * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ listAggregations(organizationId: string, queries?: string[]): Promise; /** * Get a specific aggregation using it's aggregation ID. * * @param {string} params.organizationId - Organization ID * @param {string} params.aggregationId - Invoice unique ID * @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. * @param {number} params.offset - Offset value. The default value is 0. Use this param to manage pagination. * @throws {AppwriteException} * @returns {Promise} */ getAggregation(params: { organizationId: string; aggregationId: string; limit?: number; offset?: number; }): Promise; /** * Get a specific aggregation using it's aggregation ID. * * @param {string} organizationId - Organization ID * @param {string} aggregationId - Invoice unique ID * @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. * @param {number} offset - Offset value. The default value is 0. Use this param to manage pagination. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getAggregation(organizationId: string, aggregationId: string, limit?: number, offset?: number): Promise; /** * Set a billing address for an organization. * * @param {string} params.organizationId - Organization ID * @param {string} params.billingAddressId - Unique ID of billing address * @throws {AppwriteException} * @returns {Promise>} */ setBillingAddress(params: { organizationId: string; billingAddressId: string; }): Promise>; /** * Set a billing address for an organization. * * @param {string} organizationId - Organization ID * @param {string} billingAddressId - Unique ID of billing address * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ setBillingAddress(organizationId: string, billingAddressId: string): Promise>; /** * Delete a team's billing address. * * @param {string} params.organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise<{}>} */ deleteBillingAddress(params: { organizationId: string; }): Promise<{}>; /** * Delete a team's billing address. * * @param {string} organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteBillingAddress(organizationId: string): Promise<{}>; /** * Get a billing address using it's ID. * * @param {string} params.organizationId - Organization ID * @param {string} params.billingAddressId - Unique ID of billing address * @throws {AppwriteException} * @returns {Promise} */ getBillingAddress(params: { organizationId: string; billingAddressId: string; }): Promise; /** * Get a billing address using it's ID. * * @param {string} organizationId - Organization ID * @param {string} billingAddressId - Unique ID of billing address * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getBillingAddress(organizationId: string, billingAddressId: string): Promise; /** * Set the current billing email for the organization. * * @param {string} params.organizationId - Organization ID * @param {string} params.billingEmail - Billing email for the organization. * @throws {AppwriteException} * @returns {Promise>} */ setBillingEmail(params: { organizationId: string; billingEmail: string; }): Promise>; /** * Set the current billing email for the organization. * * @param {string} organizationId - Organization ID * @param {string} billingEmail - Billing email for the organization. * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ setBillingEmail(organizationId: string, billingEmail: string): Promise>; /** * Update the budget limit for an organization. * * @param {string} params.organizationId - Organization Unique ID * @param {number} params.budget - Budget limit for additional usage set for the organization * @param {number[]} params.alerts - Budget alert limit percentage * @throws {AppwriteException} * @returns {Promise>} */ updateBudget(params: { organizationId: string; budget?: number; alerts?: number[]; }): Promise>; /** * Update the budget limit for an organization. * * @param {string} organizationId - Organization Unique ID * @param {number} budget - Budget limit for additional usage set for the organization * @param {number[]} alerts - Budget alert limit percentage * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ updateBudget(organizationId: string, budget?: number, alerts?: number[]): Promise>; /** * List all credits for an organization. * * * @param {string} params.organizationId - Organization ID * @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 * @throws {AppwriteException} * @returns {Promise} */ listCredits(params: { organizationId: string; queries?: string[]; }): Promise; /** * List all credits for an organization. * * * @param {string} organizationId - Organization ID * @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 * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ listCredits(organizationId: string, queries?: string[]): Promise; /** * Add credit to an organization using a coupon. * * @param {string} params.organizationId - Organization ID * @param {string} params.couponId - ID of the coupon * @throws {AppwriteException} * @returns {Promise} */ addCredit(params: { organizationId: string; couponId: string; }): Promise; /** * Add credit to an organization using a coupon. * * @param {string} organizationId - Organization ID * @param {string} couponId - ID of the coupon * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ addCredit(organizationId: string, couponId: string): Promise; /** * Get total available valid credits for an organization. * * @param {string} params.organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise} */ getAvailableCredits(params: { organizationId: string; }): Promise; /** * Get total available valid credits for an organization. * * @param {string} organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getAvailableCredits(organizationId: string): Promise; /** * Get credit details. * * @param {string} params.organizationId - Organization ID * @param {string} params.creditId - Credit Unique ID * @throws {AppwriteException} * @returns {Promise} */ getCredit(params: { organizationId: string; creditId: string; }): Promise; /** * Get credit details. * * @param {string} organizationId - Organization ID * @param {string} creditId - Credit Unique ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getCredit(organizationId: string, creditId: string): Promise; /** * Get estimation for deleting an organization. * * @param {string} params.organizationId - Team ID. * @throws {AppwriteException} * @returns {Promise} */ estimationDeleteOrganization(params: { organizationId: string; }): Promise; /** * Get estimation for deleting an organization. * * @param {string} organizationId - Team ID. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ estimationDeleteOrganization(organizationId: string): Promise; /** * Get estimation for updating the organization plan. * * @param {string} params.organizationId - Organization ID * @param {string} params.billingPlan - Organization billing plan chosen * @param {string[]} params.invites - Additional member invites * @param {string} params.couponId - Coupon id * @throws {AppwriteException} * @returns {Promise} */ estimationUpdatePlan(params: { organizationId: string; billingPlan: string; invites?: string[]; couponId?: string; }): Promise; /** * Get estimation for updating the organization plan. * * @param {string} organizationId - Organization ID * @param {string} billingPlan - Organization billing plan chosen * @param {string[]} invites - Additional member invites * @param {string} couponId - Coupon id * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ estimationUpdatePlan(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise; /** * Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform. * * * @param {string} params.organizationId - Organization Unique ID * @param {string} params.reason - Feedback reason * @param {string} params.message - Feedback message * @param {string} params.fromPlanId - Plan downgrading from * @param {string} params.toPlanId - Plan downgrading to * @throws {AppwriteException} * @returns {Promise} */ createDowngradeFeedback(params: { organizationId: string; reason: string; message: string; fromPlanId: string; toPlanId: string; }): Promise; /** * Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform. * * * @param {string} organizationId - Organization Unique ID * @param {string} reason - Feedback reason * @param {string} message - Feedback message * @param {string} fromPlanId - Plan downgrading from * @param {string} toPlanId - Plan downgrading to * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createDowngradeFeedback(organizationId: string, reason: string, message: string, fromPlanId: string, toPlanId: string): Promise; /** * List all invoices for an organization. * * @param {string} params.organizationId - Organization ID * @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 * @throws {AppwriteException} * @returns {Promise} */ listInvoices(params: { organizationId: string; queries?: string[]; }): Promise; /** * List all invoices for an organization. * * @param {string} organizationId - Organization ID * @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 * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ listInvoices(organizationId: string, queries?: string[]): Promise; /** * Get an invoice by its unique ID. * * @param {string} params.organizationId - Organization ID * @param {string} params.invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} */ getInvoice(params: { organizationId: string; invoiceId: string; }): Promise; /** * Get an invoice by its unique ID. * * @param {string} organizationId - Organization ID * @param {string} invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getInvoice(organizationId: string, invoiceId: string): Promise; /** * Download invoice in PDF * * @param {string} params.organizationId - Organization ID * @param {string} params.invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} */ getInvoiceDownload(params: { organizationId: string; invoiceId: string; }): Promise; /** * Download invoice in PDF * * @param {string} organizationId - Organization ID * @param {string} invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getInvoiceDownload(organizationId: string, invoiceId: string): Promise; /** * Initiate payment for failed invoice to pay live from console * * @param {string} params.organizationId - Organization ID * @param {string} params.invoiceId - Invoice unique ID * @param {string} params.paymentMethodId - Payment method ID * @throws {AppwriteException} * @returns {Promise} */ createInvoicePayment(params: { organizationId: string; invoiceId: string; paymentMethodId: string; }): Promise; /** * Initiate payment for failed invoice to pay live from console * * @param {string} organizationId - Organization ID * @param {string} invoiceId - Invoice unique ID * @param {string} paymentMethodId - Payment method ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise; /** * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed. * * @param {string} params.organizationId - Organization ID * @param {string} params.invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} */ validateInvoice(params: { organizationId: string; invoiceId: string; }): Promise; /** * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed. * * @param {string} organizationId - Organization ID * @param {string} invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ validateInvoice(organizationId: string, invoiceId: string): Promise; /** * View invoice in PDF * * @param {string} params.organizationId - Organization ID * @param {string} params.invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} */ getInvoiceView(params: { organizationId: string; invoiceId: string; }): Promise; /** * View invoice in PDF * * @param {string} organizationId - Organization ID * @param {string} invoiceId - Invoice unique ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getInvoiceView(organizationId: string, invoiceId: string): Promise; /** * Get a list of all API keys from the current organization. * * @param {string} params.organizationId - Organization Unique ID * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listKeys(params: { organizationId: string; total?: boolean; }): Promise; /** * Get a list of all API keys from the current organization. * * @param {string} organizationId - Organization Unique ID * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ listKeys(organizationId: string, total?: boolean): Promise; /** * Create a new organization API key. * * @param {string} params.organizationId - Organization Unique ID * @param {string} params.name - Key name. Max length: 128 chars. * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed. * @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. * @throws {AppwriteException} * @returns {Promise} */ createKey(params: { organizationId: string; name: string; scopes: Scopes[]; expire?: string; }): Promise; /** * Create a new organization API key. * * @param {string} organizationId - Organization Unique ID * @param {string} name - Key name. Max length: 128 chars. * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed. * @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. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createKey(organizationId: string, name: string, scopes: Scopes[], expire?: string): Promise; /** * Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes. * * @param {string} params.organizationId - Organization Unique ID * @param {string} params.keyId - Key unique ID. * @throws {AppwriteException} * @returns {Promise} */ getKey(params: { organizationId: string; keyId: string; }): Promise; /** * Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes. * * @param {string} organizationId - Organization Unique ID * @param {string} keyId - Key unique ID. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getKey(organizationId: string, keyId: string): Promise; /** * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. * * @param {string} params.organizationId - Organization Unique ID * @param {string} params.keyId - Key unique ID. * @param {string} params.name - Key name. Max length: 128 chars. * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed. * @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. * @throws {AppwriteException} * @returns {Promise} */ updateKey(params: { organizationId: string; keyId: string; name: string; scopes: Scopes[]; expire?: string; }): Promise; /** * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. * * @param {string} organizationId - Organization Unique ID * @param {string} keyId - Key unique ID. * @param {string} name - Key name. Max length: 128 chars. * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed. * @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. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ updateKey(organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string): Promise; /** * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. * * @param {string} params.organizationId - Organization Unique ID * @param {string} params.keyId - Key unique ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ deleteKey(params: { organizationId: string; keyId: string; }): Promise<{}>; /** * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. * * @param {string} organizationId - Organization Unique ID * @param {string} keyId - Key unique ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteKey(organizationId: string, keyId: string): Promise<{}>; /** * Set a organization's default payment method. * * @param {string} params.organizationId - Organization ID * @param {string} params.paymentMethodId - Unique ID of payment method * @throws {AppwriteException} * @returns {Promise>} */ setDefaultPaymentMethod(params: { organizationId: string; paymentMethodId: string; }): Promise>; /** * Set a organization's default payment method. * * @param {string} organizationId - Organization ID * @param {string} paymentMethodId - Unique ID of payment method * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ setDefaultPaymentMethod(organizationId: string, paymentMethodId: string): Promise>; /** * Delete the default payment method for an organization. * * @param {string} params.organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise>} */ deleteDefaultPaymentMethod(params: { organizationId: string; }): Promise>; /** * Delete the default payment method for an organization. * * @param {string} organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteDefaultPaymentMethod(organizationId: string): Promise>; /** * Set an organization's backup payment method. * * * @param {string} params.organizationId - Organization ID * @param {string} params.paymentMethodId - Unique ID of payment method * @throws {AppwriteException} * @returns {Promise>} */ setBackupPaymentMethod(params: { organizationId: string; paymentMethodId: string; }): Promise>; /** * Set an organization's backup payment method. * * * @param {string} organizationId - Organization ID * @param {string} paymentMethodId - Unique ID of payment method * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ setBackupPaymentMethod(organizationId: string, paymentMethodId: string): Promise>; /** * Delete a backup payment method for an organization. * * @param {string} params.organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise>} */ deleteBackupPaymentMethod(params: { organizationId: string; }): Promise>; /** * Delete a backup payment method for an organization. * * @param {string} organizationId - Organization ID * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteBackupPaymentMethod(organizationId: string): Promise>; /** * Get an organization's payment method using it's payment method ID. * * @param {string} params.organizationId - Organization ID * @param {string} params.paymentMethodId - Unique ID of payment method * @throws {AppwriteException} * @returns {Promise} */ getPaymentMethod(params: { organizationId: string; paymentMethodId: string; }): Promise; /** * Get an organization's payment method using it's payment method ID. * * @param {string} organizationId - Organization ID * @param {string} paymentMethodId - Unique ID of payment method * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getPaymentMethod(organizationId: string, paymentMethodId: string): Promise; /** * Get the details of the current billing plan for an organization. * * @param {string} params.organizationId - Organization Unique ID * @throws {AppwriteException} * @returns {Promise} */ getPlan(params: { organizationId: string; }): Promise; /** * Get the details of the current billing plan for an organization. * * @param {string} organizationId - Organization Unique ID * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getPlan(organizationId: string): Promise; /** * Update the billing plan for an organization. * * @param {string} params.organizationId - Organization Unique ID * @param {string} params.billingPlan - Organization billing plan chosen * @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. * @param {string} params.billingAddressId - Unique ID of billing address * @param {string[]} params.invites - Additional member invites * @param {string} params.couponId - Coupon id * @param {string} params.taxId - Tax Id associated to billing. * @param {number} params.budget - Budget limit for additional usage set for the organization * @throws {AppwriteException} * @returns {Promise>} */ updatePlan(params: { organizationId: string; billingPlan: string; paymentMethodId?: string; billingAddressId?: string; invites?: string[]; couponId?: string; taxId?: string; budget?: number; }): Promise>; /** * Update the billing plan for an organization. * * @param {string} organizationId - Organization Unique ID * @param {string} billingPlan - Organization billing plan chosen * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set. * @param {string} billingAddressId - Unique ID of billing address * @param {string[]} invites - Additional member invites * @param {string} couponId - Coupon id * @param {string} taxId - Tax Id associated to billing. * @param {number} budget - Budget limit for additional usage set for the organization * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ updatePlan(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise>; /** * Cancel the downgrade initiated for an organization. * * @param {string} params.organizationId - Organization Unique ID * @throws {AppwriteException} * @returns {Promise>} */ cancelDowngrade(params: { organizationId: string; }): Promise>; /** * Cancel the downgrade initiated for an organization. * * @param {string} organizationId - Organization Unique ID * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ cancelDowngrade(organizationId: string): Promise>; /** * Get all available regions for an organization. * * @param {string} params.organizationId - Team ID. * @throws {AppwriteException} * @returns {Promise} */ listRegions(params: { organizationId: string; }): Promise; /** * Get all available regions for an organization. * * @param {string} organizationId - Team ID. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ listRegions(organizationId: string): Promise; /** * Get Scopes * * @param {string} params.organizationId - Organization id * @param {string} params.projectId - Project id * @throws {AppwriteException} * @returns {Promise} */ getScopes(params: { organizationId: string; projectId?: string; }): Promise; /** * Get Scopes * * @param {string} organizationId - Organization id * @param {string} projectId - Project id * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getScopes(organizationId: string, projectId?: string): Promise; /** * Set an organization's billing tax ID. * * @param {string} params.organizationId - Organization ID * @param {string} params.taxId - Tax Id associated to billing. * @throws {AppwriteException} * @returns {Promise>} */ setBillingTaxId(params: { organizationId: string; taxId?: string; }): Promise>; /** * Set an organization's billing tax ID. * * @param {string} organizationId - Organization ID * @param {string} taxId - Tax Id associated to billing. * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ setBillingTaxId(organizationId: string, taxId?: string): Promise>; /** * Get the usage data for an organization. * * @param {string} params.organizationId - Organization ID * @param {string} params.startDate - Starting date for the usage * @param {string} params.endDate - End date for the usage * @throws {AppwriteException} * @returns {Promise} */ getUsage(params: { organizationId: string; startDate?: string; endDate?: string; }): Promise; /** * Get the usage data for an organization. * * @param {string} organizationId - Organization ID * @param {string} startDate - Starting date for the usage * @param {string} endDate - End date for the usage * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getUsage(organizationId: string, startDate?: string, endDate?: string): Promise; /** * Validate payment for team after creation or upgrade. * * @param {string} params.organizationId - Organization ID * @param {string[]} params.invites - Additional member invites * @throws {AppwriteException} * @returns {Promise>} */ validatePayment(params: { organizationId: string; invites?: string[]; }): Promise>; /** * Validate payment for team after creation or upgrade. * * @param {string} organizationId - Organization ID * @param {string[]} invites - Additional member invites * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. */ validatePayment(organizationId: string, invites?: string[]): Promise>; }