UNPKG

node-appwrite

Version:

Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API

1 lines 52.3 kB
{"version":3,"sources":["../../src/services/sites.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAQjE,IAAM,QAAN,MAAY;AAAA,EAGf,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,KAAK,SAAoB,QAA2C;AAChE,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,YAAY,aAAa;AAChC,cAAQ,SAAS,IAAI;AAAA,IACzB;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyBA,OAAO,QAAgB,MAAc,WAAsB,cAA4B,SAAmB,SAAmB,SAAkB,gBAAyB,cAAuB,iBAA0B,SAAmB,gBAAyB,cAAuB,sBAA+B,gBAAyB,oBAA8B,uBAAgC,eAA8C;AAC5b,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AACA,QAAI,OAAO,SAAS,aAAa;AAC7B,YAAM,IAAI,kBAAkB,oCAAoC;AAAA,IACpE;AACA,QAAI,OAAO,cAAc,aAAa;AAClC,YAAM,IAAI,kBAAkB,yCAAyC;AAAA,IACzE;AACA,QAAI,OAAO,iBAAiB,a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A;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,eAAe,QAAgB,YAAiC;AAC5D,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AACA,QAAI,OAAO,eAAe,aAAa;AACnC,YAAM,IAAI,kBAAkB,0CAA0C;AAAA,IAC1E;AACA,UAAM,UAAU,yCAAyC,QAAQ,YAAY,MAAM,EAAE,QAAQ,gBAAgB,UAAU;AACvH,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\nimport { Framework } from '../enums/framework';\nimport { BuildRuntime } from '../enums/build-runtime';\nimport { Adapter } from '../enums/adapter';\nimport { VCSDeploymentType } from '../enums/v-c-s-deployment-type';\nimport { DeploymentDownloadType } from '../enums/deployment-download-type';\n\nexport class Sites {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the project&#039;s sites. You can use the query params to filter your results.\n *\n * @param {string[]} queries\n * @param {string} search\n * @throws {AppwriteException}\n * @returns {Promise<Models.SiteList>}\n */\n list(queries?: string[], search?: string): Promise<Models.SiteList> {\n const apiPath = '/sites';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Create a new site.\n *\n * @param {string} siteId\n * @param {string} name\n * @param {Framework} framework\n * @param {BuildRuntime} buildRuntime\n * @param {boolean} enabled\n * @param {boolean} logging\n * @param {number} timeout\n * @param {string} installCommand\n * @param {string} buildCommand\n * @param {string} outputDirectory\n * @param {Adapter} adapter\n * @param {string} installationId\n * @param {string} fallbackFile\n * @param {string} providerRepositoryId\n * @param {string} providerBranch\n * @param {boolean} providerSilentMode\n * @param {string} providerRootDirectory\n * @param {string} specification\n * @throws {AppwriteException}\n * @returns {Promise<Models.Site>}\n */\n create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n if (typeof framework === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"framework\"');\n }\n if (typeof buildRuntime === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"buildRuntime\"');\n }\n const apiPath = '/sites';\n const payload: Payload = {};\n if (typeof siteId !== 'undefined') {\n payload['siteId'] = siteId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof framework !== 'undefined') {\n payload['framework'] = framework;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof logging !== 'undefined') {\n payload['logging'] = logging;\n }\n if (typeof timeout !== 'undefined') {\n payload['timeout'] = timeout;\n }\n if (typeof installCommand !== 'undefined') {\n payload['installCommand'] = installCommand;\n }\n if (typeof buildCommand !== 'undefined') {\n payload['buildCommand'] = buildCommand;\n }\n if (typeof outputDirectory !== 'undefined') {\n payload['outputDirectory'] = outputDirectory;\n }\n if (typeof buildRuntime !== 'undefined') {\n payload['buildRuntime'] = buildRuntime;\n }\n if (typeof adapter !== 'undefined') {\n payload['adapter'] = adapter;\n }\n if (typeof installationId !== 'undefined') {\n payload['installationId'] = installationId;\n }\n if (typeof fallbackFile !== 'undefined') {\n payload['fallbackFile'] = fallbackFile;\n }\n if (typeof providerRepositoryId !== 'undefined') {\n payload['providerRepositoryId'] = providerRepositoryId;\n }\n if (typeof providerBranch !== 'undefined') {\n payload['providerBranch'] = providerBranch;\n }\n if (typeof providerSilentMode !== 'undefined') {\n payload['providerSilentMode'] = providerSilentMode;\n }\n if (typeof providerRootDirectory !== 'undefined') {\n payload['providerRootDirectory'] = providerRootDirectory;\n }\n if (typeof specification !== 'undefined') {\n payload['specification'] = specification;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a list of all frameworks that are currently available on the server instance.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.FrameworkList>}\n */\n listFrameworks(): Promise<Models.FrameworkList> {\n const apiPath = '/sites/frameworks';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List allowed site specifications for this instance.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.SpecificationList>}\n */\n listSpecifications(): Promise<Models.SpecificationList> {\n const apiPath = '/sites/specifications';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a site by its unique ID.\n *\n * @param {string} siteId\n * @throws {AppwriteException}\n * @returns {Promise<Models.Site>}\n */\n get(siteId: string): Promise<Models.Site> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update site by its unique ID.\n *\n * @param {string} siteId\n * @param {string} name\n * @param {Framework} framework\n * @param {boolean} enabled\n * @param {boolean} logging\n * @param {number} timeout\n * @param {string} installCommand\n * @param {string} buildCommand\n * @param {string} outputDirectory\n * @param {BuildRuntime} buildRuntime\n * @param {Adapter} adapter\n * @param {string} fallbackFile\n * @param {string} installationId\n * @param {string} providerRepositoryId\n * @param {string} providerBranch\n * @param {boolean} providerSilentMode\n * @param {string} providerRootDirectory\n * @param {string} specification\n * @throws {AppwriteException}\n * @returns {Promise<Models.Site>}\n */\n update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n if (typeof framework === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"framework\"');\n }\n const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof framework !== 'undefined') {\n payload['framework'] = framework;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof logging !== 'undefined') {\n payload['logging'] = logging;\n }\n if (typeof timeout !== 'undefined') {\n payload['timeout'] = timeout;\n }\n if (typeof installCommand !== 'undefined') {\n payload['installCommand'] = installCommand;\n }\n if (typeof buildCommand !== 'undefined') {\n payload['buildCommand'] = buildCommand;\n }\n if (typeof outputDirectory !== 'undefined') {\n payload['outputDirectory'] = outputDirectory;\n }\n if (typeof buildRuntime !== 'undefined') {\n payload['buildRuntime'] = buildRuntime;\n }\n if (typeof adapter !== 'undefined') {\n payload['adapter'] = adapter;\n }\n if (typeof fallbackFile !== 'undefined') {\n payload['fallbackFile'] = fallbackFile;\n }\n if (typeof installationId !== 'undefined') {\n payload['installationId'] = installationId;\n }\n if (typeof providerRepositoryId !== 'undefined') {\n payload['providerRepositoryId'] = providerRepositoryId;\n }\n if (typeof providerBranch !== 'undefined') {\n payload['providerBranch'] = providerBranch;\n }\n if (typeof providerSilentMode !== 'undefined') {\n payload['providerSilentMode'] = providerSilentMode;\n }\n if (typeof providerRootDirectory !== 'undefined') {\n payload['providerRootDirectory'] = providerRootDirectory;\n }\n if (typeof specification !== 'undefined') {\n payload['specification'] = specification;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Delete a site by its unique ID.\n *\n * @param {string} siteId\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n delete(siteId: string): Promise<{}> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n const apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.\n *\n * @param {string} siteId\n * @param {string} deploymentId\n * @throws {AppwriteException}\n * @returns {Promise<Models.Site>}\n */\n updateSiteDeployment(siteId: string, deploymentId: string): Promise<Models.Site> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof deploymentId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"deploymentId\"');\n }\n const apiPath = '/sites/{siteId}/deployment'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof deploymentId !== 'undefined') {\n payload['deploymentId'] = deploymentId;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a list of all the site&#039;s code deployments. You can use the query params to filter your results.\n *\n * @param {string} siteId\n * @param {string[]} queries\n * @param {string} search\n * @throws {AppwriteException}\n * @returns {Promise<Models.DeploymentList>}\n */\n listDeployments(siteId: string, queries?: string[], search?: string): Promise<Models.DeploymentList> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment ID.\n *\n * @param {string} siteId\n * @param {File} code\n * @param {boolean} activate\n * @param {string} installCommand\n * @param {string} buildCommand\n * @param {string} outputDirectory\n * @throws {AppwriteException}\n * @returns {Promise<Models.Deployment>}\n */\n createDeployment(siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress = (progress: UploadProgress) => {}): Promise<Models.Deployment> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof code === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"code\"');\n }\n if (typeof activate === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"activate\"');\n }\n const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof installCommand !== 'undefined') {\n payload['installCommand'] = installCommand;\n }\n if (typeof buildCommand !== 'undefined') {\n payload['buildCommand'] = buildCommand;\n }\n if (typeof outputDirectory !== 'undefined') {\n payload['outputDirectory'] = outputDirectory;\n }\n if (typeof code !== 'undefined') {\n payload['code'] = code;\n }\n if (typeof activate !== 'undefined') {\n payload['activate'] = activate;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'multipart/form-data',\n }\n\n return this.client.chunkedUpload(\n 'post',\n uri,\n apiHeaders,\n payload,\n onProgress\n );\n }\n /**\n * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment&#039;s code will be preserved and used for the new build.\n *\n * @param {string} siteId\n * @param {string} deploymentId\n * @throws {AppwriteException}\n * @returns {Promise<Models.Deployment>}\n */\n createDuplicateDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof deploymentId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"deploymentId\"');\n }\n const apiPath = '/sites/{siteId}/deployments/duplicate'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof deploymentId !== 'undefined') {\n payload['deploymentId'] = deploymentId;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.\n *\n * @param {string} siteId\n * @param {string} repository\n * @param {string} owner\n * @param {string} rootDirectory\n * @param {string} version\n * @param {boolean} activate\n * @throws {AppwriteException}\n * @returns {Promise<Models.Deployment>}\n */\n createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, version: string, activate?: boolean): Promise<Models.Deployment> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof repository === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"repository\"');\n }\n if (typeof owner === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"owner\"');\n }\n if (typeof rootDirectory === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"rootDirectory\"');\n }\n if (typeof version === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"version\"');\n }\n const apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof repository !== 'undefined') {\n payload['repository'] = repository;\n }\n if (typeof owner !== 'undefined') {\n payload['owner'] = owner;\n }\n if (typeof rootDirectory !== 'undefined') {\n payload['rootDirectory'] = rootDirectory;\n }\n if (typeof version !== 'undefined') {\n payload['version'] = version;\n }\n if (typeof activate !== 'undefined') {\n payload['activate'] = activate;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.\n *\n * @param {string} siteId\n * @param {VCSDeploymentType} type\n * @param {string} reference\n * @param {boolean} activate\n * @throws {AppwriteException}\n * @returns {Promise<Models.Deployment>}\n */\n createVcsDeployment(siteId: string, type: VCSDeploymentType, reference: string, activate?: boolean): Promise<Models.Deployment> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof type === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"type\"');\n }\n if (typeof reference === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"reference\"');\n }\n const apiPath = '/sites/{siteId}/deployments/vcs'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof type !== 'undefined') {\n payload['type'] = type;\n }\n if (typeof reference !== 'undefined') {\n payload['reference'] = reference;\n }\n if (typeof activate !== 'undefined') {\n payload['activate'] = activate;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a site deployment by its unique ID.\n *\n * @param {string} siteId\n * @param {string} deploymentId\n * @throws {AppwriteException}\n * @returns {Promise<Models.Deployment>}\n */\n getDeployment(siteId: string, deploymentId: string): Promise<Models.Deployment> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof deploymentId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"deploymentId\"');\n }\n const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Delete a site deployment by its unique ID.\n *\n * @param {string} siteId\n * @param {string} deploymentId\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteDeployment(siteId: string, deploymentId: string): Promise<{}> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof deploymentId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"deploymentId\"');\n }\n const apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a site deployment content by its unique ID. The endpoint response return with a &#039;Content-Disposition: attachment&#039; header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} siteId\n * @param {string} deploymentId\n * @param {DeploymentDownloadType} type\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getDeploymentDownload(siteId: string, deploymentId: string, type?: DeploymentDownloadType): Promise<ArrayBuffer> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof deploymentId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"deploymentId\"');\n }\n const apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);\n const payload: Payload = {};\n if (typeof type !== 'undefined') {\n payload['type'] = type;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n /**\n * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn&#039;t started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status &#039;ready&#039;) or failed. The response includes the final build status and details.\n *\n * @param {string} siteId\n * @param {string} deploymentId\n * @throws {AppwriteException}\n * @returns {Promise<Models.Deployment>}\n */\n updateDeploymentStatus(siteId: string, deploymentId: string): Promise<Models.Deployment> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof deploymentId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"deploymentId\"');\n }\n const apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a list of all site logs. You can use the query params to filter your results.\n *\n * @param {string} siteId\n * @param {string[]} queries\n * @throws {AppwriteException}\n * @returns {Promise<Models.ExecutionList>}\n */\n listLogs(siteId: string, queries?: string[]): Promise<Models.ExecutionList> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n const apiPath = '/sites/{siteId}/logs'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a site request log by its unique ID.\n *\n * @param {string} siteId\n * @param {string} logId\n * @throws {AppwriteException}\n * @returns {Promise<Models.Execution>}\n */\n getLog(siteId: string, logId: string): Promise<Models.Execution> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof logId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"logId\"');\n }\n const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Delete a site log by its unique ID.\n *\n * @param {string} siteId\n * @param {string} logId\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteLog(siteId: string, logId: string): Promise<{}> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof logId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"logId\"');\n }\n const apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a list of all variables of a specific site.\n *\n * @param {string} siteId\n * @throws {AppwriteException}\n * @returns {Promise<Models.VariableList>}\n */\n listVariables(siteId: string): Promise<Models.VariableList> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.\n *\n * @param {string} siteId\n * @param {string} key\n * @param {string} value\n * @param {boolean} secret\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n */\n createVariable(siteId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof key === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"key\"');\n }\n if (typeof value === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"value\"');\n }\n const apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);\n const payload: Payload = {};\n if (typeof key !== 'undefined') {\n payload['key'] = key;\n }\n if (typeof value !== 'undefined') {\n payload['value'] = value;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Get a variable by its unique ID.\n *\n * @param {string} siteId\n * @param {string} variableId\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n */\n getVariable(siteId: string, variableId: string): Promise<Models.Variable> {\n if (typeof siteId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"siteId\"');\n }\n if (typeof variableId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"variableId\"');\n }\n const apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * Update variable by its unique ID.\n *\n * @param {string} siteId\n * @param {string} variableId\n * @param {string} key\n * @param {string} value\n * @param {boolean} secret\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n */\n updateVariable(siteId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable> {\n if (typeof s