node-appwrite 22.0.0 → 22.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +6 -5
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +6 -1477
- package/dist/client.mjs.map +1 -1
- package/dist/enums/backup-services.d.mts +7 -0
- package/dist/enums/backup-services.d.ts +7 -0
- package/dist/enums/backup-services.js +12 -0
- package/dist/enums/backup-services.js.map +1 -0
- package/dist/enums/backup-services.mjs +11 -0
- package/dist/enums/backup-services.mjs.map +1 -0
- package/dist/enums/build-runtime.d.mts +23 -4
- package/dist/enums/build-runtime.d.ts +23 -4
- package/dist/enums/build-runtime.js +22 -3
- package/dist/enums/build-runtime.js.map +1 -1
- package/dist/enums/build-runtime.mjs +22 -3
- package/dist/enums/build-runtime.mjs.map +1 -1
- package/dist/enums/runtime.d.mts +23 -4
- package/dist/enums/runtime.d.ts +23 -4
- package/dist/enums/runtime.js +22 -3
- package/dist/enums/runtime.js.map +1 -1
- package/dist/enums/runtime.mjs +22 -3
- package/dist/enums/runtime.mjs.map +1 -1
- package/dist/enums/scopes.d.mts +12 -1
- package/dist/enums/scopes.d.ts +12 -1
- package/dist/enums/scopes.js +11 -0
- package/dist/enums/scopes.js.map +1 -1
- package/dist/enums/scopes.mjs +11 -0
- package/dist/enums/scopes.mjs.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +396 -4
- package/dist/models.d.ts +396 -4
- package/dist/query.d.mts +22 -0
- package/dist/query.d.ts +22 -0
- package/dist/query.js +22 -0
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +22 -0
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.js +3 -3
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +3 -3
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/activities.d.mts +60 -0
- package/dist/services/activities.d.ts +60 -0
- package/dist/services/activities.js +61 -0
- package/dist/services/activities.js.map +1 -0
- package/dist/services/activities.mjs +60 -0
- package/dist/services/activities.mjs.map +1 -0
- package/dist/services/avatars.js +3 -3
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +3 -3
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/backups.d.mts +291 -0
- package/dist/services/backups.d.ts +291 -0
- package/dist/services/backups.js +404 -0
- package/dist/services/backups.js.map +1 -0
- package/dist/services/backups.mjs +403 -0
- package/dist/services/backups.mjs.map +1 -0
- package/dist/services/databases.d.mts +16 -4
- package/dist/services/databases.d.ts +16 -4
- package/dist/services/databases.js +24 -4
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +24 -4
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +95 -0
- package/dist/services/health.d.ts +95 -0
- package/dist/services/health.js +121 -1
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +121 -1
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/storage.d.mts +4 -4
- package/dist/services/storage.d.ts +4 -4
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +16 -4
- package/dist/services/tables-db.d.ts +16 -4
- package/dist/services/tables-db.js +24 -4
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +24 -4
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -9
- package/dist/services/teams.d.ts +8 -9
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/roles.d.mts +0 -7
- package/dist/enums/roles.d.ts +0 -7
- package/dist/enums/roles.js +0 -12
- package/dist/enums/roles.js.map +0 -1
- package/dist/en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AAA,IACJ;AAAA,EACJ;AAAA,EAmBA,eACI,eACiC;AACjC,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACvF,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,eAAe;AAAA,MACnB;AAAA,IACJ;AAEA,UAAM,gBAAgB,OAAO;AAE7B,QAAI,OAAO,kBAAkB,aAAa;AACtC,YAAM,IAAI,kBAAkB,6CAA6C;AAAA,IAC7E;AAEA,UAAM,UAAU,wCAAwC,QAAQ,mBAAmB,aAAa;AAChG,UAAM,UAAmB,CAAC;AAC1B,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;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { BackupServices } from '../enums/backup-services';\n\nexport class Backups {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * List all archives for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchiveList>}\n */\n listArchives(params?: { queries?: string[] }): Promise<Models.BackupArchiveList>;\n /**\n * List all archives for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchiveList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listArchives(queries?: string[]): Promise<Models.BackupArchiveList>;\n listArchives(\n paramsOrFirst?: { queries?: string[] } | string[] \n ): Promise<Models.BackupArchiveList> {\n let params: { queries?: string[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[] };\n } else {\n params = {\n queries: paramsOrFirst as string[] \n };\n }\n \n const queries = params.queries;\n\n\n const apiPath = '/backups/archives';\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 /**\n * Create a new archive asynchronously for a project.\n *\n * @param {BackupServices[]} params.services - Array of services to backup\n * @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n */\n createArchive(params: { services: BackupServices[], resourceId?: string }): Promise<Models.BackupArchive>;\n /**\n * Create a new archive asynchronously for a project.\n *\n * @param {BackupServices[]} services - Array of services to backup\n * @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createArchive(services: BackupServices[], resourceId?: string): Promise<Models.BackupArchive>;\n createArchive(\n paramsOrFirst: { services: BackupServices[], resourceId?: string } | BackupServices[],\n ...rest: [(string)?] \n ): Promise<Models.BackupArchive> {\n let params: { services: BackupServices[], resourceId?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { services: BackupServices[], resourceId?: string };\n } else {\n params = {\n services: paramsOrFirst as BackupServices[],\n resourceId: rest[0] as string \n };\n }\n \n const services = params.services;\n const resourceId = params.resourceId;\n\n if (typeof services === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"services\"');\n }\n\n const apiPath = '/backups/archives';\n const payload: Payload = {};\n if (typeof services !== 'undefined') {\n payload['services'] = services;\n }\n if (typeof resourceId !== 'undefined') {\n payload['resourceId'] = resourceId;\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 /**\n * Get a backup archive using it's ID.\n *\n * @param {string} params.archiveId - Archive ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n */\n getArchive(params: { archiveId: string }): Promise<Models.BackupArchive>;\n /**\n * Get a backup archive using it's ID.\n *\n * @param {string} archiveId - Archive ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getArchive(archiveId: string): Promise<Models.BackupArchive>;\n getArchive(\n paramsOrFirst: { archiveId: string } | string \n ): Promise<Models.BackupArchive> {\n let params: { archiveId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { archiveId: string };\n } else {\n params = {\n archiveId: paramsOrFirst as string \n };\n }\n \n const archiveId = params.archiveId;\n\n if (typeof archiveId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"archiveId\"');\n }\n\n const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', archiveId);\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 /**\n * Delete an existing archive for a project.\n *\n * @param {string} params.archiveId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteArchive(params: { archiveId: string }): Promise<{}>;\n /**\n * Delete an existing archive for a project.\n *\n * @param {string} archiveId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteArchive(archiveId: string): Promise<{}>;\n deleteArchive(\n paramsOrFirst: { archiveId: string } | string \n ): Promise<{}> {\n let params: { archiveId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { archiveId: string };\n } else {\n params = {\n archiveId: paramsOrFirst as string \n };\n }\n \n const archiveId = params.archiveId;\n\n if (typeof archiveId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"archiveId\"');\n }\n\n const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', archiveId);\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 /**\n * List all policies for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicyList>}\n */\n listPolicies(params?: { queries?: string[] }): Promise<Models.BackupPolicyList>;\n /**\n * List all policies for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicyList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listPolicies(queries?: string[]): Promise<Models.BackupPolicyList>;\n listPolicies(\n paramsOrFirst?: { queries?: string[] } | string[] \n ): Promise<Models.BackupPolicyList> {\n let params: { queries?: string[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[] };\n } else {\n params = {\n queries: paramsOrFirst as string[] \n };\n }\n \n const queries = params.queries;\n\n\n const apiPath = '/backups/policies';\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 /**\n * Create a new backup policy.\n *\n * @param {string} params.policyId - Policy 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.\n * @param {BackupServices[]} params.services - Array of services to backup\n * @param {number} params.retention - Days to keep backups before deletion\n * @param {string} params.schedule - Schedule CRON syntax.\n * @param {string} params.name - Policy name. Max length: 128 chars.\n * @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.\n * @param {boolean} params.enabled - Is policy enabled? When set to 'disabled', no backups will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n */\n createPolicy(params: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;\n /**\n * Create a new backup policy.\n *\n * @param {string} policyId - Policy 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.\n * @param {BackupServices[]} services - Array of services to backup\n * @param {number} retention - Days to keep backups before deletion\n * @param {string} schedule - Schedule CRON syntax.\n * @param {string} name - Policy name. Max length: 128 chars.\n * @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.\n * @param {boolean} enabled - Is policy enabled? When set to 'disabled', no backups will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createPolicy(policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;\n createPolicy(\n paramsOrFirst: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean } | string,\n ...rest: [(BackupServices[])?, (number)?, (string)?, (string)?, (string)?, (boolean)?] \n ): Promise<Models.BackupPolicy> {\n let params: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };\n } else {\n params = {\n policyId: paramsOrFirst as string,\n services: rest[0] as BackupServices[],\n retention: rest[1] as number,\n schedule: rest[2] as string,\n name: rest[3] as string,\n resourceId: rest[4] as string,\n enabled: rest[5] as boolean \n };\n }\n \n const policyId = params.policyId;\n const services = params.services;\n const retention = params.retention;\n const schedule = params.schedule;\n const name = params.name;\n const resourceId = params.resourceId;\n const enabled = params.enabled;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n if (typeof services === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"services\"');\n }\n if (typeof retention === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"retention\"');\n }\n if (typeof schedule === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"schedule\"');\n }\n\n const apiPath = '/backups/policies';\n const payload: Payload = {};\n if (typeof policyId !== 'undefined') {\n payload['policyId'] = policyId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof services !== 'undefined') {\n payload['services'] = services;\n }\n if (typeof resourceId !== 'undefined') {\n payload['resourceId'] = resourceId;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof retention !== 'undefined') {\n payload['retention'] = retention;\n }\n if (typeof schedule !== 'undefined') {\n payload['schedule'] = schedule;\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 /**\n * Get a backup policy using it's ID.\n *\n * @param {string} params.policyId - Policy ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n */\n getPolicy(params: { policyId: string }): Promise<Models.BackupPolicy>;\n /**\n * Get a backup policy using it's ID.\n *\n * @param {string} policyId - Policy ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getPolicy(policyId: string): Promise<Models.BackupPolicy>;\n getPolicy(\n paramsOrFirst: { policyId: string } | string \n ): Promise<Models.BackupPolicy> {\n let params: { policyId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string };\n } else {\n params = {\n policyId: paramsOrFirst as string \n };\n }\n \n const policyId = params.policyId;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n\n const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId);\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 /**\n * Update an existing policy using it's ID.\n *\n * @param {string} params.policyId - Policy ID. Choose a custom ID`. 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.\n * @param {string} params.name - Policy name. Max length: 128 chars.\n * @param {number} params.retention - Days to keep backups before deletion\n * @param {string} params.schedule - Cron expression\n * @param {boolean} params.enabled - Is Backup enabled? When set to 'disabled', No backup will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n */\n updatePolicy(params: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;\n /**\n * Update an existing policy using it's ID.\n *\n * @param {string} policyId - Policy ID. Choose a custom ID`. 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.\n * @param {string} name - Policy name. Max length: 128 chars.\n * @param {number} retention - Days to keep backups before deletion\n * @param {string} schedule - Cron expression\n * @param {boolean} enabled - Is Backup enabled? When set to 'disabled', No backup will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updatePolicy(policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;\n updatePolicy(\n paramsOrFirst: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean } | string,\n ...rest: [(string)?, (number)?, (string)?, (boolean)?] \n ): Promise<Models.BackupPolicy> {\n let params: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean };\n } else {\n params = {\n policyId: paramsOrFirst as string,\n name: rest[0] as string,\n retention: rest[1] as number,\n schedule: rest[2] as string,\n enabled: rest[3] as boolean \n };\n }\n \n const policyId = params.policyId;\n const name = params.name;\n const retention = params.retention;\n const schedule = params.schedule;\n const enabled = params.enabled;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n\n const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof retention !== 'undefined') {\n payload['retention'] = retention;\n }\n if (typeof schedule !== 'undefined') {\n payload['schedule'] = schedule;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\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 /**\n * Delete a policy using it's ID.\n *\n * @param {string} params.policyId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deletePolicy(params: { policyId: string }): Promise<{}>;\n /**\n * Delete a policy using it's ID.\n *\n * @param {string} policyId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deletePolicy(policyId: string): Promise<{}>;\n deletePolicy(\n paramsOrFirst: { policyId: string } | string \n ): Promise<{}> {\n let params: { policyId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string };\n } else {\n params = {\n policyId: paramsOrFirst as string \n };\n }\n \n const policyId = params.policyId;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n\n const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId);\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 /**\n * Create and trigger a new restoration for a backup on a project.\n *\n * @param {string} params.archiveId - Backup archive ID to restore\n * @param {BackupServices[]} params.services - Array of services to restore\n * @param {string} params.newResourceId - Unique 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.\n * @param {string} params.newResourceName - Database name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n */\n createRestoration(params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string }): Promise<Models.BackupRestoration>;\n /**\n * Create and trigger a new restoration for a backup on a project.\n *\n * @param {string} archiveId - Backup archive ID to restore\n * @param {BackupServices[]} services - Array of services to restore\n * @param {string} newResourceId - Unique 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.\n * @param {string} newResourceName - Database name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;\n createRestoration(\n paramsOrFirst: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string } | string,\n ...rest: [(BackupServices[])?, (string)?, (string)?] \n ): Promise<Models.BackupRestoration> {\n let params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string };\n } else {\n params = {\n archiveId: paramsOrFirst as string,\n services: rest[0] as BackupServices[],\n newResourceId: rest[1] as string,\n newResourceName: rest[2] as string \n };\n }\n \n const archiveId = params.archiveId;\n const services = params.services;\n const newResourceId = params.newResourceId;\n const newResourceName = params.newResourceName;\n\n if (typeof archiveId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"archiveId\"');\n }\n if (typeof services === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"services\"');\n }\n\n const apiPath = '/backups/restoration';\n const payload: Payload = {};\n if (typeof archiveId !== 'undefined') {\n payload['archiveId'] = archiveId;\n }\n if (typeof services !== 'undefined') {\n payload['services'] = services;\n }\n if (typeof newResourceId !== 'undefined') {\n payload['newResourceId'] = newResourceId;\n }\n if (typeof newResourceName !== 'undefined') {\n payload['newResourceName'] = newResourceName;\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 /**\n * List all backup restorations for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestorationList>}\n */\n listRestorations(params?: { queries?: string[] }): Promise<Models.BackupRestorationList>;\n /**\n * List all backup restorations for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestorationList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listRestorations(queries?: string[]): Promise<Models.BackupRestorationList>;\n listRestorations(\n paramsOrFirst?: { queries?: string[] } | string[] \n ): Promise<Models.BackupRestorationList> {\n let params: { queries?: string[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[] };\n } else {\n params = {\n queries: paramsOrFirst as string[] \n };\n }\n \n const queries = params.queries;\n\n\n const apiPath = '/backups/restorations';\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 /**\n * Get the current status of a backup restoration.\n *\n * @param {string} params.restorationId - Restoration ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n */\n getRestoration(params: { restorationId: string }): Promise<Models.BackupRestoration>;\n /**\n * Get the current status of a backup restoration.\n *\n * @param {string} restorationId - Restoration ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getRestoration(restorationId: string): Promise<Models.BackupRestoration>;\n getRestoration(\n paramsOrFirst: { restorationId: string } | string \n ): Promise<Models.BackupRestoration> {\n let params: { restorationId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { restorationId: string };\n } else {\n params = {\n restorationId: paramsOrFirst as string \n };\n }\n \n const restorationId = params.restorationId;\n\n if (typeof restorationId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"restorationId\"');\n }\n\n const apiPath = '/backups/restorations/{restorationId}'.replace('{restorationId}', restorationId);\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"]}
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import { AppwriteException } from '../client.mjs';
|
|
2
|
+
|
|
3
|
+
// src/services/backups.ts
|
|
4
|
+
var Backups = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
listArchives(paramsOrFirst) {
|
|
9
|
+
let params;
|
|
10
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11
|
+
params = paramsOrFirst || {};
|
|
12
|
+
} else {
|
|
13
|
+
params = {
|
|
14
|
+
queries: paramsOrFirst
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const queries = params.queries;
|
|
18
|
+
const apiPath = "/backups/archives";
|
|
19
|
+
const payload = {};
|
|
20
|
+
if (typeof queries !== "undefined") {
|
|
21
|
+
payload["queries"] = queries;
|
|
22
|
+
}
|
|
23
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24
|
+
const apiHeaders = {};
|
|
25
|
+
return this.client.call(
|
|
26
|
+
"get",
|
|
27
|
+
uri,
|
|
28
|
+
apiHeaders,
|
|
29
|
+
payload
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
createArchive(paramsOrFirst, ...rest) {
|
|
33
|
+
let params;
|
|
34
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("services" in paramsOrFirst || "resourceId" in paramsOrFirst)) {
|
|
35
|
+
params = paramsOrFirst || {};
|
|
36
|
+
} else {
|
|
37
|
+
params = {
|
|
38
|
+
services: paramsOrFirst,
|
|
39
|
+
resourceId: rest[0]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const services = params.services;
|
|
43
|
+
const resourceId = params.resourceId;
|
|
44
|
+
if (typeof services === "undefined") {
|
|
45
|
+
throw new AppwriteException('Missing required parameter: "services"');
|
|
46
|
+
}
|
|
47
|
+
const apiPath = "/backups/archives";
|
|
48
|
+
const payload = {};
|
|
49
|
+
if (typeof services !== "undefined") {
|
|
50
|
+
payload["services"] = services;
|
|
51
|
+
}
|
|
52
|
+
if (typeof resourceId !== "undefined") {
|
|
53
|
+
payload["resourceId"] = resourceId;
|
|
54
|
+
}
|
|
55
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
56
|
+
const apiHeaders = {
|
|
57
|
+
"content-type": "application/json"
|
|
58
|
+
};
|
|
59
|
+
return this.client.call(
|
|
60
|
+
"post",
|
|
61
|
+
uri,
|
|
62
|
+
apiHeaders,
|
|
63
|
+
payload
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
getArchive(paramsOrFirst) {
|
|
67
|
+
let params;
|
|
68
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
69
|
+
params = paramsOrFirst || {};
|
|
70
|
+
} else {
|
|
71
|
+
params = {
|
|
72
|
+
archiveId: paramsOrFirst
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const archiveId = params.archiveId;
|
|
76
|
+
if (typeof archiveId === "undefined") {
|
|
77
|
+
throw new AppwriteException('Missing required parameter: "archiveId"');
|
|
78
|
+
}
|
|
79
|
+
const apiPath = "/backups/archives/{archiveId}".replace("{archiveId}", archiveId);
|
|
80
|
+
const payload = {};
|
|
81
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
82
|
+
const apiHeaders = {};
|
|
83
|
+
return this.client.call(
|
|
84
|
+
"get",
|
|
85
|
+
uri,
|
|
86
|
+
apiHeaders,
|
|
87
|
+
payload
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
deleteArchive(paramsOrFirst) {
|
|
91
|
+
let params;
|
|
92
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
93
|
+
params = paramsOrFirst || {};
|
|
94
|
+
} else {
|
|
95
|
+
params = {
|
|
96
|
+
archiveId: paramsOrFirst
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
const archiveId = params.archiveId;
|
|
100
|
+
if (typeof archiveId === "undefined") {
|
|
101
|
+
throw new AppwriteException('Missing required parameter: "archiveId"');
|
|
102
|
+
}
|
|
103
|
+
const apiPath = "/backups/archives/{archiveId}".replace("{archiveId}", archiveId);
|
|
104
|
+
const payload = {};
|
|
105
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
106
|
+
const apiHeaders = {
|
|
107
|
+
"content-type": "application/json"
|
|
108
|
+
};
|
|
109
|
+
return this.client.call(
|
|
110
|
+
"delete",
|
|
111
|
+
uri,
|
|
112
|
+
apiHeaders,
|
|
113
|
+
payload
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
listPolicies(paramsOrFirst) {
|
|
117
|
+
let params;
|
|
118
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
119
|
+
params = paramsOrFirst || {};
|
|
120
|
+
} else {
|
|
121
|
+
params = {
|
|
122
|
+
queries: paramsOrFirst
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const queries = params.queries;
|
|
126
|
+
const apiPath = "/backups/policies";
|
|
127
|
+
const payload = {};
|
|
128
|
+
if (typeof queries !== "undefined") {
|
|
129
|
+
payload["queries"] = queries;
|
|
130
|
+
}
|
|
131
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
132
|
+
const apiHeaders = {};
|
|
133
|
+
return this.client.call(
|
|
134
|
+
"get",
|
|
135
|
+
uri,
|
|
136
|
+
apiHeaders,
|
|
137
|
+
payload
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
createPolicy(paramsOrFirst, ...rest) {
|
|
141
|
+
let params;
|
|
142
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
143
|
+
params = paramsOrFirst || {};
|
|
144
|
+
} else {
|
|
145
|
+
params = {
|
|
146
|
+
policyId: paramsOrFirst,
|
|
147
|
+
services: rest[0],
|
|
148
|
+
retention: rest[1],
|
|
149
|
+
schedule: rest[2],
|
|
150
|
+
name: rest[3],
|
|
151
|
+
resourceId: rest[4],
|
|
152
|
+
enabled: rest[5]
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
const policyId = params.policyId;
|
|
156
|
+
const services = params.services;
|
|
157
|
+
const retention = params.retention;
|
|
158
|
+
const schedule = params.schedule;
|
|
159
|
+
const name = params.name;
|
|
160
|
+
const resourceId = params.resourceId;
|
|
161
|
+
const enabled = params.enabled;
|
|
162
|
+
if (typeof policyId === "undefined") {
|
|
163
|
+
throw new AppwriteException('Missing required parameter: "policyId"');
|
|
164
|
+
}
|
|
165
|
+
if (typeof services === "undefined") {
|
|
166
|
+
throw new AppwriteException('Missing required parameter: "services"');
|
|
167
|
+
}
|
|
168
|
+
if (typeof retention === "undefined") {
|
|
169
|
+
throw new AppwriteException('Missing required parameter: "retention"');
|
|
170
|
+
}
|
|
171
|
+
if (typeof schedule === "undefined") {
|
|
172
|
+
throw new AppwriteException('Missing required parameter: "schedule"');
|
|
173
|
+
}
|
|
174
|
+
const apiPath = "/backups/policies";
|
|
175
|
+
const payload = {};
|
|
176
|
+
if (typeof policyId !== "undefined") {
|
|
177
|
+
payload["policyId"] = policyId;
|
|
178
|
+
}
|
|
179
|
+
if (typeof name !== "undefined") {
|
|
180
|
+
payload["name"] = name;
|
|
181
|
+
}
|
|
182
|
+
if (typeof services !== "undefined") {
|
|
183
|
+
payload["services"] = services;
|
|
184
|
+
}
|
|
185
|
+
if (typeof resourceId !== "undefined") {
|
|
186
|
+
payload["resourceId"] = resourceId;
|
|
187
|
+
}
|
|
188
|
+
if (typeof enabled !== "undefined") {
|
|
189
|
+
payload["enabled"] = enabled;
|
|
190
|
+
}
|
|
191
|
+
if (typeof retention !== "undefined") {
|
|
192
|
+
payload["retention"] = retention;
|
|
193
|
+
}
|
|
194
|
+
if (typeof schedule !== "undefined") {
|
|
195
|
+
payload["schedule"] = schedule;
|
|
196
|
+
}
|
|
197
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
198
|
+
const apiHeaders = {
|
|
199
|
+
"content-type": "application/json"
|
|
200
|
+
};
|
|
201
|
+
return this.client.call(
|
|
202
|
+
"post",
|
|
203
|
+
uri,
|
|
204
|
+
apiHeaders,
|
|
205
|
+
payload
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
getPolicy(paramsOrFirst) {
|
|
209
|
+
let params;
|
|
210
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
211
|
+
params = paramsOrFirst || {};
|
|
212
|
+
} else {
|
|
213
|
+
params = {
|
|
214
|
+
policyId: paramsOrFirst
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
const policyId = params.policyId;
|
|
218
|
+
if (typeof policyId === "undefined") {
|
|
219
|
+
throw new AppwriteException('Missing required parameter: "policyId"');
|
|
220
|
+
}
|
|
221
|
+
const apiPath = "/backups/policies/{policyId}".replace("{policyId}", policyId);
|
|
222
|
+
const payload = {};
|
|
223
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
224
|
+
const apiHeaders = {};
|
|
225
|
+
return this.client.call(
|
|
226
|
+
"get",
|
|
227
|
+
uri,
|
|
228
|
+
apiHeaders,
|
|
229
|
+
payload
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
updatePolicy(paramsOrFirst, ...rest) {
|
|
233
|
+
let params;
|
|
234
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
235
|
+
params = paramsOrFirst || {};
|
|
236
|
+
} else {
|
|
237
|
+
params = {
|
|
238
|
+
policyId: paramsOrFirst,
|
|
239
|
+
name: rest[0],
|
|
240
|
+
retention: rest[1],
|
|
241
|
+
schedule: rest[2],
|
|
242
|
+
enabled: rest[3]
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
const policyId = params.policyId;
|
|
246
|
+
const name = params.name;
|
|
247
|
+
const retention = params.retention;
|
|
248
|
+
const schedule = params.schedule;
|
|
249
|
+
const enabled = params.enabled;
|
|
250
|
+
if (typeof policyId === "undefined") {
|
|
251
|
+
throw new AppwriteException('Missing required parameter: "policyId"');
|
|
252
|
+
}
|
|
253
|
+
const apiPath = "/backups/policies/{policyId}".replace("{policyId}", policyId);
|
|
254
|
+
const payload = {};
|
|
255
|
+
if (typeof name !== "undefined") {
|
|
256
|
+
payload["name"] = name;
|
|
257
|
+
}
|
|
258
|
+
if (typeof retention !== "undefined") {
|
|
259
|
+
payload["retention"] = retention;
|
|
260
|
+
}
|
|
261
|
+
if (typeof schedule !== "undefined") {
|
|
262
|
+
payload["schedule"] = schedule;
|
|
263
|
+
}
|
|
264
|
+
if (typeof enabled !== "undefined") {
|
|
265
|
+
payload["enabled"] = enabled;
|
|
266
|
+
}
|
|
267
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
268
|
+
const apiHeaders = {
|
|
269
|
+
"content-type": "application/json"
|
|
270
|
+
};
|
|
271
|
+
return this.client.call(
|
|
272
|
+
"patch",
|
|
273
|
+
uri,
|
|
274
|
+
apiHeaders,
|
|
275
|
+
payload
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
deletePolicy(paramsOrFirst) {
|
|
279
|
+
let params;
|
|
280
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
281
|
+
params = paramsOrFirst || {};
|
|
282
|
+
} else {
|
|
283
|
+
params = {
|
|
284
|
+
policyId: paramsOrFirst
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
const policyId = params.policyId;
|
|
288
|
+
if (typeof policyId === "undefined") {
|
|
289
|
+
throw new AppwriteException('Missing required parameter: "policyId"');
|
|
290
|
+
}
|
|
291
|
+
const apiPath = "/backups/policies/{policyId}".replace("{policyId}", policyId);
|
|
292
|
+
const payload = {};
|
|
293
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
294
|
+
const apiHeaders = {
|
|
295
|
+
"content-type": "application/json"
|
|
296
|
+
};
|
|
297
|
+
return this.client.call(
|
|
298
|
+
"delete",
|
|
299
|
+
uri,
|
|
300
|
+
apiHeaders,
|
|
301
|
+
payload
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
createRestoration(paramsOrFirst, ...rest) {
|
|
305
|
+
let params;
|
|
306
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
307
|
+
params = paramsOrFirst || {};
|
|
308
|
+
} else {
|
|
309
|
+
params = {
|
|
310
|
+
archiveId: paramsOrFirst,
|
|
311
|
+
services: rest[0],
|
|
312
|
+
newResourceId: rest[1],
|
|
313
|
+
newResourceName: rest[2]
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const archiveId = params.archiveId;
|
|
317
|
+
const services = params.services;
|
|
318
|
+
const newResourceId = params.newResourceId;
|
|
319
|
+
const newResourceName = params.newResourceName;
|
|
320
|
+
if (typeof archiveId === "undefined") {
|
|
321
|
+
throw new AppwriteException('Missing required parameter: "archiveId"');
|
|
322
|
+
}
|
|
323
|
+
if (typeof services === "undefined") {
|
|
324
|
+
throw new AppwriteException('Missing required parameter: "services"');
|
|
325
|
+
}
|
|
326
|
+
const apiPath = "/backups/restoration";
|
|
327
|
+
const payload = {};
|
|
328
|
+
if (typeof archiveId !== "undefined") {
|
|
329
|
+
payload["archiveId"] = archiveId;
|
|
330
|
+
}
|
|
331
|
+
if (typeof services !== "undefined") {
|
|
332
|
+
payload["services"] = services;
|
|
333
|
+
}
|
|
334
|
+
if (typeof newResourceId !== "undefined") {
|
|
335
|
+
payload["newResourceId"] = newResourceId;
|
|
336
|
+
}
|
|
337
|
+
if (typeof newResourceName !== "undefined") {
|
|
338
|
+
payload["newResourceName"] = newResourceName;
|
|
339
|
+
}
|
|
340
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
341
|
+
const apiHeaders = {
|
|
342
|
+
"content-type": "application/json"
|
|
343
|
+
};
|
|
344
|
+
return this.client.call(
|
|
345
|
+
"post",
|
|
346
|
+
uri,
|
|
347
|
+
apiHeaders,
|
|
348
|
+
payload
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
listRestorations(paramsOrFirst) {
|
|
352
|
+
let params;
|
|
353
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
354
|
+
params = paramsOrFirst || {};
|
|
355
|
+
} else {
|
|
356
|
+
params = {
|
|
357
|
+
queries: paramsOrFirst
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
const queries = params.queries;
|
|
361
|
+
const apiPath = "/backups/restorations";
|
|
362
|
+
const payload = {};
|
|
363
|
+
if (typeof queries !== "undefined") {
|
|
364
|
+
payload["queries"] = queries;
|
|
365
|
+
}
|
|
366
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
367
|
+
const apiHeaders = {};
|
|
368
|
+
return this.client.call(
|
|
369
|
+
"get",
|
|
370
|
+
uri,
|
|
371
|
+
apiHeaders,
|
|
372
|
+
payload
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
getRestoration(paramsOrFirst) {
|
|
376
|
+
let params;
|
|
377
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
378
|
+
params = paramsOrFirst || {};
|
|
379
|
+
} else {
|
|
380
|
+
params = {
|
|
381
|
+
restorationId: paramsOrFirst
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
const restorationId = params.restorationId;
|
|
385
|
+
if (typeof restorationId === "undefined") {
|
|
386
|
+
throw new AppwriteException('Missing required parameter: "restorationId"');
|
|
387
|
+
}
|
|
388
|
+
const apiPath = "/backups/restorations/{restorationId}".replace("{restorationId}", restorationId);
|
|
389
|
+
const payload = {};
|
|
390
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
391
|
+
const apiHeaders = {};
|
|
392
|
+
return this.client.call(
|
|
393
|
+
"get",
|
|
394
|
+
uri,
|
|
395
|
+
apiHeaders,
|
|
396
|
+
payload
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
export { Backups };
|
|
402
|
+
//# sourceMappingURL=out.js.map
|
|
403
|
+
//# sourceMappingURL=backups.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/services/backups.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAKjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAmBA,aACI,eACiC;AACjC,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,SAAS;AAAA,MACb;AAAA,IACJ;AAEA,UAAM,UAAU,OAAO;AAGvB,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,YAAY,aAAa;AAChC,cAAQ,SAAS,IAAI;AAAA,IACzB;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,EAqBA,cACI,kBACG,MAC0B;AAC7B,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,MAAM,cAAc,iBAAiB,gBAAgB,gBAAiB;AACzJ,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;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U,OAAO;AAGvB,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,YAAY,aAAa;AAChC,cAAQ,SAAS,IAAI;AAAA,IACzB;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,EAmBA,eACI,eACiC;AACjC,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACvF,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,eAAe;AAAA,MACnB;AAAA,IACJ;AAEA,UAAM,gBAAgB,OAAO;AAE7B,QAAI,OAAO,kBAAkB,aAAa;AACtC,YAAM,IAAI,kBAAkB,6CAA6C;AAAA,IAC7E;AAEA,UAAM,UAAU,wCAAwC,QAAQ,mBAAmB,aAAa;AAChG,UAAM,UAAmB,CAAC;AAC1B,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;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { BackupServices } from '../enums/backup-services';\n\nexport class Backups {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * List all archives for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchiveList>}\n */\n listArchives(params?: { queries?: string[] }): Promise<Models.BackupArchiveList>;\n /**\n * List all archives for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchiveList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listArchives(queries?: string[]): Promise<Models.BackupArchiveList>;\n listArchives(\n paramsOrFirst?: { queries?: string[] } | string[] \n ): Promise<Models.BackupArchiveList> {\n let params: { queries?: string[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[] };\n } else {\n params = {\n queries: paramsOrFirst as string[] \n };\n }\n \n const queries = params.queries;\n\n\n const apiPath = '/backups/archives';\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 /**\n * Create a new archive asynchronously for a project.\n *\n * @param {BackupServices[]} params.services - Array of services to backup\n * @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n */\n createArchive(params: { services: BackupServices[], resourceId?: string }): Promise<Models.BackupArchive>;\n /**\n * Create a new archive asynchronously for a project.\n *\n * @param {BackupServices[]} services - Array of services to backup\n * @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createArchive(services: BackupServices[], resourceId?: string): Promise<Models.BackupArchive>;\n createArchive(\n paramsOrFirst: { services: BackupServices[], resourceId?: string } | BackupServices[],\n ...rest: [(string)?] \n ): Promise<Models.BackupArchive> {\n let params: { services: BackupServices[], resourceId?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('services' in paramsOrFirst || 'resourceId' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { services: BackupServices[], resourceId?: string };\n } else {\n params = {\n services: paramsOrFirst as BackupServices[],\n resourceId: rest[0] as string \n };\n }\n \n const services = params.services;\n const resourceId = params.resourceId;\n\n if (typeof services === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"services\"');\n }\n\n const apiPath = '/backups/archives';\n const payload: Payload = {};\n if (typeof services !== 'undefined') {\n payload['services'] = services;\n }\n if (typeof resourceId !== 'undefined') {\n payload['resourceId'] = resourceId;\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 /**\n * Get a backup archive using it's ID.\n *\n * @param {string} params.archiveId - Archive ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n */\n getArchive(params: { archiveId: string }): Promise<Models.BackupArchive>;\n /**\n * Get a backup archive using it's ID.\n *\n * @param {string} archiveId - Archive ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupArchive>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getArchive(archiveId: string): Promise<Models.BackupArchive>;\n getArchive(\n paramsOrFirst: { archiveId: string } | string \n ): Promise<Models.BackupArchive> {\n let params: { archiveId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { archiveId: string };\n } else {\n params = {\n archiveId: paramsOrFirst as string \n };\n }\n \n const archiveId = params.archiveId;\n\n if (typeof archiveId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"archiveId\"');\n }\n\n const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', archiveId);\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 /**\n * Delete an existing archive for a project.\n *\n * @param {string} params.archiveId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteArchive(params: { archiveId: string }): Promise<{}>;\n /**\n * Delete an existing archive for a project.\n *\n * @param {string} archiveId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteArchive(archiveId: string): Promise<{}>;\n deleteArchive(\n paramsOrFirst: { archiveId: string } | string \n ): Promise<{}> {\n let params: { archiveId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { archiveId: string };\n } else {\n params = {\n archiveId: paramsOrFirst as string \n };\n }\n \n const archiveId = params.archiveId;\n\n if (typeof archiveId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"archiveId\"');\n }\n\n const apiPath = '/backups/archives/{archiveId}'.replace('{archiveId}', archiveId);\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 /**\n * List all policies for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicyList>}\n */\n listPolicies(params?: { queries?: string[] }): Promise<Models.BackupPolicyList>;\n /**\n * List all policies for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicyList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listPolicies(queries?: string[]): Promise<Models.BackupPolicyList>;\n listPolicies(\n paramsOrFirst?: { queries?: string[] } | string[] \n ): Promise<Models.BackupPolicyList> {\n let params: { queries?: string[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[] };\n } else {\n params = {\n queries: paramsOrFirst as string[] \n };\n }\n \n const queries = params.queries;\n\n\n const apiPath = '/backups/policies';\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 /**\n * Create a new backup policy.\n *\n * @param {string} params.policyId - Policy 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.\n * @param {BackupServices[]} params.services - Array of services to backup\n * @param {number} params.retention - Days to keep backups before deletion\n * @param {string} params.schedule - Schedule CRON syntax.\n * @param {string} params.name - Policy name. Max length: 128 chars.\n * @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.\n * @param {boolean} params.enabled - Is policy enabled? When set to 'disabled', no backups will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n */\n createPolicy(params: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;\n /**\n * Create a new backup policy.\n *\n * @param {string} policyId - Policy 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.\n * @param {BackupServices[]} services - Array of services to backup\n * @param {number} retention - Days to keep backups before deletion\n * @param {string} schedule - Schedule CRON syntax.\n * @param {string} name - Policy name. Max length: 128 chars.\n * @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.\n * @param {boolean} enabled - Is policy enabled? When set to 'disabled', no backups will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createPolicy(policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;\n createPolicy(\n paramsOrFirst: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean } | string,\n ...rest: [(BackupServices[])?, (number)?, (string)?, (string)?, (string)?, (boolean)?] \n ): Promise<Models.BackupPolicy> {\n let params: { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };\n } else {\n params = {\n policyId: paramsOrFirst as string,\n services: rest[0] as BackupServices[],\n retention: rest[1] as number,\n schedule: rest[2] as string,\n name: rest[3] as string,\n resourceId: rest[4] as string,\n enabled: rest[5] as boolean \n };\n }\n \n const policyId = params.policyId;\n const services = params.services;\n const retention = params.retention;\n const schedule = params.schedule;\n const name = params.name;\n const resourceId = params.resourceId;\n const enabled = params.enabled;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n if (typeof services === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"services\"');\n }\n if (typeof retention === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"retention\"');\n }\n if (typeof schedule === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"schedule\"');\n }\n\n const apiPath = '/backups/policies';\n const payload: Payload = {};\n if (typeof policyId !== 'undefined') {\n payload['policyId'] = policyId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof services !== 'undefined') {\n payload['services'] = services;\n }\n if (typeof resourceId !== 'undefined') {\n payload['resourceId'] = resourceId;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof retention !== 'undefined') {\n payload['retention'] = retention;\n }\n if (typeof schedule !== 'undefined') {\n payload['schedule'] = schedule;\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 /**\n * Get a backup policy using it's ID.\n *\n * @param {string} params.policyId - Policy ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n */\n getPolicy(params: { policyId: string }): Promise<Models.BackupPolicy>;\n /**\n * Get a backup policy using it's ID.\n *\n * @param {string} policyId - Policy ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getPolicy(policyId: string): Promise<Models.BackupPolicy>;\n getPolicy(\n paramsOrFirst: { policyId: string } | string \n ): Promise<Models.BackupPolicy> {\n let params: { policyId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string };\n } else {\n params = {\n policyId: paramsOrFirst as string \n };\n }\n \n const policyId = params.policyId;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n\n const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId);\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 /**\n * Update an existing policy using it's ID.\n *\n * @param {string} params.policyId - Policy ID. Choose a custom ID`. 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.\n * @param {string} params.name - Policy name. Max length: 128 chars.\n * @param {number} params.retention - Days to keep backups before deletion\n * @param {string} params.schedule - Cron expression\n * @param {boolean} params.enabled - Is Backup enabled? When set to 'disabled', No backup will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n */\n updatePolicy(params: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;\n /**\n * Update an existing policy using it's ID.\n *\n * @param {string} policyId - Policy ID. Choose a custom ID`. 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.\n * @param {string} name - Policy name. Max length: 128 chars.\n * @param {number} retention - Days to keep backups before deletion\n * @param {string} schedule - Cron expression\n * @param {boolean} enabled - Is Backup enabled? When set to 'disabled', No backup will be taken\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupPolicy>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updatePolicy(policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;\n updatePolicy(\n paramsOrFirst: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean } | string,\n ...rest: [(string)?, (number)?, (string)?, (boolean)?] \n ): Promise<Models.BackupPolicy> {\n let params: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean };\n } else {\n params = {\n policyId: paramsOrFirst as string,\n name: rest[0] as string,\n retention: rest[1] as number,\n schedule: rest[2] as string,\n enabled: rest[3] as boolean \n };\n }\n \n const policyId = params.policyId;\n const name = params.name;\n const retention = params.retention;\n const schedule = params.schedule;\n const enabled = params.enabled;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n\n const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof retention !== 'undefined') {\n payload['retention'] = retention;\n }\n if (typeof schedule !== 'undefined') {\n payload['schedule'] = schedule;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\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 /**\n * Delete a policy using it's ID.\n *\n * @param {string} params.policyId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deletePolicy(params: { policyId: string }): Promise<{}>;\n /**\n * Delete a policy using it's ID.\n *\n * @param {string} policyId - Policy 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.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deletePolicy(policyId: string): Promise<{}>;\n deletePolicy(\n paramsOrFirst: { policyId: string } | string \n ): Promise<{}> {\n let params: { policyId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { policyId: string };\n } else {\n params = {\n policyId: paramsOrFirst as string \n };\n }\n \n const policyId = params.policyId;\n\n if (typeof policyId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"policyId\"');\n }\n\n const apiPath = '/backups/policies/{policyId}'.replace('{policyId}', policyId);\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 /**\n * Create and trigger a new restoration for a backup on a project.\n *\n * @param {string} params.archiveId - Backup archive ID to restore\n * @param {BackupServices[]} params.services - Array of services to restore\n * @param {string} params.newResourceId - Unique 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.\n * @param {string} params.newResourceName - Database name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n */\n createRestoration(params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string }): Promise<Models.BackupRestoration>;\n /**\n * Create and trigger a new restoration for a backup on a project.\n *\n * @param {string} archiveId - Backup archive ID to restore\n * @param {BackupServices[]} services - Array of services to restore\n * @param {string} newResourceId - Unique 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.\n * @param {string} newResourceName - Database name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;\n createRestoration(\n paramsOrFirst: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string } | string,\n ...rest: [(BackupServices[])?, (string)?, (string)?] \n ): Promise<Models.BackupRestoration> {\n let params: { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string };\n } else {\n params = {\n archiveId: paramsOrFirst as string,\n services: rest[0] as BackupServices[],\n newResourceId: rest[1] as string,\n newResourceName: rest[2] as string \n };\n }\n \n const archiveId = params.archiveId;\n const services = params.services;\n const newResourceId = params.newResourceId;\n const newResourceName = params.newResourceName;\n\n if (typeof archiveId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"archiveId\"');\n }\n if (typeof services === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"services\"');\n }\n\n const apiPath = '/backups/restoration';\n const payload: Payload = {};\n if (typeof archiveId !== 'undefined') {\n payload['archiveId'] = archiveId;\n }\n if (typeof services !== 'undefined') {\n payload['services'] = services;\n }\n if (typeof newResourceId !== 'undefined') {\n payload['newResourceId'] = newResourceId;\n }\n if (typeof newResourceName !== 'undefined') {\n payload['newResourceName'] = newResourceName;\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 /**\n * List all backup restorations for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestorationList>}\n */\n listRestorations(params?: { queries?: string[] }): Promise<Models.BackupRestorationList>;\n /**\n * List all backup restorations for a project.\n *\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestorationList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listRestorations(queries?: string[]): Promise<Models.BackupRestorationList>;\n listRestorations(\n paramsOrFirst?: { queries?: string[] } | string[] \n ): Promise<Models.BackupRestorationList> {\n let params: { queries?: string[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[] };\n } else {\n params = {\n queries: paramsOrFirst as string[] \n };\n }\n \n const queries = params.queries;\n\n\n const apiPath = '/backups/restorations';\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 /**\n * Get the current status of a backup restoration.\n *\n * @param {string} params.restorationId - Restoration ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n */\n getRestoration(params: { restorationId: string }): Promise<Models.BackupRestoration>;\n /**\n * Get the current status of a backup restoration.\n *\n * @param {string} restorationId - Restoration ID. Choose a custom ID`. 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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BackupRestoration>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getRestoration(restorationId: string): Promise<Models.BackupRestoration>;\n getRestoration(\n paramsOrFirst: { restorationId: string } | string \n ): Promise<Models.BackupRestoration> {\n let params: { restorationId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { restorationId: string };\n } else {\n params = {\n restorationId: paramsOrFirst as string \n };\n }\n \n const restorationId = params.restorationId;\n\n if (typeof restorationId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"restorationId\"');\n }\n\n const apiPath = '/backups/restorations/{restorationId}'.replace('{restorationId}', restorationId);\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"]}
|