import { Client } from '../client.js'; import { Models } from '../models.js'; import { InvalidationType } from '../enums/invalidation-type.js'; import { StatusCode } from '../enums/status-code.js'; import { ProxyResourceType } from '../enums/proxy-resource-type.js'; import 'undici'; import '../query.js'; import '../enums/database-type.js'; import '../enums/attribute-status.js'; import '../enums/column-status.js'; import '../enums/index-status.js'; import '../enums/deployment-status.js'; import '../enums/execution-resource-type.js'; import '../enums/execution-trigger.js'; import '../enums/execution-status.js'; import '../enums/project-auth-method-id.js'; import '../enums/project-service-id.js'; import '../enums/project-protocol-id.js'; import '../enums/o-auth-2-google-prompt.js'; import '../enums/o-auth-2-oidc-prompt.js'; import '../enums/platform-type.js'; import '../enums/proxy-rule-deployment-resource-type.js'; import '../enums/proxy-rule-status.js'; import '../enums/message-status.js'; import '../enums/billing-plan-group.js'; declare class Proxy { client: Client; constructor(client: Client); /** * Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content. * * Depending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain. * * @param {string} params.domain - Domain name. * @param {InvalidationType} params.type - Type of reference passed. Allowed values are: tag, path, all * @param {string} params.reference - Reference to invalidate. Depending on type this can be: cache tag name (up to 128 characters), URL path (up to 2048 characters). Not required when type is all. * @throws {AppwriteException} * @returns {Promise} */ createInvalidation(params: { domain: string; type: InvalidationType; reference?: string; }): Promise; /** * Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content. * * Depending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain. * * @param {string} domain - Domain name. * @param {InvalidationType} type - Type of reference passed. Allowed values are: tag, path, all * @param {string} reference - Reference to invalidate. Depending on type this can be: cache tag name (up to 128 characters), URL path (up to 2048 characters). Not required when type is all. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createInvalidation(domain: string, type: InvalidationType, reference?: string): Promise; /** * Get a list of all the proxy rules. You can use the query params 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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listRules(params?: { queries?: string[]; total?: boolean; }): Promise; /** * Get a list of all the proxy rules. You can use the query params 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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch * @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. */ listRules(queries?: string[], total?: boolean): Promise; /** * Create a new proxy rule for serving Appwrite's API on custom domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} params.domain - Domain name. * @throws {AppwriteException} * @returns {Promise} */ createAPIRule(params: { domain: string; }): Promise; /** * Create a new proxy rule for serving Appwrite's API on custom domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} domain - Domain name. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createAPIRule(domain: string): Promise; /** * Create a new proxy rule for executing Appwrite Function on custom domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} params.domain - Domain name. * @param {string} params.functionId - ID of function to be executed. * @param {string} params.branch - Name of VCS branch to deploy changes automatically * @throws {AppwriteException} * @returns {Promise} */ createFunctionRule(params: { domain: string; functionId: string; branch?: string; }): Promise; /** * Create a new proxy rule for executing Appwrite Function on custom domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} domain - Domain name. * @param {string} functionId - ID of function to be executed. * @param {string} branch - Name of VCS branch to deploy changes automatically * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createFunctionRule(domain: string, functionId: string, branch?: string): Promise; /** * Create a new proxy rule for to redirect from custom domain to another domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} params.domain - Domain name. * @param {string} params.url - Target URL of redirection * @param {StatusCode} params.statusCode - Status code of redirection * @param {string} params.resourceId - ID of parent resource. * @param {ProxyResourceType} params.resourceType - Type of parent resource. * @throws {AppwriteException} * @returns {Promise} */ createRedirectRule(params: { domain: string; url: string; statusCode: StatusCode; resourceId: string; resourceType: ProxyResourceType; }): Promise; /** * Create a new proxy rule for to redirect from custom domain to another domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} domain - Domain name. * @param {string} url - Target URL of redirection * @param {StatusCode} statusCode - Status code of redirection * @param {string} resourceId - ID of parent resource. * @param {ProxyResourceType} resourceType - Type of parent resource. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createRedirectRule(domain: string, url: string, statusCode: StatusCode, resourceId: string, resourceType: ProxyResourceType): Promise; /** * Create a new proxy rule for serving Appwrite Site on custom domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} params.domain - Domain name. * @param {string} params.siteId - ID of site to be executed. * @param {string} params.branch - Name of VCS branch to deploy changes automatically * @throws {AppwriteException} * @returns {Promise} */ createSiteRule(params: { domain: string; siteId: string; branch?: string; }): Promise; /** * Create a new proxy rule for serving Appwrite Site on custom domain. * * Rule ID is automatically generated as MD5 hash of a rule domain for performance purposes. * * @param {string} domain - Domain name. * @param {string} siteId - ID of site to be executed. * @param {string} branch - Name of VCS branch to deploy changes automatically * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createSiteRule(domain: string, siteId: string, branch?: string): Promise; /** * Get a proxy rule by its unique ID. * * @param {string} params.ruleId - Rule ID. * @throws {AppwriteException} * @returns {Promise} */ getRule(params: { ruleId: string; }): Promise; /** * Get a proxy rule by its unique ID. * * @param {string} ruleId - Rule ID. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ getRule(ruleId: string): Promise; /** * Delete a proxy rule by its unique ID. * * @param {string} params.ruleId - Rule ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ deleteRule(params: { ruleId: string; }): Promise<{}>; /** * Delete a proxy rule by its unique ID. * * @param {string} ruleId - Rule ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ deleteRule(ruleId: string): Promise<{}>; /** * If not succeeded yet, retry verification process of a proxy rule domain. This endpoint triggers domain verification by checking DNS records. If verification is successful, a TLS certificate will be automatically provisioned for the domain asynchronously in the background. * * @param {string} params.ruleId - Rule ID. * @throws {AppwriteException} * @returns {Promise} */ updateRuleStatus(params: { ruleId: string; }): Promise; /** * If not succeeded yet, retry verification process of a proxy rule domain. This endpoint triggers domain verification by checking DNS records. If verification is successful, a TLS certificate will be automatically provisioned for the domain asynchronously in the background. * * @param {string} ruleId - Rule ID. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ updateRuleStatus(ruleId: string): Promise; } export { Proxy };